Skip to content

Regenerate the navigation mesh

POST
/{resource}/navmesh
curl --request POST \
--url https://example.com/v1/example/navmesh \
--header 'Authorization: Bearer <token>'

Starts regenerating the navigation mesh from the space as it is now. It takes a few minutes; the job is recorded in the document as navMeshJob, and when it finishes the document is updated - generatedNavMesh points to the new mesh, and the floors are worked out again, each keeping its id and title if it’s found at about the same height as before. Follow it with GET, or watch navMeshJob in the document.

resource
required
string
/^\d+$/

The project ID of the space

The job was started

Media typeapplication/json
object
job
object
id
required
string format: uuid
startedAt
required

When the job started, in milliseconds since the Unix epoch.

integer
status
required
string
Allowed values: running failed
error

Why the job failed.

string
stage

What a running job is doing.

string
Allowed values: loading generating uploading

Example

{
"job": {
"status": "running",
"stage": "loading"
}
}

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": [
{}
]
}

A regeneration is already running (navMeshJobRunning), the space has no map meshes (noMaps) or is being duplicated

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 has too many map meshes or obstacles to send for generation (tooLarge)

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

The job couldn’t be started

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": [
{}
]
}