Assign Directory Path
PUT
/{organization}/projects/{projectId}/layer-directory
const url = 'https://app.civillo.com/api/v1/example/projects/1/layer-directory';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"path":"some/arbitrary/pathname","layerId":123}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://app.civillo.com/api/v1/example/projects/1/layer-directory \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "path": "some/arbitrary/pathname", "layerId": 123 }'Assign a layer directory path and/or assign a layer to the given path. The API will try it;s best to create the given path and if a layer id is supplied, attempt to assign the layer.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”organization
required
string
The organization nickname
projectId
required
integer
The project id
Request Body
Section titled “Request Body”Media typeapplication/json
object
path
required
The path you want to create and/or assign a layer to.
string
layerId
A layer id you want to assign to this path.
integer
Example
{ "path": "some/arbitrary/pathname", "layerId": 123}Responses
Section titled “ Responses ”Successful response
Bad Request
Unauthorized
Forbidden