Jira Legacy | ||||||||
---|---|---|---|---|---|---|---|---|
|
...
Payload Filter Format
Anchor | ||||
---|---|---|---|---|
|
The filter data can be provided on any filtered, using JSON format, on one field at any level, but it is important to provide the entire path from the root. The below mention JSON is used as an example to explain the filtering format
...
The filtering scenarios and the format to be used for each is are defined below:
No | Type of fieldFilter Condition | To be search | Format |
---|---|---|---|
1 | Top-level field Field | idNearRTRIC | { "idNearRTRIC": "1"} |
2 | Nested Field | nestedObject → id | { "nestedObject" : {"attributes" : {"gNBDUId": 4.0 }} } |
3 | valueValue(s) in a collection | labels | { "labels": ["cps"] } |
4 | field Field of an object inside a collection | GNBDUFunction → idGNBDUFunction | { "GNBDUFunction" : [ {"idGNBDUFunction" : 5 }] } |
Proposed APIs
Currently, we are not supporting all the filtering criteria defined in the overview. The supported ones are defined below and The GET Endpoints URIs depends on the CPS datatype and rest of the filtering criteria are passed as query parameter. The supported query parameters are
- after - timestamp ( ISO Format) to consider data created after the specified Timestamp
- payload - to define payload filtering criteria
- index - to define the page number (required for pagination)
- maxSize - to limit the response size
- pointInTime - to consider data changed or added before this time.
- sortBy - to define the order of data in the result set
The response format for all GET APIs endpoints is the same and defined here
By Dataspace and Anchor
URL: GET /dataspaces/{dataspace-name}/anchors/{anchor-name}
Example: GET /dataspaces/{dataspace-name}/anchors/{anchor-name}?after=2021-03-21T00:00:00-0:00&payload=/device/port/interface[status=up]&maxSize=500
By Dataspace and Schema-set
URL: GET /dataspaces/{dataspace-name}/schema-sets/{schema-set}
Example: GET /dataspaces/{dataspace-name}/schema-sets/{schema-set}?after=2021-03-21T00:00:00-0:00&payload=/device/port/interface[status=up]
Response Anchor responseBody responseBody
responseBody | |
responseBody |
name | type | |
---|---|---|
nextRecordsLink | string | added only if there are remaining records to be fetched for the query. |
previousRecordsLink | string | added only if it is not the first set of records. |
records | list | contains one record for each timestamp that meets filtering criteria. It contains header information along with data. |
...