create<TYPE> mutation
Use the createType GraphQL mutation to create new entities.
Mutation syntax
The following code illustrates required format for the GraphQL request, followed by a description of the input values:
mutation {
createTYPE([parentIdentity: {
namespace: "NAMESPACE",
id: "IDENTIFIER",
type: "TYPE"
},
]
input: {
INPUT_FIELD_1: INPUT_VALUE_1
INPUT_FIELD_2: INPUT_VALUE_2
INPUT_FIELD_n: INPUT_VALUE_n
} )
{
RESPONSE_FIELD_1
RESPONSE_FIELD_2
RESPONSE_FIELD_n
}
}
Fields and inputs
- createTYPE
- The operation to be performed by the mutation (create) and the type of entity to be created. The TYPE is the entity type and matches the TYPE value in the identity section.
- parentIdentity
-
In the
parentIdentitysection, identify either the namespace root ID or a parent folder or category of the entity being created. - input
- The
inputobject includes property-value pairs that define the entity to be created, where:- INPUT_FIELD_1 to n
- The property to be defined for the new entity.
- INPUT_VALUE_1 to n
- The input data for the entity.
- Response fields
- (Optional) Fields at the end of the request identify data that you want to return in the response following a successful create operation.
Example request and response
The first sample code block illustrates a request to to create a new entity of the type "Contact". The second code block illustrates the corresponding response with a confirmation of the new entity's identity.
| Request | Response |
|---|---|
| |