Rest API: Error ODF-0015 Creating Custom Investment Instance
search cancel

Rest API: Error ODF-0015 Creating Custom Investment Instance

book

Article ID: 255946

calendar_today

Updated On:

Products

Clarity PPM SaaS Clarity PPM On Premise

Issue/Introduction

One or more of the following errors are shown from 

1. REST API Tool

{
    "resourceId": null,
    "httpStatus": "400",
    "errorMessage": "ODF-0015: Value must be unique.",
    "errorCode": "odf.uniqueIndexViolation"
}
2. APP Logs

ERROR 2022-12-09 17:15:45,245 [http-nio-80-exec-37] rest.validation (clarity:user:session:PPM_REST_API) ODFResourceProvider :: Could not create resource. Object code alias: [ requestUrl: http://<host>/ppm/rest/v1/custCustomers , _restResourceName : custCustomers , _id : null , _parentInfo : null , _apiVersion : v1 , _includeLinksArray : true , _contextId : -1 , _hierarchyId : -1 , _isGroupBy : false , _isPartition : false]
ERROR 2022-12-09 17:15:45,245 [http-nio-80-exec-37] rest.validation (clarity:user:session:PPM_REST_API) ExceptionInfo ::  Could not create resource. Resource name: custCustomers. Error code: odf.uniqueIndexViolation Error message: ODF-0015: Value must be unique.

Environment

Release : 16.0.3

Resolution

GET 
/ppm/rest/v1/<custom_investment>

Ensure the following JSON body is unique in both required fields(name,code):

POST
/ppm/rest/v1/<custom_investment>

{
  "name": "Test",
   "code": "12345"
}