# Search for collections Create a new CollectionSearch The most commmon use of an CollectionSearch is to retrieve all the Collection resources associated with a User Endpoint: POST /collection-searches Version: 2.0.0 Security: bearerToken ## Request fields (application/json): - `from` (integer, required) The item number to begin the result set from - `pageSize` (integer, required) The maximum number of items to return in the result set Example: 100 - `criterion` (any) - `sorts` (array) Sorts to be applied to the search in order of precedence - `sorts.field` (string) The name of the [Collection](#tag/Collections) property value Enum: "NAME" - `sorts.order` (string) The order of the sort Enum: "ASC", "DESC" ## Response 200 fields (application/json): - `results` (array) The specified page of [Collection](#tag/Collections) resources which match the search criterion - `results.result` (object, required) - `results.result.id` (string, required) The unique ID of the [Collection](#tag/Collections) Example: "a52b5315-15b8-417f-b742-d6902108bac1" - `results.result.accountId` (string, required) The unique ID of the Account the [Collection](#tag/Collections) belongs to Example: "cfb665ca-ce35-4418-b9d5-70ee815db4bd" - `results.result.name` (string, required) Name of the [Collection](#tag/Collections) Example: "Folders" - `results.result.creatorId` (string, required) The ID of the [User](#tag/Users) who created the collection Example: "google-oauth2|110955770826801837334" - `results.result.dateCreated` (string, required) The datetime the collection was created in ISO datetime format Example: "2021-02-17T09:24:01.417Z" - `results.result.collaborators` (array, required) - `results.result.collaborators.id` (string, required) The unique ID for the CollectionCollaborator Example: "76c5765e-4623-41c9-a521-23610343f019" - `results.result.collaborators.collectionId` (string, required) The unique ID of the [Collection](#tag/Collections) which is being collaborated on Example: "a52b5315-15b8-417f-b742-d6902108bac1" - `results.result.collaborators.userId` (string, required) The ID of the [User](#tag/Users) who is a collaborator Example: "google-oauth2|110955770826801837334" - `results.result.share` (object) - `results.result.share.id` (string, required) The unique ID for the [CollectionShare](#tag/Collection-Shares) Example: "4517a7ba-a482-4211-b97e-f4256f53fd32" - `results.result.share.accountId` (string, required) The ID of the Account the [CollectionShare](#tag/Collection-Shares) belongs to Example: "cfb665ca-ce35-4418-b9d5-70ee815db4bd" - `results.result.share.collectionId` (string, required) The unique ID of the [Collection](#tag/Collections) which is being shared Example: "a52b5315-15b8-417f-b742-d6902108bac1" - `results.result.share.collectionName` (string, required) Name of the [Collection](#tag/Collections) which is being shared Example: "Folders" - `results.result.share.currentSlug` (string, required) A human readable unique identifier based on the [Collection](#tag/Collections) name, used in the Dash frontend share URL Example: "EW7DT/folders" - `results.result.share.slugs` (array, required) The set of all slugs that have ever been used, maintained so that old share URLs still work Example: ["EW7DT/folders","B35FP/old-name"] - `results.result.share.expiry` (string,null, required) The datetime the share will expire and no longer be accessible in ISO datetime format. If the expiry is null, the share will never expire. Example: "2021-02-17T09:24:01.417Z" - `results.result.share.assetPermittedActions` (string, required) Permissions users have on assets they are viewing Enum: "VIEW", "VIEW_AND_DOWNLOAD" - `results.permittedActions` (array, required) - `results.permittedActions.resourceType` (string, required) Defines the type of the resource that is being permitted to act on Enum: "ACCOUNT", "ASSET", "ASSET_SHARES", "ASSETS", "ASSETS_IN_NO_FOLDERS", "CLOUD_CONNECTION", "CLOUD_CONNECTIONS", "COLLECTION", "COLLECTIONS", "COMMENT", "CUSTOM_TERMS_AND_CONDITIONS", "EMAILS", "FIELD_OPTION", "FIELDS", "INDESIGN_EXTENSION", "INTELLIGENCE_SETTINGS", "METADATA_SCHEMA", "PORTALS", "PRESET_SIZES", "REFERRAL", "SAVED_SEARCHES", "SHOPIFY_INTEGRATION_V2", "SUBSCRIPTION", "THEME", "TOP_LEVEL_FIELD_OPTIONS", "USER_GROUPS", "WEB_USAGE" - `results.permittedActions.resourceId` (string) The ID of the resource that is being permitted to act on. This may be null if the permission is on the resource type as a whole rather than an individual instance. Example: "7af90a8b-7ccd-430f-a85d-e8614015bc47" - `results.permittedActions.action` (string, required) Defines the action that is being permitted Enum: "ADD_ASSET_TO_COLLECTION", "ADD_COLLABORATOR_TO_COLLECTION", "APPROVE_ASSETS", "CONFIGURE_SHOPIFY_INTEGRATION", "CREATE_ASSET_SHARES", "CREATE_ASSETS", "CREATE_CHILD_FIELD_OPTIONS", "CREATE_CLOUD_CONNECTIONS", "CREATE_COLLECTIONS", "CREATE_COLLECTION_COMMENTS", "CREATE_COMMENTS", "CREATE_EMBEDDABLE_LINKS", "CREATE_PORTALS", "CREATE_SAVED_SEARCHES", "CREATE_SUBSCRIPTION", "CREATE_TOP_LEVEL_FIELD_OPTIONS", "CUSTOMISE_EMAILS", "DELETE_ASSET", "DELETE_CLOUD_CONNECTION", "DELETE_COLLECTION", "DELETE_COMMENT", "DOWNLOAD_ASSET", "DOWNLOAD_INDESIGN_EXTENSION", "EDIT_ACCOUNT", "EDIT_ASSET", "EDIT_CLOUD_CONNECTION", "EDIT_COLLECTION", "EDIT_COMMENT", "EDIT_FIELDS", "EDIT_INTELLIGENCE_SETTINGS_ADDRESS_LOOKUP", "EDIT_INTELLIGENCE_SETTINGS_IMAGE_AUTO_TAGGING", "EDIT_INTELLIGENCE_SETTINGS_IMAGE_FACIAL_REC", "EDIT_INTELLIGENCE_SETTINGS_TEXT_IN_IMAGE", "EDIT_INTELLIGENCE_SETTINGS_VIDEO_AUTO_TAGGING", "EDIT_INTELLIGENCE_SETTINGS_VIDEO_FACIAL_REC", "EDIT_METADATA_SCHEMA", "EDIT_PRESET_SIZES", "EDIT_THEME", "EDIT_USER_GROUPS", "EXPORT_TO_SHOPIFY", "IMPORT_ASSETS_OR_METADATA", "IMPORT_FROM_CLOUD", "MAKE_REFERRAL", "MANAGE_CUSTOM_TERMS_AND_CONDITIONS", "PROMOTE_ASSETS_TO_LIVE", "PUT_ASSETS_IN_NO_FOLDER", "REMOVE_ASSET_FROM_COLLECTION", "REMOVE_COLLABORATOR_FROM_COLLECTION", "RUN_NATURAL_LANGUAGE_SEARCH", "SEARCH_FOR_VIEW", "SET_ASSETS_LIFECYCLE_STATUS_BINNED", "SET_ASSETS_LIFECYCLE_STATUS_LIVE", "UPDATE_METADATA_WITH_FIELD_OPTION", "USE_CANVA_INTEGRATION", "USE_CLOUD_CONNECTION", "USE_COLLECTIONS", "USE_EMBEDDABLE_LINKS", "VIEW_ASSET", "VIEW_ASSET_EVENTS", "VIEW_ASSET_FACES", "VIEW_ASSETS_IN_NO_FOLDER", "VIEW_CLOUD_CONNECTION", "VIEW_COLLECTION", "VIEW_COMMENTS", "VIEW_WEB_USAGE" - `totalResults` (integer) The total number of [Collection](#tag/Collections) resources which match the search criterion Example: 15 ## Response 4XX fields (application/json): - `timestamp` (string) The datetime that the error occurred in ISO offset format Example: "2021-02-16T16:21:58.640+00:00" - `status` (integer) The HTTP status code of the error Example: 401 - `error` (string) The title of the error Example: "Unauthorized" - `message` (string) A more detailed error message - `path` (string) The path that was called which led to the error Example: "/folder-settings"