Projects are getting created with blank Name and notes

Hello,

Please see the JSON i am sending to asana to create projects:
{“data”:[{“workspace”:null,“notes”:“These are things we want to purchase.”,“name”:“Custom Project”,“assignee”:null}]}

Response received from Asana : {“data”:{“gid”:“980984147367695”,“id”:980984147367695,“resource_type”:“project”,“created_at”:“2019-01-14T10:48:17.735Z”,“modified_at”:“2019-01-14T10:48:17.735Z”,“owner”:{“gid”:“967839896278404”,“id”:967839896278404,“resource_type”:“user”,“name”:“Pradip”},“due_date”:null,“current_status”:null,“public”:true,“name”:“”,“notes”:“”,“archived”:false,“workspace”:{“gid”:“967840855208084”,“id”:967840855208084,“resource_type”:“workspace”,“name”:“cm-focus.com”},“team”:{“gid”:“967848453419510”,“id”:967848453419510,“resource_type”:“team”,“name”:“AD-OPS”},“start_on”:null,“color”:null,“members”:[{“gid”:“967839896278404”,“id”:967839896278404,“resource_type”:“user”,“name”:“Pradip”}],“collaborators”:[{“gid”:“967839896278404”,“id”:967839896278404,“resource_type”:“user”,“name”:“Pradip”}]}}

Basically, Asana is accepting the response but create a project with blank name and notes though i am sending those details in my request.

I have no idea where i am doing wrong :frowning:

Please help.

1 Like

Hi @Soumen_Jana,

That is odd.

I’ve never tried creating a project without specifying a workspace. I see that in your case it seems to be putting the project into a workspace anyway, but try explicitly specifying the workspace in your request and see if that helps. That’s the only thing I can spot which seems a bit off.

1 Like

Hi @Soumen_Jana, it looks like you are sending an array, not an object. The body for creating an object in the API should be { "data": {...} } and not { "data": [...] }. However, the API should also not be accepting an array here, so I’ll file a bug for this behavior.

Thanks, Joe, I missed that! I think the fact that it created the object threw me off of looking to see if the overall format was incorrect. :slight_smile:

Thank you guys. It’s working now :slight_smile:

Successfully Processed Payload : {“data”:{“workspace”:“967840855208084”,“notes”:“These are things we want to purchase.”,“name”:“Custom Project”}}

1 Like