Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The GET Endpoints URI contains information about the anchors. But, the format of the anchor data is different in both CPS Core and CPS-temporal, which can cause some confusion. Hence, two endpoint format have been proposed.

The dataspace and anchor and the rest of the filtering criteria are passed as query parameter. The below mentioned query parameters which are supported by all endpoints are.

  1. after - timestamp ( ISO Format) to consider data created after the specified Timestamp
  2. payload - to define payload filtering criteria
  3. index - to define the page number (required for pagination)
  4. maxSize - to limit the response size
  5. pointInTime - to consider data changed or added before this time.
  6. sortBy - to define the order of data in the result set

The response format for endpoints is the same and defined here

By Dataspace and Anchor

Endpoint Format A

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={"idNearRTRIC":"1"}&maxSize=500

Endpoint Format B

URL: GET /dataspaces/{dataspace-name}​/anchor-data

Example: GET /dataspaces/{dataspace-name}​/anchor-data?anchor={anchor-name}​?after=2021-03-21T00:00:00-0:00&payload={"idNearRTRIC":"1"}&maxSize=500

By Dataspace and Schema-set

Endpoint Format A

URL: ​GET /dataspaces/{dataspace-name}/anchors?schemaSet={schemaset-name}

Example: GET /dataspaces/{dataspace-name}/anchors?schemaSet={schemaset-name}&after=2021-03-21T00:00:00-0:00&payload={"idNearRTRIC":"1"}

Endpoint Format B

URL: ​GET /dataspaces/{dataspace-name}/anchors?schemaSet={schemaset-name}

Example: GET /dataspaces/{dataspace-name}/anchor-data?schemaSet={schemaset-name}&after=2021-03-21T00:00:00-0:00&payload={"idNearRTRIC":"1"}

...