Datasets API

Datasets are callections of of geometric Features. Each map is built from combining one or more Datasets.

When a floor plan is uploaded, its geometry gets extracted into a Dataset that can be access and modified through this API.

ENDPOINTS

POST /datasets/v1
GET /datasets/v1/:dataset_id
PUT /datasets/v1/:dataset_id
DELETE /datasets/v1/:dataset_id
GET /datasets/v1
POST /datasets/v1/:dataset_id/features
GET /datasets/v1/:dataset_id/features/:feature_id
PUT /datasets/v1/:dataset_id/features/:feature_id
DELETE /datasets/v1/:dataset_id/features/:feature_id
GET /datasets/v1/dataset_id/features

The Dataset object

Properties

  • Name
    dataset_id
    Type
    string
    Description

    The unique ID for the dataset objet.

  • Name
    account_id
    Type
    string
    Description

    Unique identifier for the account.

  • Name
    name
    Type
    string
    Description

    The name of the dataset.

  • Name
    state
    Type
    string
    Description

    Indicates the state of the dataset processing for this floor plan. Options are 'pending', 'processing', 'completed', or 'failed'

  • Name
    updated_at
    Type
    timestamp
    Description

    Timestamp of when the account was last updated.

  • Name
    created_at
    Type
    timestamp
    Description

    Timestamp of when the account was created.

The Dataset object

{
  "dataset_id": "203h0hdfodjfbdaboajbpjb2zxlcv",
  "account_id": "ajnvaslidvawudfw9gfogsyg9gsga",
  "name": "Event-1-Floor-1"
  "state": "completed",
  "updated_at": 705103200,
  "created_at": 692233200
}

POST/datasets/v1

Create a dataset

This endpoint allows you to create an empty dataset.

If you want to automate the creation of a Dataset from a floor plan, use the upload a floor plan endpoint from the Floor Plans API instead.

Required attributes

  • Name
    name
    Type
    string
    Description

    The name of the dataset.

Optional attributes

  • Name
    dataset_id
    Type
    string | null
    Description

    Sets a custom ID for this dataset. If not included, a unique dataset_id will be generated.

POST /datasets/v1

API KEY SCOPE
datasets:write
curl https://api.waygomaps.com/datasets/v1 \
    -H "Waygo-API-Key: eyJhbGciOiJIU...sXSJE_1AJgMEnI_g-WTerk" \
    -H "Waygo-Account: n33f9h0fh9324hf9h439fh9h2f9h93h9" \
    -d '{"name": "Event-1-Floor-1", "dataset_id": "custom-dataset-id"}'

Response

{
  "dataset_id": "custom-dataset-id",
  "account_id": "ajnvaslidvawudfw9gfogsyg9gsga", 
  "name": "Event-1-Floor-1",
  "state": "completed",
  "updated_at": 705103200,
  "created_at": 692233200
}

GET/datasets/v1/:dataset_id

Retrieve a dataset

This endpoint allows you to retrieve the metadata for a Dataset. If you want to access retrieve the features of a Dataset, use the List Features in Dataset endpoint instead.

GET /datasets/v1/:dataset_id

API KEY SCOPE
datasets:read
curl https://api.waygomaps.com/datasets/v1/:dataset_id \
  -H "Waygo-API-Key: eyJhbGciOiJIU...sXSJE_1AJgMEnI_g-WTerk" \
  -H "Waygo-Account: n33f9h0fh9324hf9h439fh9h2f9h93h9"

Response

{
  "dataset_id": "custom-dataset-id",
  "account_id": "ajnvaslidvawudfw9gfogsyg9gsga", 
  "name": "Event-1-Floor-1",
  "state": "completed",
  "updated_at": 705103200,
  "created_at": 692233200
}

PUT/datasets/v1/:dataset_id

Update dataset metadata

This endpoint allows you to update the metadata of an existing dataset.

Optional attributes

  • Name
    name
    Type
    string
    Description

    The name of the dataset.

PUT /datasets/v1/:dataset_id

API KEY SCOPE
datasets:write
curl -X PUT https://api.waygomaps.com/floor-plans/v1/:dataset_id \
  -H "Waygo-API-Key: eyJhbGciOiJIU...sXSJE_1AJgMEnI_g-WTerk" \
  -H "Waygo-Account: n39q9h0ph9324hf9h4vksh9h2f9h03hl" \
  -d '{"name": "Event-1-Floor-2"}'

Response

{
  "dataset_id": "custom-dataset-id",
  "account_id": "ajnvaslidvawudfw9gfogsyg9gsga", 
  "name": "Event-1-Floor-2",
  "state": "completed",
  "updated_at": 929308302,
  "created_at": 692233200
}

DELETE/datasets/v1/:dataset_id

Delete a dataset

This endpoint allows you to delete a dataset and all of its features.

DELETE /datasets/v1/:dataset_id

API KEY SCOPE
datasets:delete
curl -X DELETE https://api.waygomaps.com/datasets/v1/:dataset_id \
  -H "Waygo-API-Key: eyJhbGciOiJIU...sXSJE_1AJgMEnI_g-WTerk" \
  -H "Waygo-Account: n33f9h0fh9324hf9h439fh9h2f9h93h9"

Response

204 No Content

GET/datasets/v1

List datasets

This endpoint allows you to list the datasets for your account. By default, this endpoint returns 20 datasets at a time.

Optional parameters

  • Name
    skip
    Type
    integer
    Description

    Number of records to skip. Defaults to 0 if not specified.

  • Name
    limit
    Type
    integer
    Description

    Maximum number of records to return. Defaults to 20 if not specified.

GET /datasets/v1

API KEY SCOPE
datasets:read
curl -X GET https://api.waygomaps.com/datasets/v1 \
  -H "Waygo-API-Key: eyJhbGciOiJIU...sXSJE_1AJgMEnI_g-WTerk" \
  -H "Waygo-Account: n39q9h0ph9324hf9h4vksh9h2f9h03hl" \
  -d skip=20 \
  -d limit=20

Response

{
  "datasets": [
    {
      "dataset_id": "custom-dataset-id",
      "account_id": "ajnvaslidvawudfw9gfogsyg9gsga", 
      "name": "Event-1-Floor-2",
      "state": "completed",
      "updated_at": 929308302,
      "created_at": 692233200
    }
    // ...
  ],
  total: 98,
  skip: 1,
  limit: 20
}

The Feautre object

Dataset are made up of a collection features. The Feature object is a similar structure to a GeoJSON feature.

Properties

  • Name
    feature_id
    Type
    string
    Description

    The unique ID for the dataset objet.

  • Name
    dataset_id
    Type
    string
    Description

    The unique ID for the dataset objet.

  • Name
    account_id
    Type
    string
    Description

    Unique identifier for the account.

  • Name
    type
    Type
    string
    Description

    Defaults to 'Feature'.

  • Name
    geometry
    Type
    object
    Description

    An object that specifies the geometric data of the feature. This geometry object follows typical GeoJSON format.

  • Name
    properties
    Type
    object
    Description

    A dictionary containing any custom properties of the dataset feature. Default set to an empty dict.

  • Name
    updated_at
    Type
    timestamp
    Description

    Timestamp of when the account was last updated.

  • Name
    created_at
    Type
    timestamp
    Description

    Timestamp of when the account was created.

The Feature object

{
  "feature_id": "erhfq3eu9hfoieufh0uhf0f9q3uhf",
  "dataset_id": "203h0hdfodjfbdaboajbpjb2zxlcv",
  "account_id": "ajnvaslidvawudfw9gfogsyg9gsga",
  "type": "Feature",
  "geometry": {
    "type": "Polygon",  // Can be 'Point', 'Polygon', or 'LineString'  
      "coordinates": [
        [
          [
            23.01280, 12.18999
          ],
          [
            24.01280, 12.18999
          ],
          [
            24.01280, 11.18999
          ],
          [
            23.01280, 12.18999
          ]
        ]
      ]
    },
  "properties": {
    "name": "Feature name",
    "custom_id": "20FJ0238J"
  },
  "updated_at": 705103200,
  "created_at": 692233200
}

POST/datasets/v1/:dataset_id/features

Create a dataset feature

This endpoint allows you to create a geometric feature in a dataset.

Required attributes

  • Name
    type
    Type
    string
    Description

    Must be "Feature".

  • Name
    geometry
    Type
    object
    Description

    The geometry object of a GeoJSON feature. Must match the proper format of a GeoJson 'geometry' object.

Optional attributes

  • Name
    properties
    Type
    object
    Description

    The dictionary of customizable data for the feature object. If not included, the properties dict will automatically be generated as an empty dict.

POST /datasets/v1/:dataset_id/features

API KEY SCOPE
datasets:write
curl https://api.waygomaps.com/datasets/v1/:dataset_id/features \
    -H "Waygo-API-Key: eyJhbGciOiJIU...sXSJE_1AJgMEnI_g-WTerk" \
    -H "Waygo-Account: n33f9h0fh9324hf9h439fh9h2f9h93h9" \
    -d '{
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [125.6, 10.1]
      },
      "properties": {
        "name": "Sample Point Feature"
      }
    }'

Response

{
  "feature_id": "erhfq3eu9hfoieufh0uhf0f9q3uhf",
  "dataset_id": "203h0hdfodjfbdaboajbpjb2zxlcv",
  "account_id": "ajnvaslidvawudfw9gfogsyg9gsga",
  "type": "Feature",
    "geometry": {
      "type": "Point",
      "coordinates": [125.6, 10.1]
    },
    "properties": {
      "name": "Sample Point Feature"
    }
  "updated_at": 705103200,
  "created_at": 692233200
}

GET/datasets/v1/:dataset_id/features/:feature_id

Retrieve a dataset feature

Retrieve a feature from a dataset.

GET /datasets/v1/:dataset_id/features/:feature_id

API KEY SCOPE
datasets:read
curl https://api.waygomaps.com/datasets/v1/:dataset_id/features/:feature_id \
  -H "Waygo-API-Key: eyJhbGciOiJIU...sXSJE_1AJgMEnI_g-WTerk" \
  -H "Waygo-Account: n33f9h0fh9324hf9h439fh9h2f9h93h9"

Response

{
  "feature_id": "erhfq3eu9hfoieufh0uhf0f9q3uhf",
  "dataset_id": "203h0hdfodjfbdaboajbpjb2zxlcv",
  "account_id": "ajnvaslidvawudfw9gfogsyg9gsga",
  "type": "Feature",
  "geometry": {
    "type": "Point",
    "coordinates": [125.6, 10.1]
  },
  "properties": {
    "name": "Sample Point Feature"
  },
  "updated_at": 705103200,
  "created_at": 692233200
}

DELETE/datasets/v1/:dataset_id/features/:feature_id

Delete a dataset feature

Deletes a feature from a dataset.

DELETE /datasets/v1/:dataset_id/features/:feature_id

API KEY SCOPE
datasets:delete
curl -X DELETE https://api.waygomaps.com/datasets/v1/:dataset_id/features/:feature_id \
  -H "Waygo-API-Key: eyJhbGciOiJIU...sXSJE_1AJgMEnI_g-WTerk" \
  -H "Waygo-Account: n33f9h0fh9324hf9h439fh9h2f9h93h9"

Response

204 No Content

GET/datasets/v1/:dataset_id/features/:feature_id

List dataset features

This endpoint allows you to list the features from one of your datasets.

GET :dataset_id/features/:feature_id

API KEY SCOPE
datasets:read
curl -X GET https://api.waygomaps.com/datasets/:dataset_id/features/:feature_id \
  -H "Waygo-API-Key: eyJhbGciOiJIU...sXSJE_1AJgMEnI_g-WTerk" \
  -H "Waygo-Account: n39q9h0ph9324hf9h4vksh9h2f9h03hl" \
  -d skip=20 \
  -d limit=20

Response

{
  "features": [
    {
      "feature_id": "erhfq3eu9hfoieufh0uhf0f9q3uhf",
      "dataset_id": "203h0hdfodjfbdaboajbpjb2zxlcv",
      "account_id": "ajnvaslidvawudfw9gfogsyg9gsga",
      "type": "Feature",
        "geometry": {
        "type": "Point",
        "coordinates": [125.6, 10.1]
      },
      "properties": {
        "name": "Sample Point Feature"
      },
      "updated_at": 705103200,
      "created_at": 692233200
    }
    // ...
  ]
}