REST API Returns '401 Unauthorized' Error When Creating New Instance (POST)
search cancel

REST API Returns '401 Unauthorized' Error When Creating New Instance (POST)

book

Article ID: 382204

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

When trying to create a new instance of an object via the REST API (POST), you receive a '401 Unauthorized' error. However, using the same authentication, a GET request works (200 OK).

Environment

Any supported Clarity release.

Cause

While you are logged in Clarity with the same user you are trying to do the POST request, try to create an instance using the Modern UX (this will likely not be possible).

It may be due to insufficient 'Edit' access rights at object level; or the instance has a 'Secure' attribute that you are trying to set a value, but you do not have 'Access Edit' rights to that attribute.

Resolution

Add the necessary rights at object level and Modern UX atrribute level (for 'Secure' attributes).