Skip to content

Import IMDF into the space

POST
/{resource}/imdf/import
curl --request POST \
--url 'https://example.com/v1/example/imdf/import?mode=merge&dryRun=false' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/zip' \
--data binary

Merges an IMDF dataset into the space, placing it with the space’s georeference. Each level is matched to the floor with the same ordinal.

  • Amenities, occupants and kiosks become landmarks, as do named units and units with a category Spaces has, such as conference rooms, at their middle.
  • Openings become doors, and fixtures obstacles - split into convex pieces if they need to be.
  • The venue’s name and address are used if the space doesn’t have its own.

Entities keep their IMDF ids, so importing the same dataset again updates them rather than adding more. An update only changes what IMDF describes. A commit is made before anything changes.

resource
required
string
/^\d+$/

The project ID of the space

mode
string
default: merge
Allowed values: merge replace

replace also deletes entities that an earlier import created and this one doesn’t include.

dryRun
boolean

Report what the import would do, without doing it.

string format: binary

What the import did, or would do

Media typeapplication/json

What an import did, or would do.

object
dryRun
boolean
commit

The commit made before the import. Not given for a dry run.

string format: uuid
created
integer
updated
integer
deleted
integer
entities

Each entity created or updated, and the feature it came from.

Array<object>
object
id
string
action
string
Allowed values: create update
type

The entity’s type.

string
from
object
featureType
string
id
string
deletions

The ids of entities deleted.

Array<string>
floors

The ids of floors given a title from their level.

Array<string>
levels

How each level was matched to a floor. A level with no floor isn’t imported.

Array<object>
object
id
string
ordinal
integer | null
floorId
string | null
space

What was set on the space itself.

Array<string>
Allowed values: name address
unmapped

Features that weren’t imported, and why.

Array<object>
object
featureType
string
id
string
reason
string
warnings
Array<string>
needsNavMeshRegeneration

Whether obstacles changed, so the navigation mesh needs to be regenerated.

boolean

Example

{
"entities": [
{
"action": "create"
}
],
"space": [
"name"
]
}

The body is invalid. issues describes what was wrong.

Media typeapplication/json
object
error
required

A description of the error

string
code
required

A stable identifier for the kind of error

string
issues

For invalidBody: what failed validation, and where

Array<object>
object

Example generated

{
"error": "example",
"code": "example",
"issues": [
{}
]
}

The token is missing or invalid.

Media typeapplication/json
object
error
required

A description of the error

string
code
required

A stable identifier for the kind of error

string
issues

For invalidBody: what failed validation, and where

Array<object>
object

Example generated

{
"error": "example",
"code": "example",
"issues": [
{}
]
}

The token has no access to this space.

Media typeapplication/json
object
error
required

A description of the error

string
code
required

A stable identifier for the kind of error

string
issues

For invalidBody: what failed validation, and where

Array<object>
object

Example generated

{
"error": "example",
"code": "example",
"issues": [
{}
]
}

An item with this id already exists or the space is being duplicated - or, for IMDF, the space has no georeference or floors (noGeoreference, noFloors) or is missing information IMDF requires (imdfIncomplete).

Media typeapplication/json
object
error
required

A description of the error

string
code
required

A stable identifier for the kind of error

string
issues

For invalidBody: what failed validation, and where

Array<object>
object

Example generated

{
"error": "example",
"code": "example",
"issues": [
{}
]
}

The body isn’t in a format this operation accepts.

Media typeapplication/json
object
error
required

A description of the error

string
code
required

A stable identifier for the kind of error

string
issues

For invalidBody: what failed validation, and where

Array<object>
object

Example generated

{
"error": "example",
"code": "example",
"issues": [
{}
]
}

Too many requests. Retry after Retry-After seconds.

Media typeapplication/json
object
error
required

A description of the error

string
code
required

A stable identifier for the kind of error

string
issues

For invalidBody: what failed validation, and where

Array<object>
object

Example generated

{
"error": "example",
"code": "example",
"issues": [
{}
]
}
Retry-After
integer

Seconds to wait before retrying

Something upstream failed.

Media typeapplication/json
object
error
required

A description of the error

string
code
required

A stable identifier for the kind of error

string
issues

For invalidBody: what failed validation, and where

Array<object>
object

Example generated

{
"error": "example",
"code": "example",
"issues": [
{}
]
}

The space is moving between servers. Retry after Retry-After seconds.

Media typeapplication/json
object
error
required

A description of the error

string
code
required

A stable identifier for the kind of error

string
issues

For invalidBody: what failed validation, and where

Array<object>
object

Example generated

{
"error": "example",
"code": "example",
"issues": [
{}
]
}
Retry-After
integer

Seconds to wait before retrying

Something upstream timed out.

Media typeapplication/json
object
error
required

A description of the error

string
code
required

A stable identifier for the kind of error

string
issues

For invalidBody: what failed validation, and where

Array<object>
object

Example generated

{
"error": "example",
"code": "example",
"issues": [
{}
]
}