Create An Entity
To create an entity, we need to make the following HTTP request
Last updated
To create an entity, we need to make the following HTTP request
Last updated
Copyright (c) 2023 EkStep Foundation under MIT License
POST
/api/v1/{entity-type}
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Sample Request Body for Teacher as Entity-Type
Important Fields in Response Body
So to create a Teacher
entity named Pranav Agate who teaches Math at UP Public School, we would make the following API call:
{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
Field | Type | Description |
---|---|---|
entity-type*
String
The type of entity to create
mode
String
Query parameter whose value can be async
if creating an entity should be asynchronously handled
callbackUrl
String
Query parameter whose value will be a web-hook url
. The webook will be called once the entity is created in the registry. This is applicable only for async mode
content-type*
String
Set to application/json
authorization
String
Set to Bearer {access-token}
if roles
in schema config is not anonymous else this can be empty
...*
The entity's data
result.{entity-type}.osid
string
The ID of the create entity in the registry, used for retrieval and modification of the entity