curl --request POST \
  --url https://{domain}-be.glean.com/rest/api/v1/editdocumentcollections \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "addedCollections": [
    123
  ],
  "removedCollections": [
    123
  ],
  "documentId": "<string>",
  "url": "<string>",
  "name": "<string>",
  "description": "<string>"
}'
{
  "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>"
      }
    ]
  }
}

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
Data describing the edit operation.
documentId
string

The Glean Document ID of the item being added to or removed from Collections if it's an indexed document.

url
string

The URL of the item being added to or removed from Collections.

name
string

Custom title of the document if adding a non-indexed URL.

description
string

The description of this CollectionItem.

addedCollections
integer[]

IDs of Collections to which a document is added.

removedCollections
integer[]

IDs of Collections from which a document is removed.

Response

200
application/json
OK
document
object

The modified document. Some fields may be empty but it should at least contain the full updated list of Collections.