From a49a8944ad45d8de0febb464bba69764d076ade9 Mon Sep 17 00:00:00 2001 From: LaunchDarklyCI Date: Wed, 28 Oct 2020 14:42:59 +0000 Subject: [PATCH] prepare 3.8.0 release (#67) * [ch90498] Adding new REST funcationality for unbounded segments * Move unbounded segment target list wrapper to its own object * [ch90412] add relay auto config crud endpoints to openapi (#155) * remove unnecessary files * fix typo, indicate required fields on definition, remove 500 response * missed a few 500s * fix body name of relay post request * fix typo in token path * remove periods from descriptions, make configs plural where necessary * [ch92014] add mobile key and SDK key reset endpoints (#156) * add mobile key and SDK key reset endpoints * fix formatting * fix typo * fix single quotes * Indicate expiry param is deprecated for mobile key reset openapi spec (#158) * edit mobile key reset endpoint and expiry param descriptions to indicate deprecation * remove mention of mobile key in SDK key expiry param, rename SDK key expiry param * Imiller/ch65698/update openapi with goaltender api endpoints (#159) * add integration subscriptions to definitions * clean up definitions * add more parameters * add integrations endpoints * fix invalid definition * remove slack url and datadog api key * add paths * fix some paths * update description for config post field * change from subscription to integrationSubscription * add missing integrations tag to post * remove apiKey from patch * remove byId from getIntegrationSubscription * use generic patch request param * update summary * update 200 responses for post and patch Co-authored-by: Matt Wagner Co-authored-by: Henry Jacobs Co-authored-by: Isabelle Miller --- spec/definitions.yaml | 91 +++++++++++++++++++++++++++++++ spec/parameters.yaml | 45 ++++++++++++++++ spec/paths.yaml | 6 +++ spec/paths/integrations.yaml | 102 +++++++++++++++++++++++++++++++++++ 4 files changed, 244 insertions(+) create mode 100644 spec/paths/integrations.yaml diff --git a/spec/definitions.yaml b/spec/definitions.yaml index 389ced5..213003f 100644 --- a/spec/definitions.yaml +++ b/spec/definitions.yaml @@ -1525,3 +1525,94 @@ RelayProxyConfig: - displayKey - creationDate - lastModified +HierarchicalLinks: + type: object + properties: + "parent": + $ref: "#/definitions/Link" + "self": + $ref: "#/definitions/Link" +IntegrationSubscription: + type: object + properties: + _links: + $ref: "#/definitions/HierarchicalLinks" + _id: + $ref: "#/definitions/Id" + kind: + type: string + description: The type of integration associated with this configuration. + example: "datadog" + name: + type: string + description: The user-defined name associated with this configuration. + example: "V2" + config: + type: object + description: A key-value mapping of configuration fields. + example: + { + "apiKey": "582**************************116", + "hostURL": "https://api.datadoghq.com", + } + statements: + type: array + items: + $ref: "#/definitions/Statement" + on: + type: boolean + description: Whether or not the integration is currently active. + example: true + tags: + type: array + items: + type: string + description: An array of tags for this integration configuration. + _status: + type: object + properties: + successCount: + type: integer + example: 6 + lastSuccess: + type: integer + format: int64 + description: A unix epoch time in milliseconds specifying the last time this integration was successfully used. + example: 1443652232590 + errorCount: + type: integer + example: 2 +Integration: + type: object + properties: + _links: + type: object + properties: + "self": + $ref: "#/definitions/Link" + items: + type: array + items: + $ref: "#/definitions/IntegrationSubscription" +Integrations: + type: object + properties: + _links: + type: object + description: A mapping of integration types to their respective API endpoints. + example: + { + "appdynamics": { + "href":"/api/v2/integrations/appdynamics", + "type":"application/json" + }, + "splunk": { + "href":"/api/v2/integrations/splunk", + "type":"application/json" + } + } + items: + type: array + items: + type: object + $ref: "#/definitions/IntegrationSubscription" \ No newline at end of file diff --git a/spec/parameters.yaml b/spec/parameters.yaml index 9ad7558..8c64b5a 100644 --- a/spec/parameters.yaml +++ b/spec/parameters.yaml @@ -646,3 +646,48 @@ RelayProxyConfigsExpiry: type: integer format: int64 description: An expiration time for the old relay proxy configuration key, expressed as a Unix epoch time in milliseconds. By default, the relay proxy configuration will expire immediately +IntegrationKey: + name: integrationKey + in: path + required: true + description: The key used to specify the integration kind. + type: string +IntegrationId: + name: integrationId + in: path + required: true + description: The integration ID. + type: string +IntegrationPostRequest: + name: subscriptionBody + in: body + required: true + description: Create a new integration subscription. + schema: + type: object + properties: + name: + type: string + description: A human-readable name for your subscription configuration. + example: Example Datadog Integration + statements: + type: array + items: + $ref: "#/definitions/Statement" + config: + type: object + description: Integration-specific configuration fields. + example: { "apiKey": "582**************************116", "hostURL": "https://api.datadoghq.com" } + on: + type: boolean + example: true + description: Whether the integration subscription is active or not. + tags: + type: array + items: + type: string + example: [] + description: Tags for the integration subscription. + required: + - name + - config \ No newline at end of file diff --git a/spec/paths.yaml b/spec/paths.yaml index ef007d1..fc4bcd2 100644 --- a/spec/paths.yaml +++ b/spec/paths.yaml @@ -102,3 +102,9 @@ $ref: ./paths/relay.yaml#/Reset /: $ref: ./paths/root.yaml#/Root +/integrations: + $ref: ./paths/integrations.yaml#/IntegrationsRoot +/integrations/{integrationKey}: + $ref: ./paths/integrations.yaml#/Integrations +/integrations/{integrationKey}/{integrationId}: + $ref: ./paths/integrations.yaml#/Integration diff --git a/spec/paths/integrations.yaml b/spec/paths/integrations.yaml new file mode 100644 index 0000000..aceae82 --- /dev/null +++ b/spec/paths/integrations.yaml @@ -0,0 +1,102 @@ +IntegrationsRoot: + get: + summary: Get a list of all configured audit log event integrations associated with this account. + operationId: getIntegrations + responses: + '200': + description: Integrations response. + schema: + $ref: '#/definitions/Integrations' + '403': + $ref: '#/responses/BetaApi403' + tags: + - Integrations +Integrations: + get: + summary: Get a list of all configured integrations of a given kind. + operationId: getIntegrationSubscriptions + parameters: + - $ref: '#/parameters/IntegrationKey' + responses: + '200': + description: Integrations response. + schema: + $ref: '#/definitions/Integration' + '403': + $ref: '#/responses/BetaApi403' + '404': + $ref: '#/responses/Standard404' + tags: + - Integrations + post: + summary: Create a new integration subscription of a given kind. + operationId: postIntegrationSubscription + parameters: + - $ref: '#/parameters/IntegrationKey' + - $ref: '#/parameters/IntegrationPostRequest' + responses: + '201': + description: Integrations response. + schema: + $ref: '#/definitions/IntegrationSubscription' + '400': + $ref: '#/responses/Standard400' + '401': + $ref: '#/responses/Standard401' + '409': + $ref: '#/responses/Standard409' + tags: + - Integrations +Integration: + get: + summary: Get a single integration subscription by ID. + operationId: getIntegrationSubscription + parameters: + - $ref: '#/parameters/IntegrationKey' + - $ref: '#/parameters/IntegrationId' + responses: + '200': + description: Integrations response. + schema: + $ref: '#/definitions/IntegrationSubscription' + '403': + $ref: '#/responses/BetaApi403' + '404': + $ref: '#/responses/Standard404' + tags: + - Integrations + patch: + summary: Modify an integration subscription by ID. + operationId: patchIntegrationSubscription + parameters: + - $ref: '#/parameters/IntegrationKey' + - $ref: '#/parameters/IntegrationId' + - $ref: '#/parameters/PatchRequest' + responses: + '200': + description: Integrations response. + schema: + $ref: '#/definitions/IntegrationSubscription' + '400': + $ref: '#/responses/Standard400' + '401': + $ref: '#/responses/Standard401' + '404': + $ref: '#/responses/Standard404' + tags: + - Integrations + delete: + summary: Delete an integration subscription by ID. + operationId: deleteIntegrationSubscription + parameters: + - $ref: '#/parameters/IntegrationKey' + - $ref: '#/parameters/IntegrationId' + responses: + '204': + $ref: '#/responses/Standard204' + '401': + $ref: '#/responses/Standard401' + '404': + $ref: '#/responses/Standard404' + tags: + - Integrations \ No newline at end of file