-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
cibot
committed
Dec 16, 2024
1 parent
63675ec
commit 79cd191
Showing
6 changed files
with
2,764 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,267 @@ | ||
openapi: 3.0.1 | ||
info: | ||
title: Album API | ||
contact: | ||
email: [email protected] | ||
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.cloudinsight.alertlogic.com | ||
x-alertlogic-session-endpoint: true | ||
description: production (US) | ||
- url: https://api.cloudinsight.alertlogic.co.uk | ||
description: production (UK) | ||
x-alertlogic-session-endpoint: true | ||
- url: https://api.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/images/{platform_type}/{product_type}: | ||
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' | ||
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: | ||
[ | ||
{ | ||
"image_id": "ami-11111111111111111", | ||
"region": "us-east-1", | ||
"description": "text" | ||
} | ||
] | ||
responses: | ||
'202': | ||
$ref: 'responses.yaml#/accepted' | ||
'400': | ||
$ref: 'responses.yaml#/bad_request' | ||
|
||
/album/v1/images/{platform_type}/{product_type}/{version}: | ||
post: | ||
operationId: add_new_images_to_existing_version_set | ||
tags: | ||
- POST | ||
summary: Add new images to existing version set | ||
description: |- | ||
Add a new image to an existing version set. | ||
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 image records to existing version set | ||
description: |- | ||
An array of records that will be added to the db for the specific version set, | ||
this can be used to add a new region ami. | ||
value: | ||
{ | ||
"image_id": "ami-11111111111111111", | ||
"region": "us-east-1", | ||
"description": "text" | ||
} | ||
|
||
responses: | ||
'202': | ||
$ref: 'responses.yaml#/accepted' | ||
'400': | ||
$ref: 'responses.yaml#/bad_request' | ||
put: | ||
operationId: modify_image_record | ||
tags: | ||
- PUT | ||
summary: Modify a record within existing version set | ||
description: |- | ||
Modify a image record within a existing version set. | ||
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 modifying a record within existing version set | ||
description: The record with specified image_id will be modified with the new values. | ||
value: | ||
{ | ||
"image_id": "ami-11111111111111111", | ||
"region": "us-east-1", | ||
"description": "text" | ||
} | ||
responses: | ||
'202': | ||
$ref: 'responses.yaml#/accepted' | ||
'400': | ||
$ref: 'responses.yaml#/bad_request' | ||
'404': | ||
$ref: 'responses.yaml#/not_found' | ||
delete: | ||
operationId: delete_image_record | ||
tags: | ||
- DELETE | ||
summary: Delete a record within existing version set | ||
description: |- | ||
Delete a image record within a existing version set. | ||
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 delete a record within existing version set | ||
description: The record with specified image_id will be deleted from the version set. | ||
value: | ||
{ | ||
"image_id": "ami-11111111111111111", | ||
} | ||
responses: | ||
'202': | ||
$ref: 'responses.yaml#/accepted' | ||
'400': | ||
$ref: 'responses.yaml#/bad_request' | ||
'404': | ||
$ref: 'responses.yaml#/not_found' | ||
|
||
/album/v1/images/{platform_type}/{product_type}/{version}/enable: | ||
post: | ||
operationId: enable_image_records_version_set | ||
tags: | ||
- POST | ||
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' | ||
|
||
/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 image's 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' | ||
delete: | ||
operationId: remove_launch_permission | ||
tags: | ||
- DELETE | ||
summary: Remove launch permission | ||
description: |- | ||
Remove launch permission for the current images the the specified platform account. | ||
parameters: | ||
- $ref: 'parameters.yaml#/path_platform_type' | ||
- $ref: 'parameters.yaml#/path_image_id' | ||
responses: | ||
'204': | ||
$ref: 'responses.yaml#/no_content' | ||
'404': | ||
$ref: 'responses.yaml#/not_found' | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
|
||
get_current_images: | ||
description: 'OK' | ||
content: | ||
application/json: | ||
schema: | ||
$ref: 'schemas.yaml#/current_images' | ||
|
||
get_all_images: | ||
description: 'OK' | ||
content: | ||
application/json: | ||
schema: | ||
$ref: 'schemas.yaml#/all_images' | ||
|
||
get_image: | ||
description: 'OK' | ||
content: | ||
application/json: | ||
schema: | ||
properties: | ||
$ref: 'schemas.yaml#/image' | ||
|
||
get_image_product_type: | ||
description: 'OK' | ||
content: | ||
application/json: | ||
schema: | ||
$ref: 'schemas.yaml#/product_type' | ||
|
||
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' |
Oops, something went wrong.