|
| 1 | +@endpoint(webhooks-integration) @endpoint(webhooks-integration-v2) |
| 2 | +Feature: Webhooks Integration |
| 3 | + Configure your [Datadog Webhooks |
| 4 | + integration](https://docs.datadoghq.com/integrations/webhooks/) directly |
| 5 | + through the Datadog API. |
| 6 | + |
| 7 | + Background: |
| 8 | + Given a valid "apiKeyAuth" key in the system |
| 9 | + And a valid "appKeyAuth" key in the system |
| 10 | + And an instance of "WebhooksIntegration" API |
| 11 | + |
| 12 | + @generated @skip @team:Datadog/collaboration-integrations |
| 13 | + Scenario: Create an OAuth2 client credentials auth method returns "Bad Request" response |
| 14 | + Given new "CreateOAuth2ClientCredentials" request |
| 15 | + And body with value {"data": {"attributes": {"access_token_url": "https://example.com/oauth/token", "audience": "https://api.example.com", "client_id": "my-client-id", "client_secret": "my-client-secret", "name": "my-oauth2-auth", "scope": "read:webhooks write:webhooks"}, "type": "webhooks-auth-method-oauth2-client-credentials"}} |
| 16 | + When the request is sent |
| 17 | + Then the response status is 400 Bad Request |
| 18 | + |
| 19 | + @generated @skip @team:Datadog/collaboration-integrations |
| 20 | + Scenario: Create an OAuth2 client credentials auth method returns "CREATED" response |
| 21 | + Given new "CreateOAuth2ClientCredentials" request |
| 22 | + And body with value {"data": {"attributes": {"access_token_url": "https://example.com/oauth/token", "audience": "https://api.example.com", "client_id": "my-client-id", "client_secret": "my-client-secret", "name": "my-oauth2-auth", "scope": "read:webhooks write:webhooks"}, "type": "webhooks-auth-method-oauth2-client-credentials"}} |
| 23 | + When the request is sent |
| 24 | + Then the response status is 201 CREATED |
| 25 | + |
| 26 | + @generated @skip @team:Datadog/collaboration-integrations |
| 27 | + Scenario: Create an OAuth2 client credentials auth method returns "Conflict" response |
| 28 | + Given new "CreateOAuth2ClientCredentials" request |
| 29 | + And body with value {"data": {"attributes": {"access_token_url": "https://example.com/oauth/token", "audience": "https://api.example.com", "client_id": "my-client-id", "client_secret": "my-client-secret", "name": "my-oauth2-auth", "scope": "read:webhooks write:webhooks"}, "type": "webhooks-auth-method-oauth2-client-credentials"}} |
| 30 | + When the request is sent |
| 31 | + Then the response status is 409 Conflict |
| 32 | + |
| 33 | + @generated @skip @team:Datadog/collaboration-integrations |
| 34 | + Scenario: Delete an OAuth2 client credentials auth method returns "Not Found" response |
| 35 | + Given new "DeleteOAuth2ClientCredentials" request |
| 36 | + And request contains "auth_method_id" parameter from "REPLACE.ME" |
| 37 | + When the request is sent |
| 38 | + Then the response status is 404 Not Found |
| 39 | + |
| 40 | + @generated @skip @team:Datadog/collaboration-integrations |
| 41 | + Scenario: Delete an OAuth2 client credentials auth method returns "OK" response |
| 42 | + Given new "DeleteOAuth2ClientCredentials" request |
| 43 | + And request contains "auth_method_id" parameter from "REPLACE.ME" |
| 44 | + When the request is sent |
| 45 | + Then the response status is 204 OK |
| 46 | + |
| 47 | + @generated @skip @team:Datadog/collaboration-integrations |
| 48 | + Scenario: Get all auth methods returns "OK" response |
| 49 | + Given new "GetAllAuthMethods" request |
| 50 | + When the request is sent |
| 51 | + Then the response status is 200 OK |
| 52 | + |
| 53 | + @generated @skip @team:Datadog/collaboration-integrations |
| 54 | + Scenario: Get an OAuth2 client credentials auth method returns "Not Found" response |
| 55 | + Given new "GetOAuth2ClientCredentials" request |
| 56 | + And request contains "auth_method_id" parameter from "REPLACE.ME" |
| 57 | + When the request is sent |
| 58 | + Then the response status is 404 Not Found |
| 59 | + |
| 60 | + @generated @skip @team:Datadog/collaboration-integrations |
| 61 | + Scenario: Get an OAuth2 client credentials auth method returns "OK" response |
| 62 | + Given new "GetOAuth2ClientCredentials" request |
| 63 | + And request contains "auth_method_id" parameter from "REPLACE.ME" |
| 64 | + When the request is sent |
| 65 | + Then the response status is 200 OK |
| 66 | + |
| 67 | + @generated @skip @team:Datadog/collaboration-integrations |
| 68 | + Scenario: Update an OAuth2 client credentials auth method returns "Bad Request" response |
| 69 | + Given new "UpdateOAuth2ClientCredentials" request |
| 70 | + And request contains "auth_method_id" parameter from "REPLACE.ME" |
| 71 | + And body with value {"data": {"attributes": {"access_token_url": "https://example.com/oauth/token", "audience": "https://api.example.com", "client_id": "my-client-id", "client_secret": "my-client-secret", "name": "my-oauth2-auth", "scope": "read:webhooks write:webhooks"}, "type": "webhooks-auth-method-oauth2-client-credentials"}} |
| 72 | + When the request is sent |
| 73 | + Then the response status is 400 Bad Request |
| 74 | + |
| 75 | + @generated @skip @team:Datadog/collaboration-integrations |
| 76 | + Scenario: Update an OAuth2 client credentials auth method returns "Conflict" response |
| 77 | + Given new "UpdateOAuth2ClientCredentials" request |
| 78 | + And request contains "auth_method_id" parameter from "REPLACE.ME" |
| 79 | + And body with value {"data": {"attributes": {"access_token_url": "https://example.com/oauth/token", "audience": "https://api.example.com", "client_id": "my-client-id", "client_secret": "my-client-secret", "name": "my-oauth2-auth", "scope": "read:webhooks write:webhooks"}, "type": "webhooks-auth-method-oauth2-client-credentials"}} |
| 80 | + When the request is sent |
| 81 | + Then the response status is 409 Conflict |
| 82 | + |
| 83 | + @generated @skip @team:Datadog/collaboration-integrations |
| 84 | + Scenario: Update an OAuth2 client credentials auth method returns "Not Found" response |
| 85 | + Given new "UpdateOAuth2ClientCredentials" request |
| 86 | + And request contains "auth_method_id" parameter from "REPLACE.ME" |
| 87 | + And body with value {"data": {"attributes": {"access_token_url": "https://example.com/oauth/token", "audience": "https://api.example.com", "client_id": "my-client-id", "client_secret": "my-client-secret", "name": "my-oauth2-auth", "scope": "read:webhooks write:webhooks"}, "type": "webhooks-auth-method-oauth2-client-credentials"}} |
| 88 | + When the request is sent |
| 89 | + Then the response status is 404 Not Found |
| 90 | + |
| 91 | + @generated @skip @team:Datadog/collaboration-integrations |
| 92 | + Scenario: Update an OAuth2 client credentials auth method returns "OK" response |
| 93 | + Given new "UpdateOAuth2ClientCredentials" request |
| 94 | + And request contains "auth_method_id" parameter from "REPLACE.ME" |
| 95 | + And body with value {"data": {"attributes": {"access_token_url": "https://example.com/oauth/token", "audience": "https://api.example.com", "client_id": "my-client-id", "client_secret": "my-client-secret", "name": "my-oauth2-auth", "scope": "read:webhooks write:webhooks"}, "type": "webhooks-auth-method-oauth2-client-credentials"}} |
| 96 | + When the request is sent |
| 97 | + Then the response status is 200 OK |
0 commit comments