Create New Enum options for an existing custom field through Asana API

custom-fields

#1

I have been trying to create a new enum option for an existing custom field but, I have been getting an error. Below is my postman code:

https://app.asana.com/api/1.0/custom_fields/123456789/enum_options
{
“data”:

      					{
      						"name":"Test"}

}

And Below is my error :

“message”: “You should specify one of custom”,

I have tried using all the parameters provided in the Asana api documentation but it still gives the same error. Can anyone please help me?


#2

Are you able to do it using the API Explorer in the API documentation?


#3

Hi @Prachi_Behl, sorry for the trouble. This error was caused by a misconfiguration in our routing, for which a fix has been deployed this morning. Can you let us know if you’re still encountering this error?


#4

Hello Joe,
It seems to be working just fine now. Thank you for helping me out.


#5

Hey @Joe_Trollo sorry for @mentioning you in an old thread, but I feel like this might be related.

I’m trying to create a webhook:

POST /api/1.0/webhooks?workspace=a workspaceHTTP/1.1
Host: app.asana.com
Content-Type: application/json
Authorization: Bearer a token
cache-control: no-cache
{
“resource”: “a number”,
“target”: “a url”
}

and it’s failing with the message:
{“errors”:[{“message”:“You should specify one of resource”,“help”:“For more information on API status codes and how to handle them, read the docs on errors: https://asana.com/developers/documentation/getting-started/errors”}]}

I’m able to perform other actions, but I can’t create a webhook.


#6

Hi @Gearoid_O_Fearghail, are you wrapping your request body in a "data" object? For the request you’re trying to make, you should be sending

{
  "data": {
    "resource": "a number",
    "target": "a url"
  }
}

#7

Hey Joe,

That did indeed work, thanks. I was just trying to transpose off the post params format that’s in the docs. Cheers