Return Targets¶
The API call returns all targets of a given sensor.
URL¶
/api/v1/projects/<project id>/nodes/<node id>/sensors/<sensor name>/targets/
Method¶
GET
Request Fields¶
The server returns targets in JSON or CSV format. Select output format by setting the accept header.
Accept: application/json
| Accept: text/csv
Success Response¶
Requesting targets in JSON format:
Request:
GET
Request Fields:
Accept: application/json
Code: 200 OK
Response Fields:
Content-Type: application/json
Content:
[ "P100", "P101", "P102" ]
Requesting targets in CSV format:
Request:
GET
Request Fields:
Accept: text/csv
Code: 200 OK
Response Fields:
Content-Type: text/csv
Content:
P100
P101
P102
Error Response¶
No targets in database:
Request:
GET
Request Fields:
Accept: application/json
Code: 410 Gone
Response Fields:
Content-Type: application/json
Content:
{ "code": 410, "message": "No rows." }