Get the schema for a table [BETA]
Returns the schema for the given table in JSON format.
Methods
GET /tables/{owner}/{datasetid}/{tableid}/schema
Path parameters
Parameter | Description | Data Type |
---|---|---|
owner | Dataset owner username. Included in data.world dataset URL path, after domain. For example, jonloyens in https://data.world/jonloyens/an-intro-to-dataworld-dataset |
string |
datasetid | Dataset id. Included in data.world dataset URL, after owner's username. For example, an-intro-to-dataworld-dataset in https://data.world/jonloyens/an-intro-to-dataworld-dataset |
string |
tableid | Table id. Retrieve acceptable values via the GET: /tables method | string |
Response
Response schema (Status 200)
Returns an array of table names (strings).
{
"fields": [
{
"name": "string",
"title": "string"
},
{
"name": "string",
"title": "string"
}
]
}
Errors
HTTP Status Code | Reason | Solution |
---|---|---|
400 | Bad request. | Check syntax and URIs. |
401 | Unauthorized | Verify credentials / API key |
403 | Forbidden | |
404 | Not found. | |
422 | Bad request. | Check syntax and URIs. |
500 | Server error. |
Error Response Model:
{
"code": 0,
"message": "string",
"details": "string"
}
EXAMPLE
Request URL:
https://query.data.world/tables/jonloyens/an-intro-to-dataworld-dataset/datadotworldbballteam/schema
cURL:
$ curl -X GET \
https://query.data.world/tables/jonloyens/an-intro-to-dataworld-dataset/datadotworldbballteam/schema \
-H 'accept: application/json' \
-H 'authorization: Bearer <API_TOKEN>'
Response Body:
{
"fields": [
{
"name": "Name",
"title": "Name"
},
{
"name": "Height",
"title": "Height"
},
{
"name": "Handedness",
"title": "Handedness"
}
]
}