REST API for To Dos does not include Custom Attributes

book

Article ID: 221028

calendar_today

Updated On:

Products

Clarity PPM SaaS

Issue/Introduction

I have three custom attributes added to To Dos, all of which have API Attribute IDs and display properly in the New UX.  I'm trying to use the REST API to create a large number of To Dos using Python, which I already did with Tasks.  When using Postman to test the call I receive a 400 error 

{   "resourceId"null,
    "httpStatus""400",
    "errorMessage""Attribute(s) 'c_store_number, c_details' are not supported.",
    "errorCode""validation.invalidApiAttribute"}

The describe endpoint, as well as the API browser, both fail to include my custom attributes.

https://cppmxxxx.ondemand.ca.com/ppm/rest/v1/describe/todos and https://cppmxxxx.ondemand.ca.com/niku/rest/describe/index.html#!/Project/CaPpmPOSTtodosEntity

Is there something special about To Dos that are causing this problem, or do I need to do something additional to make these attributes work for To Dos?  I did not have the same problem with Tasks, and I don't see anything in the documentation that would lead me to believe that this should be happening.

Environment

Release : 15.9.1

Component : Clarity MUX To Dos

Resolution

Old todos API has been deprecated and obaTodos is the new API to retrieve/modify todos. Old API no longer supports create/edit/delete and it can be used to only read/get an old To Do record. Same has been updated in Swagger as well from 15.9.3. POST/PUT/DELETE no longer available in swagger for todos. Only GET is available.

Retrieve To-Do Instances:- 

GET https://your_cppm/ppm/rest/v1/obaTodos

HEADER 

Name: x-api-association-key Value: obaTodos~tasks

 

Update Custom Attributes:-

PATCH https://your_cppm/ppm/rest/v1/obaTodos/<internalidoftodo>

HEADER 

Name: x-api-association-key Value: obaTodos~tasks

BODY 

{"z_test_attribute":"test3"}

 

 

Create New To - DO Instances:-

POST https://cppmxxxx/ppm/rest/v1/obaTodos

HEADER 

Name: x-api-association-key Value: obaTodos~tasks

BODY

{"name":"test3","obaAssociation":5062603}

obaAssociation is the internal id of the task on which to do needs to be created on.