Allocation API call fails with status 400 and error message that attributes are not supported
search cancel

Allocation API call fails with status 400 and error message that attributes are not supported

book

Article ID: 418060

calendar_today

Updated On:

Products

Clarity PPM On Premise

Issue/Introduction

While trying to create allocations via postman we get the error.

{
    "resourceId": null,
    "httpStatus": "400",
    "errorMessage": "Attribute(s) 'resource, investment, allocationCurve' are not supported.",
    "errorCode": "validation.invalidApiAttribute"
}

Here are the details of the API call made in postman

POST: - https://<clarity_url>/ppm/rest/v1/obaStaffs

Headers (Key and Value) :- Key: x-api-association-key; Value: obaStaffs~resources

{
  "resource": "5xxxxxx",
  "investment": "5xxxxxx",
  "allocationCurve": {
    "isFiscal": false,
    "curveType": "value",
    "dataType": "numeric",
    "_type": "tsv",
    "workEffortUnit": "hours",
    "start": "2025-03-06T00:00:00",
    "finish": "2025-09-30T00:00:00",
    "periodList": [
      {
        "periodType": "months",
        "periods": [
          {
            "start": "2024-12-16T00:00:00",
            "finish": "2025-01-19T00:00:00",
            "value": 0
          }
        ]
      }
    ]
  }
}

Environment

Clarity 16.3.0

Cause

Customers network (proxy) settings appears to strip out or filter "non-standard" or "unknown" HTTP headers by default. x-api-association-key is a custom header, not a standard HTTP header like Content-Type or Authorization. If the proxy removes x-api-association-key before the request reaches the Clarity API server, the server will interpret the request as a basic POST /obaStaffs without any specific association context.

Resolution

Postman has a "Params" tab. When you can enter custom key-value pairs and Postman automatically constructs the query string and appends it to the URL before sending the request. This way the query params are visible in the URL and stripping it before reaching the clarity API.