Edit

Share via


Folders - Create Folder

Note

This API is in preview.

Creates a folder in the specified workspace.

Permissions

The caller must have contributor or higher workspace role.

Required Delegated Scopes

Workspace.ReadWrite.All

Microsoft Entra supported identities

This API supports the Microsoft identities listed in this section.

Identity Support
User Yes
Service principal and Managed identities Yes

Interface

POST https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/folders

URI Parameters

Name In Required Type Description
workspaceId
path True

string (uuid)

The workspace ID.

Request Body

Name Required Type Description
displayName True

string

The folder display name. The name must meet Folder name requirements

parentFolderId

string (uuid)

The parent folder ID. If not specified or null, the folder is created with the workspace as its parent folder.

Responses

Name Type Description
201 Created

Folder

Successfully created

Other Status Codes

ErrorResponse

Common error codes:

  • FolderDisplayNameAlreadyInUse - Folder display name is already used.

  • FolderNotFound - The requested folder was not found in the workspace.

  • InvalidFolderDisplayName - The provided folder display name is invalid.

  • FolderDepthOutOfRange - The parent folder has achieved max depth, can't create a new subfolder.

  • WorkspaceNotSupported - The specified workspace type doesn't support Folder

.* TooManyFolders - The specified workspace has reached the max count of folders, can't create any more.

Examples

Create a folder under another folder example
Create a folder with the workspace as its parent folder example

Create a folder under another folder example

Sample request

POST https://api.fabric.microsoft.com/v1/workspaces/aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb/folders

{
  "displayName": "Q3",
  "parentFolderId": "bbbbbbbb-1111-2222-3333-cccccccccccc"
}

Sample response

{
  "id": "ffffffff-5555-6666-7777-aaaaaaaaaaaa",
  "displayName": "Q3",
  "workspaceId": "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb",
  "parentFolderId": "bbbbbbbb-1111-2222-3333-cccccccccccc"
}

Create a folder with the workspace as its parent folder example

Sample request

POST https://api.fabric.microsoft.com/v1/workspaces/aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb/folders

{
  "displayName": "A folder"
}

Sample response

{
  "id": "eeeeeeee-4444-5555-6666-ffffffffffff",
  "displayName": "A folder",
  "workspaceId": "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb"
}

Definitions

Name Description
CreateFolderRequest

Create folder request payload.

ErrorRelatedResource

The error related resource details object.

ErrorResponse

The error response.

ErrorResponseDetails

The error response details.

Folder

A folder object.

CreateFolderRequest

Create folder request payload.

Name Type Description
displayName

string

The folder display name. The name must meet Folder name requirements

parentFolderId

string (uuid)

The parent folder ID. If not specified or null, the folder is created with the workspace as its parent folder.

ErrorRelatedResource

The error related resource details object.

Name Type Description
resourceId

string

The resource ID that's involved in the error.

resourceType

string

The type of the resource that's involved in the error.

ErrorResponse

The error response.

Name Type Description
errorCode

string

A specific identifier that provides information about an error condition, allowing for standardized communication between our service and its users.

message

string

A human readable representation of the error.

moreDetails

ErrorResponseDetails[]

List of additional error details.

relatedResource

ErrorRelatedResource

The error related resource details.

requestId

string

ID of the request associated with the error.

ErrorResponseDetails

The error response details.

Name Type Description
errorCode

string

A specific identifier that provides information about an error condition, allowing for standardized communication between our service and its users.

message

string

A human readable representation of the error.

relatedResource

ErrorRelatedResource

The error related resource details.

Folder

A folder object.

Name Type Description
displayName

string

The folder display name.

id

string (uuid)

The folder ID.

parentFolderId

string (uuid)

The parent folder ID. If the parent folder is a workspace, parentFolderId is either not specified or null.

workspaceId

string (uuid)

The workspace ID.