Service Now add a tag to the incident via rest api

I am trying to add a tag to the current incident, but I cannot find the documentation anywhere. I looked at the label and label_entry tables in the api incident. And I cannot tie the incident and the label together.

+4
source share
2 answers

In theory, this should be possible by creating an entry in the label_entry table, providing the sys_id of the tag, table, and sys_id of the record with which you want to associate the tag. After a quick test:

POST /api/now/table/label_entry {"label":"4f1094ff13162600973e70d66144b033","table":"incident","table_key":"0d97240e13aca600973e70d66144b03f","title":"Incident - INC0010018"}

I found that the table and table_key fields have ACL entries that restrict access to users with the maint role. I have no information on why this is so, but I suspect there may be a reason not to create these entries directly through the API.

ACL REST API, , GlideRecord label_entry. , .

+1

api, api .

, "Label" "Label_entry table", "Label_entry" " " ( )

{ "label": "036d0358db091f00fca43e1f7c9619pp", "": "", "": "", "_key": "24df3a484f8672c09d37a8fe0310c753", "": " - INC0028899", "": " https://tgroupdev.service-now.com/api/now/table/sys_user/036d0358db091f00fca43e1f7c9619pp",                "value": "036d0358db091f00fca43e1f7c9619pp" }

, , . . .

.

: tags_admin

" " > "" "" > " ". "". "". () . . - . . : , . . : . . : . : . . : . Tagged Documents . , . . .

Viewable by . (Me), . tags_admin , , Everyone. Active , . Tags Tags .

: tags_admin

. .

" " > "". . . "". , , .

: tags_admin

, , , , . , , , .

" " > "". , . " ". " ". . . "". , . "". , . "". .

: tags_admin

" " > "". . , . Notify onchange, , . Notify when condition, , . - Notify script. . https://docs.servicenow.com/bundle/jakarta-platform-user-interface/page/use/common-ui-elements/concept/administering-tags.html

0

Source: https://habr.com/ru/post/1652008/


All Articles