Mutations
createIndexedDocument
Manually add a single URL as an indexed document within an existing knowledge source. The document is fetched and queued for indexing asynchronously. Requires Plain AI to be enabled on the workspace.
MUTATION
createIndexedDocument(input: CreateIndexedDocumentInput!): CreateIndexedDocumentOutput!Arguments
input
required
Returns
error
indexedDocument
Mutation
mutation CreateIndexedDocument($input: CreateIndexedDocumentInput!) {
createIndexedDocument(input: $input) {
error {
message
type
code
fields {
field
message
type
}
}
indexedDocument {
id
url
labelTypes {
id
name
icon
color
type
description
}
status {
__typename
... on IndexedDocumentStatusIndexed {
__typename
}
}
createdAt {
unixTimestamp
iso8601
}
createdBy {
__typename
... on UserActor {
__typename
}
}
}
}
}Variables
{
"input": {
"url": "string",
"knowledgeSourceId": "id"
}
}Response
{
"data": {
"createIndexedDocument": {
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
},
"indexedDocument": {
"id": "id",
"url": "string",
"labelTypes": [
{
"id": "id",
"name": "string",
"icon": "string",
"color": "string",
"type": "DEFAULT",
"description": "string"
}
],
"status": {
"__typename": "IndexedDocumentStatusIndexed"
},
"createdAt": {
"unixTimestamp": "string",
"iso8601": "string"
},
"createdBy": {
"__typename": "UserActor"
}
}
}
}
}Was this page helpful?
⌘I
Mutation
mutation CreateIndexedDocument($input: CreateIndexedDocumentInput!) {
createIndexedDocument(input: $input) {
error {
message
type
code
fields {
field
message
type
}
}
indexedDocument {
id
url
labelTypes {
id
name
icon
color
type
description
}
status {
__typename
... on IndexedDocumentStatusIndexed {
__typename
}
}
createdAt {
unixTimestamp
iso8601
}
createdBy {
__typename
... on UserActor {
__typename
}
}
}
}
}Variables
{
"input": {
"url": "string",
"knowledgeSourceId": "id"
}
}Response
{
"data": {
"createIndexedDocument": {
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
},
"indexedDocument": {
"id": "id",
"url": "string",
"labelTypes": [
{
"id": "id",
"name": "string",
"icon": "string",
"color": "string",
"type": "DEFAULT",
"description": "string"
}
],
"status": {
"__typename": "IndexedDocumentStatusIndexed"
},
"createdAt": {
"unixTimestamp": "string",
"iso8601": "string"
},
"createdBy": {
"__typename": "UserActor"
}
}
}
}
}
