Search relevant documents in Dynatrace with the Davis CoPilot Document Search API using search texts, collections, and optional excluded document IDs.
| POST | SaaS | https://{your-environment-id}.apps.dynatrace.com/platform/davis/copilot/v1/skills/document-search:execute |
Allows to query documents (Dashboards, Notebooks, …) relevant for your input. The payload is a JSON dictionary provided from the response. Please review the examples for the correct payload formatting.
Parameters:
Please note, this endpoint is in preview and is subject to the Dynatrace preview conditions, as linked in the overview.
To execute this request, you need a platform token or OAuth access token with davis-copilot:document-search:execute scope. To learn how to obtain and use it, see Tokens and authentication.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| body | Document | - | body | Required |
DocumentSearchRequest object| Element | Type | Description | Required |
|---|---|---|---|
| texts | string[] | - | Required |
| collections | string[] | The name of the document collections corresponding to the names in the vectorstore. | Required |
| exclude | string[] | Must be a uuid hash matching a document (for now, no patterns/wildcards) | Optional |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"texts": ["search-string 1","search-string 2","DQL1","DQL2"],"collections": ["documentCollection 1","documentCollection 2","documentCollection 3"],"exclude": ["documentId1","documentId2","documentId3"]}
| Code | Type | Description |
|---|---|---|
| 200 | Document | List of documents with their relevance scores |
| 4XX | Client | - |
| 5XX | Internal | - |
DocumentSearchResponse object| Element | Type | Description |
|---|---|---|
| messageToken | string | Must be a random uuid hash to identify the response |
| results | Scored | - |
| status | Status | -The element can hold these values
|
ScoredDocument object| Element | Type | Description |
|---|---|---|
| documentId | string | - |
| relevanceScore | number | - |
| documentMetadata | Document | - |
DocumentMetadata object| Element | Type | Description |
|---|---|---|
| id | string | - |
| externalId | string | Is deprecated and will be removed. For now, it is a copy of id in order to remain backwards compatible. |
| name | string | - |
| type | string | Type of document (notebook or dashboard) |
| description | string | Users description of the document |
| version | string | Starting at 1, every modification of the document to either metadata or content increases the version number |
Status objectClientErrorResponse object| Element | Type | Description |
|---|---|---|
| error | Client | - |
ClientErrorResponseObject object| Element | Type | Description |
|---|---|---|
| code | integer | - |
| message | string | - |
{"messageToken": "<some UUID hash>","results": [{"documentId": "<some UUID hash>","relevanceScore": 0.9999,"documentMetadata": {"id": "<some UUID hash>","externalId": "<some UUID hash>","name": "Name of document","type": "notebook","description": "This notebook analyses problems","version": "<some UUID hash>"}}],"status": "SUCCESSFUL"}
{"error": {"code": 400,"message": "Bad Request"}}