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.
- A label is explicitly disassociated with a related job template
- A job is deleted with labels
- A cleanup job deletes a job with labels
Request
Supported Media Types
- application/json
Path Parameters
Root Schema : schema
Type:
Show Source
object
-
name:
string
-
organization:
integer
Organization this label belongs to.