Targets

Manage the units of work in a pipeline, control whether they can run, and retry failed work.

/spaces/{spaceId}/pipelines/{pipelineName}/targets
  • GETList the pipeline’s targets.

    Sample request

    GET /spaces/space_123/pipelines/web/targets HTTP/1.1
    Host: api.munchii.com
    Authorization: Bearer <access-token>

    Example response

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {
      "data": [
        {
          "id": "target_123",
          "name": "deploy"
        }
      ]
    }

    Common errors

    • 401 The credentials are missing, expired, or invalid.
    • 403 The caller lacks permission for this operation.
    • 404 The space or pipeline was not found.
/spaces/{spaceId}/pipelines/{pipelineName}/targets/{targetName}
  • GETGet details for the target.

    Sample request

    GET /spaces/space_123/pipelines/web/targets/deploy HTTP/1.1
    Host: api.munchii.com
    Authorization: Bearer <access-token>

    Example response

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {
      "self": {
        "id": "target_123",
        "name": "deploy"
      },
      "data": {
        "parameters": {},
        "inputs": []
      },
      "state": {}
    }

    Common errors

    • 401 The credentials are missing, expired, or invalid.
    • 403 The caller lacks permission for this operation.
    • 404 The space, pipeline, or target was not found.
  • PUTCreate a target or update its executor binding.

    Sample request

    PUT /spaces/space_123/pipelines/web/targets/deploy HTTP/1.1
    Host: api.munchii.com
    Authorization: Bearer <access-token>
    Content-Type: application/json
    
    {
      "parameters": {},
      "inputs": []
    }

    Example responses

    HTTP/1.1 201 Created

    Empty response body.

    HTTP/1.1 204 No Content

    Empty response body.

    Common errors

    • 400 Use application/json and send valid JSON that matches the expected schema.
    • 401 The credentials are missing, expired, or invalid.
    • 403 The caller lacks permission for this operation.
    • 404 The space, pipeline, or target was not found.
  • PATCHUpdate selected target settings.

    Sample request

    PATCH /spaces/space_123/pipelines/web/targets/deploy HTTP/1.1
    Host: api.munchii.com
    Authorization: Bearer <access-token>
    Content-Type: application/json
    
    {
      "name": "deploy-web"
    }

    Example response

    HTTP/1.1 204 No Content

    Empty response body.

    Common errors

    • 400 Use application/json and send valid JSON that matches the expected schema.
    • 401 The credentials are missing, expired, or invalid.
    • 403 The caller lacks permission for this operation.
    • 404 The space, pipeline, or target was not found.
  • DELETERemove the target from the pipeline.

    Sample request

    DELETE /spaces/space_123/pipelines/web/targets/deploy HTTP/1.1
    Host: api.munchii.com
    Authorization: Bearer <access-token>

    Example response

    HTTP/1.1 204 No Content

    Empty response body.

    Common errors

    • 401 The credentials are missing, expired, or invalid.
    • 403 The caller lacks permission for this operation.
    • 404 The space, pipeline, or target was not found.
/spaces/{spaceId}/pipelines/{pipelineName}/targets/{targetName}/enable
  • POSTEnable the target for scheduling.

    Sample request

    POST /spaces/space_123/pipelines/web/targets/deploy/enable HTTP/1.1
    Host: api.munchii.com
    Authorization: Bearer <access-token>

    Example response

    HTTP/1.1 204 No Content

    Empty response body.

    Common errors

    • 401 The credentials are missing, expired, or invalid.
    • 403 The caller lacks permission for this operation.
    • 404 The space, pipeline, or target was not found.
/spaces/{spaceId}/pipelines/{pipelineName}/targets/{targetName}/disable
  • POSTDisable the target for scheduling.

    Sample request

    POST /spaces/space_123/pipelines/web/targets/deploy/disable HTTP/1.1
    Host: api.munchii.com
    Authorization: Bearer <access-token>
    Content-Type: application/json
    
    {
      "reason": "Maintenance"
    }

    Example response

    HTTP/1.1 204 No Content

    Empty response body.

    Common errors

    • 400 Use application/json and send valid JSON that matches the expected schema.
    • 401 The credentials are missing, expired, or invalid.
    • 403 The caller lacks permission for this operation.
    • 404 The space, pipeline, or target was not found.
/spaces/{spaceId}/pipelines/{pipelineName}/targets/{targetName}/retry
  • POSTRetry a target run for a release.

    Sample request

    POST /spaces/space_123/pipelines/web/targets/deploy/retry HTTP/1.1
    Host: api.munchii.com
    Authorization: Bearer <access-token>

    Example response

    HTTP/1.1 204 No Content

    Empty response body.

    Common errors

    • 401 The credentials are missing, expired, or invalid.
    • 403 The caller lacks permission for this operation.
    • 404 The space, pipeline, or target was not found.