Targets

QueryTarget

POST
/cc/v1/targets/actions/query

Search for targets by property values. Returns an array of all matching target resources.

Authorization

thingspace_oauth VZ-M2M-Token
AuthorizationBearer <token>

This is the ThingSpace token, from Credentials and Tokens is used

In: header

VZ-M2M-Token<token>

M2M Session Token (How to generate an M2M session token?)

In: header

Request Body

application/json

Search for targets by property values.

Search for targets by property values.

accountidentifier?

The ID of the authenticating billing account, in the format {"billingaccountid":"1234567890-12345"}.

$selection?

A comma-separated list of properties and comparator values to match against subscriptions in the ThingSpace account. See Working with Query Filters for more information. If the request does not include $selection, the response will include all subscriptions to which the requesting user has access.

resourceidentifier?

The ID of the target to delete, in the format {"id": "dd1682d3-2d80-cefc-f3ee-25154800beff"}.

Response Body

application/json

curl -X POST "https://example.com/cc/v1/targets/actions/query" \  -H "Content-Type: application/json" \  -d '{    "accountidentifier": {      "billingaccountid": "1223334444-00001"    },    "resourceidentifier": {      "id": "dd1682d3-2d80-cefc-f3ee-25154800beff"    }  }'
[  {    "address": "https://myhost.com:1825",    "addressscheme": "streamrest",    "createdon": "2018-12-22T03:59:18.563Z",    "id": "cee10900-f54e-6eef-e455-bd7f15c4be32",    "kind": "ts.target",    "lastupdated": "2018-12-22T03:59:18.563Z",    "name": "host:port target",    "version": "1.0",    "versionid": "f4be7c2b-059d-11e9-bec6-02420a4e1b0a"  },  {    "address": "arn:aws:iam::252156542789:role/ThingSpace",    "addressscheme": "streamawsiot",    "createdon": "2019-01-24T19:06:43.577Z",    "externalid": "lJZnih8BfqsosZrEEkfPuR3aGOk2i-HIr6tXN275ioJF6bezIrQB9EbzpTRep8J7RmV7QH==",    "id": "cea170cc-a58f-6531-fc4b-fae1ceb1a6c8",    "kind": "ts.target",    "lastupdated": "2019-01-24T19:32:31.841Z",    "name": "AWS Target",    "region": "us-east-1",    "version": "1.0",    "versionid": "caf85ff7-200e-11e9-a85b-02420a621e0a"  }]