diff --git a/src/openapi.yaml b/src/openapi.yaml index fe8acbfc..be970102 100644 --- a/src/openapi.yaml +++ b/src/openapi.yaml @@ -456,6 +456,10 @@ paths: $ref: './resources/EnvironmentServiceDeploy.yaml' /environment/{environmentId}/service/restart-service: $ref: './resources/EnvironmentServiceReboot.yaml' + /environment/{environmentId}/service/stop: + $ref: './resources/EnvironmentServiceStop.yaml' + /environment/{environmentId}/service/delete: + $ref: './resources/EnvironmentServiceDelete.yaml' /organization/{organizationId}/container/deploy: $ref: './resources/OrganizationContainerAutoDeploy.yaml' /organization/{organizationId}/container/preview: diff --git a/src/resources/EnvironmentServiceDelete.yaml b/src/resources/EnvironmentServiceDelete.yaml new file mode 100644 index 00000000..c8f604cc --- /dev/null +++ b/src/resources/EnvironmentServiceDelete.yaml @@ -0,0 +1,26 @@ +post: + summary: 'Delete services' + description: Delete selected services + operationId: deleteSelectedServices + parameters: + - $ref: '../parameters/path/environmentId.yaml' + tags: + - Environment Actions + requestBody: + content: + application/json: + schema: + $ref: '../schemas/EnvironmentServiceIdsAllRequest.yaml' + responses: + '200': + description: 'Services have been triggered to be deleted' + '400': + $ref: '../responses/BadRequest.yaml' + '401': + $ref: '../responses/NotAuthorized.yaml' + '403': + $ref: '../responses/Forbidden.yaml' + '404': + $ref: '../responses/NotFound.yaml' + '409': + description: 'Operation is in progress' diff --git a/src/resources/EnvironmentServiceStop.yaml b/src/resources/EnvironmentServiceStop.yaml new file mode 100644 index 00000000..6a6cb632 --- /dev/null +++ b/src/resources/EnvironmentServiceStop.yaml @@ -0,0 +1,26 @@ +post: + summary: 'Stop services' + description: Stop selected services + operationId: stopSelectedServices + parameters: + - $ref: '../parameters/path/environmentId.yaml' + tags: + - Environment Actions + requestBody: + content: + application/json: + schema: + $ref: '../schemas/EnvironmentServiceIdsAllRequest.yaml' + responses: + '200': + description: 'Services have been triggered to be deleted' + '400': + $ref: '../responses/BadRequest.yaml' + '401': + $ref: '../responses/NotAuthorized.yaml' + '403': + $ref: '../responses/Forbidden.yaml' + '404': + $ref: '../responses/NotFound.yaml' + '409': + description: 'Operation is in progress' diff --git a/src/schemas/EnvironmentServiceIdsAllRequest.yaml b/src/schemas/EnvironmentServiceIdsAllRequest.yaml new file mode 100644 index 00000000..14045e4f --- /dev/null +++ b/src/schemas/EnvironmentServiceIdsAllRequest.yaml @@ -0,0 +1,22 @@ +type: object +properties: + application_ids: + type: array + items: + type: string + format: uuid + container_ids: + type: array + items: + type: string + format: uuid + database_ids: + type: array + items: + type: string + format: uuid + job_ids: + type: array + items: + type: string + format: uuid diff --git a/src/schemas/_index.yaml b/src/schemas/_index.yaml index 64d7f45b..0bfc5597 100644 --- a/src/schemas/_index.yaml +++ b/src/schemas/_index.yaml @@ -326,6 +326,8 @@ EnvironmentVariableRequest: $ref: ./EnvironmentVariableRequest.yaml EnvironmentVariableResponseList: $ref: ./EnvironmentVariableResponseList.yaml +EnvironmentServiceIdsAllRequest: + $ref: ./EnvironmentServiceIdsAllRequest.yaml APIVariableScopeEnum: $ref: ./enums/APIVariableScope.yaml APIVariableTypeEnum: