Update table schema (fields) for a table [BETA]

Updates the table schema with the given column values.

Methods

PATCH /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

Body JSON schema

{
  "fields": [
    {
      "name": "string",
      "description": "string"
    }
  ]
}

Response schema (Status 200)

Returns empty 200 response.

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 PATCH \
  https://query.data.world/tables/jonloyens/an-intro-to-dataworld-dataset/datadotworldbballteam/schema \
  -H 'accept: application/json' \
  -H 'authorization: Bearer <API_TOKEN>' \  
  -H 'content-type: application/json' \
  -d '{
  "fields": [
    {
      "name": "Height",
      "description": "This variable is self-reported"
    }
  ]
}'

results matching ""

    No results matching ""