Here we describe the steps for creating a new object in your repository.
HTTP responses
HTTP response status code |
Interpretation |
---|---|
201 Created |
Object created successfully |
401 Unauthorized |
Invalid or missing API key secret and/or tenant |
400 Bad Request |
One or more parameters are missing or incorrect. The response body returns a specific error. For example: 'object_type_id is incorrect'. |
403 Forbidden |
The user is not allowed to create objects of this type |
Conditions
-
To create an object of a specific object type, you must have permissions for that object definition
-
The combination of
object_title
andobject_type_id
andworkspace_id
must be unique
To create a new object, make a POST request to the /objects
endpoint specifying:
-
Resource/endpoint destination URL
-
The header for your API request
-
The request body, which must include:
Parameter |
Required |
Type |
Description |
---|---|---|---|
object_title |
✓ |
string |
The name of the object to be created. |
object_type_id |
✓ |
string |
Unique identifier for the object definition that the object will be based on. Retrievable via object definitions API. |
workspace_id |
✓ |
string |
Workspace where the object will be located. |
Here is an example API request which shows how to create a new object with the name
HiBob
of the object definition Application
:
curl -L 'https://public-api.eu.bluedolphin.app/v1/objects' \
-H 'x-api-key: YOURAPIKEYSECRET' \
-H 'tenant: yourtenantname' \
-H 'Content-Type: application/json' \
-d '{
"object_title": "HiBob",
"object_type_id": "640b3d7d4a28b925fcf8b8bc",
"workspace_id": "63f620763279a10a8eefa7b0"
}'
A successful call returns a response with a 201 OK
HTTP status code and the following body:
{
"id": "644779a07470b332c82b8dg0",
"object_title": "HiBob"
}
A new object with the id
644779a07470b332c82b8dg0
has now been created.
The response also includes the location response header that indicates the URL to the newly created object. So, the location header for the previous example would be http://public-api.eu.bluedolphin.app/v1/objects/644779a07470b332c82b8dg0
.
Comments
0 comments
Please sign in to leave a comment.