/keywords/{id}/commands/{command_id}

Secured By: Authentication Token
Description:

Get command detail.

Headers

Name Required Type Description
X-AUTH-TOKEN * string

An authentication token provided to you by GovDelivery.

Status

Body

Format: application/json

Example
{
  "command_type": "dcm_subscribe",
  "name": "Subscribe to news topics",
  "updated_at": "2013-01-14T19:54:11Z",
  "params": {
    "dcm_account_code": "ACCOUNT_CODE",
    "dcm_topic_codes": ["TOPIC_CODE_23", "TOPIC_CODE_90"]
  },
  "_links": {
    "self": "/keywords/1/commands/1",
    "keyword": "/keywords/1":
  },
  "created_at": "2013-01-14T19:54:11Z"
}
Schema
Object that may include:
Name Type Description
name string

Name of the command for later reference.

Example

OpenWeatherMap Forwarder
command_type string

Specifies what type of command this is.

Valid Values:

  • dcm_subscribe
  • dcm_unsubscribe
  • forward

Example

forward
params string

The parameters to be associated with this command. The list of parameters for each command type can be found by querying the Command Type relation.

Example

{
  "dcm_account_code": "ACCOUNT_CODE",
  "dcm_topic_codes": ["TOPIC_CODE_23", "TOPIC_CODE_90"]
}
created_at string

The date and time when the command was created.

Example

2013-01-30T17:45:27Z
updated_at string

The date and time when the command was last updated.

Example

2013-01-30T17:45:27Z
_links object

An object that defines links to related objects.

Properties

{
  "self": {
    "description": "Relative URI of the object",
    "type": "string",
    "example": "/keywords/1/commands/1"
  },
  "keyword": {
    "description": "Relative URI to the keyword associated with this command",
    "type": "string",
    "example": "/keywords/1"
  },
  "command_actions": {
    "description": "Relative URI to the actions associated with this command",
    "type": "string",
    "example": "/keywords/1/commands/1/actions"
  }
}
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Command",
  "type": "object",
  "properties": {
    "name": {
      "description": "Name of the command for later reference.",
      "type": "string",
      "example": "OpenWeatherMap Forwarder"
    },
    "command_type": {
      "description": "Specifies what type of command this is.",
      "type": "string",
      "enum": [
        "dcm_subscribe",
        "dcm_unsubscribe",
        "forward"
      ],
      "example": "forward"
    },
    "params": {
      "description": "The parameters to be associated with this command. The list of  parameters for each command type can be found by querying the  Command Type relation.",
      "type": "string",
      "example": "{\n  \"dcm_account_code\": \"ACCOUNT_CODE\",\n  \"dcm_topic_codes\": [\"TOPIC_CODE_23\", \"TOPIC_CODE_90\"]\n}\n"
    },
    "created_at": {
      "description": "The date and time when the command was created.",
      "type": "string",
      "example": "2013-01-30T17:45:27Z"
    },
    "updated_at": {
      "description": "The date and time when the command was last updated.",
      "type": "string",
      "example": "2013-01-30T17:45:27Z"
    },
    "_links": {
      "title": "Relational Links",
      "description": "An object that defines links to related objects.",
      "type": "object",
      "properties": {
        "self": {
          "description": "Relative URI of the object",
          "type": "string",
          "example": "/keywords/1/commands/1"
        },
        "keyword": {
          "description": "Relative URI to the keyword associated with this command",
          "type": "string",
          "example": "/keywords/1"
        },
        "command_actions": {
          "description": "Relative URI to the actions associated with this command",
          "type": "string",
          "example": "/keywords/1/commands/1/actions"
        }
      }
    }
  }
}

Body

Format: application/json

Example
{
  "error": "Invalid authentication token"
}
Secured By: Authentication Token
Description:

Update a command.

Headers

Name Required Type Description
X-AUTH-TOKEN * string

An authentication token provided to you by GovDelivery.

Body

Format: application/json

Example
{
 "name": "Subscribe to news topics",
 "command_type": "dcm_subscribe",
 "params": {
 "dcm_account_code": "ACCOUNT_CODE",
 "dcm_topic_codes": ["TOPIC_CODE_23", "TOPIC_CODE_90"]
 }
}
Schema
Object that may include:
Name Required Type Description
name * string

Name of the command for later reference.

Example

OpenWeatherMap Forwarder
command_type * string

Specifies what type of command this is.

Valid Values:

  • dcm_subscribe
  • dcm_unsubscribe
  • forward

Example

forward
params string

The parameters to be associated with this command. The list of parameters for each command type can be found by querying the Command Type relation.

Example

{
  "dcm_account_code": "ACCOUNT_CODE",
  "dcm_topic_codes": ["TOPIC_CODE_23", "TOPIC_CODE_90"]
}
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "/keywords/{id}/commands/{command_id}",
  "description": "Update a command.",
  "type": "object",
  "properties": {
    "name": {
      "description": "Name of the command for later reference.",
      "type": "string",
      "example": "OpenWeatherMap Forwarder"
    },
    "command_type": {
      "description": "Specifies what type of command this is.",
      "type": "string",
      "enum": [
        "dcm_subscribe",
        "dcm_unsubscribe",
        "forward"
      ],
      "example": "forward"
    },
    "params": {
      "description": "The parameters to be associated with this command. The list of \nparameters for each command type can be found by querying the \nCommand Type relation. \n",
      "type": "string",
      "example": "{\n  \"dcm_account_code\": \"ACCOUNT_CODE\",\n  \"dcm_topic_codes\": [\"TOPIC_CODE_23\", \"TOPIC_CODE_90\"]\n}\n"
    }
  },
  "required": [
    "name",
    "command_type"
  ]
}
Form Parameters
Name Required Type Description
name * string

Name of the command for later reference.

Example

OpenWeatherMap Forwarder
command_type * string

Specifies what type of command this is.

Valid Values:

  • dcm_subscribe
  • dcm_unsubscribe
  • forward

Example

forward
params string

The parameters to be associated with this command. The list of parameters for each command type can be found by querying the Command Type relation.

Example

{
  "dcm_account_code": "ACCOUNT_CODE",
  "dcm_topic_codes": ["TOPIC_CODE_23", "TOPIC_CODE_90"]
}

Status

Body

Format: application/json

Example
{
  "command_type": "dcm_subscribe",
  "name": "Subscribe to news topics",
  "updated_at": "2013-01-14T19:54:11Z",
  "params": {
    "dcm_account_code": "ACCOUNT_CODE",
    "dcm_topic_codes": ["TOPIC_CODE_23", "TOPIC_CODE_90"]
  },
  "_links": {
    "self": "/keywords/1/commands/1",
    "keyword": "/keywords/1":
  },
  "created_at": "2013-01-14T19:54:11Z"
}
Schema
Object that may include:
Name Type Description
name string

Name of the command for later reference.

Example

OpenWeatherMap Forwarder
command_type string

Specifies what type of command this is.

Valid Values:

  • dcm_subscribe
  • dcm_unsubscribe
  • forward

Example

forward
params string

The parameters to be associated with this command. The list of parameters for each command type can be found by querying the Command Type relation.

Example

{
  "dcm_account_code": "ACCOUNT_CODE",
  "dcm_topic_codes": ["TOPIC_CODE_23", "TOPIC_CODE_90"]
}
created_at string

The date and time when the command was created.

Example

2013-01-30T17:45:27Z
updated_at string

The date and time when the command was last updated.

Example

2013-01-30T17:45:27Z
_links object

An object that defines links to related objects.

Properties

{
  "self": {
    "description": "Relative URI of the object",
    "type": "string",
    "example": "/keywords/1/commands/1"
  },
  "keyword": {
    "description": "Relative URI to the keyword associated with this command",
    "type": "string",
    "example": "/keywords/1"
  },
  "command_actions": {
    "description": "Relative URI to the actions associated with this command",
    "type": "string",
    "example": "/keywords/1/commands/1/actions"
  }
}
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Command",
  "type": "object",
  "properties": {
    "name": {
      "description": "Name of the command for later reference.",
      "type": "string",
      "example": "OpenWeatherMap Forwarder"
    },
    "command_type": {
      "description": "Specifies what type of command this is.",
      "type": "string",
      "enum": [
        "dcm_subscribe",
        "dcm_unsubscribe",
        "forward"
      ],
      "example": "forward"
    },
    "params": {
      "description": "The parameters to be associated with this command. The list of  parameters for each command type can be found by querying the  Command Type relation.",
      "type": "string",
      "example": "{\n  \"dcm_account_code\": \"ACCOUNT_CODE\",\n  \"dcm_topic_codes\": [\"TOPIC_CODE_23\", \"TOPIC_CODE_90\"]\n}\n"
    },
    "created_at": {
      "description": "The date and time when the command was created.",
      "type": "string",
      "example": "2013-01-30T17:45:27Z"
    },
    "updated_at": {
      "description": "The date and time when the command was last updated.",
      "type": "string",
      "example": "2013-01-30T17:45:27Z"
    },
    "_links": {
      "title": "Relational Links",
      "description": "An object that defines links to related objects.",
      "type": "object",
      "properties": {
        "self": {
          "description": "Relative URI of the object",
          "type": "string",
          "example": "/keywords/1/commands/1"
        },
        "keyword": {
          "description": "Relative URI to the keyword associated with this command",
          "type": "string",
          "example": "/keywords/1"
        },
        "command_actions": {
          "description": "Relative URI to the actions associated with this command",
          "type": "string",
          "example": "/keywords/1/commands/1/actions"
        }
      }
    }
  }
}

Body

Format: application/json

Example
{
  "error": "Invalid authentication token"
}
Secured By: Authentication Token
Description:

Delete a command.

Headers

Name Required Type Description
X-AUTH-TOKEN * string

An authentication token provided to you by GovDelivery.

Status

Description

OK

Body

Format: application/json

Example
{
  "error": "Invalid authentication token"
}