{"_id":"@dynatrace-sdk/client-service-level-objectives","name":"@dynatrace-sdk/client-service-level-objectives","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@dynatrace-sdk/client-service-level-objectives","version":"1.0.0","dependencies":{"@dynatrace-sdk/http-client":"^1.4.0","@dynatrace-sdk/shared-errors":"^1.0.2"},"license":"Apache-2.0","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.ts","_id":"@dynatrace-sdk/client-service-level-objectives@1.0.0","description":"[![npm](https://img.shields.io/badge/npm-v1.0.0-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-service-level-objectives/v/1.0.0) [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)","_integrity":"sha512-rWplbwXxPsT9TTceXgZNZfimE4q0o8tJQEaA9twXgFswPOm/fGhdJmRbrvzmsPHW1BlFfjJsi7mwx1ZZ97th8Q==","_resolved":"/tmp/npm-publish-@dynatrace-sdk-client-service-level-objectives-1.0.0-U7xxDI/dynatrace-sdk-client-service-level-objectives-1.0.0.tgz","_from":"file:dynatrace-sdk-client-service-level-objectives-1.0.0.tgz","_nodeVersion":"22.10.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-rWplbwXxPsT9TTceXgZNZfimE4q0o8tJQEaA9twXgFswPOm/fGhdJmRbrvzmsPHW1BlFfjJsi7mwx1ZZ97th8Q==","shasum":"381f2b4a19bc74df1b787f2df3e0a0b3e1431f6b","tarball":"https://registry.npmjs.org/@dynatrace-sdk/client-service-level-objectives/-/client-service-level-objectives-1.0.0.tgz","fileCount":60,"unpackedSize":306698,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCrIEyb646HyRBkUNBZuCIIZjdTP838Iptdka53ztK3hgIgbLGjGNrkyLDFXl3GCNvN6c8U+b+zrSZzde0mEf+jsXA="}]},"_npmUser":{"name":"dynatrace-nodejs","email":"nodejs@dynatrace.com"},"directories":{},"maintainers":[{"name":"dynatrace-nodejs","email":"nodejs@dynatrace.com"},{"name":"stefan.wolfsteiner.dynatrace","email":"stefan.wolfsteiner@dynatrace.com"},{"name":"wasserb","email":"Stefan.wasserbauer@dynatrace.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/client-service-level-objectives_1.0.0_1777466521180_0.30230504043327855"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-29T12:42:01.101Z","1.0.0":"2026-04-29T12:42:01.382Z","modified":"2026-04-29T12:42:01.621Z"},"maintainers":[{"name":"dynatrace-nodejs","email":"nodejs@dynatrace.com"},{"name":"stefan.wolfsteiner.dynatrace","email":"stefan.wolfsteiner@dynatrace.com"},{"name":"wasserb","email":"Stefan.wasserbauer@dynatrace.com"}],"description":"[![npm](https://img.shields.io/badge/npm-v1.0.0-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-service-level-objectives/v/1.0.0) [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)","license":"Apache-2.0","readme":"# @dynatrace-sdk/client-service-level-objectives\n\n[![npm](https://img.shields.io/badge/npm-v1.0.0-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-service-level-objectives/v/1.0.0)\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nManagement API for service-level objectives, templates and evaluating service-level objectives\n\n\n## Installation\n\n```bash\nnpm install @dynatrace-sdk/client-service-level-objectives\n```\n\n\n## Getting help\n\n- Visit [SDK for Typescript](https://developer.dynatrace.com/reference/sdks/) guide in the [Dynatrace Developer](https://developer.dynatrace.com/)\n- Ask a question in the [Dynatrace Community](https://community.dynatrace.com/)\n\n\n## License\n\nThis SDK is distributed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), see LICENSE for more information.\n\n\n# API reference\n\nFull API reference for the latest version of the SDK is also available at the [Dynatrace Developer](https://developer.dynatrace.com/reference/sdks/client-service-level-objectives/).\n\n## objectiveTemplatesClient\n\n```js\nimport { objectiveTemplatesClient } from '@dynatrace-sdk/client-service-level-objectives';\n```\n\n\n<a name=\"getobjectivetemplatebyid\"></a>\n### getObjectiveTemplateById\n\n<div class=\"padding-bottom--md\">\n<strong>objectiveTemplatesClient.getObjectiveTemplateById(config): Promise&lt;<a href=\"#objectivetemplate\">ObjectiveTemplate</a>&gt;</strong>\n\n<div class=\"padding-left--md\">\n\nGet an objective template by ID\n\n**One of the following scopes is required:**\n+ slo:objective-templates:read\n+ slo:slos:read\n\n\n\n</div>\n\n\n#### Parameters\n\n| Name | Type | Description |\n| --- | --- | --- |\n|config.id<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|objective template ID |\n\n\n\n\n#### Returns\n\n| Return type | Status code | Description |\n|---|---|---|\n|[ObjectiveTemplate](#objectivetemplate)|200|A single objective template|\n\n\n#### Throws\n\n| Error Type | Error Message |\n|---|---|\n|BadRequest|Malformed request or invalid parameters.|\n|Unauthorized|API token or tenant missing or corrupt.|\n|Forbidden|Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity isn't accessible to the user.|\n|NotFound|Not found.|\n|TooManyRequests|The client has sent too many requests in a given amount of time and has been rate-limited.|\n|InternalServerError|Internal server error.|\n\n\n<details>\n<summary>\nCode example\n</summary>\n\n```ts\nimport { objectiveTemplatesClient } from \"@dynatrace-sdk/client-service-level-objectives\";\n\nconst data =\n  await objectiveTemplatesClient.getObjectiveTemplateById({\n    id: \"...\",\n  });\n```\n\n</details>\n\n\n\n</div>\n\n\n<a name=\"getobjectivetemplates\"></a>\n### getObjectiveTemplates\n\n<div class=\"padding-bottom--md\">\n<strong>objectiveTemplatesClient.getObjectiveTemplates(config): Promise&lt;<a href=\"#objectivetemplatelist\" target=\"_blank\" rel=\"noopener noreferrer\">ObjectiveTemplateList</a>&gt;</strong>\n\n<div class=\"padding-left--md\">\n\nList objective templates\n\n**One of the following scopes is required:**\n+ slo:objective-templates:read\n+ slo:slos:read\n\n\n\n</div>\n\n\n#### Parameters\n\n| Name | Type | Description |\n| --- | --- | --- |\n|config.filter|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The filter parameter, as explained <a href=\"https://dt-url.net/platform-services-filtering\" target=\"_blank\" rel=\"noopener noreferrer\" >here</a>.</p> <p>Filtering is supported on the following fields:</p> <ul> <li><code>id</code></li> <li><code>name</code></li> <li><code>builtIn</code></li> <li><code>deprecated</code></li> <li><code>applicableScope</code></li> <li><code>tag.key</code> and <code>tag.value</code></li> </ul>  |\n|config.page|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The page number to retrieve, 1-indexed. Can't be used together with <code>page-key</code>. |\n|config.pageKey|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Cursor for the next page of results, obtained from <code>nextPageKey</code> in the previous response. Can't be used together with <code>page</code>. |\n|config.pageSize|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|How many items to return at one time (max 500) |\n|config.sort|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The sort parameter, as explained <a href=\"https://dt-url.net/platform-services-filtering\" target=\"_blank\" rel=\"noopener noreferrer\" >here</a>.</p> <p>Sorting is supported on the following fields:</p> <ul> <li><code>name</code></li> </ul>  |\n\n\n\n\n#### Returns\n\n| Return type | Status code | Description |\n|---|---|---|\n|[ObjectiveTemplateList](#objectivetemplatelist)|200|A paged array of objective templates|\n\n\n#### Throws\n\n| Error Type | Error Message |\n|---|---|\n|BadRequest|Malformed request or invalid parameters.|\n|Unauthorized|API token or tenant missing or corrupt.|\n|Forbidden|Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity isn't accessible to the user.|\n|TooManyRequests|The client has sent too many requests in a given amount of time and has been rate-limited.|\n|InternalServerError|Internal server error.|\n\n\n<details>\n<summary>\nCode example\n</summary>\n\n```ts\nimport { objectiveTemplatesClient } from \"@dynatrace-sdk/client-service-level-objectives\";\n\nconst data =\n  await objectiveTemplatesClient.getObjectiveTemplates();\n```\n\n</details>\n\n\n\n</div>\n\n## serviceLevelObjectivesClient\n\n```js\nimport { serviceLevelObjectivesClient } from '@dynatrace-sdk/client-service-level-objectives';\n```\n\n\n<a name=\"createslo\"></a>\n### createSlo\n\n<div class=\"padding-bottom--md\">\n<strong>serviceLevelObjectivesClient.createSlo(config): Promise&lt;<a href=\"#slo\">Slo</a>&gt;</strong>\n\n<div class=\"padding-left--md\">\n\nAdd a new service-level objective\n\n**Required scope:** slo:slos:write\n\n\n\n</div>\n\n\n#### Parameters\n\n| Name | Type |\n| --- | --- |\n|config.body<sup>*required</sup>|<a href=\"#sloconfig\" target=\"_blank\" rel=\"noopener noreferrer\">SloConfig</a>| \n\n\n\n\n#### Returns\n\n| Return type | Status code | Description |\n|---|---|---|\n|[Slo](#slo)|201|Created|\n\n\n#### Throws\n\n| Error Type | Error Message |\n|---|---|\n|BadRequest|Malformed request or invalid parameters.|\n|Unauthorized|API token or tenant missing or corrupt.|\n|Forbidden|Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity isn't accessible to the user.|\n|TooManyRequests|The client has sent too many requests in a given amount of time and has been rate-limited.|\n|InternalServerError|Internal server error.|\n\n\n<details>\n<summary>\nCode example\n</summary>\n\n```ts\nimport { serviceLevelObjectivesClient } from \"@dynatrace-sdk/client-service-level-objectives\";\n\nconst data = await serviceLevelObjectivesClient.createSlo({\n  body: {\n    name: \"New SLO\",\n    sliReference: {\n      templateId: \"...\",\n      variables: [\n        {\n          name: \"hostIds\",\n          value: '\"HOST-123456789ABCDEFG\"',\n        },\n      ],\n    },\n    customSli: {\n      indicator: \"timeseries sli=avg(dt.host.cpu.idle)\",\n    },\n    criteria: [{ timeframeFrom: \"now-7d\", target: 99.8 }],\n  },\n});\n```\n\n</details>\n\n\n\n</div>\n\n\n<a name=\"deleteslo\"></a>\n### deleteSlo\n\n<div class=\"padding-bottom--md\">\n<strong>serviceLevelObjectivesClient.deleteSlo(config): Promise&lt;void&gt;</strong>\n\n<div class=\"padding-left--md\">\n\nDelete a service-level objective by ID\n\n**Required scope:** slo:slos:write\n\n\n\n</div>\n\n\n#### Parameters\n\n| Name | Type | Description |\n| --- | --- | --- |\n|config.id<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|service-level objective ID |\n|config.optimisticLockingVersion<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The version of the object for optimistic locking. You can use it to detect simultaneous modifications by different users.</p> <p>It's generated upon retrieval (GET requests). If set on update (PUT request) or deletion, the update/deletion will be allowed only if there wasn't any change between the retrieval and the update.</p>  |\n\n\n\n\n#### Returns\n\n| Return type | Status code | Description |\n|---|---|---|\n|void|204|No Content|\n\n\n#### Throws\n\n| Error Type | Error Message |\n|---|---|\n|BadRequest|Malformed request or invalid parameters.|\n|Unauthorized|API token or tenant missing or corrupt.|\n|Forbidden|Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity isn't accessible to the user.|\n|NotFound|Not found.|\n|TooManyRequests|The client has sent too many requests in a given amount of time and has been rate-limited.|\n|InternalServerError|Internal server error.|\n\n\n<details>\n<summary>\nCode example\n</summary>\n\n```ts\nimport { serviceLevelObjectivesClient } from \"@dynatrace-sdk/client-service-level-objectives\";\n\nconst data = await serviceLevelObjectivesClient.deleteSlo({\n  id: \"...\",\n  optimisticLockingVersion: \"...\",\n});\n```\n\n</details>\n\n\n\n</div>\n\n\n<a name=\"getslobyid\"></a>\n### getSloById\n\n<div class=\"padding-bottom--md\">\n<strong>serviceLevelObjectivesClient.getSloById(config): Promise&lt;<a href=\"#slo\">Slo</a>&gt;</strong>\n\n<div class=\"padding-left--md\">\n\nGet a service-level objective by ID\n\n**Required scope:** slo:slos:read\n\n\n\n</div>\n\n\n#### Parameters\n\n| Name | Type |\n| --- | --- |\n|config.id<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| \n\n\n\n\n#### Returns\n\n| Return type | Status code | Description |\n|---|---|---|\n|[Slo](#slo)|200|A single service-level objective|\n\n\n#### Throws\n\n| Error Type | Error Message |\n|---|---|\n|BadRequest|Malformed request or invalid parameters.|\n|Unauthorized|API token or tenant missing or corrupt.|\n|Forbidden|Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity isn't accessible to the user.|\n|NotFound|Not found.|\n|TooManyRequests|The client has sent too many requests in a given amount of time and has been rate-limited.|\n|InternalServerError|Internal server error.|\n\n\n<details>\n<summary>\nCode example\n</summary>\n\n```ts\nimport { serviceLevelObjectivesClient } from \"@dynatrace-sdk/client-service-level-objectives\";\n\nconst data = await serviceLevelObjectivesClient.getSloById({\n  id: \"...\",\n});\n```\n\n</details>\n\n\n\n</div>\n\n\n<a name=\"getslos\"></a>\n### getSlos\n\n<div class=\"padding-bottom--md\">\n<strong>serviceLevelObjectivesClient.getSlos(config): Promise&lt;<a href=\"#sloobjectslist\" target=\"_blank\" rel=\"noopener noreferrer\">SloObjectsList</a>&gt;</strong>\n\n<div class=\"padding-left--md\">\n\nList service-level objectives\n\n**Required scope:** slo:slos:read\n\n\n\n</div>\n\n\n#### Parameters\n\n| Name | Type | Description |\n| --- | --- | --- |\n|config.filter|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The filter parameter, as explained <a href=\"https://dt-url.net/platform-services-filtering\" target=\"_blank\" rel=\"noopener noreferrer\" >here</a>.</p> <p>Filtering is supported on the following fields:</p> <ul> <li><code>id</code></li> <li><code>name</code></li> <li><code>tag.key</code> and <code>tag.value</code></li> </ul>  |\n|config.page|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The page number to retrieve, 1-indexed. Can't be used together with <code>page-key</code>. |\n|config.pageKey|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Cursor for the next page of results, obtained from <code>nextPageKey</code> in the previous response. Can't be used together with <code>page</code>. |\n|config.pageSize|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|How many items to return at one time (max 500) |\n|config.sort|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The sort parameter, as explained <a href=\"https://dt-url.net/platform-services-filtering\" target=\"_blank\" rel=\"noopener noreferrer\" >here</a>.</p> <p>Sorting is supported on the following fields:</p> <ul> <li><code>name</code></li> </ul>  |\n\n\n\n\n#### Returns\n\n| Return type | Status code | Description |\n|---|---|---|\n|[SloObjectsList](#sloobjectslist)|200|A paged array of service-level objectives|\n\n\n#### Throws\n\n| Error Type | Error Message |\n|---|---|\n|BadRequest|Malformed request or invalid parameters.|\n|Unauthorized|API token or tenant missing or corrupt.|\n|Forbidden|Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity isn't accessible to the user.|\n|TooManyRequests|The client has sent too many requests in a given amount of time and has been rate-limited.|\n|InternalServerError|Internal server error.|\n\n\n<details>\n<summary>\nCode example\n</summary>\n\n```ts\nimport { serviceLevelObjectivesClient } from \"@dynatrace-sdk/client-service-level-objectives\";\n\nconst data = await serviceLevelObjectivesClient.getSlos();\n```\n\n</details>\n\n\n\n</div>\n\n\n<a name=\"updateslo\"></a>\n### updateSlo\n\n<div class=\"padding-bottom--md\">\n<strong>serviceLevelObjectivesClient.updateSlo(config): Promise&lt;void&gt;</strong>\n\n<div class=\"padding-left--md\">\n\nUpdate a service-level objective by ID\n\n**Required scope:** slo:slos:write\n\n\n\n</div>\n\n\n#### Parameters\n\n| Name | Type | Description |\n| --- | --- | --- |\n|config.body<sup>*required</sup>|<a href=\"#sloconfig\">SloConfig</a>| |\n|config.id<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|service-level objective ID |\n|config.optimisticLockingVersion<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The version of the object for optimistic locking. You can use it to detect simultaneous modifications by different users.</p> <p>It's generated upon retrieval (GET requests). If set on update (PUT request) or deletion, the update/deletion will be allowed only if there wasn't any change between the retrieval and the update.</p>  |\n\n\n\n\n#### Returns\n\n| Return type | Status code | Description |\n|---|---|---|\n|void|200|Updated|\n\n\n#### Throws\n\n| Error Type | Error Message |\n|---|---|\n|BadRequest|Malformed request or invalid parameters.|\n|Unauthorized|API token or tenant missing or corrupt.|\n|Forbidden|Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity isn't accessible to the user.|\n|NotFound|Not found.|\n|Conflict|Optimistic locking failed, or the document is actively locked\\\\ \\\\ by another user, or some other conflict.|\n|TooManyRequests|The client has sent too many requests in a given amount of time and has been rate-limited.|\n|InternalServerError|Internal server error.|\n\n\n<details>\n<summary>\nCode example\n</summary>\n\n```ts\nimport { serviceLevelObjectivesClient } from \"@dynatrace-sdk/client-service-level-objectives\";\n\nconst data = await serviceLevelObjectivesClient.updateSlo({\n  id: \"...\",\n  optimisticLockingVersion: \"...\",\n  body: {\n    name: \"New SLO\",\n    sliReference: {\n      templateId: \"...\",\n      variables: [\n        {\n          name: \"hostIds\",\n          value: '\"HOST-123456789ABCDEFG\"',\n        },\n      ],\n    },\n    customSli: {\n      indicator: \"timeseries sli=avg(dt.host.cpu.idle)\",\n    },\n    criteria: [{ timeframeFrom: \"now-7d\", target: 99.8 }],\n  },\n});\n```\n\n</details>\n\n\n\n</div>\n\n## serviceLevelObjectivesEvaluationClient\n\n```js\nimport { serviceLevelObjectivesEvaluationClient } from '@dynatrace-sdk/client-service-level-objectives';\n```\n\n\n<a name=\"cancelsloevaluation\"></a>\n### cancelSloEvaluation\n\n<div class=\"padding-bottom--md\">\n<strong>serviceLevelObjectivesEvaluationClient.cancelSloEvaluation(config): Promise&lt;void &#124; <a href=\"#sloevaluationcancelresponse\" target=\"_blank\" rel=\"noopener noreferrer\">SloEvaluationCancelResponse</a>&gt;</strong>\n\n<div class=\"padding-left--md\">\n\nCancels the SLO evaluation and returns the result if the evaluation was already finished, otherwise discards it.\n\n**Required scope:** slo:slos:read\n\nFor information about the required Grail permissions, see the [Bucket and table permissions in Grail documentation](https://dt-url.net/hs23z40).\n\n\n\n</div>\n\n\n#### Parameters\n\n| Name | Type |\n| --- | --- |\n|config.evaluationToken<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| \n\n\n\n\n#### Returns\n\n| Return type | Status code | Description |\n|---|---|---|\n|[SloEvaluationCancelResponse](#sloevaluationcancelresponse)|200|SLO evaluation result|\n|void|202|The SLO evaluation was still running and is now cancelled.|\n\n\n#### Throws\n\n| Error Type | Error Message |\n|---|---|\n|BadRequest|Malformed request or invalid parameters.|\n|Unauthorized|API token or tenant missing or corrupt.|\n|Forbidden|Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity isn't accessible to the user.|\n|Gone|The SLO Evaluation for the given evaluationToken isn't available anymore.|\n|TooManyRequests|The client has sent too many requests in a given amount of time and has been rate-limited.|\n|InternalServerError|Internal server error.|\n\n\n<details>\n<summary>\nCode example\n</summary>\n\n```ts\nimport { serviceLevelObjectivesEvaluationClient } from \"@dynatrace-sdk/client-service-level-objectives\";\n\nconst data =\n  await serviceLevelObjectivesEvaluationClient.cancelSloEvaluation(\n    { evaluationToken: \"FQ5aVZERXZNMjR1SzVnPT0ifQ==\" },\n  );\n```\n\n</details>\n\n\n\n</div>\n\n\n<a name=\"pollsloevaluation\"></a>\n### pollSloEvaluation\n\n<div class=\"padding-bottom--md\">\n<strong>serviceLevelObjectivesEvaluationClient.pollSloEvaluation(config): Promise&lt;<a href=\"#sloevaluationresponse\">SloEvaluationResponse</a>&gt;</strong>\n\n<div class=\"padding-left--md\">\n\nPolls an SLO evaluation\n\n**Required scope:** slo:slos:read\n\nFor information about the required Grail permissions, see the [Bucket and table permissions in Grail documentation](https://dt-url.net/hs23z40).\n\n\n\n</div>\n\n\n#### Parameters\n\n| Name | Type | Description |\n| --- | --- | --- |\n|config.evaluationToken<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |\n|config.requestTimeoutMilliseconds|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|How long to wait for the evaluation result before returning in milliseconds. If the evaluation finishes within this time, the result is returned directly (<code>200</code>). If not, the response contains the <code>evaluationToken</code> for further polling. |\n\n\n\n\n#### Returns\n\n| Return type | Status code | Description |\n|---|---|---|\n|[SloEvaluationResponse](#sloevaluationresponse)|200|SLO evaluation result|\n\n\n#### Throws\n\n| Error Type | Error Message |\n|---|---|\n|BadRequest|Malformed request or invalid parameters.|\n|Unauthorized|API token or tenant missing or corrupt.|\n|Forbidden|Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity isn't accessible to the user.|\n|Gone|The SLO Evaluation for the given evaluationToken isn't available anymore.|\n|TooManyRequests|The client has sent too many requests in a given amount of time and has been rate-limited.|\n|InternalServerError|Internal server error.|\n\n\n<details>\n<summary>\nCode example\n</summary>\n\n```ts\nimport { serviceLevelObjectivesEvaluationClient } from \"@dynatrace-sdk/client-service-level-objectives\";\n\nconst data =\n  await serviceLevelObjectivesEvaluationClient.pollSloEvaluation(\n    { evaluationToken: \"FQ5aVZERXZNMjR1SzVnPT0ifQ==\" },\n  );\n```\n\n</details>\n\n\n\n</div>\n\n\n<a name=\"startsloevaluation\"></a>\n### startSloEvaluation\n\n<div class=\"padding-bottom--md\">\n<strong>serviceLevelObjectivesEvaluationClient.startSloEvaluation(config): Promise&lt;<a href=\"#sloevaluationresponse\" target=\"_blank\" rel=\"noopener noreferrer\">SloEvaluationResponse</a>&gt;</strong>\n\n<div class=\"padding-left--md\">\n\nStarts an SLO evaluation\n\n**Required scope:** slo:slos:read\n\nFor information about the required Grail permissions, see the [Bucket and table permissions in Grail documentation](https://dt-url.net/hs23z40).\n\n\n\n</div>\n\n\n#### Parameters\n\n| Name | Type |\n| --- | --- |\n|config.body<sup>*required</sup>|<a href=\"#sloevaluationrequest\">SloEvaluationRequest</a>| \n\n\n\n\n#### Returns\n\n| Return type | Status code | Description |\n|---|---|---|\n|[SloEvaluationResponse](#sloevaluationresponse)|200|SLO evaluation result|\n|[SloEvaluationResponse](#sloevaluationresponse)|202|SLO evaluation started|\n\n\n#### Throws\n\n| Error Type | Error Message |\n|---|---|\n|BadRequest|Malformed request or invalid parameters.|\n|Unauthorized|API token or tenant missing or corrupt.|\n|Forbidden|Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity isn't accessible to the user.|\n|TooManyRequests|The client has sent too many requests in a given amount of time and has been rate-limited.|\n|InternalServerError|Internal server error.|\n\n\n<details>\n<summary>\nCode example\n</summary>\n\n```ts\nimport { serviceLevelObjectivesEvaluationClient } from \"@dynatrace-sdk/client-service-level-objectives\";\n\nconst data =\n  await serviceLevelObjectivesEvaluationClient.startSloEvaluation(\n    {\n      body: {\n        id: \"A5LTU5YTVjNTcxODI5OL7vVN4V2t6t\",\n        customTimeframe: { timeframeFrom: \"now-7d\" },\n      },\n    },\n  );\n```\n\n</details>\n\n\n\n</div>\n\n## Types\n\n### ConstraintViolation\n\nContains information about a constraint violation caused by invalid input.\n\n| Name | Type | Description |\n| --- | --- | --- |\n|message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The constraint violation description message |\n|path|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The path of the parameter that caused the constraint violation |\n\n### Criteria\n\n| Name | Type | Description |\n| --- | --- | --- |\n|target<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| |\n|timeframeFrom<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The start of the timeframe. Supports relative time expressions (e.g. <code>now-7d</code>) and ISO 8601 timestamps. |\n|timeframeTo|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The end of the timeframe. Supports relative time expressions (e.g. <code>now-7d</code>) and ISO 8601 timestamps. Defaults to <code>now</code> if omitted. |\n|warning|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| |\n\n### CustomSli\n\n| Name | Type | Description |\n| --- | --- | --- |\n|filterSegments|<a href=\"#filtersegments\" target=\"_blank\" rel=\"noopener noreferrer\">FilterSegments</a>|Represents a collection of filter segments. |\n|indicator<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |\n\n### Deprecation\n\n| Name | Type | Description |\n| --- | --- | --- |\n|deprecated<sup>*required</sup>|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|True if this template is deprecated and shouldn't be used for new SLOs. |\n|replacementTemplateId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|If deprecated=true, this field may contain the ID of the template to use instead. |\n\n### Error\n\nAn error response as defined [here](https://dt-url.net/platform-services-error-handling).\n\n| Name | Type | Description |\n| --- | --- | --- |\n|code<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| |\n|details|<a href=\"#errordetails\">ErrorDetails</a>|Optional details of the error |\n|message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |\n\n### ErrorDetails\n\nOptional details of the error\n\n| Name | Type | Description |\n| --- | --- | --- |\n|constraintViolations|Array&lt;<a href=\"#constraintviolation\" target=\"_blank\" rel=\"noopener noreferrer\">ConstraintViolation</a>&gt;|A list of constraint violations of input parameters (path, query, request body) |\n|errorRef|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|reference to the error occurrence in the internal self-monitoring, logging, etc. |\n\n### ErrorEnvelope\n\n| Name | Type | Description |\n| --- | --- | --- |\n|error<sup>*required</sup>|<a href=\"#error\">Error</a>|An error response as defined <a href=\"https://dt-url.net/platform-services-error-handling\" target=\"_blank\" rel=\"noopener noreferrer\" >here</a>. |\n\n### FilterSegment\n\nA filter segment is identified by an ID.\n\n| Name | Type | Description |\n| --- | --- | --- |\n|id<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The identifier of the filter segment. |\n|variables|Array&lt;<a href=\"#filtersegmentvariable\" target=\"_blank\" rel=\"noopener noreferrer\">FilterSegmentVariable</a>&gt;| |\n\n### FilterSegmentVariable\n\nDefines a variable with a name and a list of values.\n\n| Name | Type | Description |\n| --- | --- | --- |\n|name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The name of the variable. |\n|values<sup>*required</sup>|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|The list of values for this variable. |\n\n### FilterSegments\n\nRepresents a collection of filter segments.\n\n**type**: Array&lt;<a href=\"#filtersegment\">FilterSegment</a>&gt;\n\n### Metadata\n\n| Name | Type | Description |\n| --- | --- | --- |\n|evaluatedSliQuery<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The resolved DQL query that was actually executed for this evaluation. |\n\n### MetadataResponse\n\n| Name | Type |\n| --- | --- |\n|metadata<sup>*required</sup>|<a href=\"#metadata\" target=\"_blank\" rel=\"noopener noreferrer\">Metadata</a>|\n\n### ObjectiveTemplate\n\n| Name | Type | Description |\n| --- | --- | --- |\n|applicableScope<sup>*required</sup>|\"SERVICE\" &#124; \"HOST\" &#124; \"APPLICATION\" &#124; \"CLOUD_APPLICATION\" &#124; \"KUBERNETES_CLUSTER\" &#124; \"CLOUD_APPLICATION_NAMESPACE\" &#124; \"ALL\"| |\n|builtIn<sup>*required</sup>|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)| |\n|deprecation|<a href=\"#deprecation\">Deprecation</a>| |\n|description|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |\n|externalId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|An optional user-provided external identifier for the objective template. Must be unique across all objective templates. |\n|id<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |\n|indicator<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |\n|name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |\n|tags|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|A list of tags for this objective template. Tags can be plain strings (e.g. <code>myTag</code>) or key-value pairs separated by a colon (e.g. <code>Stage:DEV</code>). To include a literal colon in a tag, escape it with a backslash (e.g. <code>key\\\\:value</code>). |\n|variables<sup>*required</sup>|Array&lt;<a href=\"#templatevariable\" target=\"_blank\" rel=\"noopener noreferrer\">TemplateVariable</a>&gt;| |\n|version|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The version of the object for optimistic locking. You can use it to detect simultaneous modifications by different users.</p> <p>It's generated upon retrieval (GET requests). If set on update (PUT request) or deletion, the update/deletion will be allowed only if there wasn't any change between the retrieval and the update.</p>  |\n\n### ObjectiveTemplateConfig\n\n| Name | Type | Description |\n| --- | --- | --- |\n|applicableScope<sup>*required</sup>|\"SERVICE\" &#124; \"HOST\" &#124; \"APPLICATION\" &#124; \"CLOUD_APPLICATION\" &#124; \"KUBERNETES_CLUSTER\" &#124; \"CLOUD_APPLICATION_NAMESPACE\" &#124; \"ALL\"| |\n|description|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |\n|externalId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|An optional user-provided external identifier for the objective template. Must be unique across all objective templates. |\n|indicator<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |\n|name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |\n|tags|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|A list of tags for this objective template. Tags can be plain strings (e.g. <code>myTag</code>) or key-value pairs separated by a colon (e.g. <code>Stage:DEV</code>). To include a literal colon in a tag, escape it with a backslash (e.g. <code>key\\\\:value</code>). |\n|variables<sup>*required</sup>|Array&lt;<a href=\"#templatevariable\">TemplateVariable</a>&gt;| |\n\n### ObjectiveTemplateList\n\n| Name | Type | Description |\n| --- | --- | --- |\n|items<sup>*required</sup>|Array&lt;<a href=\"#objectivetemplate\" target=\"_blank\" rel=\"noopener noreferrer\">ObjectiveTemplate</a>&gt;| |\n|nextPageKey|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The cursor for the next page of results. Has the value of <code>null</code> on the last page.</p> <p>Use it in the <strong>page-key</strong> query parameter to obtain subsequent pages of the result.</p>  |\n|totalCount<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The total number of entries in the result. |\n\n### SliReference\n\n| Name | Type | Description |\n| --- | --- | --- |\n|templateId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The <code>id</code> of the objective template to use as the SLI definition. |\n|variables<sup>*required</sup>|Array&lt;<a href=\"#slireferencevariable\">SliReferenceVariable</a>&gt;| |\n\n### SliReferenceVariable\n\n| Name | Type |\n| --- | --- |\n|name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| \n|value<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|\n\n### Slo\n\nConfiguration for a service-level objective. Exactly one of `sliReference` or `customSli` must be provided. Providing both or neither results in a `400 Bad Request`.\n\n| Name | Type | Description |\n| --- | --- | --- |\n|criteria<sup>*required</sup>|Array&lt;<a href=\"#criteria\" target=\"_blank\" rel=\"noopener noreferrer\">Criteria</a>&gt;| |\n|customSli|<a href=\"#customsli\">CustomSli</a>| |\n|description|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |\n|externalId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|An optional user-provided external identifier for the SLO. Must be unique across all SLOs. |\n|id<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |\n|name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |\n|sliReference|<a href=\"#slireference\" target=\"_blank\" rel=\"noopener noreferrer\">SliReference</a>| |\n|tags|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|A list of tags for this SLO. Tags can be plain strings (e.g. <code>myTag</code>) or key-value pairs separated by a colon (e.g. <code>Stage:DEV</code>). To include a literal colon in a tag, escape it with a backslash (e.g. <code>key\\\\:value</code>). |\n|version<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The version of the object for optimistic locking. You can use it to detect simultaneous modifications by different users.</p> <p>It's generated upon retrieval (GET requests). If set on update (PUT request) or deletion, the update/deletion will be allowed only if there wasn't any change between the retrieval and the update.</p>  |\n\n### SloConfig\n\nConfiguration for a service-level objective. Exactly one of `sliReference` or `customSli` must be provided. Providing both or neither results in a `400 Bad Request`.\n\n| Name | Type | Description |\n| --- | --- | --- |\n|criteria<sup>*required</sup>|Array&lt;<a href=\"#criteria\">Criteria</a>&gt;| |\n|customSli|<a href=\"#customsli\" target=\"_blank\" rel=\"noopener noreferrer\">CustomSli</a>| |\n|description|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |\n|externalId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|An optional user-provided external identifier for the SLO. Must be unique across all SLOs. |\n|name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |\n|sliReference|<a href=\"#slireference\">SliReference</a>| |\n|tags|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|A list of tags for this SLO. Tags can be plain strings (e.g. <code>myTag</code>) or key-value pairs separated by a colon (e.g. <code>Stage:DEV</code>). To include a literal colon in a tag, escape it with a backslash (e.g. <code>key\\\\:value</code>). |\n\n### SloEvaluationBaseResponse\n\n| Name | Type |\n| --- | --- |\n|evaluationResults|Array&lt;<a href=\"#sloevaluationresult\" target=\"_blank\" rel=\"noopener noreferrer\">SloEvaluationResult</a>&gt;| \n|metadata<sup>*required</sup>|<a href=\"#metadata\">Metadata</a>|\n\n### SloEvaluationCancelResponse\n\n| Name | Type |\n| --- | --- |\n|definition<sup>*required</sup>|<a href=\"#slo\" target=\"_blank\" rel=\"noopener noreferrer\">Slo</a>| \n|evaluationResults|Array&lt;<a href=\"#sloevaluationresult\">SloEvaluationResult</a>&gt;| \n|metadata<sup>*required</sup>|<a href=\"#metadata\" target=\"_blank\" rel=\"noopener noreferrer\">Metadata</a>|\n\n### SloEvaluationRequest\n\n| Name | Type | Description |\n| --- | --- | --- |\n|customTimeframe|<a href=\"#timeframe\">Timeframe</a>| |\n|filterSegments|Array&lt;<a href=\"#filtersegment\" target=\"_blank\" rel=\"noopener noreferrer\">FilterSegment</a>&gt;|Filter segments to apply during this evaluation. The effective filter for each segment is the intersection of the segment defined on the SLO and the segment provided here. If only one side defines a segment, that segment is used as-is. |\n|id<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |\n|requestTimeoutMilliseconds|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|How long to wait for the evaluation result before returning in milliseconds. If the evaluation finishes within this time, the result is returned directly (<code>200</code>). If not, a <code>202</code> is returned with an <code>evaluationToken</code> that can be used to poll for the result. <i>default:</i> <code>1000</code>|\n\n### SloEvaluationResponse\n\n| Name | Type | Description |\n| --- | --- | --- |\n|definition<sup>*required</sup>|<a href=\"#slo\">Slo</a>| |\n|evaluationResults|Array&lt;<a href=\"#sloevaluationresult\" target=\"_blank\" rel=\"noopener noreferrer\">SloEvaluationResult</a>&gt;| |\n|evaluationToken|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Token to pass to <code>evaluation:poll</code> or <code>evaluation:cancel</code> to retrieve or discard the evaluation result. |\n|metadata<sup>*required</sup>|<a href=\"#metadata\">Metadata</a>| |\n|ttlSeconds|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| |\n\n### SloEvaluationResult\n\n| Name | Type | Description |\n| --- | --- | --- |\n|criteria<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |\n|errorBudget|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| |\n|message|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |\n|status<sup>*required</sup>|\"SUCCESS\" &#124; \"WARNING\" &#124; \"FAILURE\" &#124; \"ERROR\"|The status of an SLO evaluation. <code>SUCCESS</code> and <code>WARNING</code> indicate the SLO was evaluated successfully (target met or warning threshold breached respectively). <code>FAILURE</code> means the SLO target wasn't met. <code>ERROR</code> means the evaluation couldn't be completed due to a system or query error. |\n|value|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The evaluated SLO compliance as a percentage (0–100). |\n\n### SloObjectsList\n\n| Name | Type | Description |\n| --- | --- | --- |\n|nextPageKey|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The cursor for the next page of results. Has the value of <code>null</code> on the last page.</p> <p>Use it in the <strong>page-key</strong> query parameter to obtain subsequent pages of the result.</p>  |\n|slos<sup>*required</sup>|Array&lt;<a href=\"#slo\" target=\"_blank\" rel=\"noopener noreferrer\">Slo</a>&gt;| |\n|totalCount<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The total number of entries in the result. |\n\n### TemplateVariable\n\n| Name | Type | Description |\n| --- | --- | --- |\n|name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |\n|scope<sup>*required</sup>|\"CUSTOM\" &#124; \"SERVICE\" &#124; \"SMARTSCAPE_SERVICE\" &#124; \"HOST\" &#124; \"SMARTSCAPE_HOST\" &#124; \"APPLICATION\" &#124; \"CLOUD_APPLICATION\" &#124; \"KUBERNETES_CLUSTER\" &#124; \"SMARTSCAPE_K8S_CLUSTER\" &#124; \"CLOUD_APPLICATION_NAMESPACE\" &#124; \"SMARTSCAPE_K8S_NAMESPACE\"|The scope of a template variable. Use <code>SMARTSCAPE_\\*</code> variants when referencing Smartscape objective templates. |\n\n### Timeframe\n\n| Name | Type | Description |\n| --- | --- | --- |\n|timeframeFrom<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The start of the timeframe. Supports relative time expressions (e.g. <code>now-7d</code>) and ISO 8601 timestamps. |\n|timeframeTo|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The end of the timeframe. Supports relative time expressions (e.g. <code>now-7d</code>) and ISO 8601 timestamps. Defaults to <code>now</code> if omitted. |\n\n## Enums\n\n<a name=\"evaluationstatus\"></a>\n### ~~EvaluationStatus~~\n\n> ⚠️ **Deprecated**\n> Use literal values.\n\n<div class=\"padding-left--md\">\n\nThe status of an SLO evaluation. `SUCCESS` and `WARNING` indicate the SLO was evaluated successfully (target met or warning threshold breached respectively). `FAILURE` means the SLO target wasn&apos;t met. `ERROR` means the evaluation couldn&apos;t be completed due to a system or query error.\n\n#### Enum keys\n\n<div class=\"padding-left--md\">\n\n`Error` | `Failure` | `Success` | `Warning`\n\n</div>\n\n\n</div>\n\n<a name=\"templatescope\"></a>\n### ~~TemplateScope~~\n\n> ⚠️ **Deprecated**\n> Use literal values.\n\n<div class=\"padding-left--md\">\n\n\n\n#### Enum keys\n\n<div class=\"padding-left--md\">\n\n`All` | `Application` | `CloudApplication` | `CloudApplicationNamespace` | `Host` | `KubernetesCluster` | `Service`\n\n</div>\n\n\n</div>\n\n<a name=\"variablescope\"></a>\n### ~~VariableScope~~\n\n> ⚠️ **Deprecated**\n> Use literal values.\n\n<div class=\"padding-left--md\">\n\nThe scope of a template variable. Use `SMARTSCAPE_*` variants when referencing Smartscape objective templates.\n\n#### Enum keys\n\n<div class=\"padding-left--md\">\n\n`Application` | `CloudApplication` | `CloudApplicationNamespace` | `Custom` | `Host` | `KubernetesCluster` | `Service` | `SmartscapeHost` | `SmartscapeK8SCluster` | `SmartscapeK8SNamespace` | `SmartscapeService`\n\n</div>\n\n\n</div>\n","readmeFilename":"README.md","_rev":"1-3c72a163fc5ecf97800130113f788bf7"}