Create a Label for a Job Template

post

/api/v2/job_templates/{id}/labels/

Make a POST request to this resource with the following label fields to create a new label associated with this job template.

  • name: Name of this label. (string, required)
  • organization: Organization this label belongs to. (id, required)

Add Labels for a Job Template:

Make a POST request to this resource with only an id field to associate an existing label with this job template.

Remove Labels from this Job Template:

Make a POST request to this resource with id and disassociate fields to remove the label from this job template .

Labels not associated with any other resources are deleted. A label can become disassociated with a resource as a result of 3 events.

  1. A label is explicitly disassociated with a related job template
  2. A job is deleted with labels
  3. A cleanup job deletes a job with labels

Request

Supported Media Types
Path Parameters
Body ()
Root Schema : Label
Type: object
Show Source
Back to Top

Response

Supported Media Types

201 Response

Body ()
Root Schema : Label
Type: object
Show Source
Back to Top