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 : Label
Type:
Show Source
object-
created:
string
Title:
CreatedRead Only:true -
id:
integer
Title:
IDRead Only:true -
modified:
string
Title:
ModifiedRead Only:true -
name(required):
string
Title:
NameMinimum Length:1Maximum Length:512 -
organization(required):
integer
Title:
OrganizationOrganization this label belongs to. - related: string
-
summary_fields:
string
Title:
Summary fieldsRead Only:true -
type:
string
Title:
TypeRead Only:true -
url:
string
Title:
UrlRead Only:true
Response
Supported Media Types
- application/json
201 Response
Root Schema : Label
Type:
Show Source
object-
created:
string
Title:
CreatedRead Only:true -
id:
integer
Title:
IDRead Only:true -
modified:
string
Title:
ModifiedRead Only:true -
name(required):
string
Title:
NameMinimum Length:1Maximum Length:512 -
organization(required):
integer
Title:
OrganizationOrganization this label belongs to. - related: string
-
summary_fields:
string
Title:
Summary fieldsRead Only:true -
type:
string
Title:
TypeRead Only:true -
url:
string
Title:
UrlRead Only:true