|
| 1 | +@endpoint(integration-accounts) @endpoint(integration-accounts-v2) |
| 2 | +Feature: Integration Accounts |
| 3 | + Configure and manage third-party integrations with Datadog. This API |
| 4 | + provides a unified interface for managing integration accounts across |
| 5 | + various external services. Each integration has its own unique schema |
| 6 | + that defines the required settings and secrets. Before creating or |
| 7 | + updating an account, use the schema endpoint to retrieve the specific |
| 8 | + requirements, field types, validation rules, and available configuration |
| 9 | + options for your integration. **Note**: This API manages integration |
| 10 | + account configurations only. It does not support Grace Resources, |
| 11 | + Reference Tables, or Custom Queries CRUD operations. For those features, |
| 12 | + refer to each integration's dedicated documentation. Supported |
| 13 | + Integrations: - |
| 14 | + [Twilio](https://docs.datadoghq.com/integrations/twilio/) - |
| 15 | + [Snowflake](https://docs.datadoghq.com/integrations/snowflake-web/) - |
| 16 | + [Databricks](https://docs.datadoghq.com/integrations/databricks/) |
| 17 | + |
| 18 | + Background: |
| 19 | + Given a valid "apiKeyAuth" key in the system |
| 20 | + And a valid "appKeyAuth" key in the system |
| 21 | + And an instance of "IntegrationAccounts" API |
| 22 | + |
| 23 | + @generated @skip @team:DataDog/saas-integrations |
| 24 | + Scenario: Create integration account returns "Bad Request: The request body is malformed or the integration name format is invalid." response |
| 25 | + Given new "CreateAmsIntegrationAccount" request |
| 26 | + And request contains "integration_name" parameter from "REPLACE.ME" |
| 27 | + And body with value {"data": {"attributes": {"name": "My Production Account", "secrets": {"api_key_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}, "settings": {"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "alerts": true, "api_key": "SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "call_summaries": true, "ccm_enabled": true, "censor_logs": true, "events": true, "messages": true}}, "type": "Account"}} |
| 28 | + When the request is sent |
| 29 | + Then the response status is 400 Bad Request: The request body is malformed or the integration name format is invalid. |
| 30 | + |
| 31 | + @generated @skip @team:DataDog/saas-integrations |
| 32 | + Scenario: Create integration account returns "Created: The account was successfully created." response |
| 33 | + Given new "CreateAmsIntegrationAccount" request |
| 34 | + And request contains "integration_name" parameter from "REPLACE.ME" |
| 35 | + And body with value {"data": {"attributes": {"name": "My Production Account", "secrets": {"api_key_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}, "settings": {"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "alerts": true, "api_key": "SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "call_summaries": true, "ccm_enabled": true, "censor_logs": true, "events": true, "messages": true}}, "type": "Account"}} |
| 36 | + When the request is sent |
| 37 | + Then the response status is 201 Created: The account was successfully created. |
| 38 | + |
| 39 | + @generated @skip @team:DataDog/saas-integrations |
| 40 | + Scenario: Create integration account returns "Not Found: The integration does not exist." response |
| 41 | + Given new "CreateAmsIntegrationAccount" request |
| 42 | + And request contains "integration_name" parameter from "REPLACE.ME" |
| 43 | + And body with value {"data": {"attributes": {"name": "My Production Account", "secrets": {"api_key_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}, "settings": {"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "alerts": true, "api_key": "SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "call_summaries": true, "ccm_enabled": true, "censor_logs": true, "events": true, "messages": true}}, "type": "Account"}} |
| 44 | + When the request is sent |
| 45 | + Then the response status is 404 Not Found: The integration does not exist. |
| 46 | + |
| 47 | + @generated @skip @team:DataDog/saas-integrations |
| 48 | + Scenario: Create integration account returns "Unprocessable Entity: The account configuration does not match the integration schema." response |
| 49 | + Given new "CreateAmsIntegrationAccount" request |
| 50 | + And request contains "integration_name" parameter from "REPLACE.ME" |
| 51 | + And body with value {"data": {"attributes": {"name": "My Production Account", "secrets": {"api_key_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}, "settings": {"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "alerts": true, "api_key": "SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "call_summaries": true, "ccm_enabled": true, "censor_logs": true, "events": true, "messages": true}}, "type": "Account"}} |
| 52 | + When the request is sent |
| 53 | + Then the response status is 422 Unprocessable Entity: The account configuration does not match the integration schema. |
| 54 | + |
| 55 | + @generated @skip @team:DataDog/saas-integrations |
| 56 | + Scenario: Delete integration account returns "Bad Request: The integration name or account ID format is invalid." response |
| 57 | + Given new "DeleteAmsIntegrationAccount" request |
| 58 | + And request contains "integration_name" parameter from "REPLACE.ME" |
| 59 | + And request contains "account_id" parameter from "REPLACE.ME" |
| 60 | + When the request is sent |
| 61 | + Then the response status is 400 Bad Request: The integration name or account ID format is invalid. |
| 62 | + |
| 63 | + @generated @skip @team:DataDog/saas-integrations |
| 64 | + Scenario: Delete integration account returns "Not Found: The integration or account does not exist." response |
| 65 | + Given new "DeleteAmsIntegrationAccount" request |
| 66 | + And request contains "integration_name" parameter from "REPLACE.ME" |
| 67 | + And request contains "account_id" parameter from "REPLACE.ME" |
| 68 | + When the request is sent |
| 69 | + Then the response status is 404 Not Found: The integration or account does not exist. |
| 70 | + |
| 71 | + @generated @skip @team:DataDog/saas-integrations |
| 72 | + Scenario: Delete integration account returns "OK: The account was successfully deleted." response |
| 73 | + Given new "DeleteAmsIntegrationAccount" request |
| 74 | + And request contains "integration_name" parameter from "REPLACE.ME" |
| 75 | + And request contains "account_id" parameter from "REPLACE.ME" |
| 76 | + When the request is sent |
| 77 | + Then the response status is 200 OK: The account was successfully deleted. |
| 78 | + |
| 79 | + @generated @skip @team:DataDog/saas-integrations |
| 80 | + Scenario: Get account schema for an integration returns "Bad Request: The integration name format is invalid." response |
| 81 | + Given new "GetAmsIntegrationAccountSchema" request |
| 82 | + And request contains "integration_name" parameter from "REPLACE.ME" |
| 83 | + When the request is sent |
| 84 | + Then the response status is 400 Bad Request: The integration name format is invalid. |
| 85 | + |
| 86 | + @generated @skip @team:DataDog/saas-integrations |
| 87 | + Scenario: Get account schema for an integration returns "Not Found: The integration does not exist or has no schema available." response |
| 88 | + Given new "GetAmsIntegrationAccountSchema" request |
| 89 | + And request contains "integration_name" parameter from "REPLACE.ME" |
| 90 | + When the request is sent |
| 91 | + Then the response status is 404 Not Found: The integration does not exist or has no schema available. |
| 92 | + |
| 93 | + @generated @skip @team:DataDog/saas-integrations |
| 94 | + Scenario: Get account schema for an integration returns "OK: The JSON schema for the integration's account configuration." response |
| 95 | + Given new "GetAmsIntegrationAccountSchema" request |
| 96 | + And request contains "integration_name" parameter from "REPLACE.ME" |
| 97 | + When the request is sent |
| 98 | + Then the response status is 200 OK: The JSON schema for the integration's account configuration. |
| 99 | + |
| 100 | + @generated @skip @team:DataDog/saas-integrations |
| 101 | + Scenario: Get integration account returns "Bad Request: The integration name or account ID format is invalid." response |
| 102 | + Given new "GetAmsIntegrationAccount" request |
| 103 | + And request contains "integration_name" parameter from "REPLACE.ME" |
| 104 | + And request contains "account_id" parameter from "REPLACE.ME" |
| 105 | + When the request is sent |
| 106 | + Then the response status is 400 Bad Request: The integration name or account ID format is invalid. |
| 107 | + |
| 108 | + @generated @skip @team:DataDog/saas-integrations |
| 109 | + Scenario: Get integration account returns "Not Found: The integration or account does not exist." response |
| 110 | + Given new "GetAmsIntegrationAccount" request |
| 111 | + And request contains "integration_name" parameter from "REPLACE.ME" |
| 112 | + And request contains "account_id" parameter from "REPLACE.ME" |
| 113 | + When the request is sent |
| 114 | + Then the response status is 404 Not Found: The integration or account does not exist. |
| 115 | + |
| 116 | + @generated @skip @team:DataDog/saas-integrations |
| 117 | + Scenario: Get integration account returns "OK: The account details for the specified integration." response |
| 118 | + Given new "GetAmsIntegrationAccount" request |
| 119 | + And request contains "integration_name" parameter from "REPLACE.ME" |
| 120 | + And request contains "account_id" parameter from "REPLACE.ME" |
| 121 | + When the request is sent |
| 122 | + Then the response status is 200 OK: The account details for the specified integration. |
| 123 | + |
| 124 | + @generated @skip @team:DataDog/saas-integrations |
| 125 | + Scenario: List integration accounts returns "Bad Request: The integration name format is invalid." response |
| 126 | + Given new "ListAmsIntegrationAccounts" request |
| 127 | + And request contains "integration_name" parameter from "REPLACE.ME" |
| 128 | + When the request is sent |
| 129 | + Then the response status is 400 Bad Request: The integration name format is invalid. |
| 130 | + |
| 131 | + @generated @skip @team:DataDog/saas-integrations |
| 132 | + Scenario: List integration accounts returns "Not Found: The integration does not exist." response |
| 133 | + Given new "ListAmsIntegrationAccounts" request |
| 134 | + And request contains "integration_name" parameter from "REPLACE.ME" |
| 135 | + When the request is sent |
| 136 | + Then the response status is 404 Not Found: The integration does not exist. |
| 137 | + |
| 138 | + @generated @skip @team:DataDog/saas-integrations |
| 139 | + Scenario: List integration accounts returns "OK: List of all accounts for the specified integration." response |
| 140 | + Given new "ListAmsIntegrationAccounts" request |
| 141 | + And request contains "integration_name" parameter from "REPLACE.ME" |
| 142 | + When the request is sent |
| 143 | + Then the response status is 200 OK: List of all accounts for the specified integration. |
| 144 | + |
| 145 | + @generated @skip @team:DataDog/saas-integrations |
| 146 | + Scenario: Update integration account returns "Bad Request: The request body is malformed or the integration name/account ID format is invalid." response |
| 147 | + Given new "UpdateAmsIntegrationAccount" request |
| 148 | + And request contains "integration_name" parameter from "REPLACE.ME" |
| 149 | + And request contains "account_id" parameter from "REPLACE.ME" |
| 150 | + And body with value {"data": {"attributes": {"name": "My Production Account (Updated)", "secrets": {"api_key_token": "new_secret_token_value"}, "settings": {"ccm_enabled": true, "events": true, "messages": false}}, "type": "Account"}} |
| 151 | + When the request is sent |
| 152 | + Then the response status is 400 Bad Request: The request body is malformed or the integration name/account ID format is invalid. |
| 153 | + |
| 154 | + @generated @skip @team:DataDog/saas-integrations |
| 155 | + Scenario: Update integration account returns "Not Found: The integration or account does not exist." response |
| 156 | + Given new "UpdateAmsIntegrationAccount" request |
| 157 | + And request contains "integration_name" parameter from "REPLACE.ME" |
| 158 | + And request contains "account_id" parameter from "REPLACE.ME" |
| 159 | + And body with value {"data": {"attributes": {"name": "My Production Account (Updated)", "secrets": {"api_key_token": "new_secret_token_value"}, "settings": {"ccm_enabled": true, "events": true, "messages": false}}, "type": "Account"}} |
| 160 | + When the request is sent |
| 161 | + Then the response status is 404 Not Found: The integration or account does not exist. |
| 162 | + |
| 163 | + @generated @skip @team:DataDog/saas-integrations |
| 164 | + Scenario: Update integration account returns "OK: The account was successfully updated." response |
| 165 | + Given new "UpdateAmsIntegrationAccount" request |
| 166 | + And request contains "integration_name" parameter from "REPLACE.ME" |
| 167 | + And request contains "account_id" parameter from "REPLACE.ME" |
| 168 | + And body with value {"data": {"attributes": {"name": "My Production Account (Updated)", "secrets": {"api_key_token": "new_secret_token_value"}, "settings": {"ccm_enabled": true, "events": true, "messages": false}}, "type": "Account"}} |
| 169 | + When the request is sent |
| 170 | + Then the response status is 200 OK: The account was successfully updated. |
| 171 | + |
| 172 | + @generated @skip @team:DataDog/saas-integrations |
| 173 | + Scenario: Update integration account returns "Unprocessable Entity: The account configuration does not match the integration schema." response |
| 174 | + Given new "UpdateAmsIntegrationAccount" request |
| 175 | + And request contains "integration_name" parameter from "REPLACE.ME" |
| 176 | + And request contains "account_id" parameter from "REPLACE.ME" |
| 177 | + And body with value {"data": {"attributes": {"name": "My Production Account (Updated)", "secrets": {"api_key_token": "new_secret_token_value"}, "settings": {"ccm_enabled": true, "events": true, "messages": false}}, "type": "Account"}} |
| 178 | + When the request is sent |
| 179 | + Then the response status is 422 Unprocessable Entity: The account configuration does not match the integration schema. |
0 commit comments