Skip to content

Create a Target List
Stable

Request

Creates a new Target List within a Pipeline.

Send a POST request to define a new set of devices for the pipeline; the response returns the created Target List object, which you can then populate with individual Targets and/or Device Groups.

About Target Lists

A Target List is the mechanism by which a Pipeline's Stages determine which devices to act on — it can contain individual device Targets, whole Device Groups, or both. A Stage Run created against a Target List with no targets is marked INVALID.

Workflow

  1. Create the Target List
  2. Add Targets and/or Device Groups to it
  3. Attach the Target List to a Stage so it's used when the pipeline runs
Security
pipelines_SCAPIAuthToken
Path
pipeline_idstringrequired

ID of the Pipeline

Bodyapplication/jsonrequired
namestringrequired
target_list_typestringrequired
Enum:"DEVICES""GROUPS""COLLECTIONS"
cURL
curl -i -X POST \
  'https://api.esper.io/_mock/openapi/pipelines/v0/pipelines/{pipeline_id}/targetlists/' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "target_list_type": "DEVICES"
  }'

Responses

All Targets in Target List

Bodyapplication/json
codeinteger
messagestring
contentobject(pipelines_TargetList)
Response
{ "code": 0, "message": "string", "content": { "id": "string", "pipeline_id": "string", "name": "string", "target_list_type": "string", "created_by": 0, "updated_by": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } }