Read Schema Docs API
You could use Read Schema Docs API to fetch the Schema Doc Validation files you've created or attached with any collection.
Root
https://api.jsonbin.io/v3
Route
/s/<SCHEMA_DOC_ID>
Request Type
GET
Request Headers
Below are the list of Accepted Request Headers if you are trying to Read a Schema Doc.
Request Header | Value | Required |
---|---|---|
X-Master-Key | <X-Master-Key> | Yes |
X-Master-Key Required
X-Master-Key is nothing but your Core API Access Key. You will need this Key to access mostly any API end-point on JSONBin. You could find the key on the API Keys page.
Code Samples
curl -v\
-H "Content-Type: application/json" \
-H "X-Master-Key: <YOUR_API_KEY>" \
--request GET \
https://api.jsonbin.io/v3/s/<SCHEMA_DOC_ID>
Request Response
Success Status Code: 200
{
"record":{
<SCHEMA_VALIDATION_JSON>
},
"metadata": {
"id": "<SCHEMA_DOC_ID>",
"createdAt": <DATE / TIME>,
"name": "User Validation"
}
}
Error Status Code: 400, 401, 403, 404
{
"message": "<Error Message>"
}
For more information on the error codes & errors you might possibly encounter, refer to the below section.
Error Reference
Invalid Schema Id provided
Check the Schema Doc Id you've passed. You may face this issue if the ID is invalid or the ID doesn't belong to your account.