Solved

Remove assignee

  • 20 November 2020
  • 1 reply
  • 100 views

Userlevel 5


Hello, is it possible remove an assignee via API? I'm trying to use updateCard https://api-docs.pipefy.com/reference/mutations/updateCard/ without success

icon

Best answer by Marcos Carvalho 20 November 2020, 15:30

View original

1 reply

Userlevel 6
Badge +6

Hey Nigel, 

 

If your card has just one assignee, you can run a updateCard mutation with an empty value in the assignee field_value, like this: 

 

mutation{updateCard(input:{id:123456789, assignee_ids:[0]}) {
clientMutationId
card{
pipe {
id
}
assignees {
id
}}
}}

 

But it’s important to mention here that this mutation replace any value in the assignee field_value.

So if there’s more than on assignee you must run the mutation with the assignee id you need to keep in the card, excluding the rest of assignee ids.

 

Like this:

 

My card has two assignees: 
 

{
"data": {
"card": {
"assignees": [
{
"id": "654321"
},
{
"id": "987654"
}
]
}
}
}



But I want to keep just the 987654. So my mutation will be:

mutation{updateCard(input:{id:392042201, assignee_ids:[987654]}) {
clientMutationId
card{
pipe {
id
}
assignees {
id
}}
}}

 

Hope it helps you :) 

Reply