Create Dataset

POST
https://api.woosmap.com/datasets

Creates a dataset.

Rate limit: 1/1s

Ratelimit: 1/1s

Authorization

private_key
apiKey query

Private key with write permission. Must stay private.

X-Api-Key
apiKey header

Private key with write permission. Must stay private.

Request Body

application/json
name
string required

The friendly name

url
string (uri) required
schema_mapping
object[] | null
Show 2 propertiesHide 2 properties
schema_mapping. schema_key
string required

SchemaKeys are the allowed fields to be mapped.

Available options: title
schema_mapping. data_key
string required

Response

200 application/json

Successful Response

id
string (uuid) required
name
string required
url
string | null

The url of the data to fetch

reimport_key
string | null

The reimport key to be used with the reimport hook endpoint.

created_at
string (date-time) required

The date when the dataset was created.

updated_at
string | null required

The date when the dataset was last updated.

After this date the dataset will be automatically removed

Errors

401

Unable to locate credentials.

application/json
detail
string required
402

Out of free quota.

application/json
detail
string required
403

Credentials found, but not matching.

application/json
detail
string required
422

Validation Error

application/json
detail
object[]
Show 3 propertiesHide 3 properties
detail. loc
any[] required
detail. msg
string required
detail. type
string required
429

Rate limit reached

application/json
detail
string required
        curl -L 'https://api.woosmap.com/datasets/?private_key=YOUR_PRIVATE_API_KEY' \
-H 'content-type: application/json' \
-d '{
  "name": "string",
  "url": "http://example.com",
  "schema_mapping": [
    {
      "schema_key": "title",
      "data_key": "string"
    }
  ]
}'

    
        const myHeaders = new Headers();
myHeaders.append("content-type", "application/json");

const raw = JSON.stringify({
  "name": "string",
  "url": "http://example.com",
  "schema_mapping": [
    {
      "schema_key": "title",
      "data_key": "string"
    }
  ]
});

const requestOptions = {
  method: "POST",
  headers: myHeaders,
  body: raw,
  redirect: "follow"
};

fetch("https://api.woosmap.com/datasets/?private_key=YOUR_PRIVATE_API_KEY", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));

    
        import requests
import json

url = "https://api.woosmap.com/datasets/?private_key=YOUR_PRIVATE_API_KEY"

payload = json.dumps({
    "name": "string",
    "url": "http://example.com",
    "schema_mapping": [
        {
            "schema_key": "title",
            "data_key": "string"
        }
    ]
})
headers = {
    'content-type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)


    
Was this helpful?