Create directory child
POST
/{organization}/projects/{projectId}/layer-directory/{nodeId}/children
const url = 'https://app.civillo.com/api/v1/example/projects/1/layer-directory/example/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/example/children \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "New Directory", "layerId": 123 }'Create a sub directory or layer assignment in a layer directory sub directory. 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
nodeId
required
string
The layer directory node id where you want to create a sub-directory or assign a layer
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