diff --git a/.apigentools-info b/.apigentools-info index 4eaaace4452..8f23d1b88a5 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-12 15:23:57.766531", - "spec_repo_commit": "222e1f81" + "regenerated": "2024-12-12 20:09:25.773186", + "spec_repo_commit": "3938e748" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-12 15:23:57.785483", - "spec_repo_commit": "222e1f81" + "regenerated": "2024-12-12 20:09:25.792778", + "spec_repo_commit": "3938e748" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 05e8f325c19..6689e131b8d 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1615,6 +1615,126 @@ components: type: string x-enum-varnames: - apm_retention_filter + AppBuilderError: + description: The definition of `AppBuilderError` object. + properties: + errors: + description: The `AppBuilderError` `errors`. + items: + $ref: '#/components/schemas/AppBuilderErrorErrorsItems' + type: array + type: object + AppBuilderErrorErrorsItems: + description: The definition of `AppBuilderErrorErrorsItems` object. + properties: + detail: + description: The `items` `detail`. + type: string + source: + $ref: '#/components/schemas/AppBuilderErrorErrorsItemsSource' + type: object + AppBuilderErrorErrorsItemsSource: + description: The definition of `AppBuilderErrorErrorsItemsSource` object. + properties: + parameter: + description: The `source` `parameter`. + type: string + pointer: + description: The `source` `pointer`. + type: string + type: object + AppBuilderEvent: + additionalProperties: {} + description: The definition of `AppBuilderEvent` object. + properties: + name: + $ref: '#/components/schemas/AppBuilderEventName' + type: + $ref: '#/components/schemas/AppBuilderEventType' + type: object + AppBuilderEventName: + description: The triggering action for the event. + enum: + - pageChange + - tableRowClick + - _tableRowButtonClick + - change + - submit + - click + - toggleOpen + - close + - open + - executionFinished + type: string + x-enum-varnames: + - PAGECHANGE + - TABLEROWCLICK + - TABLEROWBUTTONCLICK + - CHANGE + - SUBMIT + - CLICK + - TOGGLEOPEN + - CLOSE + - OPEN + - EXECUTIONFINISHED + AppBuilderEventType: + description: The response to the event. + enum: + - custom + - setComponentState + - triggerQuery + - openModal + - closeModal + - openUrl + - downloadFile + - setStateVariableValue + type: string + x-enum-varnames: + - CUSTOM + - SETCOMPONENTSTATE + - TRIGGERQUERY + - OPENMODAL + - CLOSEMODAL + - OPENURL + - DOWNLOADFILE + - SETSTATEVARIABLEVALUE + AppMeta: + description: The definition of `AppMeta` object. + properties: + created_at: + description: The `AppMeta` `created_at`. + type: string + deleted_at: + description: The `AppMeta` `deleted_at`. + type: string + org_id: + description: The `AppMeta` `org_id`. + format: int64 + type: integer + run_as_user: + description: The `AppMeta` `run_as_user`. + type: string + updated_at: + description: The `AppMeta` `updated_at`. + type: string + updated_since_deployment: + description: The `AppMeta` `updated_since_deployment`. + type: boolean + user_id: + description: The `AppMeta` `user_id`. + format: int64 + type: integer + user_name: + description: The `AppMeta` `user_name`. + type: string + user_uuid: + description: The `AppMeta` `user_uuid`. + type: string + version: + description: The `AppMeta` `version`. + format: int64 + type: integer + type: object ApplicationKeyCreateAttributes: description: Attributes used to create an application Key. properties: @@ -1766,6 +1886,27 @@ components: type: string x-enum-varnames: - APPLICATION_KEYS + AppsSortField: + description: The field and direction to sort apps by + enum: + - name + - created_at + - updated_at + - user_name + - -name + - -created_at + - -updated_at + - -user_name + type: string + x-enum-varnames: + - NAME + - CREATED_AT + - UPDATED_AT + - USER_NAME + - NAME_DESC + - CREATED_AT_DESC + - UPDATED_AT_DESC + - USER_NAME_DESC AuditLogsEvent: description: Object description of an Audit Logs event after it is processed and stored by Datadog. @@ -5500,6 +5641,150 @@ components: $ref: '#/components/schemas/CloudflareAccountResponseData' type: array type: object + Component: + description: The definition of `Component` object. + properties: + events: + description: The `Component` `events`. + items: + $ref: '#/components/schemas/AppBuilderEvent' + type: array + id: + description: The `Component` `id`. + nullable: true + type: string + name: + description: The `Component` `name`. + example: '' + type: string + properties: + $ref: '#/components/schemas/ComponentProperties' + type: + $ref: '#/components/schemas/ComponentType' + required: + - name + - type + - properties + type: object + ComponentGrid: + description: The definition of `ComponentGrid` object. + properties: + events: + description: The `ComponentGrid` `events`. + items: + $ref: '#/components/schemas/AppBuilderEvent' + type: array + id: + description: The `ComponentGrid` `id`. + type: string + name: + description: The `ComponentGrid` `name`. + example: '' + type: string + properties: + $ref: '#/components/schemas/ComponentGridProperties' + type: + $ref: '#/components/schemas/ComponentGridType' + required: + - name + - type + - properties + type: object + ComponentGridProperties: + description: The definition of `ComponentGridProperties` object. + properties: + backgroundColor: + default: default + description: The `ComponentGridProperties` `backgroundColor`. + type: string + children: + description: The `ComponentGridProperties` `children`. + items: + $ref: '#/components/schemas/Component' + type: array + isVisible: + $ref: '#/components/schemas/ComponentGridPropertiesIsVisible' + type: object + ComponentGridPropertiesIsVisible: + description: The definition of `ComponentGridPropertiesIsVisible` object. + oneOf: + - type: string + - default: true + type: boolean + ComponentGridType: + description: The definition of `ComponentGridType` object. + enum: + - grid + example: grid + type: string + x-enum-varnames: + - GRID + ComponentProperties: + additionalProperties: {} + description: The definition of `ComponentProperties` object. + properties: + children: + description: The `ComponentProperties` `children`. + items: + $ref: '#/components/schemas/Component' + type: array + isVisible: + $ref: '#/components/schemas/ComponentPropertiesIsVisible' + type: object + ComponentPropertiesIsVisible: + description: The definition of `ComponentPropertiesIsVisible` object. + oneOf: + - type: boolean + - description: If a string, it should be a valid JavaScript expression that + evaluates to a boolean. + example: ${true} + type: string + ComponentType: + description: The definition of `ComponentType` object. + enum: + - table + - textInput + - textArea + - button + - text + - select + - modal + - schemaForm + - checkbox + - tabs + - vegaChart + - radioButtons + - numberInput + - fileInput + - jsonInput + - gridCell + - dateRangePicker + - search + - container + - calloutValue + example: table + type: string + x-enum-varnames: + - TABLE + - TEXTINPUT + - TEXTAREA + - BUTTON + - TEXT + - SELECT + - MODAL + - SCHEMAFORM + - CHECKBOX + - TABS + - VEGACHART + - RADIOBUTTONS + - NUMBERINPUT + - FILEINPUT + - JSONINPUT + - GRIDCELL + - DATERANGEPICKER + - SEARCH + - CONTAINER + - CALLOUTVALUE ConfluentAccountCreateRequest: description: Payload schema when adding a Confluent account. properties: @@ -6501,6 +6786,132 @@ components: type: string x-enum-varnames: - COST_BY_ORG + CreateAppRequest: + description: The definition of `CreateAppRequest` object. + example: + data: + attributes: + components: + - events: [] + name: grid0 + properties: + children: + - events: [] + name: gridCell0 + properties: + children: + - events: [] + name: calloutValue0 + properties: + isDisabled: false + isLoading: false + isVisible: true + label: CPU Usage + size: sm + style: vivid_yellow + unit: kB + value: '42' + type: calloutValue + isVisible: 'true' + layout: + default: + height: 8 + width: 2 + x: 0 + y: 0 + type: gridCell + type: grid + description: This is a simple example app + embeddedQueries: [] + name: Example App + rootInstanceName: grid0 + type: appDefinitions + properties: + data: + $ref: '#/components/schemas/CreateAppRequestData' + type: object + CreateAppRequestData: + description: The definition of `CreateAppRequestData` object. + properties: + attributes: + $ref: '#/components/schemas/CreateAppRequestDataAttributes' + type: + $ref: '#/components/schemas/CreateAppRequestDataType' + required: + - type + type: object + CreateAppRequestDataAttributes: + description: The definition of `CreateAppRequestDataAttributes` object. + properties: + components: + description: The `attributes` `components`. + items: + $ref: '#/components/schemas/ComponentGrid' + type: array + description: + description: The `attributes` `description`. + type: string + embeddedQueries: + description: The `attributes` `embeddedQueries`. + items: + $ref: '#/components/schemas/Query' + type: array + inputSchema: + $ref: '#/components/schemas/InputSchema' + name: + description: The `attributes` `name`. + type: string + rootInstanceName: + description: The `attributes` `rootInstanceName`. + type: string + scripts: + description: The `attributes` `scripts`. + items: + $ref: '#/components/schemas/Script' + type: array + tags: + description: The `attributes` `tags`. + items: + type: string + type: array + type: object + CreateAppRequestDataType: + default: appDefinitions + description: The definition of `CreateAppRequestDataType` object. + enum: + - appDefinitions + example: appDefinitions + type: string + x-enum-varnames: + - APPDEFINITIONS + CreateAppResponse: + description: The definition of `CreateAppResponse` object. + properties: + data: + $ref: '#/components/schemas/CreateAppResponseData' + type: object + CreateAppResponseData: + description: The definition of `CreateAppResponseData` object. + properties: + id: + description: The `data` `id`. + example: '' + type: string + type: + $ref: '#/components/schemas/CreateAppResponseDataType' + required: + - id + - type + type: object + CreateAppResponseDataType: + default: appDefinitions + description: The definition of `CreateAppResponseDataType` object. + enum: + - appDefinitions + example: appDefinitions + type: string + x-enum-varnames: + - APPDEFINITIONS CreateDataDeletionRequestBody: description: Object needed to create a data deletion request. properties: @@ -6630,6 +7041,44 @@ components: nullable: true type: string type: object + CustomConnection: + description: The definition of `CustomConnection` object. + properties: + attributes: + $ref: '#/components/schemas/CustomConnectionAttributes' + id: + description: The `CustomConnection` `id`. + type: string + type: + $ref: '#/components/schemas/CustomConnectionType' + type: object + CustomConnectionAttributes: + description: The definition of `CustomConnectionAttributes` object. + properties: + name: + description: The `attributes` `name`. + type: string + onPremRunner: + $ref: '#/components/schemas/CustomConnectionAttributesOnPremRunner' + type: object + CustomConnectionAttributesOnPremRunner: + description: The definition of `CustomConnectionAttributesOnPremRunner` object. + properties: + id: + description: The `onPremRunner` `id`. + type: string + url: + description: The `onPremRunner` `url`. + type: string + type: object + CustomConnectionType: + default: custom_connections + description: The definition of `CustomConnectionType` object. + enum: + - custom_connections + type: string + x-enum-varnames: + - CUSTOM_CONNECTIONS CustomCostGetResponseMeta: description: Meta for the response from the Get Custom Costs endpoints. properties: @@ -8011,6 +8460,270 @@ components: type: number type: array type: object + DeleteAppResponse: + description: The definition of `DeleteAppResponse` object. + properties: + data: + $ref: '#/components/schemas/DeleteAppResponseData' + type: object + DeleteAppResponseData: + description: The definition of `DeleteAppResponseData` object. + properties: + id: + description: The `data` `id`. + example: '' + type: string + type: + $ref: '#/components/schemas/DeleteAppResponseDataType' + required: + - id + - type + type: object + DeleteAppResponseDataType: + default: appDefinitions + description: The definition of `DeleteAppResponseDataType` object. + enum: + - appDefinitions + example: appDefinitions + type: string + x-enum-varnames: + - APPDEFINITIONS + DeleteAppsRequest: + description: The definition of `DeleteAppsRequest` object. + example: + data: + - id: 29494ddd-ac13-46a7-8558-b05b050ee755 + type: appDefinitions + - id: 71c0d358-eac5-41e3-892d-a7467571b9b0 + type: appDefinitions + - id: 98e7e44d-1562-474a-90f7-3a94e739c006 + type: appDefinitions + properties: + data: + description: The `DeleteAppsRequest` `data`. + items: + $ref: '#/components/schemas/DeleteAppsRequestDataItems' + type: array + type: object + DeleteAppsRequestDataItems: + description: The definition of `DeleteAppsRequestDataItems` object. + properties: + id: + description: The `items` `id`. + example: '' + type: string + type: + $ref: '#/components/schemas/DeleteAppsRequestDataItemsType' + required: + - id + - type + type: object + DeleteAppsRequestDataItemsType: + default: appDefinitions + description: The definition of `DeleteAppsRequestDataItemsType` object. + enum: + - appDefinitions + example: appDefinitions + type: string + x-enum-varnames: + - APPDEFINITIONS + DeleteAppsResponse: + description: The definition of `DeleteAppsResponse` object. + properties: + data: + description: The `DeleteAppsResponse` `data`. + items: + $ref: '#/components/schemas/DeleteAppsResponseDataItems' + type: array + type: object + DeleteAppsResponseDataItems: + description: The definition of `DeleteAppsResponseDataItems` object. + properties: + id: + description: The `items` `id`. + example: '' + type: string + type: + $ref: '#/components/schemas/DeleteAppsResponseDataItemsType' + required: + - id + - type + type: object + DeleteAppsResponseDataItemsType: + default: appDefinitions + description: The definition of `DeleteAppsResponseDataItemsType` object. + enum: + - appDefinitions + example: appDefinitions + type: string + x-enum-varnames: + - APPDEFINITIONS + DeployAppResponse: + description: The definition of `DeployAppResponse` object. + properties: + data: + $ref: '#/components/schemas/DeployAppResponseData' + type: object + DeployAppResponseData: + description: The definition of `DeployAppResponseData` object. + properties: + attributes: + $ref: '#/components/schemas/DeployAppResponseDataAttributes' + id: + description: The `data` `id`. + type: string + meta: + $ref: '#/components/schemas/DeploymentMeta' + type: + $ref: '#/components/schemas/DeployAppResponseDataType' + type: object + DeployAppResponseDataAttributes: + description: The definition of `DeployAppResponseDataAttributes` object. + properties: + app_version_id: + description: The `attributes` `app_version_id`. + type: string + type: object + DeployAppResponseDataType: + default: deployment + description: The definition of `DeployAppResponseDataType` object. + enum: + - deployment + type: string + x-enum-varnames: + - DEPLOYMENT + Deployment: + description: The definition of `Deployment` object. + properties: + attributes: + $ref: '#/components/schemas/DeploymentAttributes' + id: + description: The `Deployment` `id`. + type: string + meta: + $ref: '#/components/schemas/DeploymentMeta' + type: + $ref: '#/components/schemas/DeploymentType' + type: object + DeploymentAttributes: + description: The definition of `DeploymentAttributes` object. + properties: + app_version_id: + description: The `attributes` `app_version_id`. + type: string + type: object + DeploymentIncluded: + description: The definition of `DeploymentIncluded` object. + properties: + attributes: + $ref: '#/components/schemas/DeploymentIncludedAttributes' + id: + description: The `DeploymentIncluded` `id`. + type: string + meta: + $ref: '#/components/schemas/DeploymentIncludedMeta' + type: + $ref: '#/components/schemas/DeploymentIncludedType' + type: object + DeploymentIncludedAttributes: + description: The definition of `DeploymentIncludedAttributes` object. + properties: + app_version_id: + description: The `attributes` `app_version_id`. + type: string + type: object + DeploymentIncludedMeta: + description: The definition of `DeploymentIncludedMeta` object. + properties: + created_at: + description: The `meta` `created_at`. + type: string + user_id: + description: The `meta` `user_id`. + format: int64 + type: integer + user_name: + description: The `meta` `user_name`. + type: string + user_uuid: + description: The `meta` `user_uuid`. + type: string + type: object + DeploymentIncludedType: + default: deployment + description: The definition of `DeploymentIncludedType` object. + enum: + - deployment + type: string + x-enum-varnames: + - DEPLOYMENT + DeploymentMeta: + description: The definition of `DeploymentMeta` object. + properties: + created_at: + description: The `DeploymentMeta` `created_at`. + type: string + user_id: + description: The `DeploymentMeta` `user_id`. + format: int64 + type: integer + user_name: + description: The `DeploymentMeta` `user_name`. + type: string + user_uuid: + description: The `DeploymentMeta` `user_uuid`. + type: string + type: object + DeploymentRelationship: + description: The definition of `DeploymentRelationship` object. + properties: + data: + $ref: '#/components/schemas/DeploymentRelationshipData' + meta: + $ref: '#/components/schemas/DeploymentRelationshipMeta' + type: object + DeploymentRelationshipData: + description: The definition of `DeploymentRelationshipData` object. + properties: + id: + description: The `data` `id`. + type: string + type: + $ref: '#/components/schemas/DeploymentRelationshipDataType' + type: object + DeploymentRelationshipDataType: + default: deployment + description: The definition of `DeploymentRelationshipDataType` object. + enum: + - deployment + type: string + x-enum-varnames: + - DEPLOYMENT + DeploymentRelationshipMeta: + description: The definition of `DeploymentRelationshipMeta` object. + properties: + created_at: + description: The `meta` `created_at`. + type: string + user_id: + description: The `meta` `user_id`. + format: int64 + type: integer + user_name: + description: The `meta` `user_name`. + type: string + user_uuid: + description: The `meta` `user_uuid`. + type: string + type: object + DeploymentType: + default: deployment + description: The definition of `DeploymentType` object. + enum: + - deployment + type: string + x-enum-varnames: + - DEPLOYMENT DetailedFinding: description: A single finding with with message and resource configuration. properties: @@ -8194,6 +8907,40 @@ components: description: The type of the resource. The value should always be device. type: string type: object + DisableAppResponse: + description: The definition of `DisableAppResponse` object. + properties: + data: + $ref: '#/components/schemas/DisableAppResponseData' + type: object + DisableAppResponseData: + description: The definition of `DisableAppResponseData` object. + properties: + attributes: + $ref: '#/components/schemas/DisableAppResponseDataAttributes' + id: + description: The `data` `id`. + type: string + meta: + $ref: '#/components/schemas/DeploymentMeta' + type: + $ref: '#/components/schemas/DisableAppResponseDataType' + type: object + DisableAppResponseDataAttributes: + description: The definition of `DisableAppResponseDataAttributes` object. + properties: + app_version_id: + description: The `attributes` `app_version_id`. + type: string + type: object + DisableAppResponseDataType: + default: deployment + description: The definition of `DisableAppResponseDataType` object. + enum: + - deployment + type: string + x-enum-varnames: + - DEPLOYMENT DomainAllowlist: description: The email domain allowlist for an org. properties: @@ -10974,6 +11721,95 @@ components: type: string x-enum-varnames: - GCP_SERVICE_ACCOUNT + GetAppResponse: + description: The definition of `GetAppResponse` object. + properties: + data: + $ref: '#/components/schemas/GetAppResponseData' + included: + description: The `GetAppResponse` `included`. + items: + $ref: '#/components/schemas/DeploymentIncluded' + type: array + meta: + $ref: '#/components/schemas/AppMeta' + relationship: + $ref: '#/components/schemas/GetAppResponseRelationship' + type: object + GetAppResponseData: + description: The definition of `GetAppResponseData` object. + properties: + attributes: + $ref: '#/components/schemas/GetAppResponseDataAttributes' + id: + description: The `data` `id`. + example: '' + type: string + type: + $ref: '#/components/schemas/GetAppResponseDataType' + required: + - id + - type + - attributes + type: object + GetAppResponseDataAttributes: + description: The definition of `GetAppResponseDataAttributes` object. + properties: + components: + description: The `attributes` `components`. + items: + $ref: '#/components/schemas/ComponentGrid' + type: array + description: + description: The `attributes` `description`. + type: string + embeddedQueries: + description: The `attributes` `embeddedQueries`. + items: + $ref: '#/components/schemas/Query' + type: array + favorite: + description: The `attributes` `favorite`. + type: boolean + inputSchema: + $ref: '#/components/schemas/InputSchema' + name: + description: The `attributes` `name`. + type: string + rootInstanceName: + description: The `attributes` `rootInstanceName`. + type: string + scripts: + description: The `attributes` `scripts`. + items: + $ref: '#/components/schemas/Script' + type: array + tags: + description: The `attributes` `tags`. + items: + type: string + type: array + type: object + GetAppResponseDataType: + default: appDefinitions + description: The definition of `GetAppResponseDataType` object. + enum: + - appDefinitions + example: appDefinitions + type: string + x-enum-varnames: + - APPDEFINITIONS + GetAppResponseRelationship: + description: The definition of `GetAppResponseRelationship` object. + properties: + connections: + description: The `relationship` `connections`. + items: + $ref: '#/components/schemas/CustomConnection' + type: array + deployment: + $ref: '#/components/schemas/DeploymentRelationship' + type: object GetDataDeletionsResponseBody: description: The response from the get data deletion requests endpoint. properties: @@ -13627,6 +14463,77 @@ components: - ONCALL - INCIDENT - RELATION + InputSchema: + description: The definition of `InputSchema` object. + properties: + data: + $ref: '#/components/schemas/InputSchemaData' + type: object + InputSchemaData: + description: The definition of `InputSchemaData` object. + properties: + attributes: + $ref: '#/components/schemas/InputSchemaDataAttributes' + id: + description: The `data` `id`. + type: string + type: + $ref: '#/components/schemas/InputSchemaDataType' + type: object + InputSchemaDataAttributes: + description: The definition of `InputSchemaDataAttributes` object. + properties: + parameters: + description: The `attributes` `parameters`. + items: + $ref: '#/components/schemas/InputSchemaDataAttributesParametersItems' + type: array + type: object + InputSchemaDataAttributesParametersItems: + description: The definition of `InputSchemaDataAttributesParametersItems` object. + properties: + data: + $ref: '#/components/schemas/InputSchemaDataAttributesParametersItemsData' + type: object + InputSchemaDataAttributesParametersItemsData: + description: The definition of `InputSchemaDataAttributesParametersItemsData` + object. + properties: + attributes: + $ref: '#/components/schemas/InputSchemaDataAttributesParametersItemsDataAttributes' + type: object + InputSchemaDataAttributesParametersItemsDataAttributes: + description: The definition of `InputSchemaDataAttributesParametersItemsDataAttributes` + object. + properties: + defaultValue: + description: The `attributes` `defaultValue`. + description: + description: The `attributes` `description`. + type: string + enum: + description: The `attributes` `enum`. + items: + type: string + type: array + label: + description: The `attributes` `label`. + type: string + name: + description: The `attributes` `name`. + type: string + type: + description: The `attributes` `type`. + type: string + type: object + InputSchemaDataType: + default: inputSchema + description: The definition of `InputSchemaDataType` object. + enum: + - inputSchema + type: string + x-enum-varnames: + - INPUTSCHEMA IntakePayloadAccepted: description: The payload accepted for intake. properties: @@ -14012,6 +14919,96 @@ components: meta: $ref: '#/components/schemas/ApplicationKeyResponseMeta' type: object + ListAppsResponse: + description: The definition of `ListAppsResponse` object. + properties: + data: + description: The `ListAppsResponse` `data`. + items: + $ref: '#/components/schemas/ListAppsResponseDataItems' + type: array + included: + description: The `ListAppsResponse` `included`. + items: + $ref: '#/components/schemas/DeploymentIncluded' + type: array + meta: + $ref: '#/components/schemas/ListAppsResponseMeta' + type: object + ListAppsResponseDataItems: + description: The definition of `ListAppsResponseDataItems` object. + properties: + attributes: + $ref: '#/components/schemas/ListAppsResponseDataItemsAttributes' + id: + description: The `items` `id`. + example: '' + type: string + meta: + $ref: '#/components/schemas/AppMeta' + relationships: + $ref: '#/components/schemas/ListAppsResponseDataItemsRelationships' + type: + $ref: '#/components/schemas/ListAppsResponseDataItemsType' + required: + - id + - type + - attributes + type: object + ListAppsResponseDataItemsAttributes: + description: The definition of `ListAppsResponseDataItemsAttributes` object. + properties: + description: + description: The `attributes` `description`. + type: string + favorite: + description: The `attributes` `favorite`. + type: boolean + name: + description: The `attributes` `name`. + type: string + selfService: + description: The `attributes` `selfService`. + type: boolean + tags: + description: The `attributes` `tags`. + items: + type: string + type: array + type: object + ListAppsResponseDataItemsRelationships: + description: The definition of `ListAppsResponseDataItemsRelationships` object. + properties: + deployment: + $ref: '#/components/schemas/DeploymentRelationship' + type: object + ListAppsResponseDataItemsType: + default: appDefinitions + description: The definition of `ListAppsResponseDataItemsType` object. + enum: + - appDefinitions + example: appDefinitions + type: string + x-enum-varnames: + - APPDEFINITIONS + ListAppsResponseMeta: + description: The definition of `ListAppsResponseMeta` object. + properties: + page: + $ref: '#/components/schemas/ListAppsResponseMetaPage' + type: object + ListAppsResponseMetaPage: + description: The definition of `ListAppsResponseMetaPage` object. + properties: + totalCount: + description: The `page` `totalCount`. + format: int64 + type: integer + totalFilteredCount: + description: The `page` `totalFilteredCount`. + format: int64 + type: integer + type: object ListDevicesResponse: description: List devices response. properties: @@ -18780,6 +19777,31 @@ components: $ref: '#/components/schemas/Project' type: array type: object + Query: + description: The definition of `Query` object. + properties: + events: + description: The `Query` `events`. + items: + $ref: '#/components/schemas/AppBuilderEvent' + type: array + id: + description: The `Query` `id`. + example: '' + type: string + name: + description: The `Query` `name`. + example: '' + type: string + properties: + description: The `Query` `properties`. + type: + $ref: '#/components/schemas/QueryType' + required: + - id + - name + - type + type: object QueryFormula: description: A formula for calculation based on one or more queries. properties: @@ -18803,6 +19825,18 @@ components: x-enum-varnames: - ASC - DESC + QueryType: + description: The definition of `QueryType` object. + enum: + - action + - stateVariable + - dataTransform + example: action + type: string + x-enum-varnames: + - ACTION + - STATEVARIABLE + - DATATRANSFORM RUMAggregateBucketValue: description: A bucket value, can be either a timeseries or a single value. oneOf: @@ -21337,6 +22371,44 @@ components: type: string x-enum-varnames: - SCORECARD + Script: + description: The definition of `Script` object. + properties: + data: + $ref: '#/components/schemas/ScriptData' + type: object + ScriptData: + description: The definition of `ScriptData` object. + properties: + attributes: + $ref: '#/components/schemas/ScriptDataAttributes' + id: + description: The `data` `id`. + type: string + type: + $ref: '#/components/schemas/ScriptDataType' + type: object + ScriptDataAttributes: + description: The definition of `ScriptDataAttributes` object. + properties: + name: + description: The `attributes` `name`. + type: string + src: + description: The `attributes` `src`. + type: string + type: + description: The `attributes` `type`. + type: string + type: object + ScriptDataType: + default: scripts + description: The definition of `ScriptDataType` object. + enum: + - scripts + type: string + x-enum-varnames: + - SCRIPTS SecurityFilter: description: The security filter's properties. properties: @@ -26930,6 +28002,197 @@ components: example: min type: string type: object + UpdateAppRequest: + description: The definition of `UpdateAppRequest` object. + example: + data: + attributes: + components: + - events: [] + name: grid0 + properties: + children: + - events: [] + name: gridCell0 + properties: + children: + - events: [] + name: calloutValue0 + properties: + isDisabled: false + isLoading: false + isVisible: true + label: CPU Usage + size: sm + style: vivid_yellow + unit: kB + value: '42' + type: calloutValue + isVisible: 'true' + layout: + default: + height: 8 + width: 2 + x: 0 + y: 0 + type: gridCell + type: grid + description: This is a simple example app + embeddedQueries: [] + name: Example App + rootInstanceName: grid0 + id: 9e20cbaf-68da-45a6-9ccf-54193ac29fa5 + type: appDefinitions + properties: + data: + $ref: '#/components/schemas/UpdateAppRequestData' + type: object + UpdateAppRequestData: + description: The definition of `UpdateAppRequestData` object. + properties: + attributes: + $ref: '#/components/schemas/UpdateAppRequestDataAttributes' + id: + description: The `data` `id`. + type: string + type: + $ref: '#/components/schemas/UpdateAppRequestDataType' + required: + - type + type: object + UpdateAppRequestDataAttributes: + description: The definition of `UpdateAppRequestDataAttributes` object. + properties: + components: + description: The `attributes` `components`. + items: + $ref: '#/components/schemas/ComponentGrid' + type: array + description: + description: The `attributes` `description`. + type: string + embeddedQueries: + description: The `attributes` `embeddedQueries`. + items: + $ref: '#/components/schemas/Query' + type: array + inputSchema: + $ref: '#/components/schemas/InputSchema' + name: + description: The `attributes` `name`. + type: string + rootInstanceName: + description: The `attributes` `rootInstanceName`. + type: string + scripts: + description: The `attributes` `scripts`. + items: + $ref: '#/components/schemas/Script' + type: array + tags: + description: The `attributes` `tags`. + items: + type: string + type: array + type: object + UpdateAppRequestDataType: + default: appDefinitions + description: The definition of `UpdateAppRequestDataType` object. + enum: + - appDefinitions + example: appDefinitions + type: string + x-enum-varnames: + - APPDEFINITIONS + UpdateAppResponse: + description: The definition of `UpdateAppResponse` object. + properties: + data: + $ref: '#/components/schemas/UpdateAppResponseData' + included: + description: The `UpdateAppResponse` `included`. + items: + $ref: '#/components/schemas/DeploymentIncluded' + type: array + meta: + $ref: '#/components/schemas/AppMeta' + relationship: + $ref: '#/components/schemas/UpdateAppResponseRelationship' + type: object + UpdateAppResponseData: + description: The definition of `UpdateAppResponseData` object. + properties: + attributes: + $ref: '#/components/schemas/UpdateAppResponseDataAttributes' + id: + description: The `data` `id`. + example: '' + type: string + type: + $ref: '#/components/schemas/UpdateAppResponseDataType' + required: + - id + - type + - attributes + type: object + UpdateAppResponseDataAttributes: + description: The definition of `UpdateAppResponseDataAttributes` object. + properties: + components: + description: The `attributes` `components`. + items: + $ref: '#/components/schemas/ComponentGrid' + type: array + description: + description: The `attributes` `description`. + type: string + embeddedQueries: + description: The `attributes` `embeddedQueries`. + items: + $ref: '#/components/schemas/Query' + type: array + favorite: + description: The `attributes` `favorite`. + type: boolean + inputSchema: + $ref: '#/components/schemas/InputSchema' + name: + description: The `attributes` `name`. + type: string + rootInstanceName: + description: The `attributes` `rootInstanceName`. + type: string + scripts: + description: The `attributes` `scripts`. + items: + $ref: '#/components/schemas/Script' + type: array + tags: + description: The `attributes` `tags`. + items: + type: string + type: array + type: object + UpdateAppResponseDataType: + default: appDefinitions + description: The definition of `UpdateAppResponseDataType` object. + enum: + - appDefinitions + example: appDefinitions + type: string + x-enum-varnames: + - APPDEFINITIONS + UpdateAppResponseRelationship: + description: The definition of `UpdateAppResponseRelationship` object. + properties: + connections: + description: The `relationship` `connections`. + items: + $ref: '#/components/schemas/CustomConnection' + type: array + deployment: + $ref: '#/components/schemas/DeploymentRelationship' + type: object UpdateOpenAPIResponse: description: Response for `UpdateOpenAPI`. properties: @@ -28688,6 +29951,430 @@ paths: permissions: - apm_retention_filter_write - apm_pipelines_write + /api/v2/app-builder/apps: + delete: + description: Delete multiple apps by ID + operationId: DeleteApps + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteAppsRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteAppsResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Forbidden, e.g. missing permissions to delete one or more apps + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete Multiple Apps + tags: + - Apps + x-permission: + operator: OR + permissions: + - apps_write + x-unstable: '**Note**: App Builder API endpoints are still under active development + and may change at any time.' + get: + description: List all apps, with optional filters and sorting + operationId: ListApps + parameters: + - description: The number of apps to return per page + in: query + name: limit + required: false + schema: + format: int64 + type: integer + - description: The page number to return + in: query + name: page + required: false + schema: + format: int64 + type: integer + - description: The `AppsFilter` `user_name`. + in: query + name: filter[user_name] + required: false + schema: + type: string + - description: The `AppsFilter` `user_uuid`. + in: query + name: filter[user_uuid] + required: false + schema: + type: string + - description: The `AppsFilter` `name`. + in: query + name: filter[name] + required: false + schema: + type: string + - description: The `AppsFilter` `query`. + in: query + name: filter[query] + required: false + schema: + type: string + - description: The `AppsFilter` `deployed`. + in: query + name: filter[deployed] + required: false + schema: + type: boolean + - description: The `AppsFilter` `tags`. + in: query + name: filter[tags] + required: false + schema: + type: string + - description: The `AppsFilter` `favorite`. + in: query + name: filter[favorite] + required: false + schema: + type: boolean + - explode: false + in: query + name: sort + required: false + schema: + items: + $ref: '#/components/schemas/AppsSortField' + type: array + style: form + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ListAppsResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Bad Request, e.g. invalid sort parameter + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: List Apps + tags: + - Apps + x-permission: + operator: OR + permissions: + - apps_run + x-unstable: '**Note**: App Builder API endpoints are still under active development + and may change at any time.' + post: + description: Create a new app, returning the app ID + operationId: CreateApp + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAppRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAppResponse' + description: App Created + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Forbidden, e.g. missing required permissions to a connection + or workflow used in the app + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create App + tags: + - Apps + x-permission: + operator: AND + permissions: + - apps_write + - connections_resolve + - workflows_run + x-unstable: '**Note**: App Builder API endpoints are still under active development + and may change at any time.' + /api/v2/app-builder/apps/{app_id}: + delete: + description: Delete an app by ID + operationId: DeleteApp + parameters: + - in: path + name: app_id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteAppResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Not Found + '410': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Gone + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete App + tags: + - Apps + x-permission: + operator: OR + permissions: + - apps_write + x-unstable: '**Note**: App Builder API endpoints are still under active development + and may change at any time.' + get: + description: Get the full definition of an app by ID + operationId: GetApp + parameters: + - in: path + name: app_id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GetAppResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get App + tags: + - Apps + x-permission: + operator: AND + permissions: + - apps_run + - connections_read + x-unstable: '**Note**: App Builder API endpoints are still under active development + and may change at any time.' + patch: + description: Update an existing app by ID. Creates a new version of the app + operationId: UpdateApp + parameters: + - in: path + name: app_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateAppRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateAppResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Forbidden, e.g. missing required permissions to a connection + or workflow used in the app + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update App + tags: + - Apps + x-permission: + operator: AND + permissions: + - apps_write + - connections_resolve + - workflows_run + x-unstable: '**Note**: App Builder API endpoints are still under active development + and may change at any time.' + /api/v2/app-builder/apps/{app_id}/deployment: + delete: + description: Disable an app by ID + operationId: DisableApp + parameters: + - in: path + name: app_id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DisableAppResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Disable App + tags: + - App Deployment + x-permission: + operator: OR + permissions: + - apps_write + x-unstable: '**Note**: App Builder API endpoints are still under active development + and may change at any time.' + post: + description: Deploy (publish) an app by ID + operationId: DeployApp + parameters: + - in: path + name: app_id + required: true + schema: + type: string + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/DeployAppResponse' + description: Created + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/AppBuilderError' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Deploy App + tags: + - App Deployment + x-permission: + operator: OR + permissions: + - apps_write + x-unstable: '**Note**: App Builder API endpoints are still under active development + and may change at any time.' /api/v2/application_keys: get: description: List all application keys available for your org @@ -44601,6 +46288,10 @@ tags: externalDocs: url: https://docs.datadoghq.com/integrations/amazon_web_services/#log-collection name: AWS Logs Integration +- description: Deploy and disable apps in App Builder. + name: App Deployment +- description: Create, read, update, and delete apps in App Builder. + name: Apps - description: Search your Audit Logs events over HTTP. name: Audit - description: '[The AuthN Mappings API](https://docs.datadoghq.com/account_management/authn_mapping/?tab=example) diff --git a/cassettes/v2/App-Deployment_818229931/Deploy-App-returns-Bad-Request-response_3804679907/frozen.json b/cassettes/v2/App-Deployment_818229931/Deploy-App-returns-Bad-Request-response_3804679907/frozen.json new file mode 100644 index 00000000000..f65a7194e0b --- /dev/null +++ b/cassettes/v2/App-Deployment_818229931/Deploy-App-returns-Bad-Request-response_3804679907/frozen.json @@ -0,0 +1 @@ +"2024-12-10T19:57:35.320Z" diff --git a/cassettes/v2/App-Deployment_818229931/Deploy-App-returns-Bad-Request-response_3804679907/recording.har b/cassettes/v2/App-Deployment_818229931/Deploy-App-returns-Bad-Request-response_3804679907/recording.har new file mode 100644 index 00000000000..ba3c9060f18 --- /dev/null +++ b/cassettes/v2/App-Deployment_818229931/Deploy-App-returns-Bad-Request-response_3804679907/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "App Deployment/Deploy App returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "14cb6f3cda9b309d435de221ebf1e5e1", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 550, + "httpVersion": "HTTP/1.1", + "method": "POST", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps/invalid-uuid/deployment" + }, + "response": { + "bodySize": 79, + "content": { + "mimeType": "application/vnd.api+json", + "size": 79, + "text": "{\"errors\":[{\"detail\":\"invalid path parameter\",\"source\":{\"parameter\":\"appId\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 655, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2024-12-10T19:57:35.328Z", + "time": 124 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/App-Deployment_818229931/Deploy-App-returns-Created-response_286585597/frozen.json b/cassettes/v2/App-Deployment_818229931/Deploy-App-returns-Created-response_286585597/frozen.json new file mode 100644 index 00000000000..259009ab723 --- /dev/null +++ b/cassettes/v2/App-Deployment_818229931/Deploy-App-returns-Created-response_286585597/frozen.json @@ -0,0 +1 @@ +"2024-12-10T19:57:35.459Z" diff --git a/cassettes/v2/App-Deployment_818229931/Deploy-App-returns-Created-response_286585597/recording.har b/cassettes/v2/App-Deployment_818229931/Deploy-App-returns-Created-response_286585597/recording.har new file mode 100644 index 00000000000..03c46a4adce --- /dev/null +++ b/cassettes/v2/App-Deployment_818229931/Deploy-App-returns-Created-response_286585597/recording.har @@ -0,0 +1,153 @@ +{ + "log": { + "_recordingName": "App Deployment/Deploy App returns \"Created\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "c3f34ea78ba167210bdc50ceaaf2b68a", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 611, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 560, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"components\":[{\"events\":[],\"name\":\"grid0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"gridCell0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"calloutValue0\",\"properties\":{\"isVisible\":true,\"isDisabled\":false,\"isLoading\":false,\"label\":\"CPU Usage\",\"size\":\"sm\",\"style\":\"vivid_yellow\",\"unit\":\"kB\",\"value\":\"42\"},\"type\":\"calloutValue\"}],\"isVisible\":\"true\",\"layout\":{\"default\":{\"height\":8,\"width\":2,\"x\":0,\"y\":0}}},\"type\":\"gridCell\"}]},\"type\":\"grid\"}],\"description\":\"This is a simple example app\",\"embeddedQueries\":[],\"name\":\"Example App\",\"rootInstanceName\":\"grid0\"},\"type\":\"appDefinitions\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps" + }, + "response": { + "bodySize": 78, + "content": { + "mimeType": "application/vnd.api+json", + "size": 78, + "text": "{\"data\":{\"id\":\"f40f3df0-f9e5-46e9-87e4-aba789548b0b\",\"type\":\"appDefinitions\"}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 655, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-12-10T19:57:35.462Z", + "time": 159 + }, + { + "_id": "86871ecdde38e0b7041d2d2ea07c4d63", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 574, + "httpVersion": "HTTP/1.1", + "method": "POST", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps/f40f3df0-f9e5-46e9-87e4-aba789548b0b/deployment" + }, + "response": { + "bodySize": 304, + "content": { + "mimeType": "application/vnd.api+json", + "size": 304, + "text": "{\"data\":{\"id\":\"21151cad-2a7c-4b14-b151-ed45916e0ee2\",\"type\":\"deployment\",\"attributes\":{\"app_version_id\":\"d5f91141-ac8f-4da5-a27f-33f1c7f4042f\"},\"meta\":{\"created_at\":\"2024-12-10T19:57:35.83889Z\",\"user_id\":15479137,\"user_uuid\":\"b3f98453-b289-11ef-a4e9-d6d283f92d91\",\"user_name\":\"oliver.li@datadoghq.com\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 656, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-12-10T19:57:35.625Z", + "time": 171 + }, + { + "_id": "b19145099a4f13d9f10272e199e11643", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 546, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps/f40f3df0-f9e5-46e9-87e4-aba789548b0b" + }, + "response": { + "bodySize": 78, + "content": { + "mimeType": "application/vnd.api+json", + "size": 78, + "text": "{\"data\":{\"id\":\"f40f3df0-f9e5-46e9-87e4-aba789548b0b\",\"type\":\"appDefinitions\"}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 655, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-12-10T19:57:35.802Z", + "time": 177 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/App-Deployment_818229931/Deploy-App-returns-Not-Found-response_670810212/frozen.json b/cassettes/v2/App-Deployment_818229931/Deploy-App-returns-Not-Found-response_670810212/frozen.json new file mode 100644 index 00000000000..210258567a1 --- /dev/null +++ b/cassettes/v2/App-Deployment_818229931/Deploy-App-returns-Not-Found-response_670810212/frozen.json @@ -0,0 +1 @@ +"2024-12-10T19:57:35.984Z" diff --git a/cassettes/v2/App-Deployment_818229931/Deploy-App-returns-Not-Found-response_670810212/recording.har b/cassettes/v2/App-Deployment_818229931/Deploy-App-returns-Not-Found-response_670810212/recording.har new file mode 100644 index 00000000000..10dd29b1091 --- /dev/null +++ b/cassettes/v2/App-Deployment_818229931/Deploy-App-returns-Not-Found-response_670810212/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "App Deployment/Deploy App returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "f1645f2747cfdbde385431495fbebdc3", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 574, + "httpVersion": "HTTP/1.1", + "method": "POST", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps/7addb29b-f935-472c-ae79-d1963979a23e/deployment" + }, + "response": { + "bodySize": 39, + "content": { + "mimeType": "application/vnd.api+json", + "size": 39, + "text": "{\"errors\":[{\"detail\":\"app not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 655, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2024-12-10T19:57:35.987Z", + "time": 96 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/App-Deployment_818229931/Disable-App-returns-Bad-Request-response_1603315968/frozen.json b/cassettes/v2/App-Deployment_818229931/Disable-App-returns-Bad-Request-response_1603315968/frozen.json new file mode 100644 index 00000000000..389479fa8ca --- /dev/null +++ b/cassettes/v2/App-Deployment_818229931/Disable-App-returns-Bad-Request-response_1603315968/frozen.json @@ -0,0 +1 @@ +"2024-12-10T19:57:36.091Z" diff --git a/cassettes/v2/App-Deployment_818229931/Disable-App-returns-Bad-Request-response_1603315968/recording.har b/cassettes/v2/App-Deployment_818229931/Disable-App-returns-Bad-Request-response_1603315968/recording.har new file mode 100644 index 00000000000..9cdf79313df --- /dev/null +++ b/cassettes/v2/App-Deployment_818229931/Disable-App-returns-Bad-Request-response_1603315968/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "App Deployment/Disable App returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "156308ed63d00d29d497b834bd7e0a85", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 534, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps/invalid-uuid/deployment" + }, + "response": { + "bodySize": 79, + "content": { + "mimeType": "application/vnd.api+json", + "size": 79, + "text": "{\"errors\":[{\"detail\":\"invalid path parameter\",\"source\":{\"parameter\":\"appId\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 655, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2024-12-10T19:57:36.094Z", + "time": 78 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/App-Deployment_818229931/Disable-App-returns-Not-Found-response_2767718519/frozen.json b/cassettes/v2/App-Deployment_818229931/Disable-App-returns-Not-Found-response_2767718519/frozen.json new file mode 100644 index 00000000000..6264d396566 --- /dev/null +++ b/cassettes/v2/App-Deployment_818229931/Disable-App-returns-Not-Found-response_2767718519/frozen.json @@ -0,0 +1 @@ +"2024-12-10T19:57:36.179Z" diff --git a/cassettes/v2/App-Deployment_818229931/Disable-App-returns-Not-Found-response_2767718519/recording.har b/cassettes/v2/App-Deployment_818229931/Disable-App-returns-Not-Found-response_2767718519/recording.har new file mode 100644 index 00000000000..a52f217d8f7 --- /dev/null +++ b/cassettes/v2/App-Deployment_818229931/Disable-App-returns-Not-Found-response_2767718519/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "App Deployment/Disable App returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "f901af43faac48f46691ae2146c6bd82", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 558, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps/7addb29b-f935-472c-ae79-d1963979a23e/deployment" + }, + "response": { + "bodySize": 39, + "content": { + "mimeType": "application/vnd.api+json", + "size": 39, + "text": "{\"errors\":[{\"detail\":\"app not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 655, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2024-12-10T19:57:36.181Z", + "time": 96 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/App-Deployment_818229931/Disable-App-returns-OK-response_84091086/frozen.json b/cassettes/v2/App-Deployment_818229931/Disable-App-returns-OK-response_84091086/frozen.json new file mode 100644 index 00000000000..827b41e13b9 --- /dev/null +++ b/cassettes/v2/App-Deployment_818229931/Disable-App-returns-OK-response_84091086/frozen.json @@ -0,0 +1 @@ +"2024-12-10T19:57:36.281Z" diff --git a/cassettes/v2/App-Deployment_818229931/Disable-App-returns-OK-response_84091086/recording.har b/cassettes/v2/App-Deployment_818229931/Disable-App-returns-OK-response_84091086/recording.har new file mode 100644 index 00000000000..b6ce123c877 --- /dev/null +++ b/cassettes/v2/App-Deployment_818229931/Disable-App-returns-OK-response_84091086/recording.har @@ -0,0 +1,153 @@ +{ + "log": { + "_recordingName": "App Deployment/Disable App returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "c3f34ea78ba167210bdc50ceaaf2b68a", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 611, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 560, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"components\":[{\"events\":[],\"name\":\"grid0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"gridCell0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"calloutValue0\",\"properties\":{\"isVisible\":true,\"isDisabled\":false,\"isLoading\":false,\"label\":\"CPU Usage\",\"size\":\"sm\",\"style\":\"vivid_yellow\",\"unit\":\"kB\",\"value\":\"42\"},\"type\":\"calloutValue\"}],\"isVisible\":\"true\",\"layout\":{\"default\":{\"height\":8,\"width\":2,\"x\":0,\"y\":0}}},\"type\":\"gridCell\"}]},\"type\":\"grid\"}],\"description\":\"This is a simple example app\",\"embeddedQueries\":[],\"name\":\"Example App\",\"rootInstanceName\":\"grid0\"},\"type\":\"appDefinitions\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps" + }, + "response": { + "bodySize": 78, + "content": { + "mimeType": "application/vnd.api+json", + "size": 78, + "text": "{\"data\":{\"id\":\"10fe8156-fe6b-4dbd-b0b6-8dc08e072b1d\",\"type\":\"appDefinitions\"}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 655, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-12-10T19:57:36.283Z", + "time": 183 + }, + { + "_id": "3d8a3f549cda857307963d59da93a273", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 558, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps/10fe8156-fe6b-4dbd-b0b6-8dc08e072b1d/deployment" + }, + "response": { + "bodySize": 305, + "content": { + "mimeType": "application/vnd.api+json", + "size": 305, + "text": "{\"data\":{\"id\":\"1d3fc23b-d099-4646-b5bd-2c8e419f82aa\",\"type\":\"deployment\",\"attributes\":{\"app_version_id\":\"00000000-0000-0000-0000-000000000000\"},\"meta\":{\"created_at\":\"2024-12-10T19:57:36.674239Z\",\"user_id\":15479137,\"user_uuid\":\"b3f98453-b289-11ef-a4e9-d6d283f92d91\",\"user_name\":\"oliver.li@datadoghq.com\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 656, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-12-10T19:57:36.470Z", + "time": 137 + }, + { + "_id": "d25eccf922a57a30db706d117b3f811d", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 546, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps/10fe8156-fe6b-4dbd-b0b6-8dc08e072b1d" + }, + "response": { + "bodySize": 78, + "content": { + "mimeType": "application/vnd.api+json", + "size": 78, + "text": "{\"data\":{\"id\":\"10fe8156-fe6b-4dbd-b0b6-8dc08e072b1d\",\"type\":\"appDefinitions\"}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 655, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-12-10T19:57:36.612Z", + "time": 227 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Apps_1406737069/Create-App-returns-App-Created-response_2429108219/frozen.json b/cassettes/v2/Apps_1406737069/Create-App-returns-App-Created-response_2429108219/frozen.json new file mode 100644 index 00000000000..038060412cf --- /dev/null +++ b/cassettes/v2/Apps_1406737069/Create-App-returns-App-Created-response_2429108219/frozen.json @@ -0,0 +1 @@ +"2024-12-10T19:57:09.544Z" diff --git a/cassettes/v2/Apps_1406737069/Create-App-returns-App-Created-response_2429108219/recording.har b/cassettes/v2/Apps_1406737069/Create-App-returns-App-Created-response_2429108219/recording.har new file mode 100644 index 00000000000..bb33a4e9c5a --- /dev/null +++ b/cassettes/v2/Apps_1406737069/Create-App-returns-App-Created-response_2429108219/recording.har @@ -0,0 +1,110 @@ +{ + "log": { + "_recordingName": "Apps/Create App returns \"App Created\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "c3f34ea78ba167210bdc50ceaaf2b68a", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 611, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 560, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"components\":[{\"events\":[],\"name\":\"grid0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"gridCell0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"calloutValue0\",\"properties\":{\"isVisible\":true,\"isDisabled\":false,\"isLoading\":false,\"label\":\"CPU Usage\",\"size\":\"sm\",\"style\":\"vivid_yellow\",\"unit\":\"kB\",\"value\":\"42\"},\"type\":\"calloutValue\"}],\"isVisible\":\"true\",\"layout\":{\"default\":{\"height\":8,\"width\":2,\"x\":0,\"y\":0}}},\"type\":\"gridCell\"}]},\"type\":\"grid\"}],\"description\":\"This is a simple example app\",\"embeddedQueries\":[],\"name\":\"Example App\",\"rootInstanceName\":\"grid0\"},\"type\":\"appDefinitions\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps" + }, + "response": { + "bodySize": 78, + "content": { + "mimeType": "application/vnd.api+json", + "size": 78, + "text": "{\"data\":{\"id\":\"7189aab4-a57b-4709-95b2-e5d8dd9937df\",\"type\":\"appDefinitions\"}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 655, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-12-10T19:57:09.553Z", + "time": 235 + }, + { + "_id": "ed0507d30bf26ac19cd10eba8a4d2e2a", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 546, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps/7189aab4-a57b-4709-95b2-e5d8dd9937df" + }, + "response": { + "bodySize": 78, + "content": { + "mimeType": "application/vnd.api+json", + "size": 78, + "text": "{\"data\":{\"id\":\"7189aab4-a57b-4709-95b2-e5d8dd9937df\",\"type\":\"appDefinitions\"}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 655, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-12-10T19:57:09.796Z", + "time": 227 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Apps_1406737069/Create-App-returns-Bad-Request-response_2920792470/frozen.json b/cassettes/v2/Apps_1406737069/Create-App-returns-Bad-Request-response_2920792470/frozen.json new file mode 100644 index 00000000000..73f145af21a --- /dev/null +++ b/cassettes/v2/Apps_1406737069/Create-App-returns-Bad-Request-response_2920792470/frozen.json @@ -0,0 +1 @@ +"2024-12-10T19:57:10.031Z" diff --git a/cassettes/v2/Apps_1406737069/Create-App-returns-Bad-Request-response_2920792470/recording.har b/cassettes/v2/Apps_1406737069/Create-App-returns-Bad-Request-response_2920792470/recording.har new file mode 100644 index 00000000000..2318579ece5 --- /dev/null +++ b/cassettes/v2/Apps_1406737069/Create-App-returns-Bad-Request-response_2920792470/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Apps/Create App returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "cac8f72eb8c39caf9580ed4fa55c0d31", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 139, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 560, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"description\":\"This is a bad example app\",\"embeddedQueries\":[],\"rootInstanceName\":\"grid0\"},\"type\":\"appDefinitions\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps" + }, + "response": { + "bodySize": 93, + "content": { + "mimeType": "application/vnd.api+json", + "size": 93, + "text": "{\"errors\":[{\"detail\":\"missing required field\",\"source\":{\"pointer\":\"/data/attributes/name\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 656, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2024-12-10T19:57:10.034Z", + "time": 85 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Apps_1406737069/Delete-App-returns-Bad-Request-response_2830425951/frozen.json b/cassettes/v2/Apps_1406737069/Delete-App-returns-Bad-Request-response_2830425951/frozen.json new file mode 100644 index 00000000000..2352e167765 --- /dev/null +++ b/cassettes/v2/Apps_1406737069/Delete-App-returns-Bad-Request-response_2830425951/frozen.json @@ -0,0 +1 @@ +"2024-12-10T19:57:10.128Z" diff --git a/cassettes/v2/Apps_1406737069/Delete-App-returns-Bad-Request-response_2830425951/recording.har b/cassettes/v2/Apps_1406737069/Delete-App-returns-Bad-Request-response_2830425951/recording.har new file mode 100644 index 00000000000..c9dee3e52b8 --- /dev/null +++ b/cassettes/v2/Apps_1406737069/Delete-App-returns-Bad-Request-response_2830425951/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "Apps/Delete App returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "4b4fcb07c29e09ac25e16975c8d3c21b", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 520, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps/bad-app-id" + }, + "response": { + "bodySize": 79, + "content": { + "mimeType": "application/vnd.api+json", + "size": 79, + "text": "{\"errors\":[{\"detail\":\"invalid path parameter\",\"source\":{\"parameter\":\"appId\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 656, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2024-12-10T19:57:10.133Z", + "time": 84 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Apps_1406737069/Delete-App-returns-Not-Found-response_2437545272/frozen.json b/cassettes/v2/Apps_1406737069/Delete-App-returns-Not-Found-response_2437545272/frozen.json new file mode 100644 index 00000000000..9b35f99b57f --- /dev/null +++ b/cassettes/v2/Apps_1406737069/Delete-App-returns-Not-Found-response_2437545272/frozen.json @@ -0,0 +1 @@ +"2024-12-10T19:57:10.225Z" diff --git a/cassettes/v2/Apps_1406737069/Delete-App-returns-Not-Found-response_2437545272/recording.har b/cassettes/v2/Apps_1406737069/Delete-App-returns-Not-Found-response_2437545272/recording.har new file mode 100644 index 00000000000..06e72971a8a --- /dev/null +++ b/cassettes/v2/Apps_1406737069/Delete-App-returns-Not-Found-response_2437545272/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "Apps/Delete App returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "187e5a042d9b956c59c1b6b2f9fb3c52", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 546, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps/7addb29b-f935-472c-ae79-d1963979a23e" + }, + "response": { + "bodySize": 39, + "content": { + "mimeType": "application/vnd.api+json", + "size": 39, + "text": "{\"errors\":[{\"detail\":\"app not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 656, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2024-12-10T19:57:10.230Z", + "time": 93 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Apps_1406737069/Delete-App-returns-OK-response_3750909387/frozen.json b/cassettes/v2/Apps_1406737069/Delete-App-returns-OK-response_3750909387/frozen.json new file mode 100644 index 00000000000..5605ceac92a --- /dev/null +++ b/cassettes/v2/Apps_1406737069/Delete-App-returns-OK-response_3750909387/frozen.json @@ -0,0 +1 @@ +"2024-12-10T19:57:10.331Z" diff --git a/cassettes/v2/Apps_1406737069/Delete-App-returns-OK-response_3750909387/recording.har b/cassettes/v2/Apps_1406737069/Delete-App-returns-OK-response_3750909387/recording.har new file mode 100644 index 00000000000..36b7a1854c3 --- /dev/null +++ b/cassettes/v2/Apps_1406737069/Delete-App-returns-OK-response_3750909387/recording.har @@ -0,0 +1,153 @@ +{ + "log": { + "_recordingName": "Apps/Delete App returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "c3f34ea78ba167210bdc50ceaaf2b68a", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 611, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 560, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"components\":[{\"events\":[],\"name\":\"grid0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"gridCell0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"calloutValue0\",\"properties\":{\"isVisible\":true,\"isDisabled\":false,\"isLoading\":false,\"label\":\"CPU Usage\",\"size\":\"sm\",\"style\":\"vivid_yellow\",\"unit\":\"kB\",\"value\":\"42\"},\"type\":\"calloutValue\"}],\"isVisible\":\"true\",\"layout\":{\"default\":{\"height\":8,\"width\":2,\"x\":0,\"y\":0}}},\"type\":\"gridCell\"}]},\"type\":\"grid\"}],\"description\":\"This is a simple example app\",\"embeddedQueries\":[],\"name\":\"Example App\",\"rootInstanceName\":\"grid0\"},\"type\":\"appDefinitions\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps" + }, + "response": { + "bodySize": 78, + "content": { + "mimeType": "application/vnd.api+json", + "size": 78, + "text": "{\"data\":{\"id\":\"31966edc-cbbc-4f12-91c1-c179a1d6f7bd\",\"type\":\"appDefinitions\"}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 699, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-12-10T19:57:10.337Z", + "time": 198 + }, + { + "_id": "e15ed7ed96ceb2a5594091bb9560dc94", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 546, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps/31966edc-cbbc-4f12-91c1-c179a1d6f7bd" + }, + "response": { + "bodySize": 78, + "content": { + "mimeType": "application/vnd.api+json", + "size": 78, + "text": "{\"data\":{\"id\":\"31966edc-cbbc-4f12-91c1-c179a1d6f7bd\",\"type\":\"appDefinitions\"}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 656, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-12-10T19:57:10.543Z", + "time": 177 + }, + { + "_id": "e15ed7ed96ceb2a5594091bb9560dc94", + "_order": 1, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 546, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps/31966edc-cbbc-4f12-91c1-c179a1d6f7bd" + }, + "response": { + "bodySize": 39, + "content": { + "mimeType": "application/vnd.api+json", + "size": 39, + "text": "{\"errors\":[{\"detail\":\"app not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 656, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2024-12-10T19:57:10.728Z", + "time": 106 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Apps_1406737069/Delete-Multiple-Apps-returns-Bad-Request-response_199784758/frozen.json b/cassettes/v2/Apps_1406737069/Delete-Multiple-Apps-returns-Bad-Request-response_199784758/frozen.json new file mode 100644 index 00000000000..8f2e44f4d15 --- /dev/null +++ b/cassettes/v2/Apps_1406737069/Delete-Multiple-Apps-returns-Bad-Request-response_199784758/frozen.json @@ -0,0 +1 @@ +"2024-12-10T19:57:10.845Z" diff --git a/cassettes/v2/Apps_1406737069/Delete-Multiple-Apps-returns-Bad-Request-response_199784758/recording.har b/cassettes/v2/Apps_1406737069/Delete-Multiple-Apps-returns-Bad-Request-response_199784758/recording.har new file mode 100644 index 00000000000..6461edd014a --- /dev/null +++ b/cassettes/v2/Apps_1406737069/Delete-Multiple-Apps-returns-Bad-Request-response_199784758/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Apps/Delete Multiple Apps returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "22a58f2f29df4405aa099552c247b75e", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 219, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 563, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":[{\"id\":\"71c0d358-eac5-41e3-892d-a7467571b9b\",\"type\":\"appDefinitions\"},{\"id\":\"71c0d358-eac5-41e3-892d-a7467571b9b0\",\"type\":\"appDefinitions\"},{\"id\":\"98e7e44d-1562-474a-90f7-3a94e739c006\",\"type\":\"appDefinitions\"}]}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps" + }, + "response": { + "bodySize": 86, + "content": { + "mimeType": "application/vnd.api+json", + "size": 86, + "text": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"invalid UUID length: 35\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 655, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2024-12-10T19:57:10.850Z", + "time": 86 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Apps_1406737069/Delete-Multiple-Apps-returns-Not-Found-response_899304157/frozen.json b/cassettes/v2/Apps_1406737069/Delete-Multiple-Apps-returns-Not-Found-response_899304157/frozen.json new file mode 100644 index 00000000000..7bac8f549f9 --- /dev/null +++ b/cassettes/v2/Apps_1406737069/Delete-Multiple-Apps-returns-Not-Found-response_899304157/frozen.json @@ -0,0 +1 @@ +"2024-12-10T19:57:10.942Z" diff --git a/cassettes/v2/Apps_1406737069/Delete-Multiple-Apps-returns-Not-Found-response_899304157/recording.har b/cassettes/v2/Apps_1406737069/Delete-Multiple-Apps-returns-Not-Found-response_899304157/recording.har new file mode 100644 index 00000000000..110478ce6e1 --- /dev/null +++ b/cassettes/v2/Apps_1406737069/Delete-Multiple-Apps-returns-Not-Found-response_899304157/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Apps/Delete Multiple Apps returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "0fabf727bf419ea03100d209acd7f2c0", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 220, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 563, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":[{\"id\":\"29494ddd-ac13-46a7-8558-b05b050ee755\",\"type\":\"appDefinitions\"},{\"id\":\"71c0d358-eac5-41e3-892d-a7467571b9b0\",\"type\":\"appDefinitions\"},{\"id\":\"98e7e44d-1562-474a-90f7-3a94e739c006\",\"type\":\"appDefinitions\"}]}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps" + }, + "response": { + "bodySize": 52, + "content": { + "mimeType": "application/vnd.api+json", + "size": 52, + "text": "{\"errors\":[{\"detail\":\"one or more apps not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 655, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2024-12-10T19:57:10.943Z", + "time": 92 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Apps_1406737069/Delete-Multiple-Apps-returns-OK-response_1924539132/frozen.json b/cassettes/v2/Apps_1406737069/Delete-Multiple-Apps-returns-OK-response_1924539132/frozen.json new file mode 100644 index 00000000000..f111aafe43a --- /dev/null +++ b/cassettes/v2/Apps_1406737069/Delete-Multiple-Apps-returns-OK-response_1924539132/frozen.json @@ -0,0 +1 @@ +"2024-12-10T19:57:11.041Z" diff --git a/cassettes/v2/Apps_1406737069/Delete-Multiple-Apps-returns-OK-response_1924539132/recording.har b/cassettes/v2/Apps_1406737069/Delete-Multiple-Apps-returns-OK-response_1924539132/recording.har new file mode 100644 index 00000000000..c82e00b3d05 --- /dev/null +++ b/cassettes/v2/Apps_1406737069/Delete-Multiple-Apps-returns-OK-response_1924539132/recording.har @@ -0,0 +1,163 @@ +{ + "log": { + "_recordingName": "Apps/Delete Multiple Apps returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "c3f34ea78ba167210bdc50ceaaf2b68a", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 611, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 560, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"components\":[{\"events\":[],\"name\":\"grid0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"gridCell0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"calloutValue0\",\"properties\":{\"isVisible\":true,\"isDisabled\":false,\"isLoading\":false,\"label\":\"CPU Usage\",\"size\":\"sm\",\"style\":\"vivid_yellow\",\"unit\":\"kB\",\"value\":\"42\"},\"type\":\"calloutValue\"}],\"isVisible\":\"true\",\"layout\":{\"default\":{\"height\":8,\"width\":2,\"x\":0,\"y\":0}}},\"type\":\"gridCell\"}]},\"type\":\"grid\"}],\"description\":\"This is a simple example app\",\"embeddedQueries\":[],\"name\":\"Example App\",\"rootInstanceName\":\"grid0\"},\"type\":\"appDefinitions\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps" + }, + "response": { + "bodySize": 78, + "content": { + "mimeType": "application/vnd.api+json", + "size": 78, + "text": "{\"data\":{\"id\":\"c582f723-26c4-4b98-9a4e-cb14e756450e\",\"type\":\"appDefinitions\"}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 655, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-12-10T19:57:11.043Z", + "time": 194 + }, + { + "_id": "c6edc5eeb2e03c4e561df93bfdd74d3a", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 80, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 562, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":[{\"id\":\"c582f723-26c4-4b98-9a4e-cb14e756450e\",\"type\":\"appDefinitions\"}]}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps" + }, + "response": { + "bodySize": 80, + "content": { + "mimeType": "application/vnd.api+json", + "size": 80, + "text": "{\"data\":[{\"id\":\"c582f723-26c4-4b98-9a4e-cb14e756450e\",\"type\":\"appDefinitions\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 655, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-12-10T19:57:11.245Z", + "time": 155 + }, + { + "_id": "4b34318610c7a77967090db63f6a4957", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 546, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps/c582f723-26c4-4b98-9a4e-cb14e756450e" + }, + "response": { + "bodySize": 39, + "content": { + "mimeType": "application/vnd.api+json", + "size": 39, + "text": "{\"errors\":[{\"detail\":\"app not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 655, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2024-12-10T19:57:11.407Z", + "time": 103 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Apps_1406737069/Get-App-returns-Bad-Request-response_214408132/frozen.json b/cassettes/v2/Apps_1406737069/Get-App-returns-Bad-Request-response_214408132/frozen.json new file mode 100644 index 00000000000..10c9ca40062 --- /dev/null +++ b/cassettes/v2/Apps_1406737069/Get-App-returns-Bad-Request-response_214408132/frozen.json @@ -0,0 +1 @@ +"2024-12-10T19:57:11.519Z" diff --git a/cassettes/v2/Apps_1406737069/Get-App-returns-Bad-Request-response_214408132/recording.har b/cassettes/v2/Apps_1406737069/Get-App-returns-Bad-Request-response_214408132/recording.har new file mode 100644 index 00000000000..1343e5ea4ba --- /dev/null +++ b/cassettes/v2/Apps_1406737069/Get-App-returns-Bad-Request-response_214408132/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "Apps/Get App returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "ef15c1f31252a5d9ec2f095e6f2bde02", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 516, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps/invalid-uuid" + }, + "response": { + "bodySize": 79, + "content": { + "mimeType": "application/vnd.api+json", + "size": 79, + "text": "{\"errors\":[{\"detail\":\"invalid path parameter\",\"source\":{\"parameter\":\"appId\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 655, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2024-12-10T19:57:11.521Z", + "time": 81 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Apps_1406737069/Get-App-returns-Not-Found-response_396337923/frozen.json b/cassettes/v2/Apps_1406737069/Get-App-returns-Not-Found-response_396337923/frozen.json new file mode 100644 index 00000000000..4b13b2d2c22 --- /dev/null +++ b/cassettes/v2/Apps_1406737069/Get-App-returns-Not-Found-response_396337923/frozen.json @@ -0,0 +1 @@ +"2024-12-10T19:57:11.612Z" diff --git a/cassettes/v2/Apps_1406737069/Get-App-returns-Not-Found-response_396337923/recording.har b/cassettes/v2/Apps_1406737069/Get-App-returns-Not-Found-response_396337923/recording.har new file mode 100644 index 00000000000..0d881932268 --- /dev/null +++ b/cassettes/v2/Apps_1406737069/Get-App-returns-Not-Found-response_396337923/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "Apps/Get App returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "2e08c033541bad06579e937d6c01b0fb", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 540, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps/7addb29b-f935-472c-ae79-d1963979a23e" + }, + "response": { + "bodySize": 39, + "content": { + "mimeType": "application/vnd.api+json", + "size": 39, + "text": "{\"errors\":[{\"detail\":\"app not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 655, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2024-12-10T19:57:11.615Z", + "time": 121 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Apps_1406737069/Get-App-returns-OK-response_2570582586/frozen.json b/cassettes/v2/Apps_1406737069/Get-App-returns-OK-response_2570582586/frozen.json new file mode 100644 index 00000000000..d16310c1a48 --- /dev/null +++ b/cassettes/v2/Apps_1406737069/Get-App-returns-OK-response_2570582586/frozen.json @@ -0,0 +1 @@ +"2024-12-10T19:57:11.740Z" diff --git a/cassettes/v2/Apps_1406737069/Get-App-returns-OK-response_2570582586/recording.har b/cassettes/v2/Apps_1406737069/Get-App-returns-OK-response_2570582586/recording.har new file mode 100644 index 00000000000..2b74b006253 --- /dev/null +++ b/cassettes/v2/Apps_1406737069/Get-App-returns-OK-response_2570582586/recording.har @@ -0,0 +1,153 @@ +{ + "log": { + "_recordingName": "Apps/Get App returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "c3f34ea78ba167210bdc50ceaaf2b68a", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 611, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 560, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"components\":[{\"events\":[],\"name\":\"grid0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"gridCell0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"calloutValue0\",\"properties\":{\"isVisible\":true,\"isDisabled\":false,\"isLoading\":false,\"label\":\"CPU Usage\",\"size\":\"sm\",\"style\":\"vivid_yellow\",\"unit\":\"kB\",\"value\":\"42\"},\"type\":\"calloutValue\"}],\"isVisible\":\"true\",\"layout\":{\"default\":{\"height\":8,\"width\":2,\"x\":0,\"y\":0}}},\"type\":\"gridCell\"}]},\"type\":\"grid\"}],\"description\":\"This is a simple example app\",\"embeddedQueries\":[],\"name\":\"Example App\",\"rootInstanceName\":\"grid0\"},\"type\":\"appDefinitions\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps" + }, + "response": { + "bodySize": 78, + "content": { + "mimeType": "application/vnd.api+json", + "size": 78, + "text": "{\"data\":{\"id\":\"810bb071-15a9-40bd-a7ff-d3811f171610\",\"type\":\"appDefinitions\"}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 655, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-12-10T19:57:11.742Z", + "time": 162 + }, + { + "_id": "b256014be89aa7ae897117cdce45336b", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 540, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps/810bb071-15a9-40bd-a7ff-d3811f171610" + }, + "response": { + "bodySize": 999, + "content": { + "mimeType": "application/vnd.api+json", + "size": 999, + "text": "{\"data\":{\"id\":\"810bb071-15a9-40bd-a7ff-d3811f171610\",\"type\":\"appDefinitions\",\"attributes\":{\"components\":[{\"events\":[],\"name\":\"grid0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"gridCell0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"calloutValue0\",\"properties\":{\"isDisabled\":false,\"isLoading\":false,\"isVisible\":true,\"label\":\"CPU Usage\",\"size\":\"sm\",\"style\":\"vivid_yellow\",\"unit\":\"kB\",\"value\":\"42\"},\"type\":\"calloutValue\"}],\"isVisible\":\"true\",\"layout\":{\"default\":{\"height\":8,\"width\":2,\"x\":0,\"y\":0}}},\"type\":\"gridCell\"}]},\"type\":\"grid\"}],\"description\":\"This is a simple example app\",\"embeddedQueries\":[],\"favorite\":false,\"name\":\"Example App\",\"rootInstanceName\":\"grid0\",\"selfService\":false,\"tags\":[]},\"meta\":{\"org_id\":1107852,\"user_id\":15479137,\"user_uuid\":\"b3f98453-b289-11ef-a4e9-d6d283f92d91\",\"user_name\":\"oliver.li@datadoghq.com\",\"version\":1,\"updated_since_deployment\":false,\"created_at\":\"2024-12-10T19:57:11.9304Z\",\"updated_at\":\"2024-12-10T19:57:11.9304Z\",\"deleted_at\":\"0001-01-01T00:00:00Z\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 656, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-12-10T19:57:11.911Z", + "time": 110 + }, + { + "_id": "8af7803a17b6bd5c2f20a1239355c1c2", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 546, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps/810bb071-15a9-40bd-a7ff-d3811f171610" + }, + "response": { + "bodySize": 78, + "content": { + "mimeType": "application/vnd.api+json", + "size": 78, + "text": "{\"data\":{\"id\":\"810bb071-15a9-40bd-a7ff-d3811f171610\",\"type\":\"appDefinitions\"}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 655, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-12-10T19:57:12.025Z", + "time": 198 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Apps_1406737069/List-Apps-returns-OK-response_4277086665/frozen.json b/cassettes/v2/Apps_1406737069/List-Apps-returns-OK-response_4277086665/frozen.json new file mode 100644 index 00000000000..fc671cf829c --- /dev/null +++ b/cassettes/v2/Apps_1406737069/List-Apps-returns-OK-response_4277086665/frozen.json @@ -0,0 +1 @@ +"2024-12-10T19:57:12.227Z" diff --git a/cassettes/v2/Apps_1406737069/List-Apps-returns-OK-response_4277086665/recording.har b/cassettes/v2/Apps_1406737069/List-Apps-returns-OK-response_4277086665/recording.har new file mode 100644 index 00000000000..2a4a2b4f434 --- /dev/null +++ b/cassettes/v2/Apps_1406737069/List-Apps-returns-OK-response_4277086665/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "Apps/List Apps returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "03250b681e4bbec25882f5bb53adc3e3", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 505, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps" + }, + "response": { + "bodySize": 558, + "content": { + "mimeType": "application/vnd.api+json", + "size": 558, + "text": "{\"data\":[{\"id\":\"d595693a-473d-4671-9da3-fce89e3a5c5d\",\"type\":\"appDefinitions\",\"attributes\":{\"description\":\"\",\"favorite\":false,\"name\":\"Max's App Fri, Jul 12, 11:10:35 am\",\"selfService\":false,\"tags\":[]},\"meta\":{\"org_id\":1107852,\"user_id\":7571362,\"user_uuid\":\"3114f3a0-3fc9-11ef-acbe-a6def6551924\",\"user_name\":\"max.gale@datadoghq.com\",\"version\":0,\"updated_since_deployment\":false,\"created_at\":\"2024-07-12T15:10:48.690305Z\",\"updated_at\":\"2024-07-12T15:10:48.690305Z\",\"deleted_at\":\"0001-01-01T00:00:00Z\"}}],\"meta\":{\"page\":{\"totalCount\":1,\"totalFilteredCount\":1}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 656, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-12-10T19:57:12.228Z", + "time": 114 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Apps_1406737069/Update-App-returns-Bad-Request-response_1790264197/frozen.json b/cassettes/v2/Apps_1406737069/Update-App-returns-Bad-Request-response_1790264197/frozen.json new file mode 100644 index 00000000000..c1ffcf1618d --- /dev/null +++ b/cassettes/v2/Apps_1406737069/Update-App-returns-Bad-Request-response_1790264197/frozen.json @@ -0,0 +1 @@ +"2024-12-10T19:57:12.347Z" diff --git a/cassettes/v2/Apps_1406737069/Update-App-returns-Bad-Request-response_1790264197/recording.har b/cassettes/v2/Apps_1406737069/Update-App-returns-Bad-Request-response_1790264197/recording.har new file mode 100644 index 00000000000..08c3a8ab853 --- /dev/null +++ b/cassettes/v2/Apps_1406737069/Update-App-returns-Bad-Request-response_1790264197/recording.har @@ -0,0 +1,163 @@ +{ + "log": { + "_recordingName": "Apps/Update App returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "c3f34ea78ba167210bdc50ceaaf2b68a", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 611, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 560, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"components\":[{\"events\":[],\"name\":\"grid0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"gridCell0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"calloutValue0\",\"properties\":{\"isVisible\":true,\"isDisabled\":false,\"isLoading\":false,\"label\":\"CPU Usage\",\"size\":\"sm\",\"style\":\"vivid_yellow\",\"unit\":\"kB\",\"value\":\"42\"},\"type\":\"calloutValue\"}],\"isVisible\":\"true\",\"layout\":{\"default\":{\"height\":8,\"width\":2,\"x\":0,\"y\":0}}},\"type\":\"gridCell\"}]},\"type\":\"grid\"}],\"description\":\"This is a simple example app\",\"embeddedQueries\":[],\"name\":\"Example App\",\"rootInstanceName\":\"grid0\"},\"type\":\"appDefinitions\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps" + }, + "response": { + "bodySize": 78, + "content": { + "mimeType": "application/vnd.api+json", + "size": 78, + "text": "{\"data\":{\"id\":\"cbff0c31-56b6-48f7-9c4f-5a96a2358d6c\",\"type\":\"appDefinitions\"}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 655, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-12-10T19:57:12.349Z", + "time": 182 + }, + { + "_id": "2bb4335d50d138bbc96a9b767db9797f", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 115, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 598, + "httpVersion": "HTTP/1.1", + "method": "PATCH", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"rootInstanceName\":\"\"},\"id\":\"cbff0c31-56b6-48f7-9c4f-5a96a2358d6c\",\"type\":\"appDefinitions\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps/cbff0c31-56b6-48f7-9c4f-5a96a2358d6c" + }, + "response": { + "bodySize": 105, + "content": { + "mimeType": "application/vnd.api+json", + "size": 105, + "text": "{\"errors\":[{\"detail\":\"missing required field\",\"source\":{\"pointer\":\"/data/attributes/rootInstanceName\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 656, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2024-12-10T19:57:12.534Z", + "time": 106 + }, + { + "_id": "627e52da584ebc934bc198d28c7f5882", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 546, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps/cbff0c31-56b6-48f7-9c4f-5a96a2358d6c" + }, + "response": { + "bodySize": 78, + "content": { + "mimeType": "application/vnd.api+json", + "size": 78, + "text": "{\"data\":{\"id\":\"cbff0c31-56b6-48f7-9c4f-5a96a2358d6c\",\"type\":\"appDefinitions\"}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 655, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-12-10T19:57:12.645Z", + "time": 174 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Apps_1406737069/Update-App-returns-OK-response_1935745305/frozen.json b/cassettes/v2/Apps_1406737069/Update-App-returns-OK-response_1935745305/frozen.json new file mode 100644 index 00000000000..2990be93a94 --- /dev/null +++ b/cassettes/v2/Apps_1406737069/Update-App-returns-OK-response_1935745305/frozen.json @@ -0,0 +1 @@ +"2024-12-10T19:57:12.823Z" diff --git a/cassettes/v2/Apps_1406737069/Update-App-returns-OK-response_1935745305/recording.har b/cassettes/v2/Apps_1406737069/Update-App-returns-OK-response_1935745305/recording.har new file mode 100644 index 00000000000..e419bd6cbd6 --- /dev/null +++ b/cassettes/v2/Apps_1406737069/Update-App-returns-OK-response_1935745305/recording.har @@ -0,0 +1,163 @@ +{ + "log": { + "_recordingName": "Apps/Update App returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "c3f34ea78ba167210bdc50ceaaf2b68a", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 611, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 560, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"components\":[{\"events\":[],\"name\":\"grid0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"gridCell0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"calloutValue0\",\"properties\":{\"isVisible\":true,\"isDisabled\":false,\"isLoading\":false,\"label\":\"CPU Usage\",\"size\":\"sm\",\"style\":\"vivid_yellow\",\"unit\":\"kB\",\"value\":\"42\"},\"type\":\"calloutValue\"}],\"isVisible\":\"true\",\"layout\":{\"default\":{\"height\":8,\"width\":2,\"x\":0,\"y\":0}}},\"type\":\"gridCell\"}]},\"type\":\"grid\"}],\"description\":\"This is a simple example app\",\"embeddedQueries\":[],\"name\":\"Example App\",\"rootInstanceName\":\"grid0\"},\"type\":\"appDefinitions\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps" + }, + "response": { + "bodySize": 78, + "content": { + "mimeType": "application/vnd.api+json", + "size": 78, + "text": "{\"data\":{\"id\":\"291d8084-0383-4e59-b17c-ef0c0d7e6532\",\"type\":\"appDefinitions\"}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 655, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-12-10T19:57:12.825Z", + "time": 169 + }, + { + "_id": "7dd98b61d2725f2573f672c49eca619e", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 142, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 598, + "httpVersion": "HTTP/1.1", + "method": "PATCH", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"name\":\"Updated Name\",\"rootInstanceName\":\"grid0\"},\"id\":\"291d8084-0383-4e59-b17c-ef0c0d7e6532\",\"type\":\"appDefinitions\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps/291d8084-0383-4e59-b17c-ef0c0d7e6532" + }, + "response": { + "bodySize": 1004, + "content": { + "mimeType": "application/vnd.api+json", + "size": 1004, + "text": "{\"data\":{\"id\":\"291d8084-0383-4e59-b17c-ef0c0d7e6532\",\"type\":\"appDefinitions\",\"attributes\":{\"components\":[{\"events\":[],\"name\":\"grid0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"gridCell0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"calloutValue0\",\"properties\":{\"isDisabled\":false,\"isLoading\":false,\"isVisible\":true,\"label\":\"CPU Usage\",\"size\":\"sm\",\"style\":\"vivid_yellow\",\"unit\":\"kB\",\"value\":\"42\"},\"type\":\"calloutValue\"}],\"isVisible\":\"true\",\"layout\":{\"default\":{\"height\":8,\"width\":2,\"x\":0,\"y\":0}}},\"type\":\"gridCell\"}]},\"type\":\"grid\"}],\"description\":\"This is a simple example app\",\"embeddedQueries\":[],\"favorite\":false,\"name\":\"Updated Name\",\"rootInstanceName\":\"grid0\",\"selfService\":false,\"tags\":[]},\"meta\":{\"org_id\":1107852,\"user_id\":15479137,\"user_uuid\":\"b3f98453-b289-11ef-a4e9-d6d283f92d91\",\"user_name\":\"oliver.li@datadoghq.com\",\"version\":2,\"updated_since_deployment\":false,\"created_at\":\"2024-12-10T19:57:13.001527Z\",\"updated_at\":\"2024-12-10T19:57:13.188796Z\",\"deleted_at\":\"0001-01-01T00:00:00Z\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 657, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-12-10T19:57:12.998Z", + "time": 151 + }, + { + "_id": "ec28bb0b1fe81f8a97db05d4e82aa5bf", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 546, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/app-builder/apps/291d8084-0383-4e59-b17c-ef0c0d7e6532" + }, + "response": { + "bodySize": 78, + "content": { + "mimeType": "application/vnd.api+json", + "size": 78, + "text": "{\"data\":{\"id\":\"291d8084-0383-4e59-b17c-ef0c0d7e6532\",\"type\":\"appDefinitions\"}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 655, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-12-10T19:57:13.158Z", + "time": 192 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/examples/v2/app-deployment/DeployApp.ts b/examples/v2/app-deployment/DeployApp.ts new file mode 100644 index 00000000000..b1af4829456 --- /dev/null +++ b/examples/v2/app-deployment/DeployApp.ts @@ -0,0 +1,25 @@ +/** + * Deploy App returns "Created" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.deployApp"] = true; +const apiInstance = new v2.AppDeploymentApi(configuration); + +// there is a valid "app" in the system +const APP_DATA_ID = process.env.APP_DATA_ID as string; + +const params: v2.AppDeploymentApiDeployAppRequest = { + appId: APP_DATA_ID, +}; + +apiInstance + .deployApp(params) + .then((data: v2.DeployAppResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/app-deployment/DisableApp.ts b/examples/v2/app-deployment/DisableApp.ts new file mode 100644 index 00000000000..e472e533fd6 --- /dev/null +++ b/examples/v2/app-deployment/DisableApp.ts @@ -0,0 +1,25 @@ +/** + * Disable App returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.disableApp"] = true; +const apiInstance = new v2.AppDeploymentApi(configuration); + +// there is a valid "app" in the system +const APP_DATA_ID = process.env.APP_DATA_ID as string; + +const params: v2.AppDeploymentApiDisableAppRequest = { + appId: APP_DATA_ID, +}; + +apiInstance + .disableApp(params) + .then((data: v2.DisableAppResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/apps/CreateApp.ts b/examples/v2/apps/CreateApp.ts new file mode 100644 index 00000000000..8419762c943 --- /dev/null +++ b/examples/v2/apps/CreateApp.ts @@ -0,0 +1,61 @@ +/** + * Create App returns "App Created" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.createApp"] = true; +const apiInstance = new v2.AppsApi(configuration); + +const params: v2.AppsApiCreateAppRequest = { + body: { + data: { + attributes: { + components: [ + { + events: [], + name: "grid0", + properties: { + children: [ + { + events: [], + name: "gridCell0", + properties: { + children: [ + { + events: [], + name: "calloutValue0", + properties: { + isVisible: true, + }, + type: "calloutValue", + }, + ], + isVisible: "true", + }, + type: "gridCell", + }, + ], + }, + type: "grid", + }, + ], + description: "This is a simple example app", + embeddedQueries: [], + name: "Example App", + rootInstanceName: "grid0", + }, + type: "appDefinitions", + }, + }, +}; + +apiInstance + .createApp(params) + .then((data: v2.CreateAppResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/apps/DeleteApp.ts b/examples/v2/apps/DeleteApp.ts new file mode 100644 index 00000000000..2370f191103 --- /dev/null +++ b/examples/v2/apps/DeleteApp.ts @@ -0,0 +1,25 @@ +/** + * Delete App returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.deleteApp"] = true; +const apiInstance = new v2.AppsApi(configuration); + +// there is a valid "app" in the system +const APP_DATA_ID = process.env.APP_DATA_ID as string; + +const params: v2.AppsApiDeleteAppRequest = { + appId: APP_DATA_ID, +}; + +apiInstance + .deleteApp(params) + .then((data: v2.DeleteAppResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/apps/DeleteApps.ts b/examples/v2/apps/DeleteApps.ts new file mode 100644 index 00000000000..2961afd5138 --- /dev/null +++ b/examples/v2/apps/DeleteApps.ts @@ -0,0 +1,32 @@ +/** + * Delete Multiple Apps returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.deleteApps"] = true; +const apiInstance = new v2.AppsApi(configuration); + +// there is a valid "app" in the system +const APP_DATA_ID = process.env.APP_DATA_ID as string; + +const params: v2.AppsApiDeleteAppsRequest = { + body: { + data: [ + { + id: APP_DATA_ID, + type: "appDefinitions", + }, + ], + }, +}; + +apiInstance + .deleteApps(params) + .then((data: v2.DeleteAppsResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/apps/GetApp.ts b/examples/v2/apps/GetApp.ts new file mode 100644 index 00000000000..7c94acb2602 --- /dev/null +++ b/examples/v2/apps/GetApp.ts @@ -0,0 +1,25 @@ +/** + * Get App returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.getApp"] = true; +const apiInstance = new v2.AppsApi(configuration); + +// there is a valid "app" in the system +const APP_DATA_ID = process.env.APP_DATA_ID as string; + +const params: v2.AppsApiGetAppRequest = { + appId: APP_DATA_ID, +}; + +apiInstance + .getApp(params) + .then((data: v2.GetAppResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/apps/ListApps.ts b/examples/v2/apps/ListApps.ts new file mode 100644 index 00000000000..49026eba6f2 --- /dev/null +++ b/examples/v2/apps/ListApps.ts @@ -0,0 +1,18 @@ +/** + * List Apps returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.listApps"] = true; +const apiInstance = new v2.AppsApi(configuration); + +apiInstance + .listApps() + .then((data: v2.ListAppsResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/apps/UpdateApp.ts b/examples/v2/apps/UpdateApp.ts new file mode 100644 index 00000000000..ec6521e2568 --- /dev/null +++ b/examples/v2/apps/UpdateApp.ts @@ -0,0 +1,35 @@ +/** + * Update App returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.updateApp"] = true; +const apiInstance = new v2.AppsApi(configuration); + +// there is a valid "app" in the system +const APP_DATA_ID = process.env.APP_DATA_ID as string; + +const params: v2.AppsApiUpdateAppRequest = { + body: { + data: { + attributes: { + name: "Updated Name", + rootInstanceName: "grid0", + }, + id: APP_DATA_ID, + type: "appDefinitions", + }, + }, + appId: APP_DATA_ID, +}; + +apiInstance + .updateApp(params) + .then((data: v2.UpdateAppResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/features/support/scenarios_model_mapping.ts b/features/support/scenarios_model_mapping.ts index 1696baf5a4e..78138a34a96 100644 --- a/features/support/scenarios_model_mapping.ts +++ b/features/support/scenarios_model_mapping.ts @@ -2636,6 +2636,102 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "RetentionFilterResponse", }, + "v2.DeleteApps": { + "body": { + "type": "DeleteAppsRequest", + "format": "", + }, + "operationResponseType": "DeleteAppsResponse", + }, + "v2.ListApps": { + "limit": { + "type": "number", + "format": "int64", + }, + "page": { + "type": "number", + "format": "int64", + }, + "filterUserName": { + "type": "string", + "format": "", + }, + "filterUserUuid": { + "type": "string", + "format": "", + }, + "filterName": { + "type": "string", + "format": "", + }, + "filterQuery": { + "type": "string", + "format": "", + }, + "filterDeployed": { + "type": "boolean", + "format": "", + }, + "filterTags": { + "type": "string", + "format": "", + }, + "filterFavorite": { + "type": "boolean", + "format": "", + }, + "sort": { + "type": "Array", + "format": "", + }, + "operationResponseType": "ListAppsResponse", + }, + "v2.CreateApp": { + "body": { + "type": "CreateAppRequest", + "format": "", + }, + "operationResponseType": "CreateAppResponse", + }, + "v2.DeleteApp": { + "appId": { + "type": "string", + "format": "", + }, + "operationResponseType": "DeleteAppResponse", + }, + "v2.GetApp": { + "appId": { + "type": "string", + "format": "", + }, + "operationResponseType": "GetAppResponse", + }, + "v2.UpdateApp": { + "appId": { + "type": "string", + "format": "", + }, + "body": { + "type": "UpdateAppRequest", + "format": "", + }, + "operationResponseType": "UpdateAppResponse", + }, + "v2.DisableApp": { + "appId": { + "type": "string", + "format": "", + }, + "operationResponseType": "DisableAppResponse", + }, + "v2.DeployApp": { + "appId": { + "type": "string", + "format": "", + }, + "operationResponseType": "DeployAppResponse", + }, "v2.ListAuditLogs": { "filterQuery": { "type": "string", diff --git a/features/v2/app_deployment.feature b/features/v2/app_deployment.feature new file mode 100644 index 00000000000..f1d48699205 --- /dev/null +++ b/features/v2/app_deployment.feature @@ -0,0 +1,58 @@ +@endpoint(app-deployment) @endpoint(app-deployment-v2) +Feature: App Deployment + Deploy and disable apps in App Builder. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "AppDeployment" API + + @team:DataDog/app-builder-backend + Scenario: Deploy App returns "Bad Request" response + Given operation "DeployApp" enabled + And new "DeployApp" request + And request contains "app_id" parameter with value "invalid-uuid" + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/app-builder-backend + Scenario: Deploy App returns "Created" response + Given operation "DeployApp" enabled + And new "DeployApp" request + And there is a valid "app" in the system + And request contains "app_id" parameter from "app.data.id" + When the request is sent + Then the response status is 201 Created + + @team:DataDog/app-builder-backend + Scenario: Deploy App returns "Not Found" response + Given operation "DeployApp" enabled + And new "DeployApp" request + And request contains "app_id" parameter with value "7addb29b-f935-472c-ae79-d1963979a23e" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/app-builder-backend + Scenario: Disable App returns "Bad Request" response + Given operation "DisableApp" enabled + And new "DisableApp" request + And request contains "app_id" parameter with value "invalid-uuid" + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/app-builder-backend + Scenario: Disable App returns "Not Found" response + Given operation "DisableApp" enabled + And new "DisableApp" request + And request contains "app_id" parameter with value "7addb29b-f935-472c-ae79-d1963979a23e" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/app-builder-backend + Scenario: Disable App returns "OK" response + Given operation "DisableApp" enabled + And new "DisableApp" request + And there is a valid "app" in the system + And request contains "app_id" parameter from "app.data.id" + When the request is sent + Then the response status is 200 OK diff --git a/features/v2/apps.feature b/features/v2/apps.feature new file mode 100644 index 00000000000..b306b995912 --- /dev/null +++ b/features/v2/apps.feature @@ -0,0 +1,155 @@ +@endpoint(apps) @endpoint(apps-v2) +Feature: Apps + Create, read, update, and delete apps in App Builder. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "Apps" API + + @team:DataDog/app-builder-backend + Scenario: Create App returns "App Created" response + Given operation "CreateApp" enabled + And new "CreateApp" request + And body with value {"data": {"attributes": {"components": [{"events": [], "name": "grid0", "properties": {"children": [{"events": [], "name": "gridCell0", "properties": {"children": [{"events": [], "name": "calloutValue0", "properties": {"isDisabled": false, "isLoading": false, "isVisible": true, "label": "CPU Usage", "size": "sm", "style": "vivid_yellow", "unit": "kB", "value": "42"}, "type": "calloutValue"}], "isVisible": "true", "layout": {"default": {"height": 8, "width": 2, "x": 0, "y": 0}}}, "type": "gridCell"}]}, "type": "grid"}], "description": "This is a simple example app", "embeddedQueries": [], "name": "Example App", "rootInstanceName": "grid0"}, "type": "appDefinitions"}} + When the request is sent + Then the response status is 201 App Created + And the response "data.type" is equal to "appDefinitions" + + @team:DataDog/app-builder-backend + Scenario: Create App returns "Bad Request" response + Given operation "CreateApp" enabled + And new "CreateApp" request + And body with value {"data": {"attributes": {"description": "This is a bad example app", "embeddedQueries": [], "rootInstanceName": "grid0"}, "type": "appDefinitions"}} + When the request is sent + Then the response status is 400 Bad Request + And the response "errors" has length 1 + And the response "errors[0].detail" is equal to "missing required field" + + @team:DataDog/app-builder-backend + Scenario: Delete App returns "Bad Request" response + Given operation "DeleteApp" enabled + And new "DeleteApp" request + And request contains "app_id" parameter with value "bad-app-id" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Delete App returns "Gone" response + Given operation "DeleteApp" enabled + And new "DeleteApp" request + And request contains "app_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 410 Gone + + @team:DataDog/app-builder-backend + Scenario: Delete App returns "Not Found" response + Given operation "DeleteApp" enabled + And new "DeleteApp" request + And request contains "app_id" parameter with value "7addb29b-f935-472c-ae79-d1963979a23e" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/app-builder-backend + Scenario: Delete App returns "OK" response + Given operation "DeleteApp" enabled + And there is a valid "app" in the system + And new "DeleteApp" request + And request contains "app_id" parameter from "app.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.id" has the same value as "app.data.id" + And the response "data.type" is equal to "appDefinitions" + + @team:DataDog/app-builder-backend + Scenario: Delete Multiple Apps returns "Bad Request" response + Given operation "DeleteApps" enabled + And new "DeleteApps" request + And body with value {"data": [{"id": "71c0d358-eac5-41e3-892d-a7467571b9b", "type": "appDefinitions"}, {"id": "71c0d358-eac5-41e3-892d-a7467571b9b0", "type": "appDefinitions"}, {"id": "98e7e44d-1562-474a-90f7-3a94e739c006", "type": "appDefinitions"}]} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/app-builder-backend + Scenario: Delete Multiple Apps returns "Not Found" response + Given operation "DeleteApps" enabled + And new "DeleteApps" request + And body with value {"data": [{"id": "29494ddd-ac13-46a7-8558-b05b050ee755", "type": "appDefinitions"}, {"id": "71c0d358-eac5-41e3-892d-a7467571b9b0", "type": "appDefinitions"}, {"id": "98e7e44d-1562-474a-90f7-3a94e739c006", "type": "appDefinitions"}]} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/app-builder-backend + Scenario: Delete Multiple Apps returns "OK" response + Given operation "DeleteApps" enabled + And new "DeleteApps" request + And there is a valid "app" in the system + And body with value {"data": [{"id": "{{ app.data.id }}", "type": "appDefinitions"}]} + When the request is sent + Then the response status is 200 OK + And the response "data" has length 1 + And the response "data[0].id" has the same value as "app.data.id" + + @team:DataDog/app-builder-backend + Scenario: Get App returns "Bad Request" response + Given operation "GetApp" enabled + And new "GetApp" request + And request contains "app_id" parameter with value "invalid-uuid" + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/app-builder-backend + Scenario: Get App returns "Not Found" response + Given operation "GetApp" enabled + And new "GetApp" request + And request contains "app_id" parameter with value "7addb29b-f935-472c-ae79-d1963979a23e" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/app-builder-backend + Scenario: Get App returns "OK" response + Given operation "GetApp" enabled + And new "GetApp" request + And there is a valid "app" in the system + And request contains "app_id" parameter from "app.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.id" has the same value as "app.data.id" + And the response "data.type" is equal to "appDefinitions" + + @generated @skip @team:DataDog/app-builder-backend + Scenario: List Apps returns "Bad Request, e.g. invalid sort parameter" response + Given operation "ListApps" enabled + And new "ListApps" request + When the request is sent + Then the response status is 400 Bad Request, e.g. invalid sort parameter + + @team:DataDog/app-builder-backend + Scenario: List Apps returns "OK" response + Given operation "ListApps" enabled + And new "ListApps" request + When the request is sent + Then the response status is 200 OK + + @team:DataDog/app-builder-backend + Scenario: Update App returns "Bad Request" response + Given operation "UpdateApp" enabled + And new "UpdateApp" request + And there is a valid "app" in the system + And request contains "app_id" parameter from "app.data.id" + And body with value {"data": {"attributes": {"rootInstanceName": ""}, "id": "{{ app.data.id }}", "type": "appDefinitions"}} + When the request is sent + Then the response status is 400 Bad Request + And the response "errors" has length 1 + And the response "errors[0].detail" is equal to "missing required field" + + @team:DataDog/app-builder-backend + Scenario: Update App returns "OK" response + Given operation "UpdateApp" enabled + And new "UpdateApp" request + And there is a valid "app" in the system + And request contains "app_id" parameter from "app.data.id" + And body with value {"data": {"attributes": {"name": "Updated Name", "rootInstanceName": "grid0"}, "id": "{{ app.data.id }}", "type": "appDefinitions"}} + When the request is sent + Then the response status is 200 OK + And the response "data.id" has the same value as "app.data.id" + And the response "data.type" is equal to "appDefinitions" + And the response "data.attributes.name" is equal to "Updated Name" diff --git a/features/v2/given.json b/features/v2/given.json index 21d526af248..3c9e4279380 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -47,6 +47,18 @@ "tag": "APM Retention Filters", "operationId": "CreateApmRetentionFilter" }, + { + "parameters": [ + { + "name": "body", + "value": "{\"data\": {\"attributes\": {\"components\": [{\"events\": [], \"name\": \"grid0\", \"properties\": {\"children\": [{\"events\": [], \"name\": \"gridCell0\", \"properties\": {\"children\": [{\"events\": [], \"name\": \"calloutValue0\", \"properties\": {\"isDisabled\": false, \"isLoading\": false, \"isVisible\": true, \"label\": \"CPU Usage\", \"size\": \"sm\", \"style\": \"vivid_yellow\", \"unit\": \"kB\", \"value\": \"42\"}, \"type\": \"calloutValue\"}], \"isVisible\": \"true\", \"layout\": {\"default\": {\"height\": 8, \"width\": 2, \"x\": 0, \"y\": 0}}}, \"type\": \"gridCell\"}]}, \"type\": \"grid\"}], \"description\": \"This is a simple example app\", \"embeddedQueries\": [], \"name\": \"Example App\", \"rootInstanceName\": \"grid0\"}, \"type\": \"appDefinitions\"}}" + } + ], + "step": "there is a valid \"app\" in the system", + "key": "app", + "tag": "Apps", + "operationId": "CreateApp" + }, { "parameters": [ { diff --git a/features/v2/undo.json b/features/v2/undo.json index 9db842c40ad..7f5663e7dc5 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -153,6 +153,61 @@ "type": "idempotent" } }, + "DeleteApps": { + "tag": "Apps", + "undo": { + "type": "idempotent" + } + }, + "ListApps": { + "tag": "Apps", + "undo": { + "type": "safe" + } + }, + "CreateApp": { + "tag": "Apps", + "undo": { + "operationId": "DeleteApp", + "parameters": [ + { + "name": "app_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteApp": { + "tag": "Apps", + "undo": { + "type": "idempotent" + } + }, + "GetApp": { + "tag": "Apps", + "undo": { + "type": "safe" + } + }, + "UpdateApp": { + "tag": "Apps", + "undo": { + "type": "idempotent" + } + }, + "DisableApp": { + "tag": "App Deployment", + "undo": { + "type": "idempotent" + } + }, + "DeployApp": { + "tag": "App Deployment", + "undo": { + "type": "idempotent" + } + }, "ListApplicationKeys": { "tag": "Key Management", "undo": { diff --git a/packages/datadog-api-client-common/configuration.ts b/packages/datadog-api-client-common/configuration.ts index 5f2a66317ba..804da0f2a70 100644 --- a/packages/datadog-api-client-common/configuration.ts +++ b/packages/datadog-api-client-common/configuration.ts @@ -227,6 +227,14 @@ export function createConfiguration( "v2.getOpenAPI": false, "v2.listAPIs": false, "v2.updateOpenAPI": false, + "v2.createApp": false, + "v2.deleteApp": false, + "v2.deleteApps": false, + "v2.getApp": false, + "v2.listApps": false, + "v2.updateApp": false, + "v2.deployApp": false, + "v2.disableApp": false, "v2.getActiveBillingDimensions": false, "v2.getBillingDimensionMapping": false, "v2.getMonthlyCostAttribution": false, diff --git a/packages/datadog-api-client-v2/apis/AppDeploymentApi.ts b/packages/datadog-api-client-v2/apis/AppDeploymentApi.ts new file mode 100644 index 00000000000..ef87c3dfb58 --- /dev/null +++ b/packages/datadog-api-client-v2/apis/AppDeploymentApi.ts @@ -0,0 +1,340 @@ +import { + BaseAPIRequestFactory, + RequiredError, +} from "../../datadog-api-client-common/baseapi"; +import { + Configuration, + applySecurityAuthentication, +} from "../../datadog-api-client-common/configuration"; +import { + RequestContext, + HttpMethod, + ResponseContext, +} from "../../datadog-api-client-common/http/http"; + +import { logger } from "../../../logger"; +import { ObjectSerializer } from "../models/ObjectSerializer"; +import { ApiException } from "../../datadog-api-client-common/exception"; + +import { APIErrorResponse } from "../models/APIErrorResponse"; +import { AppBuilderError } from "../models/AppBuilderError"; +import { DeployAppResponse } from "../models/DeployAppResponse"; +import { DisableAppResponse } from "../models/DisableAppResponse"; + +export class AppDeploymentApiRequestFactory extends BaseAPIRequestFactory { + public async deployApp( + appId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'deployApp'"); + if (!_config.unstableOperations["v2.deployApp"]) { + throw new Error("Unstable operation 'deployApp' is disabled"); + } + + // verify required parameter 'appId' is not null or undefined + if (appId === null || appId === undefined) { + throw new RequiredError("appId", "deployApp"); + } + + // Path Params + const localVarPath = "/api/v2/app-builder/apps/{app_id}/deployment".replace( + "{app_id}", + encodeURIComponent(String(appId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.AppDeploymentApi.deployApp") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async disableApp( + appId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'disableApp'"); + if (!_config.unstableOperations["v2.disableApp"]) { + throw new Error("Unstable operation 'disableApp' is disabled"); + } + + // verify required parameter 'appId' is not null or undefined + if (appId === null || appId === undefined) { + throw new RequiredError("appId", "disableApp"); + } + + // Path Params + const localVarPath = "/api/v2/app-builder/apps/{app_id}/deployment".replace( + "{app_id}", + encodeURIComponent(String(appId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.AppDeploymentApi.disableApp") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } +} + +export class AppDeploymentApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deployApp + * @throws ApiException if the response code was not in [200, 299] + */ + public async deployApp( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 201) { + const body: DeployAppResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "DeployAppResponse" + ) as DeployAppResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: AppBuilderError; + try { + body = ObjectSerializer.deserialize( + bodyText, + "AppBuilderError" + ) as AppBuilderError; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + if (response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: DeployAppResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "DeployAppResponse", + "" + ) as DeployAppResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to disableApp + * @throws ApiException if the response code was not in [200, 299] + */ + public async disableApp( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: DisableAppResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "DisableAppResponse" + ) as DisableAppResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: AppBuilderError; + try { + body = ObjectSerializer.deserialize( + bodyText, + "AppBuilderError" + ) as AppBuilderError; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + if (response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: DisableAppResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "DisableAppResponse", + "" + ) as DisableAppResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } +} + +export interface AppDeploymentApiDeployAppRequest { + /** + * @type string + */ + appId: string; +} + +export interface AppDeploymentApiDisableAppRequest { + /** + * @type string + */ + appId: string; +} + +export class AppDeploymentApi { + private requestFactory: AppDeploymentApiRequestFactory; + private responseProcessor: AppDeploymentApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: AppDeploymentApiRequestFactory, + responseProcessor?: AppDeploymentApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = + requestFactory || new AppDeploymentApiRequestFactory(configuration); + this.responseProcessor = + responseProcessor || new AppDeploymentApiResponseProcessor(); + } + + /** + * Deploy (publish) an app by ID + * @param param The request object + */ + public deployApp( + param: AppDeploymentApiDeployAppRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.deployApp( + param.appId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deployApp(responseContext); + }); + }); + } + + /** + * Disable an app by ID + * @param param The request object + */ + public disableApp( + param: AppDeploymentApiDisableAppRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.disableApp( + param.appId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.disableApp(responseContext); + }); + }); + } +} diff --git a/packages/datadog-api-client-v2/apis/AppsApi.ts b/packages/datadog-api-client-v2/apis/AppsApi.ts new file mode 100644 index 00000000000..ba51fbfb30c --- /dev/null +++ b/packages/datadog-api-client-v2/apis/AppsApi.ts @@ -0,0 +1,1090 @@ +import { + BaseAPIRequestFactory, + RequiredError, +} from "../../datadog-api-client-common/baseapi"; +import { + Configuration, + applySecurityAuthentication, +} from "../../datadog-api-client-common/configuration"; +import { + RequestContext, + HttpMethod, + ResponseContext, +} from "../../datadog-api-client-common/http/http"; + +import { logger } from "../../../logger"; +import { ObjectSerializer } from "../models/ObjectSerializer"; +import { ApiException } from "../../datadog-api-client-common/exception"; + +import { APIErrorResponse } from "../models/APIErrorResponse"; +import { AppBuilderError } from "../models/AppBuilderError"; +import { AppsSortField } from "../models/AppsSortField"; +import { CreateAppRequest } from "../models/CreateAppRequest"; +import { CreateAppResponse } from "../models/CreateAppResponse"; +import { DeleteAppResponse } from "../models/DeleteAppResponse"; +import { DeleteAppsRequest } from "../models/DeleteAppsRequest"; +import { DeleteAppsResponse } from "../models/DeleteAppsResponse"; +import { GetAppResponse } from "../models/GetAppResponse"; +import { ListAppsResponse } from "../models/ListAppsResponse"; +import { UpdateAppRequest } from "../models/UpdateAppRequest"; +import { UpdateAppResponse } from "../models/UpdateAppResponse"; + +export class AppsApiRequestFactory extends BaseAPIRequestFactory { + public async createApp( + body: CreateAppRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'createApp'"); + if (!_config.unstableOperations["v2.createApp"]) { + throw new Error("Unstable operation 'createApp' is disabled"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createApp"); + } + + // Path Params + const localVarPath = "/api/v2/app-builder/apps"; + + // Make Request Context + const requestContext = _config + .getServer("v2.AppsApi.createApp") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "CreateAppRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async deleteApp( + appId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'deleteApp'"); + if (!_config.unstableOperations["v2.deleteApp"]) { + throw new Error("Unstable operation 'deleteApp' is disabled"); + } + + // verify required parameter 'appId' is not null or undefined + if (appId === null || appId === undefined) { + throw new RequiredError("appId", "deleteApp"); + } + + // Path Params + const localVarPath = "/api/v2/app-builder/apps/{app_id}".replace( + "{app_id}", + encodeURIComponent(String(appId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.AppsApi.deleteApp") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async deleteApps( + body: DeleteAppsRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'deleteApps'"); + if (!_config.unstableOperations["v2.deleteApps"]) { + throw new Error("Unstable operation 'deleteApps' is disabled"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "deleteApps"); + } + + // Path Params + const localVarPath = "/api/v2/app-builder/apps"; + + // Make Request Context + const requestContext = _config + .getServer("v2.AppsApi.deleteApps") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "DeleteAppsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async getApp( + appId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'getApp'"); + if (!_config.unstableOperations["v2.getApp"]) { + throw new Error("Unstable operation 'getApp' is disabled"); + } + + // verify required parameter 'appId' is not null or undefined + if (appId === null || appId === undefined) { + throw new RequiredError("appId", "getApp"); + } + + // Path Params + const localVarPath = "/api/v2/app-builder/apps/{app_id}".replace( + "{app_id}", + encodeURIComponent(String(appId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.AppsApi.getApp") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async listApps( + limit?: number, + page?: number, + filterUserName?: string, + filterUserUuid?: string, + filterName?: string, + filterQuery?: string, + filterDeployed?: boolean, + filterTags?: string, + filterFavorite?: boolean, + sort?: Array, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'listApps'"); + if (!_config.unstableOperations["v2.listApps"]) { + throw new Error("Unstable operation 'listApps' is disabled"); + } + + // Path Params + const localVarPath = "/api/v2/app-builder/apps"; + + // Make Request Context + const requestContext = _config + .getServer("v2.AppsApi.listApps") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (limit !== undefined) { + requestContext.setQueryParam( + "limit", + ObjectSerializer.serialize(limit, "number", "int64"), + "" + ); + } + if (page !== undefined) { + requestContext.setQueryParam( + "page", + ObjectSerializer.serialize(page, "number", "int64"), + "" + ); + } + if (filterUserName !== undefined) { + requestContext.setQueryParam( + "filter[user_name]", + ObjectSerializer.serialize(filterUserName, "string", ""), + "" + ); + } + if (filterUserUuid !== undefined) { + requestContext.setQueryParam( + "filter[user_uuid]", + ObjectSerializer.serialize(filterUserUuid, "string", ""), + "" + ); + } + if (filterName !== undefined) { + requestContext.setQueryParam( + "filter[name]", + ObjectSerializer.serialize(filterName, "string", ""), + "" + ); + } + if (filterQuery !== undefined) { + requestContext.setQueryParam( + "filter[query]", + ObjectSerializer.serialize(filterQuery, "string", ""), + "" + ); + } + if (filterDeployed !== undefined) { + requestContext.setQueryParam( + "filter[deployed]", + ObjectSerializer.serialize(filterDeployed, "boolean", ""), + "" + ); + } + if (filterTags !== undefined) { + requestContext.setQueryParam( + "filter[tags]", + ObjectSerializer.serialize(filterTags, "string", ""), + "" + ); + } + if (filterFavorite !== undefined) { + requestContext.setQueryParam( + "filter[favorite]", + ObjectSerializer.serialize(filterFavorite, "boolean", ""), + "" + ); + } + if (sort !== undefined) { + requestContext.setQueryParam( + "sort", + ObjectSerializer.serialize(sort, "Array", ""), + "csv" + ); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async updateApp( + appId: string, + body: UpdateAppRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'updateApp'"); + if (!_config.unstableOperations["v2.updateApp"]) { + throw new Error("Unstable operation 'updateApp' is disabled"); + } + + // verify required parameter 'appId' is not null or undefined + if (appId === null || appId === undefined) { + throw new RequiredError("appId", "updateApp"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateApp"); + } + + // Path Params + const localVarPath = "/api/v2/app-builder/apps/{app_id}".replace( + "{app_id}", + encodeURIComponent(String(appId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.AppsApi.updateApp") + .makeRequestContext(localVarPath, HttpMethod.PATCH); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "UpdateAppRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } +} + +export class AppsApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createApp + * @throws ApiException if the response code was not in [200, 299] + */ + public async createApp( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 201) { + const body: CreateAppResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CreateAppResponse" + ) as CreateAppResponse; + return body; + } + if (response.httpStatusCode === 400 || response.httpStatusCode === 403) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: AppBuilderError; + try { + body = ObjectSerializer.deserialize( + bodyText, + "AppBuilderError" + ) as AppBuilderError; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + if (response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CreateAppResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CreateAppResponse", + "" + ) as CreateAppResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteApp + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteApp( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: DeleteAppResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "DeleteAppResponse" + ) as DeleteAppResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 410 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: AppBuilderError; + try { + body = ObjectSerializer.deserialize( + bodyText, + "AppBuilderError" + ) as AppBuilderError; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + if (response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: DeleteAppResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "DeleteAppResponse", + "" + ) as DeleteAppResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteApps + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteApps( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: DeleteAppsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "DeleteAppsResponse" + ) as DeleteAppsResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: AppBuilderError; + try { + body = ObjectSerializer.deserialize( + bodyText, + "AppBuilderError" + ) as AppBuilderError; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + if (response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: DeleteAppsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "DeleteAppsResponse", + "" + ) as DeleteAppsResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getApp + * @throws ApiException if the response code was not in [200, 299] + */ + public async getApp(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: GetAppResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GetAppResponse" + ) as GetAppResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: AppBuilderError; + try { + body = ObjectSerializer.deserialize( + bodyText, + "AppBuilderError" + ) as AppBuilderError; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + if (response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: GetAppResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GetAppResponse", + "" + ) as GetAppResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to listApps + * @throws ApiException if the response code was not in [200, 299] + */ + public async listApps(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: ListAppsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ListAppsResponse" + ) as ListAppsResponse; + return body; + } + if (response.httpStatusCode === 400 || response.httpStatusCode === 403) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: AppBuilderError; + try { + body = ObjectSerializer.deserialize( + bodyText, + "AppBuilderError" + ) as AppBuilderError; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + if (response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ListAppsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ListAppsResponse", + "" + ) as ListAppsResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateApp + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateApp( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: UpdateAppResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "UpdateAppResponse" + ) as UpdateAppResponse; + return body; + } + if (response.httpStatusCode === 400 || response.httpStatusCode === 403) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: AppBuilderError; + try { + body = ObjectSerializer.deserialize( + bodyText, + "AppBuilderError" + ) as AppBuilderError; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + if (response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: UpdateAppResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "UpdateAppResponse", + "" + ) as UpdateAppResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } +} + +export interface AppsApiCreateAppRequest { + /** + * @type CreateAppRequest + */ + body: CreateAppRequest; +} + +export interface AppsApiDeleteAppRequest { + /** + * @type string + */ + appId: string; +} + +export interface AppsApiDeleteAppsRequest { + /** + * @type DeleteAppsRequest + */ + body: DeleteAppsRequest; +} + +export interface AppsApiGetAppRequest { + /** + * @type string + */ + appId: string; +} + +export interface AppsApiListAppsRequest { + /** + * The number of apps to return per page + * @type number + */ + limit?: number; + /** + * The page number to return + * @type number + */ + page?: number; + /** + * The `AppsFilter` `user_name`. + * @type string + */ + filterUserName?: string; + /** + * The `AppsFilter` `user_uuid`. + * @type string + */ + filterUserUuid?: string; + /** + * The `AppsFilter` `name`. + * @type string + */ + filterName?: string; + /** + * The `AppsFilter` `query`. + * @type string + */ + filterQuery?: string; + /** + * The `AppsFilter` `deployed`. + * @type boolean + */ + filterDeployed?: boolean; + /** + * The `AppsFilter` `tags`. + * @type string + */ + filterTags?: string; + /** + * The `AppsFilter` `favorite`. + * @type boolean + */ + filterFavorite?: boolean; + /** + * @type Array + */ + sort?: Array; +} + +export interface AppsApiUpdateAppRequest { + /** + * @type string + */ + appId: string; + /** + * @type UpdateAppRequest + */ + body: UpdateAppRequest; +} + +export class AppsApi { + private requestFactory: AppsApiRequestFactory; + private responseProcessor: AppsApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: AppsApiRequestFactory, + responseProcessor?: AppsApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = + requestFactory || new AppsApiRequestFactory(configuration); + this.responseProcessor = + responseProcessor || new AppsApiResponseProcessor(); + } + + /** + * Create a new app, returning the app ID + * @param param The request object + */ + public createApp( + param: AppsApiCreateAppRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.createApp( + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createApp(responseContext); + }); + }); + } + + /** + * Delete an app by ID + * @param param The request object + */ + public deleteApp( + param: AppsApiDeleteAppRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.deleteApp( + param.appId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteApp(responseContext); + }); + }); + } + + /** + * Delete multiple apps by ID + * @param param The request object + */ + public deleteApps( + param: AppsApiDeleteAppsRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.deleteApps( + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteApps(responseContext); + }); + }); + } + + /** + * Get the full definition of an app by ID + * @param param The request object + */ + public getApp( + param: AppsApiGetAppRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.getApp( + param.appId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getApp(responseContext); + }); + }); + } + + /** + * List all apps, with optional filters and sorting + * @param param The request object + */ + public listApps( + param: AppsApiListAppsRequest = {}, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.listApps( + param.limit, + param.page, + param.filterUserName, + param.filterUserUuid, + param.filterName, + param.filterQuery, + param.filterDeployed, + param.filterTags, + param.filterFavorite, + param.sort, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listApps(responseContext); + }); + }); + } + + /** + * Update an existing app by ID. Creates a new version of the app + * @param param The request object + */ + public updateApp( + param: AppsApiUpdateAppRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.updateApp( + param.appId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateApp(responseContext); + }); + }); + } +} diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index 29d69a88986..4d3cd960f23 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -27,6 +27,22 @@ export { export { AWSLogsIntegrationApi } from "./apis/AWSLogsIntegrationApi"; +export { + AppDeploymentApiDeployAppRequest, + AppDeploymentApiDisableAppRequest, + AppDeploymentApi, +} from "./apis/AppDeploymentApi"; + +export { + AppsApiCreateAppRequest, + AppsApiDeleteAppRequest, + AppsApiDeleteAppsRequest, + AppsApiGetAppRequest, + AppsApiListAppsRequest, + AppsApiUpdateAppRequest, + AppsApi, +} from "./apis/AppsApi"; + export { AuditApiListAuditLogsRequest, AuditApiSearchAuditLogsRequest, @@ -608,6 +624,12 @@ export { APIKeyUpdateAttributes } from "./models/APIKeyUpdateAttributes"; export { APIKeyUpdateData } from "./models/APIKeyUpdateData"; export { APIKeyUpdateRequest } from "./models/APIKeyUpdateRequest"; export { ApmRetentionFilterType } from "./models/ApmRetentionFilterType"; +export { AppBuilderError } from "./models/AppBuilderError"; +export { AppBuilderErrorErrorsItems } from "./models/AppBuilderErrorErrorsItems"; +export { AppBuilderErrorErrorsItemsSource } from "./models/AppBuilderErrorErrorsItemsSource"; +export { AppBuilderEvent } from "./models/AppBuilderEvent"; +export { AppBuilderEventName } from "./models/AppBuilderEventName"; +export { AppBuilderEventType } from "./models/AppBuilderEventType"; export { ApplicationKeyCreateAttributes } from "./models/ApplicationKeyCreateAttributes"; export { ApplicationKeyCreateData } from "./models/ApplicationKeyCreateData"; export { ApplicationKeyCreateRequest } from "./models/ApplicationKeyCreateRequest"; @@ -621,6 +643,8 @@ export { ApplicationKeysType } from "./models/ApplicationKeysType"; export { ApplicationKeyUpdateAttributes } from "./models/ApplicationKeyUpdateAttributes"; export { ApplicationKeyUpdateData } from "./models/ApplicationKeyUpdateData"; export { ApplicationKeyUpdateRequest } from "./models/ApplicationKeyUpdateRequest"; +export { AppMeta } from "./models/AppMeta"; +export { AppsSortField } from "./models/AppsSortField"; export { AuditLogsEvent } from "./models/AuditLogsEvent"; export { AuditLogsEventAttributes } from "./models/AuditLogsEventAttributes"; export { AuditLogsEventsResponse } from "./models/AuditLogsEventsResponse"; @@ -878,6 +902,14 @@ export { CloudWorkloadSecurityAgentRuleUpdateAttributes } from "./models/CloudWo export { CloudWorkloadSecurityAgentRuleUpdateData } from "./models/CloudWorkloadSecurityAgentRuleUpdateData"; export { CloudWorkloadSecurityAgentRuleUpdaterAttributes } from "./models/CloudWorkloadSecurityAgentRuleUpdaterAttributes"; export { CloudWorkloadSecurityAgentRuleUpdateRequest } from "./models/CloudWorkloadSecurityAgentRuleUpdateRequest"; +export { Component } from "./models/Component"; +export { ComponentGrid } from "./models/ComponentGrid"; +export { ComponentGridProperties } from "./models/ComponentGridProperties"; +export { ComponentGridPropertiesIsVisible } from "./models/ComponentGridPropertiesIsVisible"; +export { ComponentGridType } from "./models/ComponentGridType"; +export { ComponentProperties } from "./models/ComponentProperties"; +export { ComponentPropertiesIsVisible } from "./models/ComponentPropertiesIsVisible"; +export { ComponentType } from "./models/ComponentType"; export { ConfluentAccountCreateRequest } from "./models/ConfluentAccountCreateRequest"; export { ConfluentAccountCreateRequestAttributes } from "./models/ConfluentAccountCreateRequestAttributes"; export { ConfluentAccountCreateRequestData } from "./models/ConfluentAccountCreateRequestData"; @@ -941,6 +973,13 @@ export { CostByOrg } from "./models/CostByOrg"; export { CostByOrgAttributes } from "./models/CostByOrgAttributes"; export { CostByOrgResponse } from "./models/CostByOrgResponse"; export { CostByOrgType } from "./models/CostByOrgType"; +export { CreateAppRequest } from "./models/CreateAppRequest"; +export { CreateAppRequestData } from "./models/CreateAppRequestData"; +export { CreateAppRequestDataAttributes } from "./models/CreateAppRequestDataAttributes"; +export { CreateAppRequestDataType } from "./models/CreateAppRequestDataType"; +export { CreateAppResponse } from "./models/CreateAppResponse"; +export { CreateAppResponseData } from "./models/CreateAppResponseData"; +export { CreateAppResponseDataType } from "./models/CreateAppResponseDataType"; export { CreateDataDeletionRequestBody } from "./models/CreateDataDeletionRequestBody"; export { CreateDataDeletionRequestBodyAttributes } from "./models/CreateDataDeletionRequestBodyAttributes"; export { CreateDataDeletionRequestBodyData } from "./models/CreateDataDeletionRequestBodyData"; @@ -953,6 +992,10 @@ export { CreateRuleRequestData } from "./models/CreateRuleRequestData"; export { CreateRuleResponse } from "./models/CreateRuleResponse"; export { CreateRuleResponseData } from "./models/CreateRuleResponseData"; export { Creator } from "./models/Creator"; +export { CustomConnection } from "./models/CustomConnection"; +export { CustomConnectionAttributes } from "./models/CustomConnectionAttributes"; +export { CustomConnectionAttributesOnPremRunner } from "./models/CustomConnectionAttributesOnPremRunner"; +export { CustomConnectionType } from "./models/CustomConnectionType"; export { CustomCostGetResponseMeta } from "./models/CustomCostGetResponseMeta"; export { CustomCostListResponseMeta } from "./models/CustomCostListResponseMeta"; export { CustomCostsFileGetResponse } from "./models/CustomCostsFileGetResponse"; @@ -1018,12 +1061,38 @@ export { DataDeletionResponseItem } from "./models/DataDeletionResponseItem"; export { DataDeletionResponseItemAttributes } from "./models/DataDeletionResponseItemAttributes"; export { DataDeletionResponseMeta } from "./models/DataDeletionResponseMeta"; export { DataScalarColumn } from "./models/DataScalarColumn"; +export { DeleteAppResponse } from "./models/DeleteAppResponse"; +export { DeleteAppResponseData } from "./models/DeleteAppResponseData"; +export { DeleteAppResponseDataType } from "./models/DeleteAppResponseDataType"; +export { DeleteAppsRequest } from "./models/DeleteAppsRequest"; +export { DeleteAppsRequestDataItems } from "./models/DeleteAppsRequestDataItems"; +export { DeleteAppsRequestDataItemsType } from "./models/DeleteAppsRequestDataItemsType"; +export { DeleteAppsResponse } from "./models/DeleteAppsResponse"; +export { DeleteAppsResponseDataItems } from "./models/DeleteAppsResponseDataItems"; +export { DeleteAppsResponseDataItemsType } from "./models/DeleteAppsResponseDataItemsType"; +export { DeployAppResponse } from "./models/DeployAppResponse"; +export { DeployAppResponseData } from "./models/DeployAppResponseData"; +export { DeployAppResponseDataAttributes } from "./models/DeployAppResponseDataAttributes"; +export { DeployAppResponseDataType } from "./models/DeployAppResponseDataType"; +export { DeploymentIncluded } from "./models/DeploymentIncluded"; +export { DeploymentIncludedAttributes } from "./models/DeploymentIncludedAttributes"; +export { DeploymentIncludedMeta } from "./models/DeploymentIncludedMeta"; +export { DeploymentIncludedType } from "./models/DeploymentIncludedType"; +export { DeploymentMeta } from "./models/DeploymentMeta"; +export { DeploymentRelationship } from "./models/DeploymentRelationship"; +export { DeploymentRelationshipData } from "./models/DeploymentRelationshipData"; +export { DeploymentRelationshipDataType } from "./models/DeploymentRelationshipDataType"; +export { DeploymentRelationshipMeta } from "./models/DeploymentRelationshipMeta"; export { DetailedFinding } from "./models/DetailedFinding"; export { DetailedFindingAttributes } from "./models/DetailedFindingAttributes"; export { DetailedFindingType } from "./models/DetailedFindingType"; export { DeviceAttributes } from "./models/DeviceAttributes"; export { DeviceAttributesInterfaceStatuses } from "./models/DeviceAttributesInterfaceStatuses"; export { DevicesListData } from "./models/DevicesListData"; +export { DisableAppResponse } from "./models/DisableAppResponse"; +export { DisableAppResponseData } from "./models/DisableAppResponseData"; +export { DisableAppResponseDataAttributes } from "./models/DisableAppResponseDataAttributes"; +export { DisableAppResponseDataType } from "./models/DisableAppResponseDataType"; export { DomainAllowlist } from "./models/DomainAllowlist"; export { DomainAllowlistAttributes } from "./models/DomainAllowlistAttributes"; export { DomainAllowlistRequest } from "./models/DomainAllowlistRequest"; @@ -1219,6 +1288,11 @@ export { GCPSTSServiceAccountResponse } from "./models/GCPSTSServiceAccountRespo export { GCPSTSServiceAccountsResponse } from "./models/GCPSTSServiceAccountsResponse"; export { GCPSTSServiceAccountUpdateRequest } from "./models/GCPSTSServiceAccountUpdateRequest"; export { GCPSTSServiceAccountUpdateRequestData } from "./models/GCPSTSServiceAccountUpdateRequestData"; +export { GetAppResponse } from "./models/GetAppResponse"; +export { GetAppResponseData } from "./models/GetAppResponseData"; +export { GetAppResponseDataAttributes } from "./models/GetAppResponseDataAttributes"; +export { GetAppResponseDataType } from "./models/GetAppResponseDataType"; +export { GetAppResponseRelationship } from "./models/GetAppResponseRelationship"; export { GetDataDeletionsResponseBody } from "./models/GetDataDeletionsResponseBody"; export { GetDeviceAttributes } from "./models/GetDeviceAttributes"; export { GetDeviceData } from "./models/GetDeviceData"; @@ -1376,6 +1450,13 @@ export { IncidentUserAttributes } from "./models/IncidentUserAttributes"; export { IncidentUserData } from "./models/IncidentUserData"; export { IncidentUserDefinedFieldType } from "./models/IncidentUserDefinedFieldType"; export { IncludeType } from "./models/IncludeType"; +export { InputSchema } from "./models/InputSchema"; +export { InputSchemaData } from "./models/InputSchemaData"; +export { InputSchemaDataAttributes } from "./models/InputSchemaDataAttributes"; +export { InputSchemaDataAttributesParametersItems } from "./models/InputSchemaDataAttributesParametersItems"; +export { InputSchemaDataAttributesParametersItemsData } from "./models/InputSchemaDataAttributesParametersItemsData"; +export { InputSchemaDataAttributesParametersItemsDataAttributes } from "./models/InputSchemaDataAttributesParametersItemsDataAttributes"; +export { InputSchemaDataType } from "./models/InputSchemaDataType"; export { IntakePayloadAccepted } from "./models/IntakePayloadAccepted"; export { InterfaceAttributes } from "./models/InterfaceAttributes"; export { InterfaceAttributesStatus } from "./models/InterfaceAttributesStatus"; @@ -1407,6 +1488,13 @@ export { ListAPIsResponseDataAttributes } from "./models/ListAPIsResponseDataAtt export { ListAPIsResponseMeta } from "./models/ListAPIsResponseMeta"; export { ListAPIsResponseMetaPagination } from "./models/ListAPIsResponseMetaPagination"; export { ListApplicationKeysResponse } from "./models/ListApplicationKeysResponse"; +export { ListAppsResponse } from "./models/ListAppsResponse"; +export { ListAppsResponseDataItems } from "./models/ListAppsResponseDataItems"; +export { ListAppsResponseDataItemsAttributes } from "./models/ListAppsResponseDataItemsAttributes"; +export { ListAppsResponseDataItemsRelationships } from "./models/ListAppsResponseDataItemsRelationships"; +export { ListAppsResponseDataItemsType } from "./models/ListAppsResponseDataItemsType"; +export { ListAppsResponseMeta } from "./models/ListAppsResponseMeta"; +export { ListAppsResponseMetaPage } from "./models/ListAppsResponseMetaPage"; export { ListDevicesResponse } from "./models/ListDevicesResponse"; export { ListDevicesResponseMetadata } from "./models/ListDevicesResponseMetadata"; export { ListDevicesResponseMetadataPage } from "./models/ListDevicesResponseMetadataPage"; @@ -1736,8 +1824,10 @@ export { ProjectRelationships } from "./models/ProjectRelationships"; export { ProjectResourceType } from "./models/ProjectResourceType"; export { ProjectResponse } from "./models/ProjectResponse"; export { ProjectsResponse } from "./models/ProjectsResponse"; +export { Query } from "./models/Query"; export { QueryFormula } from "./models/QueryFormula"; export { QuerySortOrder } from "./models/QuerySortOrder"; +export { QueryType } from "./models/QueryType"; export { RelationshipItem } from "./models/RelationshipItem"; export { RelationshipToIncidentAttachment } from "./models/RelationshipToIncidentAttachment"; export { RelationshipToIncidentAttachmentData } from "./models/RelationshipToIncidentAttachmentData"; @@ -1919,6 +2009,10 @@ export { ScalarMeta } from "./models/ScalarMeta"; export { ScalarQuery } from "./models/ScalarQuery"; export { ScalarResponse } from "./models/ScalarResponse"; export { ScorecardType } from "./models/ScorecardType"; +export { Script } from "./models/Script"; +export { ScriptData } from "./models/ScriptData"; +export { ScriptDataAttributes } from "./models/ScriptDataAttributes"; +export { ScriptDataType } from "./models/ScriptDataType"; export { SecurityFilter } from "./models/SecurityFilter"; export { SecurityFilterAttributes } from "./models/SecurityFilterAttributes"; export { SecurityFilterCreateAttributes } from "./models/SecurityFilterCreateAttributes"; @@ -2263,6 +2357,15 @@ export { TimeseriesResponse } from "./models/TimeseriesResponse"; export { TimeseriesResponseAttributes } from "./models/TimeseriesResponseAttributes"; export { TimeseriesResponseSeries } from "./models/TimeseriesResponseSeries"; export { Unit } from "./models/Unit"; +export { UpdateAppRequest } from "./models/UpdateAppRequest"; +export { UpdateAppRequestData } from "./models/UpdateAppRequestData"; +export { UpdateAppRequestDataAttributes } from "./models/UpdateAppRequestDataAttributes"; +export { UpdateAppRequestDataType } from "./models/UpdateAppRequestDataType"; +export { UpdateAppResponse } from "./models/UpdateAppResponse"; +export { UpdateAppResponseData } from "./models/UpdateAppResponseData"; +export { UpdateAppResponseDataAttributes } from "./models/UpdateAppResponseDataAttributes"; +export { UpdateAppResponseDataType } from "./models/UpdateAppResponseDataType"; +export { UpdateAppResponseRelationship } from "./models/UpdateAppResponseRelationship"; export { UpdateOpenAPIResponse } from "./models/UpdateOpenAPIResponse"; export { UpdateOpenAPIResponseAttributes } from "./models/UpdateOpenAPIResponseAttributes"; export { UpdateOpenAPIResponseData } from "./models/UpdateOpenAPIResponseData"; diff --git a/packages/datadog-api-client-v2/models/AppBuilderError.ts b/packages/datadog-api-client-v2/models/AppBuilderError.ts new file mode 100644 index 00000000000..f307d9f544a --- /dev/null +++ b/packages/datadog-api-client-v2/models/AppBuilderError.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AppBuilderErrorErrorsItems } from "./AppBuilderErrorErrorsItems"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `AppBuilderError` object. + */ +export class AppBuilderError { + /** + * The `AppBuilderError` `errors`. + */ + "errors"?: Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + errors: { + baseName: "errors", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AppBuilderError.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AppBuilderErrorErrorsItems.ts b/packages/datadog-api-client-v2/models/AppBuilderErrorErrorsItems.ts new file mode 100644 index 00000000000..76a3fd349ea --- /dev/null +++ b/packages/datadog-api-client-v2/models/AppBuilderErrorErrorsItems.ts @@ -0,0 +1,61 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AppBuilderErrorErrorsItemsSource } from "./AppBuilderErrorErrorsItemsSource"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `AppBuilderErrorErrorsItems` object. + */ +export class AppBuilderErrorErrorsItems { + /** + * The `items` `detail`. + */ + "detail"?: string; + /** + * The definition of `AppBuilderErrorErrorsItemsSource` object. + */ + "source"?: AppBuilderErrorErrorsItemsSource; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + detail: { + baseName: "detail", + type: "string", + }, + source: { + baseName: "source", + type: "AppBuilderErrorErrorsItemsSource", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AppBuilderErrorErrorsItems.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AppBuilderErrorErrorsItemsSource.ts b/packages/datadog-api-client-v2/models/AppBuilderErrorErrorsItemsSource.ts new file mode 100644 index 00000000000..71bdbe2496d --- /dev/null +++ b/packages/datadog-api-client-v2/models/AppBuilderErrorErrorsItemsSource.ts @@ -0,0 +1,60 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `AppBuilderErrorErrorsItemsSource` object. + */ +export class AppBuilderErrorErrorsItemsSource { + /** + * The `source` `parameter`. + */ + "parameter"?: string; + /** + * The `source` `pointer`. + */ + "pointer"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + parameter: { + baseName: "parameter", + type: "string", + }, + pointer: { + baseName: "pointer", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AppBuilderErrorErrorsItemsSource.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AppBuilderEvent.ts b/packages/datadog-api-client-v2/models/AppBuilderEvent.ts new file mode 100644 index 00000000000..1dc72e67b35 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AppBuilderEvent.ts @@ -0,0 +1,62 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AppBuilderEventName } from "./AppBuilderEventName"; +import { AppBuilderEventType } from "./AppBuilderEventType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `AppBuilderEvent` object. + */ +export class AppBuilderEvent { + /** + * The triggering action for the event. + */ + "name"?: AppBuilderEventName; + /** + * The response to the event. + */ + "type"?: AppBuilderEventType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + name: { + baseName: "name", + type: "AppBuilderEventName", + }, + type: { + baseName: "type", + type: "AppBuilderEventType", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AppBuilderEvent.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AppBuilderEventName.ts b/packages/datadog-api-client-v2/models/AppBuilderEventName.ts new file mode 100644 index 00000000000..4cbc5347793 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AppBuilderEventName.ts @@ -0,0 +1,34 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The triggering action for the event. + */ + +export type AppBuilderEventName = + | typeof PAGECHANGE + | typeof TABLEROWCLICK + | typeof TABLEROWBUTTONCLICK + | typeof CHANGE + | typeof SUBMIT + | typeof CLICK + | typeof TOGGLEOPEN + | typeof CLOSE + | typeof OPEN + | typeof EXECUTIONFINISHED + | UnparsedObject; +export const PAGECHANGE = "pageChange"; +export const TABLEROWCLICK = "tableRowClick"; +export const TABLEROWBUTTONCLICK = "_tableRowButtonClick"; +export const CHANGE = "change"; +export const SUBMIT = "submit"; +export const CLICK = "click"; +export const TOGGLEOPEN = "toggleOpen"; +export const CLOSE = "close"; +export const OPEN = "open"; +export const EXECUTIONFINISHED = "executionFinished"; diff --git a/packages/datadog-api-client-v2/models/AppBuilderEventType.ts b/packages/datadog-api-client-v2/models/AppBuilderEventType.ts new file mode 100644 index 00000000000..6e269c313cd --- /dev/null +++ b/packages/datadog-api-client-v2/models/AppBuilderEventType.ts @@ -0,0 +1,30 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The response to the event. + */ + +export type AppBuilderEventType = + | typeof CUSTOM + | typeof SETCOMPONENTSTATE + | typeof TRIGGERQUERY + | typeof OPENMODAL + | typeof CLOSEMODAL + | typeof OPENURL + | typeof DOWNLOADFILE + | typeof SETSTATEVARIABLEVALUE + | UnparsedObject; +export const CUSTOM = "custom"; +export const SETCOMPONENTSTATE = "setComponentState"; +export const TRIGGERQUERY = "triggerQuery"; +export const OPENMODAL = "openModal"; +export const CLOSEMODAL = "closeModal"; +export const OPENURL = "openUrl"; +export const DOWNLOADFILE = "downloadFile"; +export const SETSTATEVARIABLEVALUE = "setStateVariableValue"; diff --git a/packages/datadog-api-client-v2/models/AppMeta.ts b/packages/datadog-api-client-v2/models/AppMeta.ts new file mode 100644 index 00000000000..6f04de3aea0 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AppMeta.ts @@ -0,0 +1,127 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `AppMeta` object. + */ +export class AppMeta { + /** + * The `AppMeta` `created_at`. + */ + "createdAt"?: string; + /** + * The `AppMeta` `deleted_at`. + */ + "deletedAt"?: string; + /** + * The `AppMeta` `org_id`. + */ + "orgId"?: number; + /** + * The `AppMeta` `run_as_user`. + */ + "runAsUser"?: string; + /** + * The `AppMeta` `updated_at`. + */ + "updatedAt"?: string; + /** + * The `AppMeta` `updated_since_deployment`. + */ + "updatedSinceDeployment"?: boolean; + /** + * The `AppMeta` `user_id`. + */ + "userId"?: number; + /** + * The `AppMeta` `user_name`. + */ + "userName"?: string; + /** + * The `AppMeta` `user_uuid`. + */ + "userUuid"?: string; + /** + * The `AppMeta` `version`. + */ + "version"?: number; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + createdAt: { + baseName: "created_at", + type: "string", + }, + deletedAt: { + baseName: "deleted_at", + type: "string", + }, + orgId: { + baseName: "org_id", + type: "number", + format: "int64", + }, + runAsUser: { + baseName: "run_as_user", + type: "string", + }, + updatedAt: { + baseName: "updated_at", + type: "string", + }, + updatedSinceDeployment: { + baseName: "updated_since_deployment", + type: "boolean", + }, + userId: { + baseName: "user_id", + type: "number", + format: "int64", + }, + userName: { + baseName: "user_name", + type: "string", + }, + userUuid: { + baseName: "user_uuid", + type: "string", + }, + version: { + baseName: "version", + type: "number", + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AppMeta.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/AppsSortField.ts b/packages/datadog-api-client-v2/models/AppsSortField.ts new file mode 100644 index 00000000000..5a74200e7cc --- /dev/null +++ b/packages/datadog-api-client-v2/models/AppsSortField.ts @@ -0,0 +1,30 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The field and direction to sort apps by + */ + +export type AppsSortField = + | typeof NAME + | typeof CREATED_AT + | typeof UPDATED_AT + | typeof USER_NAME + | typeof NAME_DESC + | typeof CREATED_AT_DESC + | typeof UPDATED_AT_DESC + | typeof USER_NAME_DESC + | UnparsedObject; +export const NAME = "name"; +export const CREATED_AT = "created_at"; +export const UPDATED_AT = "updated_at"; +export const USER_NAME = "user_name"; +export const NAME_DESC = "-name"; +export const CREATED_AT_DESC = "-created_at"; +export const UPDATED_AT_DESC = "-updated_at"; +export const USER_NAME_DESC = "-user_name"; diff --git a/packages/datadog-api-client-v2/models/Component.ts b/packages/datadog-api-client-v2/models/Component.ts new file mode 100644 index 00000000000..b91364e286e --- /dev/null +++ b/packages/datadog-api-client-v2/models/Component.ts @@ -0,0 +1,90 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AppBuilderEvent } from "./AppBuilderEvent"; +import { ComponentProperties } from "./ComponentProperties"; +import { ComponentType } from "./ComponentType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `Component` object. + */ +export class Component { + /** + * The `Component` `events`. + */ + "events"?: Array; + /** + * The `Component` `id`. + */ + "id"?: string; + /** + * The `Component` `name`. + */ + "name": string; + /** + * The definition of `ComponentProperties` object. + */ + "properties": ComponentProperties; + /** + * The definition of `ComponentType` object. + */ + "type": ComponentType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + events: { + baseName: "events", + type: "Array", + }, + id: { + baseName: "id", + type: "string", + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + properties: { + baseName: "properties", + type: "ComponentProperties", + required: true, + }, + type: { + baseName: "type", + type: "ComponentType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return Component.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ComponentGrid.ts b/packages/datadog-api-client-v2/models/ComponentGrid.ts new file mode 100644 index 00000000000..5d54bf092d8 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ComponentGrid.ts @@ -0,0 +1,90 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { AppBuilderEvent } from "./AppBuilderEvent"; +import { ComponentGridProperties } from "./ComponentGridProperties"; +import { ComponentGridType } from "./ComponentGridType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `ComponentGrid` object. + */ +export class ComponentGrid { + /** + * The `ComponentGrid` `events`. + */ + "events"?: Array; + /** + * The `ComponentGrid` `id`. + */ + "id"?: string; + /** + * The `ComponentGrid` `name`. + */ + "name": string; + /** + * The definition of `ComponentGridProperties` object. + */ + "properties": ComponentGridProperties; + /** + * The definition of `ComponentGridType` object. + */ + "type": ComponentGridType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + events: { + baseName: "events", + type: "Array", + }, + id: { + baseName: "id", + type: "string", + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + properties: { + baseName: "properties", + type: "ComponentGridProperties", + required: true, + }, + type: { + baseName: "type", + type: "ComponentGridType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ComponentGrid.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ComponentGridProperties.ts b/packages/datadog-api-client-v2/models/ComponentGridProperties.ts new file mode 100644 index 00000000000..509167a1074 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ComponentGridProperties.ts @@ -0,0 +1,70 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { Component } from "./Component"; +import { ComponentGridPropertiesIsVisible } from "./ComponentGridPropertiesIsVisible"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `ComponentGridProperties` object. + */ +export class ComponentGridProperties { + /** + * The `ComponentGridProperties` `backgroundColor`. + */ + "backgroundColor"?: string; + /** + * The `ComponentGridProperties` `children`. + */ + "children"?: Array; + /** + * The definition of `ComponentGridPropertiesIsVisible` object. + */ + "isVisible"?: ComponentGridPropertiesIsVisible; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + backgroundColor: { + baseName: "backgroundColor", + type: "string", + }, + children: { + baseName: "children", + type: "Array", + }, + isVisible: { + baseName: "isVisible", + type: "ComponentGridPropertiesIsVisible", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ComponentGridProperties.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ComponentGridPropertiesIsVisible.ts b/packages/datadog-api-client-v2/models/ComponentGridPropertiesIsVisible.ts new file mode 100644 index 00000000000..629eeb58744 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ComponentGridPropertiesIsVisible.ts @@ -0,0 +1,16 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The definition of `ComponentGridPropertiesIsVisible` object. + */ + +export type ComponentGridPropertiesIsVisible = + | string + | boolean + | UnparsedObject; diff --git a/packages/datadog-api-client-v2/models/ComponentGridType.ts b/packages/datadog-api-client-v2/models/ComponentGridType.ts new file mode 100644 index 00000000000..1f53199ffe8 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ComponentGridType.ts @@ -0,0 +1,14 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The definition of `ComponentGridType` object. + */ + +export type ComponentGridType = typeof GRID | UnparsedObject; +export const GRID = "grid"; diff --git a/packages/datadog-api-client-v2/models/ComponentProperties.ts b/packages/datadog-api-client-v2/models/ComponentProperties.ts new file mode 100644 index 00000000000..96783489dfd --- /dev/null +++ b/packages/datadog-api-client-v2/models/ComponentProperties.ts @@ -0,0 +1,62 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { Component } from "./Component"; +import { ComponentPropertiesIsVisible } from "./ComponentPropertiesIsVisible"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `ComponentProperties` object. + */ +export class ComponentProperties { + /** + * The `ComponentProperties` `children`. + */ + "children"?: Array; + /** + * The definition of `ComponentPropertiesIsVisible` object. + */ + "isVisible"?: ComponentPropertiesIsVisible; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + children: { + baseName: "children", + type: "Array", + }, + isVisible: { + baseName: "isVisible", + type: "ComponentPropertiesIsVisible", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ComponentProperties.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ComponentPropertiesIsVisible.ts b/packages/datadog-api-client-v2/models/ComponentPropertiesIsVisible.ts new file mode 100644 index 00000000000..e9cdccab4cc --- /dev/null +++ b/packages/datadog-api-client-v2/models/ComponentPropertiesIsVisible.ts @@ -0,0 +1,13 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The definition of `ComponentPropertiesIsVisible` object. + */ + +export type ComponentPropertiesIsVisible = boolean | string | UnparsedObject; diff --git a/packages/datadog-api-client-v2/models/ComponentType.ts b/packages/datadog-api-client-v2/models/ComponentType.ts new file mode 100644 index 00000000000..62f436f40f5 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ComponentType.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The definition of `ComponentType` object. + */ + +export type ComponentType = + | typeof TABLE + | typeof TEXTINPUT + | typeof TEXTAREA + | typeof BUTTON + | typeof TEXT + | typeof SELECT + | typeof MODAL + | typeof SCHEMAFORM + | typeof CHECKBOX + | typeof TABS + | typeof VEGACHART + | typeof RADIOBUTTONS + | typeof NUMBERINPUT + | typeof FILEINPUT + | typeof JSONINPUT + | typeof GRIDCELL + | typeof DATERANGEPICKER + | typeof SEARCH + | typeof CONTAINER + | typeof CALLOUTVALUE + | UnparsedObject; +export const TABLE = "table"; +export const TEXTINPUT = "textInput"; +export const TEXTAREA = "textArea"; +export const BUTTON = "button"; +export const TEXT = "text"; +export const SELECT = "select"; +export const MODAL = "modal"; +export const SCHEMAFORM = "schemaForm"; +export const CHECKBOX = "checkbox"; +export const TABS = "tabs"; +export const VEGACHART = "vegaChart"; +export const RADIOBUTTONS = "radioButtons"; +export const NUMBERINPUT = "numberInput"; +export const FILEINPUT = "fileInput"; +export const JSONINPUT = "jsonInput"; +export const GRIDCELL = "gridCell"; +export const DATERANGEPICKER = "dateRangePicker"; +export const SEARCH = "search"; +export const CONTAINER = "container"; +export const CALLOUTVALUE = "calloutValue"; diff --git a/packages/datadog-api-client-v2/models/CreateAppRequest.ts b/packages/datadog-api-client-v2/models/CreateAppRequest.ts new file mode 100644 index 00000000000..fe454c0b150 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CreateAppRequest.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { CreateAppRequestData } from "./CreateAppRequestData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `CreateAppRequest` object. + */ +export class CreateAppRequest { + /** + * The definition of `CreateAppRequestData` object. + */ + "data"?: CreateAppRequestData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "CreateAppRequestData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateAppRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CreateAppRequestData.ts b/packages/datadog-api-client-v2/models/CreateAppRequestData.ts new file mode 100644 index 00000000000..eacbd9c14f4 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CreateAppRequestData.ts @@ -0,0 +1,63 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { CreateAppRequestDataAttributes } from "./CreateAppRequestDataAttributes"; +import { CreateAppRequestDataType } from "./CreateAppRequestDataType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `CreateAppRequestData` object. + */ +export class CreateAppRequestData { + /** + * The definition of `CreateAppRequestDataAttributes` object. + */ + "attributes"?: CreateAppRequestDataAttributes; + /** + * The definition of `CreateAppRequestDataType` object. + */ + "type": CreateAppRequestDataType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "CreateAppRequestDataAttributes", + }, + type: { + baseName: "type", + type: "CreateAppRequestDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateAppRequestData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CreateAppRequestDataAttributes.ts b/packages/datadog-api-client-v2/models/CreateAppRequestDataAttributes.ts new file mode 100644 index 00000000000..4d12f42d1c6 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CreateAppRequestDataAttributes.ts @@ -0,0 +1,112 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ComponentGrid } from "./ComponentGrid"; +import { InputSchema } from "./InputSchema"; +import { Query } from "./Query"; +import { Script } from "./Script"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `CreateAppRequestDataAttributes` object. + */ +export class CreateAppRequestDataAttributes { + /** + * The `attributes` `components`. + */ + "components"?: Array; + /** + * The `attributes` `description`. + */ + "description"?: string; + /** + * The `attributes` `embeddedQueries`. + */ + "embeddedQueries"?: Array; + /** + * The definition of `InputSchema` object. + */ + "inputSchema"?: InputSchema; + /** + * The `attributes` `name`. + */ + "name"?: string; + /** + * The `attributes` `rootInstanceName`. + */ + "rootInstanceName"?: string; + /** + * The `attributes` `scripts`. + */ + "scripts"?: Array