diff --git a/packages/go/openapi/src/openapi.yaml b/packages/go/openapi/src/openapi.yaml index 6652673e976..e1997574212 100644 --- a/packages/go/openapi/src/openapi.yaml +++ b/packages/go/openapi/src/openapi.yaml @@ -392,6 +392,8 @@ paths: $ref: './paths/graph.graphs.acl-inheritance.yaml' # /api/v2/graph-retention-policies/base/policy: # $ref: './paths/graph-retention-policies.base.policy.yaml' + # /api/v2/graph-retention-policies/extensions/{extension_id}/policy: + # $ref: './paths/graph-retention-policies.extensions.id.policy.yaml' # opengraph extensions /api/v2/extensions: diff --git a/packages/go/openapi/src/paths/graph-retention-policies.extensions.id.policy.yaml b/packages/go/openapi/src/paths/graph-retention-policies.extensions.id.policy.yaml new file mode 100644 index 00000000000..1d9639a06c0 --- /dev/null +++ b/packages/go/openapi/src/paths/graph-retention-policies.extensions.id.policy.yaml @@ -0,0 +1,53 @@ +# Copyright 2026 Specter Ops, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + +parameters: + - $ref: './../parameters/header.prefer.yaml' + - name: extension_id + description: Extension ID + in: path + required: true + schema: + type: integer + format: int64 +get: + operationId: GetExtensionRetentionPolicy + summary: Get Extension Retention Policy + tags: + - Graph Retention Policies + - Enterprise + responses: + 200: + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: './../schemas/model.graph-extension-retention-policy.yaml' + 400: + $ref: './../responses/bad-request.yaml' + 401: + $ref: './../responses/unauthorized.yaml' + 403: + $ref: './../responses/forbidden.yaml' + 404: + $ref: './../responses/not-found.yaml' + 429: + $ref: './../responses/too-many-requests.yaml' + 500: + $ref: './../responses/internal-server-error.yaml' diff --git a/packages/go/openapi/src/schemas/model.graph-extension-retention-policy.yaml b/packages/go/openapi/src/schemas/model.graph-extension-retention-policy.yaml new file mode 100644 index 00000000000..c20a585fe18 --- /dev/null +++ b/packages/go/openapi/src/schemas/model.graph-extension-retention-policy.yaml @@ -0,0 +1,25 @@ +# Copyright 2026 Specter Ops, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + +type: object +description: The data to describe an extension retention policy +allOf: + - $ref: './model.graph-retention-policy.yaml' + - type: object + properties: + extension_id: + type: integer +