From 8f3e7b26ca40e4e39911f11a0f2c255c4de93e4d Mon Sep 17 00:00:00 2001 From: cibot Date: Thu, 2 Oct 2025 12:08:04 +0000 Subject: [PATCH] Definitions Update album --- alsdkdefs/apis/album/album.v1.yaml | 212 +++ alsdkdefs/apis/album/api/album.v1.html | 2275 ++++++++++++++++++++++++ alsdkdefs/apis/album/example.yaml | 0 alsdkdefs/apis/album/parameters.yaml | 51 + alsdkdefs/apis/album/responses.yaml | 54 + alsdkdefs/apis/album/schemas.yaml | 97 + 6 files changed, 2689 insertions(+) create mode 100644 alsdkdefs/apis/album/album.v1.yaml create mode 100644 alsdkdefs/apis/album/api/album.v1.html create mode 100644 alsdkdefs/apis/album/example.yaml create mode 100644 alsdkdefs/apis/album/parameters.yaml create mode 100644 alsdkdefs/apis/album/responses.yaml create mode 100644 alsdkdefs/apis/album/schemas.yaml diff --git a/alsdkdefs/apis/album/album.v1.yaml b/alsdkdefs/apis/album/album.v1.yaml new file mode 100644 index 0000000..876ca34 --- /dev/null +++ b/alsdkdefs/apis/album/album.v1.yaml @@ -0,0 +1,212 @@ +openapi: 3.0.2 +info: + title: Album API + contact: + email: support@alertlogic.com + name: Alert Logic Support + url: https://support.alertlogic.com + x-alertlogic-iws-service: + type: public + description: |- + AMI sharing service + version: 1.0.0 +servers: + - url: https://api.global.alertlogic.com + x-alertlogic-session-endpoint: true + description: production (US) + - url: https://api.global.alertlogic.com + description: production (UK) + x-alertlogic-session-endpoint: true + - url: https://api.global-integration.product.dev.alertlogic.com + description: integration +paths: + /album/v1/images: + get: + operationId: get_current_images + tags: + - GET + summary: Get current images + description: |- + Returns a list of current images. + parameters: + - $ref: 'parameters.yaml#/query_product_type' + - $ref: 'parameters.yaml#/query_platform_type' + responses: + '200': + $ref: 'responses.yaml#/get_current_images' + + /album/v1/all/images: + get: + operationId: get_all_images + tags: + - GET + summary: Get all images + description: |- + Returns a list of all image records, including their ami name and description. + responses: + '200': + $ref: 'responses.yaml#/get_all_images' + + /album/v1/all/images/{image_id}: + get: + operationId: get_image + tags: + - GET + summary: Get specified image + description: |- + Returns single image record, including their ami name and description. + parameters: + - $ref: 'parameters.yaml#/path_image_id' + responses: + '200': + $ref: 'responses.yaml#/get_image' + '404': + $ref: 'responses.yaml#/not_found' + + /album/v1/all/images/{image_id}/product_type: + get: + operationId: get_image_product_type + tags: + - GET + summary: Get specified images' product type + description: |- + Returns product type for specified image id. + parameters: + - $ref: 'parameters.yaml#/path_image_id' + responses: + '200': + $ref: 'responses.yaml#/get_image_product_type' + '404': + $ref: 'responses.yaml#/not_found' + + /album/v1/shares/{platform_type}/{platform_id}: + put: + operationId: add_launch_permission + tags: + - PUT + summary: Add launch permission + description: |- + Adds launch permission for the current images the the specified platform account. + parameters: + - $ref: 'parameters.yaml#/path_platform_type' + - $ref: 'parameters.yaml#/path_platform_id' + responses: + '204': + $ref: 'responses.yaml#/no_content' + '404': + $ref: 'responses.yaml#/not_found' + + /album/v2/images/{product_type}/{platform_type}/{version}: + get: + operationId: get_version_image_set + tags: + - GET + summary: Get a specific version set of images + description: |- + Get a specific version set of images. + parameters: + - $ref: 'parameters.yaml#/path_platform_type' + - $ref: 'parameters.yaml#/path_product_type' + - $ref: 'parameters.yaml#/path_version' + responses: + '200': + $ref: 'responses.yaml#/get_version_image_set' + '404': + $ref: 'responses.yaml#/not_found' + post: + operationId: add_new_images_and_create_version_set + tags: + - POST + summary: Add new images + description: |- + Add a new version of images. + parameters: + - $ref: 'parameters.yaml#/path_platform_type' + - $ref: 'parameters.yaml#/path_product_type' + - $ref: 'parameters.yaml#/path_version' + requestBody: + content: + application/json: + schema: + $ref: 'schemas.yaml#/ami_record_ref' + examples: + ami_record: + summary: Request for adding ami records + description: |- + An array of records that will be added to the db, + this will also put all ami in the request under a single version. + value: + { + "ami_name": "Example-AMI-Name", + "description": "Example-AMI-Description", + "image_array": [ + { + "image_id": "ami-11111111111111111", + "region": "us-east-1" + }, + { + "image_id": "ami-22222222222222222", + "region": "us-east-2" + }, + { + "image_id": "ami-33333333333333333", + "region": "us-west-1" + }, + { + "image_id": "ami-44444444444444444", + "region": "us-west-2" + } + ] + } + responses: + '202': + $ref: 'responses.yaml#/accepted' + '400': + $ref: 'responses.yaml#/bad_request' + + /album/v2/images/enabled: + get: + operationId: get_enabled_image_set + tags: + - GET + summary: Get enabled sets of images + description: |- + Get enabled sets of images per product type. + responses: + '200': + $ref: 'responses.yaml#/accepted' + '404': + $ref: 'responses.yaml#/not_found' + + /album/v2/images/all: + get: + operationId: get_all_image_set + tags: + - GET + summary: Get all sets of images + description: |- + Get all sets of images. + responses: + '200': + $ref: 'responses.yaml#/accepted' + '404': + $ref: 'responses.yaml#/not_found' + + /album/v2/images/{product_type}/{platform_type}/{version}/enable: + put: + operationId: enable_image_records_version_set + tags: + - PUT + summary: Enable a specific version set of images + description: |- + Enable a specific version set of images. + parameters: + - $ref: 'parameters.yaml#/path_platform_type' + - $ref: 'parameters.yaml#/path_product_type' + - $ref: 'parameters.yaml#/path_version' + responses: + '200': + $ref: 'responses.yaml#/accepted' + '404': + $ref: 'responses.yaml#/not_found' + diff --git a/alsdkdefs/apis/album/api/album.v1.html b/alsdkdefs/apis/album/api/album.v1.html new file mode 100644 index 0000000..c97be85 --- /dev/null +++ b/alsdkdefs/apis/album/api/album.v1.html @@ -0,0 +1,2275 @@ + + + + + + Album API + + + + + + + + + +

Album API (1.0.0)

Download OpenAPI specification:Download

AMI sharing service

+

GET

Get current images

Returns a list of current images.

+
query Parameters
product_type
string (product_type)
Enum: "ids" "scan" "wsm"

Product Type

+
platform_type
string (platform_type)
Value: "aws"

Platform Type

+

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get all images

Returns a list of all image records, including their ami name and description.

+

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get specified image

Returns single image record, including their ami name and description.

+
path Parameters
image_id
required
string (image_id)
Example: ami-11111111111111111

Responses

Response samples

Content type
application/json
{
  • "image_id": "string",
  • "region": "string"
}

Get specified images' product type

Returns product type for specified image id.

+
path Parameters
image_id
required
string (image_id)
Example: ami-11111111111111111

Responses

Response samples

Content type
application/json
"ids"

Get a specific version set of images

Get a specific version set of images.

+
path Parameters
platform_type
required
string (platform_type)
Value: "aws"

platform type

+
product_type
required
string (product_type)
Enum: "ids" "scan" "wsm"

product type

+
version
required
string (version)
Example: v1.0.0

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get enabled sets of images

Get enabled sets of images per product type.

+

Responses

Get all sets of images

Get all sets of images.

+

Responses

PUT

Add launch permission

Adds launch permission for the current images the the specified platform account.

+
path Parameters
platform_type
required
string (platform_type)
Value: "aws"

platform type

+
platform_id
required
string (platform_id)
Example: 0000-0000-0000

Responses

Enable a specific version set of images

Enable a specific version set of images.

+
path Parameters
platform_type
required
string (platform_type)
Value: "aws"

platform type

+
product_type
required
string (product_type)
Enum: "ids" "scan" "wsm"

product type

+
version
required
string (version)
Example: v1.0.0

Responses

POST

Add new images

Add a new version of images.

+
path Parameters
platform_type
required
string (platform_type)
Value: "aws"

platform type

+
product_type
required
string (product_type)
Enum: "ids" "scan" "wsm"

product type

+
version
required
string (version)
Example: v1.0.0
Request Body schema: application/json
ami_name
required
string (ami_name) non-empty

Description for the image

+
description
required
string (description)

Description for the image

+
required
Array of objects (image_array) >= 0 items

Responses

Request samples

Content type
application/json

An array of records that will be added to the db, +this will also put all ami in the request under a single version.

+
{
  • "ami_name": "Example-AMI-Name",
  • "description": "Example-AMI-Description",
  • "image_array": [
    ]
}
+ + + + \ No newline at end of file diff --git a/alsdkdefs/apis/album/example.yaml b/alsdkdefs/apis/album/example.yaml new file mode 100644 index 0000000..e69de29 diff --git a/alsdkdefs/apis/album/parameters.yaml b/alsdkdefs/apis/album/parameters.yaml new file mode 100644 index 0000000..631442c --- /dev/null +++ b/alsdkdefs/apis/album/parameters.yaml @@ -0,0 +1,51 @@ + +query_product_type: + name: product_type + required: false + description: Product Type + in: query + schema: + $ref: 'schemas.yaml#/product_type' + +query_platform_type: + name: platform_type + required: false + description: Platform Type + in: query + schema: + $ref: 'schemas.yaml#/platform_type' + +path_image_id: + name: image_id + required: true + in: path + schema: + $ref: 'schemas.yaml#/image_id' + +path_platform_id: + name: platform_id + required: true + in: path + schema: + $ref: 'schemas.yaml#/platform_id' + +path_product_type: + name: product_type + required: true + in: path + schema: + $ref: 'schemas.yaml#/product_type' + +path_platform_type: + name: platform_type + required: true + in: path + schema: + $ref: 'schemas.yaml#/platform_type' + +path_version: + name: version + required: true + in: path + schema: + $ref: 'schemas.yaml#/version' diff --git a/alsdkdefs/apis/album/responses.yaml b/alsdkdefs/apis/album/responses.yaml new file mode 100644 index 0000000..96a79df --- /dev/null +++ b/alsdkdefs/apis/album/responses.yaml @@ -0,0 +1,54 @@ + +get_current_images: + description: 'OK' + content: + application/json: + schema: + $ref: 'schemas.yaml#/v1_current_images' + +get_all_images: + description: 'OK' + content: + application/json: + schema: + $ref: 'schemas.yaml#/v1_all_images' + +get_image: + description: 'OK' + content: + application/json: + schema: + $ref: 'schemas.yaml#/image' + +get_image_product_type: + description: 'OK' + content: + application/json: + schema: + $ref: 'schemas.yaml#/product_type' + +get_version_image_set: + description: 'OK' + content: + application/json: + schema: + $ref: 'schemas.yaml#/v2_current_images' + +add_new_images_and_create_version_set: + description: 'OK' + content: + application/json: + schema: + $ref: 'schemas.yaml#/version' + +no_content: + description: 'Successful No Content' + +not_found: + description: 'Not Found' + +accepted: + description: 'Post Successful' + +bad_request: + description: 'Bad Request' diff --git a/alsdkdefs/apis/album/schemas.yaml b/alsdkdefs/apis/album/schemas.yaml new file mode 100644 index 0000000..6783049 --- /dev/null +++ b/alsdkdefs/apis/album/schemas.yaml @@ -0,0 +1,97 @@ + + +ami_record_ref: + $ref: '../../priv/schemas/api.json#/definitions/image_set' + +v1_current_images: + type: array + items: + type: object + properties: + type: + type: string + example: aws + product: + type: string + example: ids + images: + type: array + items: + description: 'v1_image object' + type: object + example: { + 'us-east-1' : 'ami-11111111111111111', + 'us-west-1' : 'ami-22222222222222222' + } + +v2_current_images: + type: array + items: + type: object + properties: + type: + type: string + example: aws + product: + type: string + example: ids + images: + type: array + items: + $ref: '#/image' + +v1_all_images: + type: array + items: + type: object + description: 'v1_all_image object' + example: { + 'product_type': 'ids', + 'platform_type': 'aws', + 'id': 'ami-11111111111111111', + 'details': { + 'region': 'us-east-1', + 'ami_name': 'example name' + }, + 'description': 'example description' + } + +image: + description: 'v2_image object' + type: object + properties: + image_id: + type: string + region: + type: string + +image_id: + type: string + example: ami-11111111111111111 + +region: + type: string + example: us-east-1 + +version: + type: string + example: v1.0.0 + +product_type: + type: string + description: product type + enum: + - ids + - scan + - wsm + +platform_type: + type: string + description: platform type + enum: + - aws + +platform_id: + type: string + example: 0000-0000-0000 +