Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Trello API, Get Custom Field items for Single Card

Gerasim Gerasimov
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 27, 2018

Hi!

I had read the "section-get-customfielditem-for-single-card" a many times already, but don't get custom fields object from selected card (got the "400" error). I guess, because i don't define key&token for authentification.

I know the ID of selected card (cardID) and create the url for request:
url = 'https://api.trello.com/1/cards/'+cardID+'/?fields=name&customFieldItems=true/

Where i must write down the key and token (?key='+o.key+'&token='+o.token) for correct data request? Show me please a full url string for "Get Custom Field items for Single Card"

 

2 answers

0 votes
Gerasim Gerasimov
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 28, 2018

Many thanks!
i do code of orders execution control for visualization Trello-cards information.
The program is scaning cards like that "To Do", and drawing the linear diagrams for each order:
1) days in do process (gray)
2) days until Due-time (green)
3) days of overdue (red)
All these diagrams scaling by max days of overdue, and max normal execution days.
That i have at this moment, see at attached image.

Custom Field i will use for visualisation of orders stages: (design, equipment, assembly, delivery)expiration.png

0 votes
marc -Collabello--Phase Locked-
Community Champion
August 28, 2018

From the API documentation:

    https://api.trello.com/1/boards/560bf4298b3dda300c18d09c?fields=name,url&key={YOUR-API-KEY}&token={AN-OAUTH-TOKEN}

It seems to me that you don't format your request correctly.  Your request looks like:

    WRONG url = 'https://api.trello.com/1/cards/'+cardID+'/?fields=name&customFieldItems=true/'

It should look like:

    GET 'https://api.trello.com/1/cards/' + cardID + '/customFieldItems?key=' + YOUR-API-KEY + '&token=' + AN-OAUTH-TOKEN

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events