Puppet Enterprise 2017.3

Lists all tasks in a given environment.

Parameters

The request accepts this query parameter:

ParameterDefinition
environment Returns the tasks in the specified environment. If unspecified, defaults to production.

Response format

The response is a JSON object that lists each known task with a link to additional information, and uses these keys:
KeyDefinition
environment A map containing a name key specifying the environment's name and a code_id key indicating the code ID where the task is listed.
items Contains an array of all known tasks.
id An absolute URL where the task's details are listed.
name The full name of the task.
For example:
{
  "environment": {
    "name": "production",
    "code_id": "urn:puppet:code-id:1:a86da166c30f871823f9b2ea224796e834840676;production"
  },
  "items": [
    {
      "id": "https://orchestrator.example.com:8143/orchestrator/v1/tasks/package/install",
      "name": "package::install"
    },
    {
      "id": "https://orchestrator.example.com:8143/orchestrator/v1/tasks/package/upgrade",
      "name": "package::upgrade"
    },
    {
      "id": "https://orchestrator.example.com:8143/orchestrator/v1/tasks/exec/init",
      "name": "exec"
    }
  ]
}

Error responses

See the error response documentation for the general format of error responses. For this endpoint, the kind key of the error displays the conflict.
KeyDefinition
puppetlabs.orchestrator/validation-error If the environment parameter is not a legal environment name, the server returns a 400 response.
puppetlabs.orchestrator/unknown-environment If the specified environment doesn't exist, the server returns a 404 response.
Back to top