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

...

limit
NoNameTypeDefaultPurposeExample
1pagepageNumberint0

The query output can have many rows so it is important to limit the fetched data. To limit the number of records and to provide pagination, these two parameters can be used. 

pageNumber starts from "page" parameter represents the page number, starts with 0, and "limit" is the page size.

2

0"

pageLimit can't be greater than the maximum value configured  in the application 


2pageLimitint1000
3pointInTimeTimestamp (ISO Format)CurrentDateTime

When a user uses the APIs with pagination (by running several stateless requests), the result set can be impacted by new states stored while navigating. This can be a challenge to retrieve a consistent result set. 

This parameter must be used to avoid this issue. However, It will not provide a consistent result set if data, that meet search criteria, get deleted because of the cleanup triggered by the retention policy.


4

sort

string timestamp:desc

Data is by default returned sorted by the timestamp in descending order. It can be overridden and data can be sorted by multiple fields.

sort=timestamp:asc,anchor:desc

...

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

...

By Dataspace and Anchor

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

Example: GET /dataspaces/{dataspace-name}​/anchors/{anchor-name}​/history?after=2021-03-21T00:00:00-0:00&simplePayloadFilter={"idNearRTRIC":"1"}&limitpageLimit=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"}

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"}&limitpageLimit=500&pointInTime=2021-04-21T00:00:00-0:00&pagepageNumber=2",
  "previousRecordsLink": "cps-temporal/api/v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/history?after=2021-03-21T00:00:00-0:00&simplePayloadFilter={"idNearRTRIC":"1"}&limitpageLimit=500&pointInTime=2021-04-21T00:00:00-0:00&pagepageNumber=0",
  "records": [
    {
      "timestamp": "2021-03-21T00:00:00-0:00",
      "dataspace": "my-dataspace",
      "schemaSet": "my-schema-set",
      "anchor": "my-anchor",
      "data": {
        "status" : "UP"
      }
    }
  ]
}

...