Create directory root child
POST
/{organization}/projects/{projectId}/layer-directory/children
const url = 'https://app.civillo.com/api/v1/example/projects/1/layer-directory/children';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"New Directory","layerId":123}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.civillo.com/api/v1/example/projects/1/layer-directory/children \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "New Directory", "layerId": 123 }'Create a sub directory or layer assignment in the layer directory root folder. You should provide the name property to create a directory OR the layer id property to create a layer assignment, not both.
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
name
The name of the new directory
string
Example
New DirectorylayerId
The id of the layer to assign
integer
Example
123Responses
Section titled “ Responses ”Successful response
Bad Request
Unauthorized
Forbidden