Reference Guide

Creating other types of requests
Topics:
Creating a resource instance
Modifying a resource instance
Deleting a resource instance
Performing an instance-level resource-specific action
Performing a class-level action
Working with asynchronous requests
Creating a resource instance
To create a resource instance, use the following request components:
Headers
Accept: application/json
Content-Type: application/json
Authorization: <auth_cookie>
Operation
POST
URI
pattern
/api/rest/<resource_type>
where <resource_type> is the resource type of the instance you want to create.
Body
{
"argument1":<value>,
"argument2":<value>,
"argument3":<value>
.
.
.
}
where the comma-separated list contains all required arguments and any optional arguments. Use double quotes
around a string, date-time, or ip-address value.
NOTE: The unique identifier of the new instance is generated automatically by the server.
If the request succeeds, it returns a 201 Created HTTP status code and a create response body. This resource contains the
id attribute for the new resource. If the request does not succeed, the server returns a 4xx or 5xx HTTP status code and a
message entity in the response body.
Creating a local_user
The following request creates an instance of the local_user resource type.
Headers
Accept: application/json
Content-Type: application/json
Authorization: <auth_cookie>
Request
POST https://1.2.3.4/api/rest/local_user
7
Creating other types of requests 35