Skip to content
  • Auto
  • Light
  • Dark
Get Started

Create

Create
client.directories.create(DirectoryCreateParamsbody?, RequestOptionsoptions?): directoryViewDirectoryViewexpandedunionDirectoryCreateResponse
post/api/v1/directories

Create a directory.

Parameters
bodyappIdstringexpandMaskExpandMaskDirectoryCreateParams
Hide ParametersShow Parameters
appIdstring
optional

The AppID to make into a directory, providing identities and more for the C1 app.

expandMaskExpandMask
optional

The fields to be included in the directory response.

Hide ParametersShow Parameters
pathsunion
optional
Array<string> | null

An array of fields to be included in the directory response.

Returns
DirectoryCreateResponse

The DirectoryServiceCreateResponse message.

Hide ParametersShow Parameters
directoryViewappPathstringdirectoryDirectoryDirectoryView
optional

The directory view contains a directory and an app_path which is a JSONPATH set to the location in the expand mask that the expanded app will live if requested by the expander.

expandedunion
optional
Array<Expanded> | null

List of serialized related objects.

Hide ParametersShow Parameters
@typestring
optional

The type of the serialized message.

Request example TypeScript
import ConductoroneSDK from 'conductorone-sdk';

const client = new ConductoroneSDK({
  apiKey: 'My API Key',
});

const directory = await client.directories.create();

console.log(directory.directoryView);
200 Example
{
  "directoryView": {
    "appPath": "appPath",
    "directory": {}
  },
  "expanded": [
    {
      "@type": "@type"
    }
  ]
}