Rest API: How to create ToDo
search cancel

Rest API: How to create ToDo

book

Article ID: 257644

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

We are unable to create a ToDo via the PPM API swagger. We always get an unauthorized error:

{
  "resourceId": null,
  "httpStatus": "401",
  "errorMessage": "API-1007 : You are not authorized to process request. Contact your system administrator for necessary security rights.",
  "errorCode": "api.unauthorized"
}

What is required to create a ToDo via API?

Cause

A header is required: x-api-association-key = obaTodos~tasks

Make sure you are also passing the correct x-api-association-key header. Inspect the request header in developer tools.

Resolution

Use Postman or a similar API platform to create ToDos

Headers content:

Key: x-api-association-key

Value: obaTodos~custJoxiobs~include_descendants

Body of the request

{"name":"aaaa","obaAssociation":5021005}