Versions Compared

Key

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

Jira Legacy
serverSystem Jira
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId4733707d-2057-3a0f-ae5e-4fd8aff50176
keyCPS-251

...

Proposed APIs

The GET Endpoints URI contains information about the anchors . But, and 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 filtering rest of the filtering criteria are passed as query parameter. The below-mentioned query parameters are supported by all endpoints.

...

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}​/history

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

Endpoint Format B

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

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

By Dataspace and Schema-set

...

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

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

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

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

Response 
Anchor
responseBody
responseBody
nametype
nextRecordsLinkstringadded only if there are remaining records to be fetched for the query.
previousRecordsLinkstringadded only if it is not the first set of records.
recordslist

contains one record for each timestamp that meets filtering criteria. It contains header information along with data. 

...

Code Block
{
  "nextRecordsLink": "cps-temporal/api/v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/history?after=2021-03-21T00:00:00-0:00&simplePayloadFilter={"idNearRTRIC":"1"}&limit=500&pointInTime=2021-04-21T00:00:00-0:00&page=2",
  "previousRecordsLink": "cps-temporal/api/v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/history?after=2021-03-21T00:00:00-0:00&simplePayloadFilter={"idNearRTRIC":"1"}&limit=500&pointInTime=2021-04-21T00:00:00-0:00&page=0",
  "records": [
    {
      "timestamp": "2021-03-21T00:00:00-0:00",
      "dataspace": "my-dataspace",
      "schemaSet": "my-schema-set",
      "anchor": "my-anchor",
      "data": {
        "status" : "UP"
      }
    }
  ]
}

...