Skip to content

Create a target for the target list
Stable

Request

Adds a device as an individual Target to a Pipeline Target List.

Creates a new Target record scoped to the specified Target List, identifying a single device by its device_id so that pipeline stages using this Target List will act on it.

About Targets A Target represents a single device entry within a Target List, as distinct from a Device Group (which adds many devices at once). Use this endpoint when a pipeline needs to target specific devices individually rather than an entire group.

Key Fields / Query Parameters

  • device_id — Required — UUID of the device to add as a Target
  • device_alias — Optional display alias for the device within this Target List
  • device_name — Optional device name to store alongside the Target
  • is_active — Whether the Target is currently active and should be included in pipeline runs
Security
pipelines_SCAPIAuthToken
Path
pipeline_idstringrequired

ID of the Pipeline

targetlist_idstringrequired

ID of the Target List

Bodyapplication/jsonrequired
device_idstring, (uuid)required
device_aliasstring
device_namestringrequired
is_activeboolean
cURL
curl -i -X POST \
  'https://develop-api.esper.io/_mock/openapi/pipelines/v0/pipelines/{pipeline_id}/targetlists/{targetlist_id}/targets/' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "device_id": "3bafab7b-4400-4bcf-8e6e-09f954699940",
    "device_alias": "string",
    "device_name": "string",
    "is_active": true
  }'

Responses

All Targets in Target List

Bodyapplication/json
codeinteger
messagestring
contentobject(pipelines_Target)
Response
{ "code": 0, "message": "string", "content": { "id": "string", "pipeline_id": "ec036e81-7903-4e4d-bbfa-ac8516341cf0", "device_id": "3bafab7b-4400-4bcf-8e6e-09f954699940", "device_name": "string", "device_alias": "string", "is_active": true, "created_by": 0, "updated_by": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } }