Skip to content
  • Auto
  • Light
  • Dark
Get Started

Create

Create
client.Directories.New(ctx, body) (*DirectoryViewDirectoryViewExpandedarrayDirectoryNewResponse, error)
post/api/v1/directories

Create a directory.

Parameters
bodyAppIDfieldExpandMaskfieldDirectoryNewParams
Hide ParametersShow Parameters
AppIDfield
optional
param.Field[string]

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

ExpandMaskfield
optional

The fields to be included in the directory response.

Hide ParametersShow Parameters
Pathsarray
optional
[]string

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

Returns
DirectoryNewResponsestruct

The DirectoryServiceCreateResponse message.

Hide ParametersShow Parameters
DirectoryViewAppPathstringDirectoryDirectoryViewDirectoryDirectoryView
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.

Expandedarray
optional

List of serialized related objects.

Hide ParametersShow Parameters
Typestring
optional

The type of the serialized message.

Request example Go
package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/-go"
  "github.com/stainless-sdks/-go/option"
)

func main() {
  client := conductoronesdk.NewClient(
    option.WithAPIKey("My API Key"),
  )
  directory, err := client.Directories.New(context.TODO(), conductoronesdk.DirectoryNewParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", directory.DirectoryView)
}
200 Example
{
  "directoryView": {
    "appPath": "appPath",
    "directory": {}
  },
  "expanded": [
    {
      "@type": "@type"
    }
  ]
}