Dispatch

All Sections

Targets API Reference

Content

    Endpoints

    dispatch.all.readdispatch.all.readwritedispatch.targets.readdispatch.targets.readwrite

    Find all Targets.

    Query parameters

    pageTokenOptional
    string

    Specifies the page to read. Use a value provided by earlier responses in pageToken and nextPageToken.

    Example: eyJmaXJzdCI6InBhZ2UifQ==

    limitOptional
    integer
    1 - 100 (Default: 20)

    Limit the return page size to the specified count.

    Example: 1

    Responses

    200application/json

    A PagedList of Targets

    Example response body
    {
    "count": 1,
    "pageToken": "eyJmaXJzdCI6InBhZ2UifQ==",
    "nextPageToken": "eyJzZWNvbmQiOiJwYWdlIn0=",
    "items": [
    {
    "id": "DI-T-3f409cb5d8",
    "name": "User Onboarding App",
    "description": "",
    "tags": [
    "env:prod",
    "team:ninjas"
    ],
    "type": "WEBHOOK",
    "enabled": true,
    "createdTime": "2019-11-29T19:27:45.449Z",
    "lastChangedTime": "2020-04-01T14:57:18.227Z",
    "httpEndpoint": "https://messages.example.com"
    }
    ]
    }
    <<No Content

    dispatch.all.readwritedispatch.targets.readwrite

    Create a new Target. You can read more about targets Configuration.

    Request body

    nameRequired
    string

    The name of the Target

    descriptionRequired
    string

    A description of the Target

    tagsOptional
    array

    An array of string-type tags

    typeRequired
    string
    WEBHOOK
    AWS_SQS
    AWS_SNS

    The type of Target

    httpEndpointOptional
    string
    URL

    The HTTP endpoint messages will be delivered to

    Required for WEBHOOK Targets

    awsRegionOptional
    string

    The region the AWS resource is located in

    Required for AWS_SQS and AWS_SNS targets

    roleArnOptional
    string
    AWS ARN

    The AWS IAM role that Dispatch will assume in order to deliver messages

    Required for AWS_SQS and AWS_SNS targets

    queueUrlOptional
    string
    URL

    The URL of the AWS SQS queue messages will be delivered to

    Required for AWS_SQS targets

    topicArnOptional
    string
    AWS ARN

    The ARN of the AWS SNS topic messages will be delivered to

    Required for AWS_SNS targets

    Responses

    200application/json

    A Target

    Example response body
    {
    "id": "DI-T-3f409cb5d8",
    "name": "User Onboarding App",
    "description": "",
    "tags": [
    "env:prod",
    "team:ninjas"
    ],
    "type": "WEBHOOK",
    "enabled": true,
    "createdTime": "2019-11-29T19:27:45.449Z",
    "lastChangedTime": "2020-04-01T14:57:18.227Z",
    "httpEndpoint": "https://messages.example.com"
    }
    <<No Content

    Error codes

    E-DI-3002

    Unknown target type

    dispatch.all.readdispatch.all.readwritedispatch.targets.readdispatch.targets.readwrite

    Path parameters

    targetId
    string

    A Target ID

    Example: DI-T-3f409cb5d8

    Responses

    200application/json

    A Target

    Example response body
    {
    "id": "DI-T-3f409cb5d8",
    "name": "User Onboarding App",
    "description": "",
    "tags": [
    "env:prod",
    "team:ninjas"
    ],
    "type": "WEBHOOK",
    "enabled": true,
    "createdTime": "2019-11-29T19:27:45.449Z",
    "lastChangedTime": "2020-04-01T14:57:18.227Z",
    "httpEndpoint": "https://messages.example.com"
    }
    404No Content

    The Target was not found.

    <<No Content

    dispatch.all.readwritedispatch.targets.readwrite

    Path parameters

    targetId
    string

    A Target ID

    Example: DI-T-3f409cb5d8

    Request body

    nameOptional
    string

    The name of the Target

    descriptionOptional
    string

    A description of the Target

    tagsOptional
    array

    An array of string-type tags

    httpEndpointOptional
    string
    URL

    The HTTP endpoint messages will be delivered to

    For WEBHOOK Targets

    awsRegionOptional
    string

    The region the AWS resource is located in

    For AWS_SQS and AWS_SNS targets

    roleArnOptional
    string
    AWS ARN

    The AWS IAM role that Dispatch will assume in order to deliver messages

    For AWS_SQS and AWS_SNS targets

    queueUrlOptional
    string
    URL

    The URL of the AWS SQS queue messages will be delivered to

    For AWS_SQS targets

    topicArnOptional
    string
    AWS ARN

    The ARN of the AWS SNS topic messages will be delivered to

    For AWS_SNS targets

    Responses

    200application/json

    A Target

    Example response body
    {
    "id": "DI-T-3f409cb5d8",
    "name": "User Onboarding App",
    "description": "",
    "tags": [
    "env:prod",
    "team:ninjas"
    ],
    "type": "WEBHOOK",
    "enabled": true,
    "createdTime": "2019-11-29T19:27:45.449Z",
    "lastChangedTime": "2020-04-01T14:57:18.227Z",
    "httpEndpoint": "https://messages.example.com"
    }
    <<No Content

    Error codes

    E-DI-3001

    Target not found

    dispatch.all.readwritedispatch.targets.readwrite

    Path parameters

    targetId
    string

    A Target ID

    Example: DI-T-3f409cb5d8

    Responses

    200No Content

    The Target was deleted succesfully

    <<No Content

    Error codes

    E-DI-3001

    Target not found

    dispatch.all.readwritedispatch.targets.readwrite

    Enable a Target. You can read more about enabling and disabling Targets in Configuration.

    Path parameters

    targetId
    string

    A Target ID

    Example: DI-T-3f409cb5d8

    Responses

    200application/json

    The Target target was enabled successfully

    Example response body
    {
    "id": "DI-T-3f409cb5d8",
    "name": "User Onboarding App",
    "description": "",
    "tags": [
    "env:prod",
    "team:ninjas"
    ],
    "type": "WEBHOOK",
    "enabled": true,
    "createdTime": "2019-11-29T19:27:45.449Z",
    "lastChangedTime": "2020-04-01T14:57:18.227Z",
    "httpEndpoint": "https://messages.example.com"
    }
    <<No Content

    Error codes

    E-DI-3001

    Target not found

    E-DI-3003

    Cannot enable an already enabled target

    E-DI-3010

    Unknown error (Webhook Targets)

    E-DI-3011

    The endpoint domain has not been verified (Webhook Targets)

    E-DI-3020

    Unknown error (AWS SQS Targets)

    E-DI-3021

    Insufficient role permissions (AWS SQS Targets)

    E-DI-3022

    The target queue does not exist (AWS SQS Targets)

    E-DI-3023

    Unable to assume the configured role (AWS SQS Targets)

    E-DI-3030

    Unknown error (AWS SNS Targets)

    E-DI-3031

    Insufficient role permissions (AWS SNS Targets)

    E-DI-3032

    The target topic does not exist (AWS SNS Targets)

    E-DI-3033

    Unable to assume the configured role (AWS SNS Targets)

    E-DI-3034

    Unable to parse AWS region from Topic ARN (AWS SNS Targets)

    dispatch.all.readwritedispatch.targets.readwrite

    Disable a Target. You can read more about enabling and disabling Targets in Configuration.

    Path parameters

    targetId
    string

    A Target ID

    Example: DI-T-3f409cb5d8

    Request body

    reasonOptional
    string

    The reason the Target is being disabled.

    Responses

    200application/json

    The Target target was disabled successfully

    Example response body
    {
    "id": "DI-T-3f409cb5d8",
    "name": "User Onboarding App",
    "description": "",
    "tags": [
    "env:prod",
    "team:ninjas"
    ],
    "type": "WEBHOOK",
    "enabled": false,
    "createdTime": "2019-11-29T19:27:45.449Z",
    "lastChangedTime": "2020-04-03T10:21:31.521Z",
    "disabledReason": "Disabled for temporary debugging",
    "httpEndpoint": "https://messages.example.com"
    }
    <<No Content

    Error codes

    E-DI-3001

    Target not found

    E-DI-3004

    Cannot disable an already disabled target

    Models

    A paged list of items. Use the nextPageToken in follow-up requests to step through all available items. nextPageToken will be null on the last page.

    items
    array

    A list of items

    count
    integer

    The number of items in the list

    pageToken
    string

    The token for the current page

    nextPageToken
    string | NULL

    The token for the next page

    A target

    id
    string

    The Target ID

    name
    string

    The name of the Target

    description
    string

    A description of the Target

    tags
    array

    An array of string-type tags

    type
    string
    WEBHOOK
    AWS_SQS
    AWS_SNS

    The type of Target

    enabled
    boolean

    Specifies if the Target is enabled or not

    disabledReason
    string | NULL

    An optional user-provided reason why the Target has been disabled

    createdTime
    string
    ISO-8601 Date & Time

    The time of the Target was first created

    lastChangedTime
    string
    ISO-8601 Date & Time

    The time the Target was last changed

    httpEndpoint
    string
    URL

    The HTTP endpoint messages will be delivered to

    For WEBHOOK Targets

    awsRegion
    string

    The region the AWS resource is located in

    For AWS_SQS and AWS_SNS targets

    roleArn
    string
    AWS ARN

    The AWS IAM role that Dispatch will assume in order to deliver messages

    For AWS_SQS and AWS_SNS targets

    queueUrl
    string
    URL

    The URL of the AWS SQS queue messages will be delivered to

    For AWS_SQS targets

    topicArn
    string
    AWS ARN

    The ARN of the AWS SNS topic messages will be delivered to

    For AWS_SNS targets

    A container for a list of Error objects

    errors
    array

    An array of Error objects

    An error object

    code
    string

    The error code

    message
    string

    A descriptive error message