Create Collection

post/createcollection

Create a publicly visible (empty) Collection of documents.

SecurityBearerAuth
Request
header Parameters
X-Glean-Auth-Type
string

Auth type being used to access the endpoint (should be non-empty only for global tokens).

X-Scio-Actas
string <email>

Email address of a user on whose behalf the request is intended to be made (should be non-empty only for global tokens).

Request Body schema: application/json
required

Collection content plus any additional metadata for the request.

name
required
string

The unique name of the Collection.

Array of objects (UserRoleSpecification)

A list of added user roles for the Collection.

adminLocked
boolean

Indicates whether edits are allowed for everyone or only admins.

allowedDatasource
string

The datasource type this Collection can hold.

Array of objects (FacetFilter)

Filters which restrict who should see this Collection. Values are taken from the corresponding filters in people search.

description
string

A brief summary of the Collection's contents.

icon
string

The emoji icon of this Collection.

newNextItemId
string

The (optional) ItemId of the next CollectionItem in sequence. If omitted, will be added to the end of the Collection. Only used if parentId is specified.

parentId
integer

The parent of this Collection, or 0 if it's a top-level Collection.

Array of objects (UserRoleSpecification)

A list of removed user roles for the Collection.

object (Thumbnail)
Responses
200

OK

Response Schema: application/json
description
required
string

A brief summary of the Collection's contents.

errorCode
required
string
Enum: "NAME_EXISTS" "NOT_FOUND" "COLLECTION_PINNED" "CONCURRENT_HIERARCHY_EDIT" "HEIGHT_VIOLATION" "WIDTH_VIOLATION" "NO_PERMISSIONS"
id
required
integer

The unique ID of the Collection.

name
required
string

The unique name of the Collection.

Array of objects (UserRoleSpecification)

A list of added user roles for the Collection.

adminLocked
boolean

Indicates whether edits are allowed for everyone or only admins.

allowedDatasource
string

The datasource type this Collection can hold.

Array of objects (FacetFilter)

Filters which restrict who should see this Collection. Values are taken from the corresponding filters in people search.

childCount
integer

The number of children Collections. Separated from the actual children so we can grab the count without children.

children
Array of any (Collection)

The children Collections of this Collection.

object (Collection)
createTime
string <date-time>
object (Person)
object (CollectionError)
icon
string

The emoji icon of this Collection.

itemCount
integer

The number of items currently in the Collection. Separated from the actual items so we can grab the count without items.

Array of objects (CollectionItem)

The items in this Collection.

parentId
integer

The parent of this Collection, or 0 if it's a top-level Collection.

object (ObjectPermissions)
object (CollectionPinnedMetadata)
Array of objects (UserRoleSpecification)

A list of removed user roles for the Collection.

Array of objects (UserRoleSpecification)

A list of user roles for the Collection.

shortcuts
Array of strings

The names of the shortcuts (Go Links) that point to this Collection.

object (Thumbnail)
object (Person)
updateTime
string <date-time>
400

Invalid request

401

Not Authorized

422

Semantic error

429

Too Many Requests

Request samples
application/json
{
  • "name": "string",
  • "description": "string",
  • "addedRoles": [
    • {
      • "sourceDocumentSpec": {
        • "url": "string"
        },
      • "person": {
        • "name": "George Clooney",
        • "obfuscatedId": "abc123"
        },
      • "group": {
        • "type": "DEPARTMENT",
        • "id": "string",
        • "name": "string"
        },
      • "role": "OWNER"
      }
    ],
  • "removedRoles": [
    • {
      • "sourceDocumentSpec": {
        • "url": "string"
        },
      • "person": {
        • "name": "George Clooney",
        • "obfuscatedId": "abc123"
        },
      • "group": {
        • "type": "DEPARTMENT",
        • "id": "string",
        • "name": "string"
        },
      • "role": "OWNER"
      }
    ],
  • "audienceFilters": [
    • {
      • "fieldName": "type",
      • "values": [
        • {
          • "value": "Spreadsheet",
          • "relationType": "EQUALS"
          },
        • {
          • "value": "Presentation",
          • "relationType": "EQUALS"
          }
        ]
      }
    ],
  • "icon": "string",
  • "adminLocked": true,
  • "parentId": 0,
  • "thumbnail": {
    • "photoId": "string",
    • "url": "string"
    },
  • "allowedDatasource": "string",
  • "newNextItemId": "string"
}
Response samples
application/json
{
  • "name": "string",
  • "description": "string",
  • "addedRoles": [
    • {
      • "sourceDocumentSpec": {
        • "url": "string"
        },
      • "person": {
        • "name": "George Clooney",
        • "obfuscatedId": "abc123"
        },
      • "group": {
        • "type": "DEPARTMENT",
        • "id": "string",
        • "name": "string"
        },
      • "role": "OWNER"
      }
    ],
  • "removedRoles": [
    • {
      • "sourceDocumentSpec": {
        • "url": "string"
        },
      • "person": {
        • "name": "George Clooney",
        • "obfuscatedId": "abc123"
        },
      • "group": {
        • "type": "DEPARTMENT",
        • "id": "string",
        • "name": "string"
        },
      • "role": "OWNER"
      }
    ],
  • "audienceFilters": [
    • {
      • "fieldName": "type",
      • "values": [
        • {
          • "value": "Spreadsheet",
          • "relationType": "EQUALS"
          },
        • {
          • "value": "Presentation",
          • "relationType": "EQUALS"
          }
        ]
      }
    ],
  • "icon": "string",
  • "adminLocked": true,
  • "parentId": 0,
  • "thumbnail": {
    • "photoId": "string",
    • "url": "string"
    },
  • "allowedDatasource": "string",
  • "permissions": {
    • "write": {
      • "scopeType": "GLOBAL",
      • "create": true,
      • "update": true,
      • "delete": true
      }
    },
  • "id": 0,
  • "createTime": "2019-08-24T14:15:22Z",
  • "updateTime": "2019-08-24T14:15:22Z",
  • "creator": {
    • "name": "George Clooney",
    • "obfuscatedId": "abc123"
    },
  • "updatedBy": {
    • "name": "George Clooney",
    • "obfuscatedId": "abc123"
    },
  • "itemCount": 0,
  • "childCount": 0,
  • "items": [
    • {
      • "name": "string",
      • "description": "string",
      • "icon": "string",
      • "collectionId": 0,
      • "documentId": "string",
      • "url": "string",
      • "itemId": "string",
      • "createdBy": {
        • "name": "George Clooney",
        • "obfuscatedId": "abc123"
        },
      • "createdAt": "2019-08-24T14:15:22Z",
      • "document": {
        • "id": "string",
        • "datasource": "string",
        • "connectorType": "API_CRAWL",
        • "docType": "string",
        • "content": {
          • "fullTextList": [
            • "string"
            ]
          },
        • "containerDocument": { },
        • "parentDocument": { },
        • "title": "string",
        • "url": "string",
        • "metadata": {
          • "container": "container",
          • "parentId": "JIRA_EN-1337",
          • "createTime": "2000-01-23T04:56:07.000Z",
          • "datasource": "datasource",
          • "author": {
            • "name": "name"
            },
          • "documentId": "documentId",
          • "updateTime": "2000-01-23T04:56:07.000Z",
          • "mimeType": "mimeType",
          • "objectType": "Feature Request",
          • "components": [
            • "Backend",
            • "Networking"
            ],
          • "status": [
            • "Done"
            ],
          • "customData": {
            • "someCustomField": "someCustomValue"
            }
          },
        • "sections": [
          • {
            • "title": "string",
            • "url": "string"
            }
          ]
        },
      • "shortcut": {
        • "id": 0,
        • "inputAlias": "string",
        • "destinationUrl": "string",
        • "destinationDocumentId": "string",
        • "description": "string",
        • "unlisted": true,
        • "urlTemplate": "string",
        • "addedRoles": [
          • {
            • "sourceDocumentSpec": {
              • "url": "string"
              },
            • "person": {
              • "name": "George Clooney",
              • "obfuscatedId": "abc123"
              },
            • "group": {
              • "type": "DEPARTMENT",
              • "id": "string",
              • "name": "string"
              },
            • "role": "OWNER"
            }
          ],
        • "removedRoles": [
          • {
            • "sourceDocumentSpec": {
              • "url": "string"
              },
            • "person": {
              • "name": "George Clooney",
              • "obfuscatedId": "abc123"
              },
            • "group": {
              • "type": "DEPARTMENT",
              • "id": "string",
              • "name": "string"
              },
            • "role": "OWNER"
            }
          ],
        • "permissions": {
          • "write": {
            • "scopeType": "GLOBAL",
            • "create": true,
            • "update": true,
            • "delete": true
            }
          },
        • "createdBy": {
          • "name": "George Clooney",
          • "obfuscatedId": "abc123"
          },
        • "createTime": "2019-08-24T14:15:22Z",
        • "updatedBy": {
          • "name": "George Clooney",
          • "obfuscatedId": "abc123"
          },
        • "updateTime": "2019-08-24T14:15:22Z",
        • "destinationDocument": {
          • "id": "string",
          • "datasource": "string",
          • "connectorType": "API_CRAWL",
          • "docType": "string",
          • "content": {
            • "fullTextList": [
              • "string"
              ]
            },
          • "containerDocument": { },
          • "parentDocument": { },
          • "title": "string",
          • "url": "string",
          • "metadata": {
            • "container": "container",
            • "parentId": "JIRA_EN-1337",
            • "createTime": "2000-01-23T04:56:07.000Z",
            • "datasource": "datasource",
            • "author": {
              • "name": "name"
              },
            • "documentId": "documentId",
            • "updateTime": "2000-01-23T04:56:07.000Z",
            • "mimeType": "mimeType",
            • "objectType": "Feature Request",
            • "components": [
              • "Backend",
              • "Networking"
              ],
            • "status": [
              • "Done"
              ],
            • "customData": {
              • "someCustomField": "someCustomValue"
              }
            },
          • "sections": [
            • {
              • "title": "string",
              • "url": "string"
              }
            ]
          },
        • "intermediateUrl": "string",
        • "viewPrefix": "string",
        • "isExternal": true,
        • "editUrl": "string",
        • "alias": "string",
        • "title": "string",
        • "roles": [
          • {
            • "sourceDocumentSpec": {
              • "url": "string"
              },
            • "person": {
              • "name": "George Clooney",
              • "obfuscatedId": "abc123"
              },
            • "group": {
              • "type": "DEPARTMENT",
              • "id": "string",
              • "name": "string"
              },
            • "role": "OWNER"
            }
          ]
        },
      • "collection": null,
      • "itemType": "DOCUMENT"
      }
    ],
  • "pinMetadata": {
    • "existingPins": [
      • {
        • "category": "COMPANY_RESOURCE",
        • "value": "string",
        • "target": "RESOURCE_CARD"
        }
      ],
    • "eligiblePins": [
      • {
        • "id": 0,
        • "target": {
          • "category": "COMPANY_RESOURCE",
          • "value": "string",
          • "target": "RESOURCE_CARD"
          }
        }
      ]
    },
  • "shortcuts": [
    • "string"
    ],
  • "children": [
    • null
    ],
  • "roles": [
    • {
      • "sourceDocumentSpec": {
        • "url": "string"
        },
      • "person": {
        • "name": "George Clooney",
        • "obfuscatedId": "abc123"
        },
      • "group": {
        • "type": "DEPARTMENT",
        • "id": "string",
        • "name": "string"
        },
      • "role": "OWNER"
      }
    ],
  • "errorCode": "NAME_EXISTS",
  • "collection": {
    • "name": "string",
    • "description": "string",
    • "addedRoles": [
      • {
        • "sourceDocumentSpec": {
          • "url": "string"
          },
        • "person": {
          • "name": "George Clooney",
          • "obfuscatedId": "abc123"
          },
        • "group": {
          • "type": "DEPARTMENT",
          • "id": "string",
          • "name": "string"
          },
        • "role": "OWNER"
        }
      ],
    • "removedRoles": [
      • {
        • "sourceDocumentSpec": {
          • "url": "string"
          },
        • "person": {
          • "name": "George Clooney",
          • "obfuscatedId": "abc123"
          },
        • "group": {
          • "type": "DEPARTMENT",
          • "id": "string",
          • "name": "string"
          },
        • "role": "OWNER"
        }
      ],
    • "audienceFilters": [
      • {
        • "fieldName": "type",
        • "values": [
          • {
            • "value": "Spreadsheet",
            • "relationType": "EQUALS"
            },
          • {
            • "value": "Presentation",
            • "relationType": "EQUALS"
            }
          ]
        }
      ],
    • "icon": "string",
    • "adminLocked": true,
    • "parentId": 0,
    • "thumbnail": {
      • "photoId": "string",
      • "url": "string"
      },
    • "allowedDatasource": "string",
    • "permissions": {
      • "write": {
        • "scopeType": "GLOBAL",
        • "create": true,
        • "update": true,
        • "delete": true
        }
      },
    • "id": 0,
    • "createTime": "2019-08-24T14:15:22Z",
    • "updateTime": "2019-08-24T14:15:22Z",
    • "creator": {
      • "name": "George Clooney",
      • "obfuscatedId": "abc123"
      },
    • "updatedBy": {
      • "name": "George Clooney",
      • "obfuscatedId": "abc123"
      },
    • "itemCount": 0,
    • "childCount": 0,
    • "items": [
      • {
        • "name": "string",
        • "description": "string",
        • "icon": "string",
        • "collectionId": 0,
        • "documentId": "string",
        • "url": "string",
        • "itemId": "string",
        • "createdBy": {
          • "name": "George Clooney",
          • "obfuscatedId": "abc123"
          },
        • "createdAt": "2019-08-24T14:15:22Z",
        • "document": {
          • "id": "string",
          • "datasource": "string",
          • "connectorType": "API_CRAWL",
          • "docType": "string",
          • "content": {
            • "fullTextList": [
              • "string"
              ]
            },
          • "containerDocument": { },
          • "parentDocument": { },
          • "title": "string",
          • "url": "string",
          • "metadata": {
            • "container": "container",
            • "parentId": "JIRA_EN-1337",
            • "createTime": "2000-01-23T04:56:07.000Z",
            • "datasource": "datasource",
            • "author": {
              • "name": "name"
              },
            • "documentId": "documentId",
            • "updateTime": "2000-01-23T04:56:07.000Z",
            • "mimeType": "mimeType",
            • "objectType": "Feature Request",
            • "components": [
              • "Backend",
              • "Networking"
              ],
            • "status": [
              • "Done"
              ],
            • "customData": {
              • "someCustomField": "someCustomValue"
              }
            },
          • "sections": [
            • {
              • "title": "string",
              • "url": "string"
              }
            ]
          },
        • "shortcut": {
          • "id": 0,
          • "inputAlias": "string",
          • "destinationUrl": "string",
          • "destinationDocumentId": "string",
          • "description": "string",
          • "unlisted": true,
          • "urlTemplate": "string",
          • "addedRoles": [
            • {
              • "sourceDocumentSpec": {
                • "url": null
                },
              • "person": {
                • "name": "George Clooney",
                • "obfuscatedId": "abc123"
                },
              • "group": {
                • "type": null,
                • "id": null,
                • "name": null
                },
              • "role": "OWNER"
              }
            ],
          • "removedRoles": [
            • {
              • "sourceDocumentSpec": {
                • "url": null
                },
              • "person": {
                • "name": "George Clooney",
                • "obfuscatedId": "abc123"
                },
              • "group": {
                • "type": null,
                • "id": null,
                • "name": null
                },
              • "role": "OWNER"
              }
            ],
          • "permissions": {
            • "write": {
              • "scopeType": "GLOBAL",
              • "create": true,
              • "update": true,
              • "delete": true
              }
            },
          • "createdBy": {
            • "name": "George Clooney",
            • "obfuscatedId": "abc123"
            },
          • "createTime": "2019-08-24T14:15:22Z",
          • "updatedBy": {
            • "name": "George Clooney",
            • "obfuscatedId": "abc123"
            },
          • "updateTime": "2019-08-24T14:15:22Z",
          • "destinationDocument": {
            • "id": "string",
            • "datasource": "string",
            • "connectorType": "API_CRAWL",
            • "docType": "string",
            • "content": {
              • "fullTextList": [
                • null
                ]
              },
            • "containerDocument": { },
            • "parentDocument": { },
            • "title": "string",
            • "url": "string",
            • "metadata": {
              • "container": "container",
              • "parentId": "JIRA_EN-1337",
              • "createTime": "2000-01-23T04:56:07.000Z",
              • "datasource": "datasource",
              • "author": {
                • "name": "name"
                },
              • "documentId": "documentId",
              • "updateTime": "2000-01-23T04:56:07.000Z",
              • "mimeType": "mimeType",
              • "objectType": "Feature Request",
              • "components": [
                • "Backend",
                • "Networking"
                ],
              • "status": [
                • "Done"
                ],
              • "customData": {
                • "someCustomField": "someCustomValue"
                }
              },
            • "sections": [
              • {
                • "title": null,
                • "url": null
                }
              ]
            },
          • "intermediateUrl": "string",
          • "viewPrefix": "string",
          • "isExternal": true,
          • "editUrl": "string",
          • "alias": "string",
          • "title": "string",
          • "roles": [
            • {
              • "sourceDocumentSpec": {
                • "url": null
                },
              • "person": {
                • "name": "George Clooney",
                • "obfuscatedId": "abc123"
                },
              • "group": {
                • "type": null,
                • "id": null,
                • "name": null
                },
              • "role": "OWNER"
              }
            ]
          },
        • "collection": null,
        • "itemType": "DOCUMENT"
        }
      ],
    • "pinMetadata": {
      • "existingPins": [
        • {
          • "category": "COMPANY_RESOURCE",
          • "value": "string",
          • "target": "RESOURCE_CARD"
          }
        ],
      • "eligiblePins": [
        • {
          • "id": 0,
          • "target": {
            • "category": "COMPANY_RESOURCE",
            • "value": "string",
            • "target": "RESOURCE_CARD"
            }
          }
        ]
      },
    • "shortcuts": [
      • "string"
      ],
    • "children": [
      • null
      ],
    • "roles": [
      • {
        • "sourceDocumentSpec": {
          • "url": "string"
          },
        • "person": {
          • "name": "George Clooney",
          • "obfuscatedId": "abc123"
          },
        • "group": {
          • "type": "DEPARTMENT",
          • "id": "string",
          • "name": "string"
          },
        • "role": "OWNER"
        }
      ]
    },
  • "error": {
    • "errorCode": "NAME_EXISTS"
    }
}