Workfront API:问题和项目的人类可读状态
Workfront API: Human readable status for Issues and Projects
https://support.workfront.com/hc/en-us/articles/115003574147-API-Basics
https://support.workfront.com/hc/en-us/categories/202718477
查询对象(即:GET /attask/api/v9.0/project/4c78821c0000d6fa8d5e52f07a1d54d0)returns 类似于以下内容的响应:
..
"status": "INP",
...
如何从这些响应中获得人类可读的状态?您是硬编码所有可能的值,还是可以使用查询来实现?
即:"INP" > "In Progress"
您可以从自定义枚举表 (CSTEM) 中提取这些值。例如,这将 return 所有任务描述:
https://subdomain.my.workfront.com/attask/api/v9.0/CSTEM/search?apiKey={{apiKey}}&fields=*&enumClass=STATUS_TASK&enumClass_Mod=in
你会得到这样的东西:
{
"color": "FF3939",
"equatesWith": "CPL",
"groupID": "5419c94f00004a056282a15eed58e47f",
"label": "Complete",
"objCode": "CSTEM",
"value": "CPL",
"ID": "57ed3a2000477cfb7368beb5d995bf88",
"customerID": "540f5a3f0019b...",
"description": "Task is fully completed",
"enumClass": "STATUS_TASK",
"extRefID": null,
"isPrimary": true,
"valueAsInt": null,
"valueAsString": "CPL"
},
如有问题,请使用 "STATUS_OPTASK"。
我在阅读简短版本(INP > 进行中)时创建了字典并翻译了状态
https://support.workfront.com/hc/en-us/articles/115003574147-API-Basics https://support.workfront.com/hc/en-us/categories/202718477
查询对象(即:GET /attask/api/v9.0/project/4c78821c0000d6fa8d5e52f07a1d54d0)returns 类似于以下内容的响应:
..
"status": "INP",
...
如何从这些响应中获得人类可读的状态?您是硬编码所有可能的值,还是可以使用查询来实现?
即:"INP" > "In Progress"
您可以从自定义枚举表 (CSTEM) 中提取这些值。例如,这将 return 所有任务描述:
https://subdomain.my.workfront.com/attask/api/v9.0/CSTEM/search?apiKey={{apiKey}}&fields=*&enumClass=STATUS_TASK&enumClass_Mod=in
你会得到这样的东西:
{
"color": "FF3939",
"equatesWith": "CPL",
"groupID": "5419c94f00004a056282a15eed58e47f",
"label": "Complete",
"objCode": "CSTEM",
"value": "CPL",
"ID": "57ed3a2000477cfb7368beb5d995bf88",
"customerID": "540f5a3f0019b...",
"description": "Task is fully completed",
"enumClass": "STATUS_TASK",
"extRefID": null,
"isPrimary": true,
"valueAsInt": null,
"valueAsString": "CPL"
},
如有问题,请使用 "STATUS_OPTASK"。
我在阅读简短版本(INP > 进行中)时创建了字典并翻译了状态