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)会返回类似于以下内容的响应:
..
"status": "INP",
...
如何从这些回复中获得人类可读的状态?您是否对所有可能的值进行硬编码,或者是否可以使用查询来实现?
即:“INP”> “进行中”
答案 0 :(得分:1)
您可以从自定义枚举表(CSTEM)中提取这些值。例如,这将返回所有任务描述:
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”。
答案 1 :(得分:0)
我创建了词典并在阅读简短版本时翻译状态(INP>进行中)