API调用URL地址
http://<serverName>:<portNumber>/api/v3/changes/{change_id}/metainfo
其中{change_id}为需要获取模板信息的变更ID
示例:http://192.168.0.163:8080/api/v3/changes/3/metainfo
请求参数
方法:GET
请求参数:
参数名
|
值
|
位置
|
authtoken
|
<API Key>
|
header
|
响应示例
{
"response_status":{
"status_code":2000,
"status":"success"
}, "metainfo":{
"display_key":"sdp.common.change",
"is_dynamic":false,
"plural_name":"changes",
"relationship":false,
"display_name":"变更",
"fields":{
"projects":{
"multiple":true,
"form_field":false,
"lookup_entity":"change_project_association",
"lookup_field":"name",
"sortable":false,
"href":"/changes/3/projects",
"type":"lookup",
"partial_field":false,
"searchable":false
},
"notes":{
"display_key":"sdp.change.submission.notes",
"multiple":true,
"form_field":false,
"lookup_entity":"change_note",
"lookup_field":"name",
"sortable":false,
"href":"/changes/3/notes",
"type":"lookup",
"partial_field":false,
"display_name":"备注",
"searchable":false
},
"roll_out_plan":{
"display_key":"sdp.change.rollout",
"form_field":false,
"lookup_entity":"change_descriptive_field",
"lookup_field":"name",
"href":"/changes/3/roll_out_plan",
"type":"lookup",
"partial_field":false,
"display_name":"上线计划",
"fields":{
"description":{
"display_type":"Html",
"display_name":"描述",
"type":"html"
}
}
},
"closure_code":{
"display_type":"Pick List",
"display_key":"sdp.admin.change.closurecode",
"lookup_entity":"change_closure_code",
"lookup_field":"name",
"href":"/changes/3/closure_code",
"type":"lookup",
"partial_field":false,
"display_name":"关闭代码"
},
"sla_violation":{
"display_key":"sdp.change.overdueflag.title",
"read_only":true,
"editable":false,
"form_field":false,
"sortable":false,
"type":"boolean",
"partial_field":false,
"display_name":"违反SLA"
},
"emergency":{
"display_key":"sdp.change.rfc.emergency",
"read_only":true,
"editable":false,
"form_field":false,
"sortable":false,
"type":"boolean",
"partial_field":false,
"display_name":"紧急"
},
"change_type":{
"display_type":"Pick List",
"display_key":"sdp.itil.common.changetype",
"fafr_key":"CHANGETYPE",
"lookup_entity":"change_type",
"lookup_field":"name",
"href":"/changes/3/change_type",
"type":"lookup",
"partial_field":false,
"display_name":"变更类型"
},
"review_details":{
"display_key":"sdp.change.review",
"form_field":false,
"lookup_entity":"change_descriptive_field",
"lookup_field":"name",
"href":"/changes/3/review_details",
"type":"lookup",
"partial_field":false,
"display_name":"复审",
"fields":{
"description":{
"display_type":"Html",
"display_name":"描述",
"type":"html"
}
}
},
"assets":{
"display_type":"MultiSelect",
"display_key":"sdp.itil.common.asset",
"fafr_key":"ASSET",
"multiple":true,
"lookup_entity":"ci",
"lookup_field":"name",
"href":"/changes/3/assets",
"type":"lookup",
"partial_field":false,
"display_name":"资产"
},
"status_comments":{
"multiple":true,
"form_field":false,
"lookup_entity":"change_status_comment",
"lookup_field":"name",
"sortable":false,
"href":"/changes/3/status_comments",
"type":"lookup",
"partial_field":false,
"searchable":false
},
"initiated_requests":{
"multiple":true,
"form_field":false,
"lookup_entity":"request_caused_by_change",
"lookup_field":"name",
"sortable":false,
"href":"/changes/3/initiated_requests",
"type":"lookup",
"partial_field":false,
"searchable":false
},
"id":{
"identifier":true,
"display_key":"sdp.change.listview.id",
"read_only":true,
"form_field":false,
"type":"long",
"partial_field":false,
"display_name":"ID"
},
"change_requester":{
"display_type":"Pick List",
"display_key":"sdp.change.rfc.changerequester",
"fafr_key":"INITIATOR",
"lookup_entity":"user",
"lookup_field":"name",
"href":"/changes/3/change_requester",
"type":"lookup",
"partial_field":false,
"display_name":"ChangeRequester"
},
"tasks":{
"multiple":true,
"form_field":false,
"lookup_entity":"change_task",
"lookup_field":"name",
"sortable":false,
"href":"/changes/3/tasks",
"type":"lookup",
"partial_field":false,
"searchable":false
},
"group":{
"display_type":"Pick List",
"display_key":"common.group",
"fafr_key":"GROUP",
"depends_on":[
"site"
],
"lookup_entity":"support_group",
"lookup_field":"name",
"href":"/changes/3/group",
"type":"lookup",
"partial_field":false,
"display_name":"组"
},
"created_time":{
"display_key":"sdp.change.createdtime",
"fafr_key":"CREATEDTIME",
"default_value":{
"value":1637569640941
},
"type":"datetime",
"partial_field":false,
"display_name":"创建时间",
"searchable":false
},
"item":{
"display_type":"Pick List",
"display_key":"sdp.common.item",
"fafr_key":"ITEM",
"depends_on":[
"subcategory"
],
"lookup_entity":"item",
"lookup_field":"name",
"href":"/changes/3/item",
"type":"lookup",
"partial_field":false,
"display_name":"条目"
},
"workflow":{
"display_type":"Pick List",
"display_key":"common.workflow.label",
"fafr_key":"WORKFLOW",
"lookup_entity":"workflow",
"lookup_field":"name",
"href":"/changes/3/workflow",
"type":"lookup",
"partial_field":false,
"display_name":"工作流"
},
"approval_status":{
"display_key":"sdp.approve.apprstatus",
"read_only":true,
"editable":false,
"form_field":false,
"lookup_entity":"approval_status",
"lookup_field":"name",
"href":"/changes/3/approval_status",
"type":"lookup",
"partial_field":false,
"display_name":"审批状态"
},
"impact":{
"display_type":"Pick List",
"display_key":"sdp.change.impact",
"fafr_key":"IMPACT",
"lookup_entity":"impact",
"lookup_field":"name",
"href":"/changes/3/impact",
"type":"lookup",
"partial_field":false,
"display_name":"影响"
},
"sla":{
"display_key":"sdp.admin.sla.title",
"read_only":true,
"editable":false,
"form_field":false,
"lookup_entity":"change_sla",
"lookup_field":"name",
"href":"/changes/3/sla",
"type":"lookup",
"partial_field":false,
"display_name":"服务级别协议"
},
"initiated_by_requests":{
"multiple":true,
"form_field":false,
"lookup_entity":"request_initiated_change",
"lookup_field":"name",
"sortable":false,
"href":"/changes/3/initiated_by_requests",
"type":"lookup",
"partial_field":false,
"searchable":false
},
"priority":{
"display_type":"Pick List",
"display_key":"sdp.itil.common.priority",
"fafr_key":"PRIORITY",
"lookup_entity":"priority",
"lookup_field":"name",
"href":"/changes/3/priority",
"type":"lookup",
"partial_field":false,
"display_name":"优先级"
},
"scheduled_end_time":{
"display_key":"sdp.tasks.ScheduledEndTime",
"fafr_key":"SCHEDULEDENDTIME",
"type":"datetime",
"partial_field":false,
"display_name":"计划结束",
"searchable":false
},
"reason_for_change":{
"display_type":"Pick List",
"display_key":"sdp.admin.change.reasonforchange",
"fafr_key":"REASONFORCHANGE",
"lookup_entity":"reason_for_change",
"lookup_field":"name",
"href":"/changes/3/reason_for_change",
"type":"lookup",
"partial_field":false,
"display_name":"变更理由"
},
"udf_fields":{
"type":"udf",
"fields":{
}
},
"impact_details":{
"display_key":"sdp.problem.impactdetails",
"form_field":false,
"lookup_entity":"change_descriptive_field",
"lookup_field":"name",
"href":"/changes/3/impact_details",
"type":"lookup",
"partial_field":false,
"display_name":"影响明细",
"fields":{
"description":{
"display_type":"Html",
"display_name":"描述",
"type":"html"
}
}
},
"subcategory":{
"display_type":"Pick List",
"display_key":"sdp.common.subcategory",
"fafr_key":"SUBCATEGORY",
"depends_on":[
"category"
],
"lookup_entity":"subcategory",
"lookup_field":"name",
"href":"/changes/3/subcategory",
"type":"lookup",
"partial_field":false,
"display_name":"子分类"
},
"status":{
"display_type":"Pick List",
"display_key":"sdp.admin.change.status",
"fafr_key":"STATUS",
"depends_on":[
"stage"
],
"lookup_entity":"change_status",
"lookup_field":"name",
"href":"/changes/3/status",
"type":"lookup",
"partial_field":false,
"display_name":"状态",
"mandatory":true
},
"scheduled_start_time":{
"display_key":"sdp.tasks.ScheduledStartTime",
"fafr_key":"SCHEDULEDSTARTTIME",
"type":"datetime",
"partial_field":false,
"display_name":"计划开始",
"searchable":false
},
"descriptive_fields":{
"multiple":true,
"form_field":false,
"lookup_entity":"change_descriptive_field",
"lookup_field":"name",
"sortable":false,
"href":"/changes/3/descriptive_fields",
"type":"lookup",
"partial_field":false,
"searchable":false
},
"problems":{
"multiple":true,
"form_field":false,
"lookup_entity":"change_problem_association",
"lookup_field":"name",
"sortable":false,
"href":"/changes/3/problems",
"type":"lookup",
"partial_field":false,
"searchable":false
},
"template":{
"display_type":"Pick List",
"display_key":"sdp.changeform.choose.template",
"fafr_key":"TEMPLATE",
"lookup_entity":"change_template",
"lookup_field":"name",
"href":"/changes/3/template",
"type":"lookup",
"partial_field":false,
"display_name":"模板"
},
"short_description":{
"read_only":true,
"editable":false,
"form_field":false,
"type":"string",
"partial_field":true
},
"attachments":{
"display_key":"sdp.common.attachments",
"multiple":true,
"form_field":false,
"lookup_entity":"attachment",
"lookup_field":"name",
"sortable":false,
"href":"/changes/3/attachments",
"type":"lookup",
"partial_field":false,
"display_name":"附件",
"searchable":false
},
"roles":{
"display_key":"sdp.change.submission.roles",
"multiple":true,
"form_field":false,
"lookup_entity":"change_to_change_role",
"lookup_field":"name",
"sortable":false,
"href":"/changes/3/roles",
"type":"lookup",
"partial_field":false,
"display_name":"角色",
"fields":{
"4":{
"display_type":"MultiSelect",
"prominent":true,
"placeholder_string":"i18n.sdp.release.user",
"lookup_entity":"user",
"href":"/changes/change_requester",
"display_name":"CAB",
"type":"lookup"
},
"5":{
"display_type":"MultiSelect",
"prominent":true,
"depends_on":[
"site"
],
"placeholder_string":"i18n.sdp.release.technician",
"lookup_entity":"technician",
"href":"/changes/change_owner",
"display_name":"ChangeApprover",
"type":"lookup"
},
"6":{
"display_type":"MultiSelect",
"prominent":true,
"depends_on":[
"site"
],
"placeholder_string":"i18n.sdp.release.technician",
"lookup_entity":"technician",
"href":"/changes/change_owner",
"display_name":"SharedRole",
"type":"lookup"
},
"7":{
"display_type":"MultiSelect",
"prominent":false,
"placeholder_string":"i18n.sdp.release.user",
"lookup_entity":"user",
"href":"/changes/change_requester",
"display_name":"Line Manager",
"type":"lookup"
},
"8":{
"display_type":"MultiSelect",
"prominent":false,
"depends_on":[
"site"
],
"placeholder_string":"i18n.sdp.release.technician",
"lookup_entity":"technician",
"href":"/changes/change_owner",
"display_name":"Implementer",
"type":"lookup"
},
"9":{
"display_type":"MultiSelect",
"prominent":false,
"depends_on":[
"site"
],
"placeholder_string":"i18n.sdp.release.technician",
"lookup_entity":"technician",
"href":"/changes/change_owner",
"display_name":"Reviewer",
"type":"lookup"
}
},
"searchable":false
},
"downtimes":{
"display_key":"sdp.change.downtime",
"multiple":true,
"form_field":false,
"lookup_entity":"downtime",
"lookup_field":"name",
"sortable":false,
"href":"/changes/3/downtimes",
"type":"lookup",
"partial_field":false,
"display_name":"停机时间",
"searchable":false
},
"description":{
"display_key":"sdp.common.description",
"sortable":false,
"type":"html",
"partial_field":false,
"display_name":"描述"
},
"title":{
"display_type":"Single Line",
"display_key":"sdp.common.title",
"fafr_key":"TITLE",
"type":"string",
"partial_field":true,
"display_name":"标题",
"mandatory":true,
"constraints":{
"max_length":250
}
},
"change_owner":{
"display_type":"Pick List",
"display_key":"sdp.change.rfc.changeowner",
"fafr_key":"TECHNICIAN",
"lookup_entity":"technician",
"lookup_field":"name",
"href":"/changes/3/change_owner",
"type":"lookup",
"partial_field":false,
"display_name":"ChangeOwner"
},
"next_review_on":{
"display_type":"Date/Time",
"display_key":"sdp.change.review.edit.nextschedule.forhistory",
"type":"datetime",
"partial_field":false,
"display_name":"下个复审日期",
"searchable":false
},
"urgency":{
"display_type":"pick_list",
"display_key":"sdp.itil.common.urgency",
"fafr_key":"URGENCY",
"lookup_entity":"urgency",
"lookup_field":"name",
"href":"/changes/3/urgency",
"type":"lookup",
"partial_field":false,
"display_name":"紧急度"
},
"close_details":{
"display_key":"sdp.change.closedetails",
"form_field":false,
"lookup_entity":"change_descriptive_field",
"lookup_field":"name",
"href":"/changes/3/close_details",
"type":"lookup",
"partial_field":false,
"display_name":"关闭明细",
"fields":{
"description":{
"display_type":"Html",
"display_name":"描述",
"type":"html"
}
}
},
"worklogs":{
"multiple":true,
"form_field":false,
"lookup_entity":"worklog",
"lookup_field":"name",
"sortable":false,
"href":"/changes/3/worklogs",
"type":"lookup",
"partial_field":false,
"searchable":false
},
"summary":{
"read_only":true,
"form_field":false,
"lookup_entity":"change_summary",
"lookup_field":"name",
"sortable":false,
"href":"/changes/3/summary",
"type":"lookup",
"partial_field":false,
"searchable":false
},
"change_manager":{
"display_type":"Pick List",
"display_key":"sdp.admin.changemanager",
"fafr_key":"CHANGEMANAGER",
"lookup_entity":"technician",
"lookup_field":"name",
"href":"/changes/3/change_manager",
"type":"lookup",
"partial_field":false,
"display_name":"ChangeManager"
},
"approval_levels":{
"editable":false,
"multiple":true,
"form_field":false,
"lookup_entity":"change_approval_level",
"lookup_field":"name",
"sortable":false,
"href":"/changes/3/approval_levels",
"type":"lookup",
"partial_field":false,
"searchable":false
},
"retrospective":{
"display_key":"sdp.change.rfc.retrospective",
"sortable":false,
"type":"boolean",
"partial_field":false,
"display_name":"回顾"
},
"checklist":{
"display_key":"sdp.change.checklist",
"form_field":false,
"lookup_entity":"change_descriptive_field",
"lookup_field":"name",
"href":"/changes/3/checklist",
"type":"lookup",
"partial_field":false,
"display_name":"检查表",
"fields":{
"description":{
"display_type":"Html",
"display_name":"描述",
"type":"html"
}
}
},
"services":{
"display_type":"MultiSelect",
"display_key":"sdp.itil.common.serviceaffected",
"fafr_key":"SERVICE",
"multiple":true,
"lookup_entity":"service_category",
"lookup_field":"name",
"href":"/changes/3/services",
"type":"lookup",
"partial_field":false,
"display_name":"受影响的服务"
},
"back_out_plan":{
"display_key":"sdp.change.backout",
"form_field":false,
"lookup_entity":"change_descriptive_field",
"lookup_field":"name",
"href":"/changes/3/back_out_plan",
"type":"lookup",
"partial_field":false,
"display_name":"回退计划",
"fields":{
"description":{
"display_type":"Html",
"display_name":"描述",
"type":"html"
}
}
},
"releases":{
"multiple":true,
"form_field":false,
"lookup_entity":"release_change_association",
"lookup_field":"name",
"sortable":false,
"href":"/changes/3/releases",
"type":"lookup",
"partial_field":false,
"searchable":false
},
"site":{
"display_type":"Pick List",
"display_key":"sdp.helpdesk.common.site",
"fafr_key":"SITE",
"lookup_entity":"site",
"lookup_field":"name",
"href":"/changes/3/site",
"type":"lookup",
"partial_field":false,
"display_name":"地点"
},
"stage":{
"display_type":"Pick List",
"display_key":"sdp.admin.change.stage",
"fafr_key":"STAGE",
"lookup_entity":"change_stage",
"lookup_field":"name",
"href":"/changes/3/stage",
"type":"lookup",
"partial_field":false,
"display_name":"阶段",
"mandatory":true
},
"completed_time":{
"display_key":"sdp.change.completedtime",
"fafr_key":"COMPLETEDTIME",
"type":"datetime",
"partial_field":false,
"display_name":"完成时间",
"searchable":false
},
"risk":{
"display_type":"Pick List",
"display_key":"sdp.admin.change.risk",
"fafr_key":"RISK",
"lookup_entity":"risk",
"lookup_field":"name",
"href":"/changes/3/risk",
"type":"lookup",
"partial_field":false,
"display_name":"风险"
},
"comment":{
"display_type":"Multi Line",
"sortable":false,
"type":"string",
"partial_field":false,
"constraints":{
"max_length":-1
},
"searchable":false
},
"category":{
"display_type":"Pick List",
"display_key":"sdp.common.category",
"fafr_key":"CATEGORY",
"lookup_entity":"category",
"lookup_field":"name",
"href":"/changes/3/category",
"type":"lookup",
"partial_field":false,
"display_name":"分类"
},
"notes_present":{
"read_only":true,
"form_field":false,
"sortable":false,
"type":"boolean",
"partial_field":false
}
},
"entity":"change"
}}
Postman示例
Python脚本示例
#Python version - 3.9
#需要安装requests模块
import requests
url = "http://192.168.0.163:8080/api/v3/changes/3/metainfo"
headers = {"authtoken":"2D02FD93-9BD8-484E-ADEF-727FA69A161B"}
response = requests.get(url,headers=headers,verify=False)
print(response.text)