Get Available Images on a Pin API
Require Authentication
This API is used to get available images on a pin for the company based on combination of deviceID and token.
URL
api/projects/pinimages/:projectID/:projectpinID
Required parameter (in URL)
- :projectID «contains projectID that want to be looked for. It must be put in the URL, e.g: api/projects/pinimages/1/1. To get available projectID, please visit Get Available Zones»
- :projectpinID «contains projectpinID that want to be looked for. It must be put in the URL, e.g: api/projects/pinimages/1/1. To get available projectpinID, please visit Get Available Pins on a Zone Map»
Required parameter (POST)
- deviceID
- token
Optional paramete (GET)r
All optional parameters use GET method. So it should be embedded in the URL, e.g: api/projects/pins/1?q=tes&o=imageTitle
- q «contains keyword that want to be looked for. Keyword will search imageTitle field only»
- o «used to sort data, contains field imageTitle. Available value: imageTitle, createdDate. Default value: imageTitle»
- ot «used to sort data, contains sort type. Available value: asc, desc. Default value: asc»
- per_page «indicates how many data that will be displayed in each call. Value must be a number between 1 to 500. Default value: 500»
- offset «indicates the first data index that will be displayed in each call. Value must be a number with minimum value is 0. Default value: 0»
Example JSON Payload
{ "deviceID": "ABCD-EFGH-IJKL-MNOP", "token": "bb602ab13b8090268cd6e3bb9dfa39e2" }
Possible return HTTP status code
- 200
- 401
- 405
Return message
{ "status": "success", "message": { "current_parameter": "?per_page=999999999&offset=0", "next_parameter": "", "previous_parameter": "", "start": 0, "total": 1, "lists": [ { "projectpinimageID": 4630, "imageTitle": "Ab teltonika", "imageDescription": "Primary Image for Ab teltonika", "imageURL": "https://wasteinsights-files.s3.ap-southeast-2.amazonaws.com/uploads/projectpinimages/318/a95eda9d7ad52f1b5eeb42906650a6d9.jpg?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=1234567890ABcDEfGHIJ%2F20230817%2Fap-southeast-2%2Fs3%2Faws4_request&X-Amz-Date=20230817T101248Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=123456789009876543214c286c6e40b37a46e04525cb28368990e206d741f216", "imageOriginalFileName": "", "createdDate": 1667319962, "projectID": 318, "imageURLOri": "https://wasteinsights-files.s3.ap-southeast-2.amazonaws.com/uploads/projectpinimages/318/a95eda9d7ad52f1b5eeb42906650a6d9.jpg?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=1234567890ABCDeFGhij%2F20230817%2Fap-southeast-2%2Fs3%2Faws4_request&X-Amz-Date=20230817T101248Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=123456789009876543214c286c6e40b37a46e04525cb28368990e206d741f216", "imageURLThumbnail": "https://wasteinsights-files.s3.ap-southeast-2.amazonaws.com/uploads/projectpinimages/318/a95eda9d7ad52f1b5eeb42906650a6d9.jpg?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=1234567890AbcDeFGHIJ%2F20230817%2Fap-southeast-2%2Fs3%2Faws4_request&X-Amz-Date=20230817T101248Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=123456789009876543214c286c6e40b37a46e04525cb28368990e206d741f216", "creatorUserInformation": { "userID": 90, "username": "andre@smartsensor.com.au", "firstName": "Andre", "lastName": "TebakAyo" } } ] } }
Note: use "next_parameter" and "previous_parameter" to go to next or previous result page. Just combine it with the API URL, e.g: "api/projects/pinimages/1/1"+next_parameter or "api/projects/pinimages/1/1"+previous_parameter