key value query interface and endpoints

Description

None

Activity

Show:
Ward Schweitzer
May 4, 2020, 9:28 PM

Historically, in MMS 3, the MDK relied on a ‘depth’ parameter supplied to the elements endpoint which allowed it to obtain elements related to the provided element id.

MMS 4 is moving away from this design, and instead is expected to rely on graph queries to find related elements. But, to allow MMS 4 related MDK work to move forward in the near term, we have added two search endpoints to support MDK development work.

  1. GET /projects/{projectId}/refs/{refId}/search
    User can supply multiple query key/value query parameters. The default implementation will use an elastic search term search and return all hits in the given project/branch.
    Example usage:
    {{host}}/projects/project_a/refs/master/search?name=x
    This example would return all elements in project_a/master with the name “x”

  2. POST /projects/{projectId}/refs/{refId}/search
    This endpoint works the same as the GET endpoint, but has additional recursive search capability.
    Example body content:

    The “params” object is a key/value map of the initial search parameters, like the parameters passed in the GET endpoint. The additional “recurse” object is a key/key map of how the search should continue recursively. In the above example, the recurse object instructs the search to use the “id” value of each hit as the value of “ownerId” in additional searches. Thus, the example shown will return element id=x and all of its children, grandchildren, etc.

 

Assignee

Ward Schweitzer

Reporter

Doris Lam

Labels

None

Sprint

Priority

Medium
Configure