Responses to a POST
Every successful POST generates a response object with a response payload. This payload may contain values generated by PolicyCenter during resource creation that are needed by the caller application. For example:
- The resource's Public id (which is also the Cloud API
id
value) - Generated human-readable id values, such as the policy number
- Values generated by a business flow, such as:
- The user and group that the resource was assigned to
- Activities generated to process the resource
Similarly to request schemas, response schemas follow certain patterns around using data envelopes to wrap the resource schema. In many instances, the request and response schemas will match.
Fields with null
values are omitted
Similar to GETs, the response payloads for POSTs contain only fields whose values are
non-null. Fields with null
values are omitted from the response
payload.
If a given field is expected in a response payload but it is missing, this is often because
the value was null
.
POSTs and query parameters
You can use the fields
query parameter with a POST to control the fields
that appear in the response payload. For example, the following creates a note for activity
xc:20 based on the request payload. The response payload has the default fields.
POST /activities/xc:20/notes
The following also creates a note for activity xc:20 based on the request payload. But, the
response payload includes only the id
field.
POST /activities/xc:20/notes?fields=id