We’re automating requirement creation in Agile 9.3.4 via REST API and hitting a consistent ‘Invalid JSON schema’ error. The API accepts the POST but rejects during validation. We’ve verified the JSON structure matches documentation, but clearly missing something with required field enforcement.
Here’s our payload structure:
{
"class": "Requirement",
"number": "REQ-2025-001",
"description": "Integration test requirement"
}
The error indicates schema validation failure but doesn’t specify which field. This is blocking our entire automation pipeline. Has anyone dealt with REST API payload structure requirements for the requirements module? What fields are actually mandatory beyond what’s documented?
The JSON schema validation in Agile is notoriously picky about field types too. Make sure your description field isn’t exceeding the maximum length defined in the schema. I’d recommend using the GET endpoint first on an existing requirement to see the exact JSON structure that Agile expects, including all the hidden metadata fields. That’ll show you the complete schema with proper field types and required attributes.
Good suggestions. I pulled a sample requirement via GET and noticed several additional fields in the response. The schema includes ‘lifecyclePhase’, ‘priority’, and ‘owner’ fields. Are all of these truly required for creation, or can some be null? Also seeing nested objects for ‘category’ and ‘project’ references - do these need full object structures or just IDs?
Don’t forget about custom attributes if your requirement class has any mandatory ones defined. The API won’t tell you explicitly, but any attribute marked as required in the class definition must be included in your JSON payload. You can query the class metadata via the API to get the list of required attributes. This caught me out for weeks until I discovered our business had marked several custom fields as mandatory.
I’ve seen this before. The requirements API in 9.3.4 has undocumented mandatory fields. You need to include the requirement type and status fields even if you want defaults. The schema validator is strict about object initialization. Try adding ‘type’ and ‘status’ to your payload. Also check if your API user has the ‘Create Requirement’ privilege in their role.