Create Schema
Request
Create a Schema
POST /api/v1/Schema
Headers
Name
Type
Description
content-type*
String
Set to application/json
authorization
String
Set to Bearer {access-token} . The token should be a admin token
Request Body
Name
Type
Description
name*
string
schema name
schema*
string
json schema
status
String
DRAFT | PUBLISHED
{
"id": "sunbird-rc.registry.create",
"ver": "1.0",
"ets": 1669113026569,
"params": {
"resmsgid": "",
"msgid": "7b15f6ee-eb5b-4a13-ba79-f70b3ab54fc3",
"err": "",
"status": "SUCCESSFUL",
"errmsg": ""
},
"responseCode": "OK",
"result": {
"Schema": {
"osid": "1-1a2f15e7-6c54-40e9-a689-68628a3d69df"
}
}
}Sample Schema Request Payload
Important Fields in Response Body
Field
Type
Description
result.{Schema}.osid
string
The ID of the created schema in the registry, used for retrieval and modification of the entity
Usage
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