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:
Created
Read Only:true
-
id:
integer
Title:
ID
Read Only:true
-
modified:
string
Title:
Modified
Read Only:true
-
name(required):
string
Title:
Name
Minimum Length:1
Maximum Length:512
-
organization(required):
integer
Title:
Organization
Organization this label belongs to. - related: string
-
summary_fields:
string
Title:
Summary fields
Read Only:true
-
type:
string
Title:
Type
Read Only:true
-
url:
string
Title:
Url
Read Only:true
Response
Supported Media Types
- application/json
201 Response
Root Schema : Label
Type:
Show Source
object
-
created:
string
Title:
Created
Read Only:true
-
id:
integer
Title:
ID
Read Only:true
-
modified:
string
Title:
Modified
Read Only:true
-
name(required):
string
Title:
Name
Minimum Length:1
Maximum Length:512
-
organization(required):
integer
Title:
Organization
Organization this label belongs to. - related: string
-
summary_fields:
string
Title:
Summary fields
Read Only:true
-
type:
string
Title:
Type
Read Only:true
-
url:
string
Title:
Url
Read Only:true