Create An Entity
To create an entity, we need to make the following HTTP request
Request
Create a record for entity-type
POST
/api/v1/{entity-type}
Path Parameters
Name | Type | Description |
---|---|---|
entity-type* | String | The type of entity to create |
Query Parameters
Name | Type | Description |
---|---|---|
mode | String | Query parameter whose value can be |
callbackUrl | String | Query parameter whose value will be a |
Headers
Name | Type | Description |
---|---|---|
content-type* | String | Set to |
authorization | String | Set to |
Request Body
Name | Type | Description |
---|---|---|
...* | The entity's data |
Sample Request Body for Teacher as Entity-Type
Important Fields in Response Body
Field | Type | Description |
---|---|---|
|
| The ID of the create entity in the registry, used for retrieval and modification of the entity |
Usage
So to create a Teacher
entity named Pranav Agate who teaches Math at UP Public School, we would make the following API call:
cURL
HTTPie
{registry-url}
is usually http://localhost:{port}. The port can be found under the registry
section in the docker-compose.yml
file and is usually 8081
Last updated