What API do I use to pull the Readings ?
QA Swagger Link
https://fdg-integration-api-swagger-qa.s3.us-west-2.amazonaws.com/index.html
Stage Swagger Link
https://fdg-integration-api-swagger-stage.s3.us-west-2.amazonaws.com/index.html
Query Parameters Allowed
limit
pagenumber
fields
orderby
filteron
nexttoken
1. Limit
Limit is used to get the number of records required. For example, if limit is put as 10, only 10 records will come. Default limit is 50. Max limit is 250. If limit is given as 300, it will be taken as 250 only.
Syntax
limit=<number>
Example
· Getting 10 stops
https://90iqppj8qf.execute-api.us-west-2.amazonaws.com/v1/api/integration/stop?limit=10
2. Page Number
If limit is used, next page can be got by incrementing page number by 1.
Syntax
pagenumber=<number>
Example
· Getting next 10 stops
https://90iqppj8qf.execute-api.us-west-2.amazonaws.com/v1/api/integration/stop?limit=1&pagenumber=2
3. Fields
By default, all the attributes will be shown. If only specific attributes of reading form (or master data) are required, it can be provided as fields
Syntax
fields=<comma separated values>
fields=24HourGas,APIGravity,StrokeLength,OilPCT,ObsvTemp
Example
· Getting only few attributes of Well Test
https://90iqppj8qf.exe.cute-api.us-west-2.amazonaws.com/v1/api/integration/reading?fields=24HourGas,APIGravity,StrokeLength,OilPCT,ObsvTemp,water&filteron=readingentityname[eq]=welltest,modifiedtimestamp[gte]=2022-07-01T00:00:00.000Z
4. Order By
Sorts the result as per order given. In case of readings, this works only for modified timestamp.
Syntax
orderby=<key>
Example
· Getting stops in order of ids
https://90iqppj8qf.execute-api.us-west-2.amazonaws.com/v1/api/integration/purchaser?orderby=id
· Getting readings in order of modified timestamp
5. Filter On
Can be used to filter data.
In case of master data and metadata, the keys available to filter are same as keys available in post as mentioned in swagger.
In case of readings readingentityname (or readingentityid) and modifiedtimestamp is mandatory
In case of readings only following keys are available readingentityname, readingentityid, assetid, modifiedtimestamp, isfinalized and isdeleted.
Syntax
filteron=<key>[<operator>]=<value>
multiple filters can be given using comma separated values
<operator> can be eq, equal, neq, notequal, contains, startswith, beginswith, endswith, gt, greaterthan, gte, greaterthanorequal, lt, lessthan, lte, lessthanorequal
For reading, readingentityname will only accept eq.
For reading, modifiedtimestamp will only accept lte or gte
Example
· Getting Well Test
https://90iqppj8qf.exe.cute-api.us-west-2.amazonaws.com/v1/api/integration/reading? filteron=readingentityname[eq]=welltest,modifiedtimestamp[gte]=2022-07-01T00:00:00.000Z
6. Next and Previous Links
In case pagination is happening, next and/or previous links gives the url already prepared for the user. User can directly use this and will not have to manually generate pagenumber, etc.