/api/template_sets
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | title | string | Name of the template set | optional | |
2 | descrip | string | Description of the template set | optional | |
3 | typ | job_template.TemplateType | * Set the type of the template set. * It can either contain job or issue templates. * | optional |
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | completedJobs | i32 | default | ||
2 | activeJobs | i32 | default |
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | id | string | default | ||
2 | internalVersion | i32 | Only increments when update is called. | default | |
3 | publicVersion | i32 | Increment logic for publicVersion :Normal team flow: 1. A new template set is created with create, initially publicVersion=0 and status=Unpublished .2. publicVersion increments by 1 from latest published publicVersion when publish is called, and status=Published .3. When a new edit is made with update on either published or unpublished template set, a new entry is created with publicVersion=0 and status=Unpublished .4. Repeat from step 2) or 3). Review team flow: 1. A new template set is created with create, initially publicVersion=0 and status=Unpublished .2. publicVersion increments by 1 from max publicVersion when beginReview is called, and status=InReview . publicVersion does not change if this internalVersion has already been reviewed before, i.e., publicVersion != 0 .3. endReview must be called next to close review, making status=Unpublished .4. A specific publicVersion must be used to call publishVersion and make status=Published .5. When a new edit is made with update on either published or unpublished template set, a new entry is created with publicVersion=0 and status=Unpublished .6. Repeat from step 2) or 5). | default | |
4 | title | string | default | ||
5 | descrip | string | Description | default | |
6 | status | job_template.JobTemplateStatus | default | ||
7 | teamId | string | default | ||
8 | lastAuthoredAt | i64 | authored time for this edit | default | |
9 | publishedAt | i64 | published time for this edit, 0 if not published | default | |
10 | archivedAt | i64 | archive time, 0 means the template set is not archived | default | |
11 | lastAuthorId | string | default | ||
12 | lock | job_template.JobTemplateLock | Status of lock by another user. Internal authoring lock | optional | |
13 | publishedVersion | i32 | Only increments when publish or publishVersion is called.
Is the same as publicVersion for normal teams, and only increments on publish for review teams.
Is 0 for all template sets with status!=Published .
| default | |
14 | typ | job_template.TemplateType | default | ||
15 | publishedById | string | optional | ||
101 | team | team.TeamModular | optional | ||
102 | lastPublishedAt | i64 | last published time for this template set. 0 if not published | optional | |
103 | lastAuthor | user.UserModular | optional | ||
104 | templates | list< | optional | ||
105 | counts | TemplateSetCounts | optional | ||
106 | templateTags | list< | optional | ||
107 | lastPublishedVersion | i32 | last published version (public version) for this template set. 0 if not published | optional | |
108 | lastModifiedAt | i64 | Bumps up on edit, status change, archive | optional | |
109 | attributes | list< | optional | ||
110 | originalAuthor | user.UserModular | optional | ||
111 | lastPublishedBy | user.User | optional |
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | includeTeam | bool | default | ||
2 | includeLastPublished | bool | includes both lastPublishedAt and lastPublishedVersion | default | |
3 | includeLastAuthor | bool | default | ||
4 | includeTemplates | bool | default | ||
5 | includeTags | bool | default | ||
6 | includeCounts | bool | default | ||
7 | includeLastModified | bool | default | ||
8 | includeAttributes | bool | default | ||
9 | includeOriginalAuthor | bool | default |
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | templateSet | TemplateSet | default | ||
2 | err | common.SystemException | default |
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | templateSets | list< | default | ||
2 | pageInfo | common.PageInfo | optional |
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | templateSet | TemplateSet | default | ||
2 | template | job_template.JobTemplateModular | default |
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | templateUnions | list< | default | ||
2 | pageInfo | common.PageInfo | optional |
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | templateResult | map< | default | ||
2 | templateSetResult | map< | default |
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | whereOpts | job_template.TemplateWhereOpts | default | ||
2 | includeTemplates | bool | default | true | |
3 | includeTemplateSets | bool | default | true |
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | templateSetSelectOpts | TemplateSetSelectOpts | default | ||
2 | templateSelectOpts | job_template.TemplateSelectOpts | default |
Key | Field | Type | Description | Requiredness | Default value |
---|---|---|---|---|---|
1 | id | string | default | ||
2 | publicVersion | i32 | default | ||
3 | isArchived | bool | default |
Query a list of template setsTemplateSetQueryResult
query(TemplateSetSelectOpts
selectOpts,job_template.TemplateWhereOpts
whereOpts,list<
order) throwsjob_template.TemplateOrder
>common.SystemException
Get a template setmap<
fetch(string
,TemplateSetFetchResult
>TemplateSetSelectOpts
selectOpts,list<
templateSetIds) throwsstring
>common.SystemException
TemplateSet
create(string
teamId,TemplateSetParams
params,list<
attributes) throwsabac.AbacAttribute
>common.SystemException
TemplateSet
update(string
templateSetId,i32
internalVersion,TemplateSetParams
params) throwscommon.SystemException
TemplateSet
archive(string
templateSetId) throwscommon.SystemException
TemplateSet
unarchive(string
templateSetId) throwscommon.SystemException
TemplateSet
publish(string
templateSetId) throwscommon.SystemException
Get a published TemplateSet.TemplateSet
getPublicVersion(string
templateSetId,i32
publicVersion) throwscommon.SystemException
Enter review state, which means that editing will be locked until the review process ends; also generates a new public version number which is returned. When configured, this will also call a registered webhook.i32
beginReview(string
templateSetId) throwscommon.SystemException
Exit review state, release editing lock; returns current public version number.i32
endReview(string
templateSetId) throwscommon.SystemException
Publish a specified version of the template set; must be called AFTER endReviewTemplateSet
publishVersion(string
templateSetId,i32
publicVersion) throwscommon.SystemException
TemplateSet
addTemplate(string
templateSetId,i32
internalVersion,string
templateId,i32
position,bool
replace) throwscommon.SystemException
TemplateSet
addTemplateSet(string
templateSetId,i32
internalVersion,string
addedSetId,i32
position) throwscommon.SystemException
Move a template to a different position in the template setTemplateSet
moveTemplate(string
templateSetId,i32
internalVersion,string
templateId,i32
oldPosition,i32
newPosition) throwscommon.SystemException
Remove a template from the template setTemplateSet
removeTemplate(string
templateSetId,i32
internalVersion,string
templateId,i32
position) throwscommon.SystemException
Set full list of templates on a template set. This replaces the need for consecutive api calls when moving, removing, and adding templatesTemplateSet
setTemplateList(string
templateSetId,i32
internalVersion,list<
movements) throwscommon.ListActions
>common.SystemException
Get all of the tags and comments for a template setlist<
getTags(job_template.TemplateTag
>string
templateSetId) throwscommon.SystemException
Update the tags on a template set. additions are the tags and comments to be added to the template. Removals are the ids of the tags to be removed from the template.void
updateTags(string
templateSetId,list<
added,job_template.TemplateTag
>list<
removedTagIds) throwsstring
>common.SystemException
Start editing the template set Note that this lock is associated with the specific authToken used, not just the user owning that token. The life of the lock is until releaseLock (which should be called when editing is complete), forcible takeover, or implicitly on logout. Returns the new lock on success. If the lock is already owned by another token, raises JobTemplateLockFailed with previous lock information.job_template.JobTemplateLock
acquireLock(string
templateSetId) throwscommon.SystemException
,job_template.JobTemplateLockFailed
Start editing the template, forcibly taking over any existing lock. Note that this lock is associated with the specific authToken used, not just the user owning that token. The life of the lock is until releaseLock (which should be called when editing is complete), forcible takeover, or implicitly on logout. Returns the new lock in the response structure. If the lock was owned by another token, also returns details of previous lock. This method is intended to be called after acquireLock fails and an explicit user response to forcibly take the lock. WARNING: this could result in data loss if another user is editing.job_template.ForceAcquireResponse
forceAcquireLock(string
templateSetId) throwscommon.SystemException
Query across both templates and template sets.TemplateUnionQueryResult
queryCombined(TemplateUnionSelectOpts
selectOpts,TemplateUnionWhereOpts
whereOpts,list<
order) throwsjob_template.TemplateOrder
>common.SystemException
Only returns back templates and sets where either the version or the archivedAt timestamps don't match To figure out if you have the latest versions of the templates inside the template sets, pass those along in the templateArgsTemplateUnionFetchResult
fetchUpdated(TemplateUnionSelectOpts
selectOpts,list<
templateArgs,VersionRef
>list<
templateSetArgs) throwsVersionRef
>common.SystemException
Update a single attribute on a template set return value will always be a list with a single attribute determined by which attribute was updated param templateSetId: template set to update param attributeId: the AttributeId of the team level attribute to be updated param values: the new AttributeValues to associated with Attribute attributeId on template set templateSetId param behave: determine the behaviour of the endpoint, merge or clobber. Default: clobberlist<
updateAttribute(abac.AbacAttribute
>common.UUID
templateSetId,string
attributeId,list<
values,abac.AbacAttributeValue
>abac.AbacUploadBehaviour
behave) throwscommon.SystemException