# PUT

PUT requests are made to update the layer directory structure and assign/reassign layers.

# Create a directory and/or assign a layer to a directory

PUT /{organizationNickname}/projects/{projectId}/layer-directory

Update the layer directory structure. This method will attempt to create a directory structure with the path you provide. You can also assign or reassign a layer to this directory.

Header Parameters

Name Description
Authorization String Civillo API Credentials
*required

Body Parameters

Body parameters must be in valid json format.

Name Description
path Required. The directory path you wish to create and/or assign a layer to.
layerId If provided, will attempt to assign this layer to the directory at the given path. If the layer is already assigned to a directory, it will be reassigned.

# Examples

# Create a directory

PUT /{organizationNickname}/projects/{projectId}/layer-directory
{
    "path": "path/to/my/new/directory"
}

# Assign or reassign a layer the root directory

PUT /{organizationNickname}/projects/{projectId}/layer-directory
{
    "path": "",
    "layerId": 1
}

# Assign or reassign a layer to an existing directory

PUT /{organizationNickname}/projects/{projectId}/layer-directory
{
    "path": "path/to/my/existing/directory",
    "layerId": 2
}

# Assign or reassign a layer to a newly created directory

PUT /{organizationNickname}/projects/{projectId}/layer-directory
{
    "path": "path/to/my/non/existant/directory",
    "layerId": 3
}
Last Updated: 08/08/2023