Product Documentation
Abstract
Using REST API, a user can create OpenPages objects using a POST to /grc/api/contents.
But this functionality doesn't provide a verification of the required fields, if the user just specify the name and no more, all the other fields will have the default or a blank value (no matter if the field is required or not).
Content
A user can create an Issue using a POST to /grc/api/contents using next JSON that only sets one field.
{
"name": "Test Case 1"
"description": "Test Case 1",
"typeDefinitionId": "<typeDefinitionId>",
"primaryParentId": "<primaryParentId>",
"fields": {
"field": [
{
"dataType": "STRING_TYPE",
"id": "<fieldId>",
"name": "<fieldName>"
"hasChanged": false,
"value": "Test Case 1"
}
]
}
}
Required fields are defined in the profile and/or the field definition.
The result of the above code is that the object is created and no message related to the required fields is shown.
This is not an error in the software, that is simply working as designed, therefore, only a Request For Enhancement (RFE) could be opened to request a change.
Related Information
Was this topic helpful?
Document Information
Modified date:
12 July 2018
UID
ibm10716775