Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Trello REST API - Checkitem update member

Edited

Does anyone know the correct method of updating the member for a checkitem on a card? The Trello REST API docucmentation doesn't yet describe how to do this.

I've tried doing a PUT request to the correct endpoint for the checklist, like this:

https://api.trello.com/1/cards/{id}/checkItem/{idCheckItem}?due={yyyy-mm-ddThh:mm:ss.000Z}&idMember={idMember}&key={key}&token={token}

The due date is correctly set, but the member never gets set and the REST API reports no errors.

If I do a GET request to see what the current field values are for that checkitem, the JSON response is:

{
  "idChecklist": "5fb5af30a002b753bdfa5755",
  "state": "incomplete",
  "id": "5fb5af96581f6180fb36d8a2",
  "name": "The checkitem name",
  "nameData": null,
  "pos": 101034,
  "due": "2021-02-12T07:00:00.000Z",
  "idMember": null
}

If then I manually set the member using the web interface, then send that GET request again for the same checkitem, I can see the member is now set:

{
  "idChecklist": "5fb5af30a002b753bdfa5755",
  "state": "incomplete",
  "id": "5fb5af96581f6180fb36d8a2",
  "name": "The checkitem name",
  "nameData": null,
  "pos": 101034,
  "due": "2021-02-12T07:00:00.000Z",
  "idMember": 5f67d7cdb2916e4b3f4fcc7e
}

3 answers

1 accepted

0 votes
Answer accepted

Problem resolved to faulty code. Two REST API endpoints exist for updating member for checkitem

@David Bakkers 

Bottomline. No business class, the fields are not updated. Am I right?

Yes. You are right.

@David Bakkers 

The api appears to be different from the documentation

PUT /1/cards/{idCard}/checklist/{idChecklist}/checkItem/{idCheckItem}

because due and member is specific to Advanced Checklist no info is provided there. I recall be able to do both by unpacking a python wrapper update both. 

Are you saying members cannot be added to checkitems via the endpoint I've used and must be added via the endpoint you've shown above? I tried that too and also got the same result.

Can you please provide an example of the Put method (ie the URL and Body of the request) you used to add a member to a checkitem.

Thanks,

@David Bakkers 

 

The api was taken from Trello documentation page which I observed to be different. I will need to dig up my notes. 

@David Bakkers 

EDDDD094-98A5-4AD0-B6DF-1754126FF32E.jpeg

I recall unpacking from this python function for member. 

@David Bakkers 

Not so good news. I coded a test program. It seems that it does not work for idMember as well a due. Could it be that I am no longer on Business Class trial?

OK, I've found how to do it. It's done by doing a Put request to either the endpoint for the checkItem in the card OR the checkitem in the checklist in the card.

This is one method:

PUT /1/cards/{id}/checkItem/{idCheckItem}?due={yyyy-mm-ddThh:mm:ss.000Z}&idMember={idMember}&key={key}&token={token}


This is the other:

PUT /1/cards/{id}/checkList/{idCheckList}/checkItem/{idCheckItem}?due={yyyy-mm-ddThh:mm:ss.000Z}&idMember={idMember}&key={key}&token={token}

If you prefer, you can define the due, idMember, key and token values in a JSON formatted body of the request instead of within the URL.

When I used these methods with Postman, they worked fine. When I used my code (PowerShell), it didn't work.

It turned out to be an obscure aberration in the PS code itself that, once I fixed it, the request worked fine.

@David Bakkers 

Congrats.

That final API is exactly the same as the one I tested. Out of curiosity, are you on Business Class?

I, personally, am not on Business Class. But, I also have access to Trello via an Enterprise level license via some others that I'm working for, so I used their Trello instance to double check everything is working correctly and also see the results via the web interface.

It's a bit misleading that the REST API will not give you any errors if you set the due date and member for a checkitem if you don't have Business Class or higher, so you are fooled into thinking everything has worked. However, when you check the value of the due date and member after setting them, they are still 'null'.

@David Bakkers 

I am back on this again. I do not have business class. So are you saying that if API runs clean, the update is actual successful except that when you try to retrieve it back it will show None? or null?

Sort of; it depends on what you mean by 'cleanly'.

  • If by 'cleanly' you mean "no errors", then yes, it's clean
  • If by cleanly you mean "the value is set and no errors", then no, it's not clean

If you don't have Business Class, you can use the REST API to TRY to set or update the value, and get no error, but in reality, the value doesn't get set to anything, it stays as null / none.

It would be better if the REST API gave an error and at least told you that your license level doesn't allow setting that value, or something similar.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Trello

Taco Tuesday: Your favorite Trello blog takeaway

Hello friends! From the community that brought you Welcome Wednesday, Throwback Thursday and Friday Fun, welcome to Taco Tuesday, a weekly discussion about all things Trello. The best part? One Tac...

400 views 14 12
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you