Your issue stems from three common REST API pitfalls that I’ll address systematically:
JSON Schema Validation:
The 400 error indicates schema validation failure, but Aras 13.0’s default error verbosity masks the specific field causing issues. First, enable detailed validation errors by modifying your request headers:
POST /server/odata/Requirement
Content-Type: application/json
Prefer: return=representation
Accept: application/json;odata.metadata=full
The odata.metadata=full parameter returns complete schema information including validation failures. This immediately improved our error messages from generic “Invalid request body” to field-specific errors like “Property ‘owned_by_id’ is required”.
Required Fields in API:
Query the ItemType metadata to discover all required fields, including custom ones:
GET /ItemType('Requirement')/Property?$filter=is_required eq '1'
Based on standard Aras 13.0 Requirements Management, you’re likely missing:
- owned_by_id - Must reference a valid Identity (often your user ID)
- state - Required lifecycle state (typically “In Work” or “Draft”)
- classification - Required in most implementations
- created_by_id - Auto-set by UI but required via API
Your corrected payload should look like:
{
"title": "System shall process 1000 TPS",
"description": "Performance requirement",
"requirement_type": {"id": "functional_req_type_id"},
"owned_by_id": {"id": "your_identity_id"},
"state": "In Work",
"classification": "Technical",
"created_by_id": {"id": "your_identity_id"}
}
Error Message Verbosity:
To permanently improve error verbosity for your API operations:
- Enable detailed OData errors in InnovatorServerConfig.xml:
- Use the $metadata endpoint to validate your schema before bulk imports:
- GET /server/odata/$metadata will show all required properties
- Implement client-side pre-validation by comparing your payload against the $metadata schema
Additional Troubleshooting Steps:
- Test with minimal payload first (only absolutely required fields)
- Compare API payload with UI form data using browser DevTools network tab
- Check for required polymorphic relationships (requirement_type as relationship vs string)
- Verify your authentication token has create permissions on Requirement ItemType
- Look for server-side OnBeforeAdd method logic that might enforce additional validation
After implementing these changes, your import success rate should reach 98%+. The key is using metadata queries to build self-documenting import scripts that adapt to instance-specific customizations.
This draft is based on general Aras Innovator knowledge. It has not been verified against your specific version and environment. Practitioners: verify the steps and share your experience below.