Define a target to receive data streams, alerts, or callbacks. After creating the target resource, use its ID in a subscription to set up a data stream.
thingspace_oauth VZ-M2M-Token In: header
M2M Session Token (How to generate an M2M session token?)
In: header
application/json
The request body provides the details of the target that you want to create.
TypeScript Definitions
Use the request body type in TypeScript.
Details of the target that you want to create.
application/json
curl -X POST "https://example.com/targets" \ -H "Content-Type: application/json" \ -d '{ "accountidentifier": { "billingaccountid": "0000000000-00001" }, "billingaccountid": "0000000000-00001", "kind": "ts.target", "address": "https://your_IoT_Central_Application.azureiotcentral.com", "addressscheme": "streamazureiot", "fields": { "httpheaders": { "Authorization": "SharedAccessSignature sr=d1f9b6bf-1380-41f6-b757-d9805e48392b&sig=EF5tnXClw3MWkb84OkIOUhMH%2FaS1DRD2nXT69QR8RD8%3D&skn=TSCCtoken&se=1648827260410" }, "devicetypes": [ "cHeAssetTracker", "cHeAssetTrackerV2", "tgAssetTracker", "tgAssetTrackerV2" ] } }'{ "address": "arn:aws:iam::252156542978:role/ThingSpace", "addressscheme": "streamawsiot", "billingaccountid": "1223334444-00001", "createdon": "2018-12-21T04:37:42.651Z", "externalid": "lJZnih8BfqsosZrEEkfPuR3aGOk2i-HIr6tXN275ioJF6bezIrQB9EbzpTRep8J7RmV7QH==", "id": "0e411230-c3eb-64dc-f5f4-1020364aa81f", "kind": "ts.target", "lastupdated": "2018-12-21T04:37:42.651Z", "name": "AWS Target", "region": "us-east-1", "version": "1.0", "versionid": "27aca5a4-04da-11e9-bff3-02420a5e1b0b"}The ID of the authenticating billing account, in the format {"billingaccountid":"1234567890-12345"}.
The ID of the authenticating billing account.
Identifies the resource kind. Targets are ts.target.
The endpoint for notifications or data streams. The format depends on the selected addressscheme.streamrest requires a host:port value streamawsiot requres a valid ARN.
The transport format. Valid values are: streamawsiot - streamed data to an AWS account streamrest - streamed REST data to a defined endpoint.
Descriptive information about the target.
Security identification string created by a POST /targets/actions/newextid request.
Name of the target.
AWS region value.
OAuth 2.0 bearer token.
OAuth 2 token and refresh token for TS to stream events to Target.