You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Trello API技术问询:如何获取卡片中自定义字段的具体值

如何通过Trello API获取自定义字段的实际值?

我正在用Trello API获取卡片信息,但不知道怎么获取自定义字段的设置值。下图是带有若干自定义字段及对应值的卡片:

带有自定义字段的Trello卡片

我发送GET请求到:
https://api.trello.com/1/cards/{cardId}?key={trelloKey}&token={trelloToken}&card_customFieldItems=true
得到的卡片信息如下,但其中不包含自定义字段:

{"id": "6022f966865fcb70b03f8cb3","badges": {"attachmentsByType": {"trello": {"board": 0,"card": 0}},"location": false,"votes": 0,"viewingMemberVoted": false,"subscribed": false,"fogbugz": "","checkItems": 30,"checkItemsChecked": 5,"checkItemsEarliestDue": null,"comments": 48,"attachments": 0,"description": true,"due": "2021-07-22T22:54:23.000Z","dueComplete": false,"start": "2021-08-11T00:00:00.000Z"},"checkItemStates": [{"idCheckItem": "61a65b5df97d530c5fa6dbac","state": "complete"},{"idCheckItem": "612d013f446e1806f55af402","state": "complete"},{"idCheckItem": "616522ea10fc1b8e352d04b0","state": "complete"},{"idCheckItem": "616525ecd463b0671871e0ae","state": "complete"},{"idCheckItem": "60f9f65443f17d509472439a","state": "complete"}],"closed": false,"dueComplete": false,"dateLastActivity": "2023-03-22T14:39:14.901Z","desc": "some description","descData": null,"due": "2021-07-22T22:54:23.000Z","dueReminder": -1,"email": null,"idBoard": "5b7bf48f8439ad2c1d5359e8","idChecklists": ["60f9f65097429c7669ec25b2","60f9f650ac549119b952e57e","60f9f651310ae602d4b2b25e","60f9f651b5c1d60c0d076962","60f9f6543cbf4519bc3a1d2d","60f9f65423b32263c93ab2c9","60f9f65443f17d5094724396","623486b041358424196a7000","631898f2ee40800125606c38"],"idList": "601d140c0e86f707796d05c1","idMembers": ["5cbe5c943c8d27750b5e27f2"],"idMembersVoted": [],"idShort": 605,"idAttachmentCover": null,"labels": [],"idLabels": [],"manualCoverAttachment": false,"name": "Test - Jomar - 2/9/2021 21:04:56: $45","pos": 817539754.6666666,"shortLink": "6y9J6umX","shortUrl": "https://trello.com/c/6y9J6umX","start": "2021-08-11T00:00:00.000Z","subscribed": false,"url": "https://trello.com/c/6y9J6umX/605-test-jomar-2-9-2021-210456-45","cover": {"idAttachment": null,"color": null,"idUploadedBackground": null,"size": "normal","brightness": "light","idPlugin": null},"isTemplate": false,"cardRole": null}

之后我发送GET请求到:
https://api.trello.com/1/cards/{cardId}/customFieldItems?key={trelloKey}&token={trelloToken}&card_customFieldItems=true
获取到了卡片的自定义字段:

[{"id": "6418dfc87cd38440817413bb","idValue": "602fc6c6a6ed4e4c1ec070f6","idCustomField": "600841c33b833e52356627d4","idModel": "6022f966865fcb70b03f8cb3","modelType": "card"},{"id": "6089ffb9de6d2e0a2b92c3c5","idValue": "60083fcaea399523d6a91ed0","idCustomField": "60083fcaea399523d6a91ecd","idModel": "6022f966865fcb70b03f8cb3","modelType": "card"},{"id": "6418dfc2f3eeda2c1ca3486e","idValue": "5f7c96ff499bee6e6c91c8a8","idCustomField": "5f7c96ff499bee6e6c91c8a7","idModel": "6022f966865fcb70b03f8cb3","modelType": "card"},{"id": "63dcd004cf343905f3e4dd01","value": {"text": "Jomar Garcia"},"idCustomField": "5f7c9682ceaf796852a56cc3","idModel": "6022f966865fcb70b03f8cb3","modelType": "card"}]

可以看到,只有最后一个字段返回了具体值(对应图片中的expert字段),其余结果仅返回idValue。我在Trello API文档里没找到通过idValue获取对应实际值的相关说明,参考了相关问题也没能解决。


内容的提问来源于stack exchange,提问作者Cristian Morales

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.26 06:10:23