⚠️ This documentation pertains to a preview endpoint. This feature is not yet ready for API consumption and may change.
For inquiries or feedback, please contact us at Glean.

Update document Collections

post/editdocumentcollections

Update the Collections that a document belongs to.

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

Data describing the edit operation.

addedCollections
Array of integers

IDs of Collections to which a document is added.

description
string

The description of this CollectionItem.

documentId
string

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

name
string

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

removedCollections
Array of integers

IDs of Collections from which a document is removed.

url
string

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

Responses
200

OK

Response Schema: application/json
object (Document)
400

Invalid request

401

Not Authorized

429

Too Many Requests

Request samples
application/json
{
  • "addedCollections": [
    • 0
    ],
  • "removedCollections": [
    • 0
    ],
  • "documentId": "string",
  • "url": "string",
  • "name": "string",
  • "description": "string"
}
Response samples
application/json
{
  • "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"
        }
      ]
    }
}