Retrieves a Chat

post/getchat

Retrieves the chat history between Glean Assistant and the user for a given Chat.

SecurityBearerAuth
Request
query Parameters
timezoneOffset
integer

The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC.

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
id
required
string

The id of the Chat to be retrieved.

Responses
200

OK

Response Schema: application/json
object (ChatResult)
400

Invalid request

401

Not Authorized

403

Forbidden

429

Too Many Requests

Request samples
application/json
{
  • "id": "string"
}
Response samples
application/json
{
  • "chatResult": {
    • "chat": {
      • "messages": [
        • {
          • "agentConfig": {
            • "agent": "DEFAULT",
            • "mode": "DEFAULT"
            },
          • "author": "USER",
          • "citations": [
            • {
              • "trackingToken": "string",
              • "sourceDocument": {
                • "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
                    }
                  ]
                },
              • "sourceFile": {
                • "id": "FILE_1234",
                • "name": "sample.pdf",
                • "metadata": {
                  • "status": "PROCESSING",
                  • "uploadTime": 0,
                  • "processedSize": 0,
                  • "failureReason": "PARSE_FAILED",
                  • "mimeType": "string"
                  }
                },
              • "sourcePerson": {
                • "name": "George Clooney",
                • "obfuscatedId": "abc123"
                },
              • "referenceRanges": [
                • {
                  • "textRange": {
                    • "startIndex": null,
                    • "endIndex": null,
                    • "type": null,
                    • "url": null,
                    • "document": null
                    },
                  • "snippets": [
                    • null
                    ]
                  }
                ]
              }
            ],
          • "uploadedFileIds": [
            • "string"
            ],
          • "fragments": [
            • {
              • "structuredResults": [
                • {
                  • "document": {
                    • "id": null,
                    • "datasource": null,
                    • "connectorType": null,
                    • "docType": null,
                    • "content": null,
                    • "containerDocument": null,
                    • "parentDocument": null,
                    • "title": null,
                    • "url": null,
                    • "metadata": null,
                    • "sections": [ ]
                    },
                  • "person": {
                    • "name": "George Clooney",
                    • "obfuscatedId": "abc123"
                    },
                  • "customer": {
                    • "id": null,
                    • "domains": [ ],
                    • "company": null,
                    • "documentCounts": null,
                    • "poc": [ ],
                    • "metadata": null,
                    • "mergedCustomers": [ ],
                    • "startDate": null,
                    • "contractAnnualRevenue": null,
                    • "notes": null
                    },
                  • "team": {
                    • "relatedObjects": { },
                    • "permissions": null,
                    • "id": null,
                    • "name": null,
                    • "description": null,
                    • "businessUnit": null,
                    • "department": null,
                    • "photoUrl": null,
                    • "bannerUrl": null,
                    • "externalLink": null,
                    • "members": [ ],
                    • "memberCount": null,
                    • "emails": [ ],
                    • "datasourceProfiles": [ ],
                    • "datasource": null,
                    • "createdFrom": null,
                    • "lastUpdatedAt": null,
                    • "status": null,
                    • "canBeDeleted": null,
                    • "loggingId": null
                    },
                  • "customEntity": {
                    • "permissions": null,
                    • "id": null,
                    • "title": null,
                    • "datasource": null,
                    • "objectType": null,
                    • "metadata": null,
                    • "roles": [ ]
                    },
                  • "answer": {
                    • "id": null,
                    • "docId": null,
                    • "question": null,
                    • "questionVariations": [ ],
                    • "bodyText": null,
                    • "boardId": null,
                    • "audienceFilters": [ ],
                    • "addedRoles": [ ],
                    • "removedRoles": [ ],
                    • "roles": [ ],
                    • "sourceDocumentSpec": null,
                    • "sourceType": null,
                    • "permissions": null,
                    • "combinedAnswerText": null,
                    • "likes": null,
                    • "author": null,
                    • "createTime": null,
                    • "updateTime": null,
                    • "updatedBy": null,
                    • "verification": null,
                    • "board": null,
                    • "collections": [ ],
                    • "documentCategory": null,
                    • "sourceDocument": null
                    },
                  • "extractedQnA": {
                    • "heading": null,
                    • "question": null,
                    • "questionResult": null
                    },
                  • "app": {
                    • "datasource": null,
                    • "docType": null,
                    • "mimeType": null,
                    • "iconUrl": null
                    },
                  • "collection": {
                    • "name": null,
                    • "description": null,
                    • "addedRoles": [ ],
                    • "removedRoles": [ ],
                    • "audienceFilters": [ ],
                    • "icon": null,
                    • "adminLocked": null,
                    • "parentId": null,
                    • "thumbnail": null,
                    • "allowedDatasource": null,
                    • "permissions": null,
                    • "id": null,
                    • "createTime": null,
                    • "updateTime": null,
                    • "creator": null,
                    • "updatedBy": null,
                    • "itemCount": null,
                    • "childCount": null,
                    • "items": [ ],
                    • "pinMetadata": null,
                    • "shortcuts": [ ],
                    • "children": [ ],
                    • "roles": [ ]
                    },
                  • "answerBoard": {
                    • "name": null,
                    • "description": null,
                    • "addedRoles": [ ],
                    • "removedRoles": [ ],
                    • "audienceFilters": [ ],
                    • "permissions": null,
                    • "id": null,
                    • "createTime": null,
                    • "updateTime": null,
                    • "creator": null,
                    • "updatedBy": null,
                    • "itemCount": null,
                    • "roles": [ ]
                    },
                  • "code": {
                    • "repoName": "scio",
                    • "fileName": "README.md",
                    • "matches": [
                      • {
                        • "lineNumber": 1,
                        • "content": "Welcome to the beginning",
                        • "ranges": [ ]
                        },
                      • {
                        • "lineNumber": 2,
                        • "content": "Second line of the file",
                        • "ranges": [ ]
                        },
                      • {
                        • "lineNumber": 3,
                        • "content": "hello world hello world",
                        • "ranges": [
                          • {
                            • "startindex": 0,
                            • "endIndex": 5
                            },
                          • {
                            • "startIndex": 12,
                            • "endIndex": 17
                            }
                          ]
                        }
                      ]
                    },
                  • "shortcut": {
                    • "id": null,
                    • "inputAlias": null,
                    • "destinationUrl": null,
                    • "destinationDocumentId": null,
                    • "description": null,
                    • "unlisted": null,
                    • "urlTemplate": null,
                    • "addedRoles": [ ],
                    • "removedRoles": [ ],
                    • "permissions": null,
                    • "createdBy": null,
                    • "createTime": null,
                    • "updatedBy": null,
                    • "updateTime": null,
                    • "destinationDocument": null,
                    • "intermediateUrl": null,
                    • "viewPrefix": null,
                    • "isExternal": null,
                    • "editUrl": null,
                    • "alias": null,
                    • "title": null,
                    • "roles": [ ]
                    },
                  • "querySuggestions": {
                    • "suggestions": [ ],
                    • "person": null
                    },
                  • "relatedDocuments": [
                    • null
                    ],
                  • "relatedQuestion": {
                    • "question": null,
                    • "answer": null,
                    • "ranges": [ ]
                    },
                  • "disambiguation": {
                    • "name": null,
                    • "id": null,
                    • "type": null
                    },
                  • "snippets": [
                    • null
                    ],
                  • "trackingToken": "string",
                  • "prominence": "HERO",
                  • "source": "EXPERT_DETECTION"
                  }
                ],
              • "trackingToken": "string",
              • "text": "string",
              • "querySuggestion": {
                • "query": "app:github type:pull author:mortimer",
                • "label": "Mortimer's PRs",
                • "datasource": "github"
                },
              • "writeAction": {
                • "toolName": "string",
                • "toolConfig": {
                  • "displayName": "string",
                  • "objectName": [
                    • "HR ticket",
                    • "Email",
                    • "Chat message"
                    ],
                  • "logoUrl": "string",
                  • "type": "REDIRECT"
                  },
                • "redirectUrl": "string",
                • "parameters": {
                  • "property1": {
                    • "type": null,
                    • "displayName": null,
                    • "value": null,
                    • "label": null,
                    • "isRequired": null,
                    • "description": null,
                    • "possibleValues": [ ]
                    },
                  • "property2": {
                    • "type": null,
                    • "displayName": null,
                    • "value": null,
                    • "label": null,
                    • "isRequired": null,
                    • "description": null,
                    • "possibleValues": [ ]
                    }
                  }
                },
              • "file": {
                • "id": "FILE_1234",
                • "name": "sample.pdf",
                • "metadata": {
                  • "status": "PROCESSING",
                  • "uploadTime": 0,
                  • "processedSize": 0,
                  • "failureReason": "PARSE_FAILED",
                  • "mimeType": "string"
                  }
                },
              • "action": {
                • "metadata": {
                  • "type": "RETRIEVAL",
                  • "name": "string",
                  • "displayName": "string",
                  • "toolId": "string",
                  • "displayDescription": "string",
                  • "logoUrl": "string",
                  • "objectName": [
                    • "HR ticket",
                    • "Email",
                    • "Chat message"
                    ],
                  • "createdBy": {
                    • "name": null,
                    • "obfuscatedId": null
                    },
                  • "lastUpdatedBy": {
                    • "name": null,
                    • "obfuscatedId": null
                    },
                  • "createdAt": "2019-08-24T14:15:22Z",
                  • "lastUpdatedAt": "2019-08-24T14:15:22Z",
                  • "auth": {
                    • "isOnPrem": null,
                    • "type": null,
                    • "grantType": null,
                    • "status": null,
                    • "client_url": null,
                    • "scopes": [ ],
                    • "audiences": [ ],
                    • "authorization_url": null,
                    • "lastAuthorizedAt": null
                    },
                  • "permissions": {
                    • "write": null
                    }
                  },
                • "parameters": {
                  • "property1": {
                    • "type": null,
                    • "displayName": null,
                    • "value": null,
                    • "label": null,
                    • "isRequired": null,
                    • "description": null,
                    • "possibleValues": [ ]
                    },
                  • "property2": {
                    • "type": null,
                    • "displayName": null,
                    • "value": null,
                    • "label": null,
                    • "isRequired": null,
                    • "description": null,
                    • "possibleValues": [ ]
                    }
                  }
                }
              }
            ],
          • "ts": "string",
          • "messageId": "string",
          • "messageTrackingToken": "string",
          • "messageType": "UPDATE",
          • "hasMoreFragments": true
          }
        ],
      • "id": "string",
      • "createTime": 0,
      • "createdBy": {
        • "name": "George Clooney",
        • "obfuscatedId": "abc123"
        },
      • "updateTime": 0,
      • "name": "string",
      • "applicationId": "string"
      },
    • "trackingToken": "string"
    }
}