Salesforce

Folders APIs

« Go Back
Information
Folders APIs
000004238
Public
Product Selection
aiWare - aiWare
Article Details

Use these APIs to create and query folders.

Create a folder

Creates a folder.

[Note] Before you create a folder, locate the ID of the intended parent folder.

To place the new folder under the rootFolder, discover the rootFolder ID by (for example) running a query using organizations(id:<your org ID>).

Example

mutation {
  createFolder(input:{
    name:"scratch"
    description:"temporary files",
    parentId:"c13df18e-314d-47fb-b4cd-aa171bc1bce6",
    rootFolderType:watchlist
  }) {
    id
    name
  }
}

Response

{
  "data": {
    "createFolder": {
      "id": "4f6e98d5-168a-407d-b22f-d5607bd4a9a6",
      "name": "scratch"
    }
  }
}

Errors

[Note] All four of the input fields, name, description, parentId, and rootFolderType are mandatory. Make sure the rootFolderType corresponds to the folder type of the parentId folder and is either cms, collection, or watchlist.

List folders in Data Center and contained TDOs

Lists folders in Data Center and contained TDOs.

Example

query listFolders {
  rootFolders(type: cms) {
    id
    name
    subfolders {
      id
      name
      childTDOs {
        count
        records {
          id
        }
      }
    }
    childTDOs {
      count
      records {
        id
      }
    }
  }
}

Get folder info by TDO ID

Use the TDO ID to retrieve folder information.

Example

query getFolderInfoByTDO {
  temporalDataObject(id: "112971783") {
    folders {
      id
      name
      childTDOs {
        records {
          id
        }
      }
    }
  }
}

Get folder info by folder ID

Use the folder ID to retrieve folder information.

Example

query getFolderInfo {
  folder(id: "0ef7e0e3-63f5-47b9-8ed1-4c172c5a1e0a") {
    id
    name
    childTDOs {
      records {
        id
      }
    }
  }
}

More API examples

Additional Technical Documentation Information
Properties
8/26/2024 10:00 PM
8/26/2024 10:01 PM
8/26/2024 10:01 PM
Documentation
Documentation
000004238
Translation Information
English

Powered by