curl --request POST \
  --url https://{domain}-be.glean.com/rest/api/v1/editcollection \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "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": 123,
  "thumbnail": {
    "photoId": "<string>",
    "url": "<string>"
  },
  "allowedDatasource": "<string>",
  "id": 123
}'
{
  "permissions": {
    "write": {
      "scopeType": "GLOBAL",
      "create": true,
      "update": true,
      "delete": true
    }
  },
  "id": 123,
  "createTime": "2023-11-07T05:31:56Z",
  "updateTime": "2023-11-07T05:31:56Z",
  "creator": {
    "name": "George Clooney",
    "obfuscatedId": "abc123"
  },
  "updatedBy": {
    "name": "George Clooney",
    "obfuscatedId": "abc123"
  },
  "itemCount": 123,
  "childCount": 123,
  "items": [
    {
      "name": "<string>",
      "description": "<string>",
      "icon": "<string>",
      "collectionId": 123,
      "documentId": "<string>",
      "url": "<string>",
      "itemId": "<string>",
      "createdBy": {
        "name": "George Clooney",
        "obfuscatedId": "abc123"
      },
      "createdAt": "2023-11-07T05:31:56Z",
      "document": {},
      "shortcut": {
        "id": 123,
        "inputAlias": "<string>",
        "destinationUrl": "<string>",
        "destinationDocumentId": "<string>",
        "description": "<string>",
        "unlisted": true,
        "urlTemplate": "<string>",
        "addedRoles": [
          {}
        ],
        "removedRoles": [
          {}
        ],
        "permissions": {
          "write": {
            "scopeType": "GLOBAL",
            "create": true,
            "update": true,
            "delete": true
          }
        },
        "createdBy": {
          "name": "George Clooney",
          "obfuscatedId": "abc123"
        },
        "createTime": "2023-11-07T05:31:56Z",
        "updatedBy": {
          "name": "George Clooney",
          "obfuscatedId": "abc123"
        },
        "updateTime": "2023-11-07T05:31:56Z",
        "destinationDocument": {},
        "intermediateUrl": "<string>",
        "viewPrefix": "<string>",
        "isExternal": true,
        "editUrl": "<string>",
        "alias": "<string>",
        "title": "<string>",
        "roles": [
          {}
        ]
      },
      "collection": "<any>",
      "itemType": "DOCUMENT"
    }
  ],
  "pinMetadata": {
    "existingPins": [
      {
        "category": "COMPANY_RESOURCE",
        "value": "<string>",
        "target": "RESOURCE_CARD"
      }
    ],
    "eligiblePins": [
      {
        "id": 123,
        "target": {
          "category": "COMPANY_RESOURCE",
          "value": "<string>",
          "target": "RESOURCE_CARD"
        }
      }
    ]
  },
  "shortcuts": [
    "<string>"
  ],
  "children": [
    "<any>"
  ],
  "roles": [
    {}
  ],
  "errorCode": "NAME_EXISTS",
  "collection": {
    "permissions": {
      "write": {
        "scopeType": "GLOBAL",
        "create": true,
        "update": true,
        "delete": true
      }
    },
    "id": 123,
    "createTime": "2023-11-07T05:31:56Z",
    "updateTime": "2023-11-07T05:31:56Z",
    "creator": {
      "name": "George Clooney",
      "obfuscatedId": "abc123"
    },
    "updatedBy": {
      "name": "George Clooney",
      "obfuscatedId": "abc123"
    },
    "itemCount": 123,
    "childCount": 123,
    "items": [
      {
        "name": "<string>",
        "description": "<string>",
        "icon": "<string>",
        "collectionId": 123,
        "documentId": "<string>",
        "url": "<string>",
        "itemId": "<string>",
        "createdBy": {
          "name": "George Clooney",
          "obfuscatedId": "abc123"
        },
        "createdAt": "2023-11-07T05:31:56Z",
        "document": {},
        "shortcut": {
          "id": 123,
          "inputAlias": "<string>",
          "destinationUrl": "<string>",
          "destinationDocumentId": "<string>",
          "description": "<string>",
          "unlisted": true,
          "urlTemplate": "<string>",
          "addedRoles": [
            {}
          ],
          "removedRoles": [
            {}
          ],
          "permissions": {
            "write": {
              "scopeType": "GLOBAL",
              "create": true,
              "update": true,
              "delete": true
            }
          },
          "createdBy": {
            "name": "George Clooney",
            "obfuscatedId": "abc123"
          },
          "createTime": "2023-11-07T05:31:56Z",
          "updatedBy": {
            "name": "George Clooney",
            "obfuscatedId": "abc123"
          },
          "updateTime": "2023-11-07T05:31:56Z",
          "destinationDocument": {},
          "intermediateUrl": "<string>",
          "viewPrefix": "<string>",
          "isExternal": true,
          "editUrl": "<string>",
          "alias": "<string>",
          "title": "<string>",
          "roles": [
            {}
          ]
        },
        "collection": "<any>",
        "itemType": "DOCUMENT"
      }
    ],
    "pinMetadata": {
      "existingPins": [
        {
          "category": "COMPANY_RESOURCE",
          "value": "<string>",
          "target": "RESOURCE_CARD"
        }
      ],
      "eligiblePins": [
        {
          "id": 123,
          "target": {
            "category": "COMPANY_RESOURCE",
            "value": "<string>",
            "target": "RESOURCE_CARD"
          }
        }
      ]
    },
    "shortcuts": [
      "<string>"
    ],
    "children": [
      "<any>"
    ],
    "roles": [
      {}
    ]
  },
  "error": {
    "errorCode": "NAME_EXISTS"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-Scio-Actas
string

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

X-Glean-Auth-Type
string

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

Body

application/json
Collection content plus any additional metadata for the request.
id
integer
required

The ID of the Collection to modify.

name
string
required

The unique name of the Collection.

icon
string

The emoji icon of this Collection.

adminLocked
boolean

Indicates whether edits are allowed for everyone or only admins.

parentId
integer

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

thumbnail
object
allowedDatasource
string

The datasource type this Collection can hold.

description
string

A brief summary of the Collection's contents.

addedRoles
object[]

A list of added user roles for the Collection.

removedRoles
object[]

A list of removed user roles for the Collection.

audienceFilters
object[]

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

Response

200
application/json
OK
id
integer
required

The unique ID of the Collection.

name
string
required

The unique name of the Collection.

description
string
required

A brief summary of the Collection's contents.

errorCode
enum<string>
required
Available options:
NAME_EXISTS,
NOT_FOUND,
COLLECTION_PINNED,
CONCURRENT_HIERARCHY_EDIT,
HEIGHT_VIOLATION,
WIDTH_VIOLATION,
NO_PERMISSIONS
icon
string

The emoji icon of this Collection.

adminLocked
boolean

Indicates whether edits are allowed for everyone or only admins.

parentId
integer

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

thumbnail
object
allowedDatasource
string

The datasource type this Collection can hold.

createTime
string
updateTime
string
creator
object
Example:
{
  "name": "George Clooney",
  "obfuscatedId": "abc123"
}
updatedBy
object
Example:
{
  "name": "George Clooney",
  "obfuscatedId": "abc123"
}
itemCount
integer

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

childCount
integer

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

items
object[]

The items in this Collection.

pinMetadata
object

Metadata having what categories this Collection is pinned to and the eligible categories to pin to

shortcuts
string[]

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

children
object[]

The children Collections of this Collection.

roles
object[]

A list of user roles for the Collection.

collection
object
error
object
addedRoles
object[]

A list of added user roles for the Collection.

removedRoles
object[]

A list of removed user roles for the Collection.

audienceFilters
object[]

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

permissions
object

The permissions the current viewer has with respect to a particular object.