debian-image-builder-frontend/api/schema/provisioning.json
regexowl 855f1430ad api: Update pull.sh, regenerate schemas and fix errors
This adds missing schema links to the `pull.sh` script, pulls new schema definitions, re-generates schemas and updates the code where needed.
2025-07-03 10:01:15 +00:00

2193 lines
64 KiB
JSON

{
"components": {
"examples": {
"v1.AvailabilityStatusRequest": {
"value": {
"source_id": "463243"
}
},
"v1.AwsReservationRequestPayloadExample": {
"value": {
"amount": 1,
"image_id": "ami-7846387643232",
"instance_type": "t3.small",
"launch_template_id": "",
"name": "my-instance",
"poweroff": false,
"pubkey_id": 42,
"region": "us-east-1",
"source_id": "654321"
}
},
"v1.AwsReservationResponsePayloadDoneExample": {
"value": {
"amount": 1,
"aws_reservation_id": "r-3743243324231",
"image_id": "ami-7846387643232",
"instance_type": "t3.small",
"instances": [
{
"detail": {
"privateipv4": "172.31.36.10",
"privateipv6": "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
"publicdns": "ec2-184-73-141-211.compute-1.amazonaws.com",
"publicipv4": "184.73.141.211"
},
"instance_id": "i-2324343212"
}
],
"launch_template_id": "",
"name": "my-instance",
"poweroff": false,
"pubkey_id": 42,
"region": "us-east-1",
"reservation_id": 1305,
"source_id": "654321"
}
},
"v1.AwsReservationResponsePayloadPendingExample": {
"value": {
"amount": 1,
"aws_reservation_id": "",
"image_id": "ami-7846387643232",
"instance_type": "t3.small",
"instances": [],
"launch_template_id": "",
"name": "my-instance",
"poweroff": false,
"pubkey_id": 42,
"region": "us-east-1",
"reservation_id": 0,
"source_id": "654321"
}
},
"v1.AzureReservationRequestPayloadExample": {
"value": {
"amount": 1,
"image_id": "composer-api-081fc867-838f-44a5-af03-8b8def808431",
"instance_size": "Basic_A0",
"location": "useast",
"name": "my-instance",
"poweroff": false,
"pubkey_id": 42,
"resource_group": "redhat-hcc",
"source_id": "654321"
}
},
"v1.AzureReservationResponsePayloadDoneExample": {
"value": {
"amount": 1,
"image_id": "composer-api-081fc867-838f-44a5-af03-8b8def808431",
"instance_size": "Basic_A0",
"instances": [
{
"detail": {
"privateipv4": "172.22.0.1",
"privateipv6": "",
"publicdns": "",
"publicipv4": "10.0.0.88"
},
"instance_id": "/subscriptions/4b9d213f-712f-4d17-a483-8a10bbe9df3a/resourceGroups/redhat-deployed/providers/Microsoft.Compute/images/composer-api-92ea98f8-7697-472e-80b1-7454fa0e7fa7"
}
],
"location": "useast",
"name": "my-instance",
"poweroff": false,
"pubkey_id": 42,
"reservation_id": 1310,
"resource_group": "myCustom Azure RG",
"source_id": "654321"
}
},
"v1.AzureReservationResponsePayloadPendingExample": {
"value": {
"amount": 1,
"image_id": "composer-api-081fc867-838f-44a5-af03-8b8def808431",
"instance_size": "Basic_A0",
"instances": [],
"location": "useast",
"name": "my-instance",
"poweroff": false,
"pubkey_id": 42,
"reservation_id": 1310,
"resource_group": "myCustom Azure RG",
"source_id": "654321"
}
},
"v1.GCPReservationRequestPayloadExample": {
"value": {
"amount": 1,
"image_id": "08a48fed-de87-40ab-a571-f64e30bd0aa8",
"launch_template_id": "",
"machine_type": "e2-micro",
"name_pattern": "my-instance",
"poweroff": false,
"pubkey_id": 42,
"source_id": "654321",
"zone": "us-east-4"
}
},
"v1.GCPReservationResponsePayloadDoneExample": {
"value": {
"amount": 1,
"gcp_operation_name": "operation-1686646674436-5fdff07e43209-66146b7e-f3f65ec5",
"image_id": "08a48fed-de87-40ab-a571-f64e30bd0aa8",
"instances": [
{
"detail": {
"privateipv4": "10.198.0.2",
"privateipv6": "",
"publicdns": "",
"publicipv4": "10.0.0.88"
},
"instance_id": "3003942005876582747"
}
],
"launch_template_id": "4883371230199373111",
"machine_type": "e2-micro",
"name_pattern": "my-instance",
"poweroff": false,
"pubkey_id": 42,
"reservation_id": 1305,
"source_id": "654321",
"zone": "us-east-4"
}
},
"v1.GCPReservationResponsePayloadPendingExample": {
"value": {
"amount": 1,
"gcp_operation_name": "operation-1686646674436-5fdff07e43209-66146b7e-f3f65ec5",
"image_id": "08a48fed-de87-40ab-a571-f64e30bd0aa8",
"instances": [],
"launch_template_id": "4883371230199373111",
"machine_type": "e2-micro",
"name_pattern": "my-instance",
"poweroff": false,
"pubkey_id": 42,
"reservation_id": 1305,
"source_id": "654321",
"zone": "us-east-4"
}
},
"v1.GenericReservationResponsePayloadFailureExample": {
"value": {
"created_at": "2013-05-13T19:20:15Z",
"error": "cannot launch ec2 instance: VPCIdNotSpecified: No default VPC for this user. GroupName is only supported for EC2-Classic and default VPC",
"finished_at": "2013-05-13T19:20:25Z",
"id": 1313,
"provider": 1,
"status": "Finished Launch instance(s)",
"step": 2,
"step_titles": [
"Ensure public key",
"Launch instance(s)",
"Fetch instance(s) description"
],
"steps": 3,
"success": false
}
},
"v1.GenericReservationResponsePayloadListExample": {
"value": {
"data": [
{
"created_at": "2013-05-13T19:20:15Z",
"error": "",
"finished_at": null,
"id": 1310,
"provider": 1,
"status": "Started Ensure public key",
"step": 1,
"step_titles": [
"Ensure public key",
"Launch instance(s)",
"Fetch instance(s) description"
],
"steps": 3,
"success": null
},
{
"created_at": "2013-05-13T19:20:15Z",
"error": "",
"finished_at": "2013-05-13T19:20:25Z",
"id": 1305,
"provider": 1,
"status": "Finished Fetch instance(s) description",
"step": 3,
"step_titles": [
"Ensure public key",
"Launch instance(s)",
"Fetch instance(s) description"
],
"steps": 3,
"success": true
},
{
"created_at": "2013-05-13T19:20:15Z",
"error": "cannot launch ec2 instance: VPCIdNotSpecified: No default VPC for this user. GroupName is only supported for EC2-Classic and default VPC",
"finished_at": "2013-05-13T19:20:25Z",
"id": 1313,
"provider": 1,
"status": "Finished Launch instance(s)",
"step": 2,
"step_titles": [
"Ensure public key",
"Launch instance(s)",
"Fetch instance(s) description"
],
"steps": 3,
"success": false
}
],
"metadata": {
"links": {
"next": "",
"previous": ""
},
"total": 3
}
}
},
"v1.GenericReservationResponsePayloadPendingExample": {
"value": {
"created_at": "2013-05-13T19:20:15Z",
"error": "",
"finished_at": null,
"id": 1310,
"provider": 1,
"status": "Started Ensure public key",
"step": 1,
"step_titles": [
"Ensure public key",
"Launch instance(s)",
"Fetch instance(s) description"
],
"steps": 3,
"success": null
}
},
"v1.GenericReservationResponsePayloadSuccessExample": {
"value": {
"created_at": "2013-05-13T19:20:15Z",
"error": "",
"finished_at": "2013-05-13T19:20:25Z",
"id": 1305,
"provider": 1,
"status": "Finished Fetch instance(s) description",
"step": 3,
"step_titles": [
"Ensure public key",
"Launch instance(s)",
"Fetch instance(s) description"
],
"steps": 3,
"success": true
}
},
"v1.InstanceTypesAWSResponse": {
"value": {
"data": [
{
"arch": "x86_64",
"cores": 16,
"memory_mib": 65536,
"name": "c5a.8xlarge",
"storage_gb": 0,
"supported": true,
"vcpus": 32
}
]
}
},
"v1.InstanceTypesAzureResponse": {
"value": {
"data": [
{
"arch": "x86_64",
"azure": {
"gen_v1": true,
"gen_v2": true
},
"cores": 64,
"memory_mib": 2000000,
"name": "Standard_M128s",
"storage_gb": 4096,
"supported": true,
"vcpus": 128
}
]
}
},
"v1.InstanceTypesGCPResponse": {
"value": {
"data": [
{
"arch": "x86_64",
"cores": 0,
"memory_mib": 15623,
"name": "e2-highcpu-16",
"storage_gb": 0,
"supported": true,
"vcpus": 16
}
]
}
},
"v1.LaunchTemplateListResponse": {
"value": {
"data": [
{
"id": "lt-9843797432897342",
"name": "XXL large backend API"
}
],
"metadata": {
"links": {
"next": "",
"previous": ""
},
"total": 0
}
}
},
"v1.NoopReservationResponsePayloadExample": {
"value": {
"reservation_id": 1310
}
},
"v1.PubkeyListResponseExample": {
"value": {
"data": [
{
"body": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEhnn80ZywmjeBFFOGm+cm+5HUwm62qTVnjKlOdYFLHN lzap",
"fingerprint": "gL/y6MvNmJ8jDXtsL/oMmK8jUuIefN39BBuvYw/Rndk=",
"fingerprint_legacy": "ee:f1:d4:62:99:ab:17:d9:3b:00:66:62:32:b2:55:9e",
"id": 3,
"name": "My key",
"type": "ssh-ed25519"
}
],
"metadata": {
"links": {
"next": "",
"previous": "/api/provisioning/v1/pubkeys?limit=2\u0026offset=0"
},
"total": 3
}
}
},
"v1.PubkeyRequestExample": {
"value": {
"body": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEhnn80ZywmjeBFFOGm+cm+5HUwm62qTVnjKlOdYFLHN lzap",
"name": "My key"
}
},
"v1.PubkeyResponseExample": {
"value": {
"body": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEhnn80ZywmjeBFFOGm+cm+5HUwm62qTVnjKlOdYFLHN lzap",
"fingerprint": "gL/y6MvNmJ8jDXtsL/oMmK8jUuIefN39BBuvYw/Rndk=",
"fingerprint_legacy": "ee:f1:d4:62:99:ab:17:d9:3b:00:66:62:32:b2:55:9e",
"id": 1,
"name": "My key",
"type": "ssh-ed25519"
}
},
"v1.SourceListResponseExample": {
"value": {
"data": [
{
"id": "654321",
"name": "My AWS account",
"provider": "aws",
"source_type_id": "",
"status": "available",
"uid": ""
},
{
"id": "543621",
"name": "My other AWS account",
"provider": "aws",
"source_type_id": "",
"status": "available",
"uid": ""
}
],
"metadata": {
"links": {
"next": "",
"previous": "/api/provisioning/v1/sources?limit=2\u0026offset=0"
},
"total": 4
}
}
},
"v1.SourceUploadInfoAWSResponse": {
"value": {
"aws": {
"account_id": "78462784632"
},
"azure": null,
"gcp": null,
"provider": "aws"
}
},
"v1.SourceUploadInfoAzureResponse": {
"value": {
"aws": null,
"azure": {
"resourcegroups": [
"MyGroup 1",
"MyGroup 42"
],
"subscriptionid": "617807e1-e4e0-4855-983c-1e3ce1e49674",
"tenantid": "617807e1-e4e0-481c-983c-be3ce1e49253"
},
"gcp": null,
"provider": "azure"
}
}
},
"parameters": {
"Limit": {
"description": "The number of items to return.",
"in": "query",
"name": "limit",
"schema": {
"default": 100,
"type": "integer"
}
},
"Offset": {
"description": "The number of items to skip before starting to collect the result set.",
"in": "query",
"name": "offset",
"schema": {
"default": 0,
"type": "integer"
}
},
"Token": {
"description": "The token used for requesting the next page of results; empty token for the first page",
"in": "query",
"name": "token",
"schema": {
"default": "",
"type": "string"
}
}
},
"responses": {
"BadRequest": {
"content": {
"application/json": {
"examples": {
"error": {
"value": {
"build_time": "2023-04-14_17:15:02",
"edge_id": "",
"environment": "",
"error": "error: bad request: details can be long",
"trace_id": "b57f7b78c",
"version": "df8a489"
}
}
},
"schema": {
"$ref": "#/components/schemas/v1.ResponseError"
}
}
},
"description": "The request's parameters are not valid"
},
"InternalError": {
"content": {
"application/json": {
"examples": {
"error": {
"value": {
"build_time": "2023-04-14_17:15:02",
"edge_id": "",
"environment": "",
"error": "error: this can be pretty long string",
"trace_id": "b57f7b78c",
"version": "df8a489"
}
}
},
"schema": {
"$ref": "#/components/schemas/v1.ResponseError"
}
}
},
"description": "The server encountered an internal error"
},
"NotFound": {
"content": {
"application/json": {
"examples": {
"error": {
"value": {
"build_time": "2023-04-14_17:15:02",
"edge_id": "",
"environment": "",
"error": "error: resource not found: details can be long",
"trace_id": "b57f7b78c",
"version": "df8a489"
}
}
},
"schema": {
"$ref": "#/components/schemas/v1.ResponseError"
}
}
},
"description": "The requested resource was not found"
}
},
"schemas": {
"v1.AWSReservationRequest": {
"properties": {
"amount": {
"format": "int32",
"type": "integer"
},
"image_id": {
"type": "string"
},
"instance_type": {
"type": "string"
},
"launch_template_id": {
"type": "string"
},
"name": {
"type": "string"
},
"poweroff": {
"type": "boolean"
},
"pubkey_id": {
"format": "int64",
"type": "integer"
},
"region": {
"type": "string"
},
"source_id": {
"type": "string"
}
},
"type": "object"
},
"v1.AWSReservationResponse": {
"properties": {
"amount": {
"format": "int32",
"type": "integer"
},
"aws_reservation_id": {
"type": "string"
},
"image_id": {
"type": "string"
},
"instance_type": {
"type": "string"
},
"instances": {
"items": {
"properties": {
"detail": {
"properties": {
"private_ipv4": {
"type": "string"
},
"private_ipv6": {
"type": "string"
},
"public_dns": {
"type": "string"
},
"public_ipv4": {
"type": "string"
}
},
"type": "object"
},
"instance_id": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"launch_template_id": {
"type": "string"
},
"name": {
"type": "string"
},
"poweroff": {
"type": "boolean"
},
"pubkey_id": {
"format": "int64",
"nullable": true,
"type": "integer"
},
"region": {
"type": "string"
},
"reservation_id": {
"format": "int64",
"type": "integer"
},
"source_id": {
"type": "string"
}
},
"type": "object"
},
"v1.AccountIDTypeResponse": {
"properties": {
"aws": {
"nullable": true,
"properties": {
"account_id": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"v1.AvailabilityStatusRequest": {
"properties": {
"source_id": {
"type": "string"
}
},
"type": "object"
},
"v1.AzureReservationRequest": {
"properties": {
"amount": {
"format": "int64",
"type": "integer"
},
"image_id": {
"type": "string"
},
"instance_size": {
"type": "string"
},
"location": {
"description": "Location (also known as region) to deploy the VM into, be aware it needs to be the same as the image location. Defaults to the Resource Group location, or 'eastus' when also creating the resource group.",
"type": "string"
},
"name": {
"description": "Name of the instance, to keep names unique, it will be suffixed with UUID. Optional, defaults to 'redhat-vm''",
"type": "string"
},
"poweroff": {
"type": "boolean"
},
"pubkey_id": {
"format": "int64",
"type": "integer"
},
"resource_group": {
"description": "Azure resource group name to deploy the VM resources into. Optional, defaults to images resource group and when not found to 'redhat-deployed'.",
"type": "string"
},
"source_id": {
"type": "string"
}
},
"type": "object"
},
"v1.AzureReservationResponse": {
"properties": {
"amount": {
"format": "int64",
"type": "integer"
},
"image_id": {
"type": "string"
},
"instance_size": {
"type": "string"
},
"instances": {
"items": {
"properties": {
"detail": {
"properties": {
"private_ipv4": {
"type": "string"
},
"private_ipv6": {
"type": "string"
},
"public_dns": {
"type": "string"
},
"public_ipv4": {
"type": "string"
}
},
"type": "object"
},
"instance_id": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"location": {
"type": "string"
},
"name": {
"type": "string"
},
"poweroff": {
"type": "boolean"
},
"pubkey_id": {
"format": "int64",
"nullable": true,
"type": "integer"
},
"reservation_id": {
"format": "int64",
"type": "integer"
},
"resource_group": {
"type": "string"
},
"source_id": {
"type": "string"
}
},
"type": "object"
},
"v1.GCPReservationRequest": {
"properties": {
"amount": {
"format": "int64",
"type": "integer"
},
"image_id": {
"type": "string"
},
"launch_template_id": {
"type": "string"
},
"machine_type": {
"type": "string"
},
"name_pattern": {
"type": "string"
},
"poweroff": {
"type": "boolean"
},
"pubkey_id": {
"format": "int64",
"type": "integer"
},
"source_id": {
"type": "string"
},
"zone": {
"type": "string"
}
},
"type": "object"
},
"v1.GCPReservationResponse": {
"properties": {
"amount": {
"format": "int64",
"type": "integer"
},
"gcp_operation_name": {
"type": "string"
},
"image_id": {
"type": "string"
},
"instances": {
"items": {
"properties": {
"detail": {
"properties": {
"private_ipv4": {
"type": "string"
},
"private_ipv6": {
"type": "string"
},
"public_dns": {
"type": "string"
},
"public_ipv4": {
"type": "string"
}
},
"type": "object"
},
"instance_id": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"launch_template_id": {
"type": "string"
},
"machine_type": {
"type": "string"
},
"name_pattern": {
"type": "string"
},
"poweroff": {
"type": "boolean"
},
"pubkey_id": {
"format": "int64",
"nullable": true,
"type": "integer"
},
"reservation_id": {
"format": "int64",
"type": "integer"
},
"source_id": {
"type": "string"
},
"zone": {
"type": "string"
}
},
"type": "object"
},
"v1.GenericReservationResponse": {
"properties": {
"created_at": {
"format": "date-time",
"type": "string"
},
"error": {
"type": "string"
},
"finished_at": {
"format": "date-time",
"nullable": true,
"type": "string"
},
"id": {
"format": "int64",
"type": "integer"
},
"provider": {
"type": "integer"
},
"status": {
"type": "string"
},
"step": {
"format": "int32",
"type": "integer"
},
"step_titles": {
"items": {
"type": "string"
},
"type": "array"
},
"steps": {
"format": "int32",
"type": "integer"
},
"success": {
"nullable": true,
"type": "boolean"
}
},
"type": "object"
},
"v1.InstanceTypeResponse": {
"properties": {
"architecture": {
"type": "string"
},
"azure": {
"nullable": true,
"properties": {
"gen_v1": {
"type": "boolean"
},
"gen_v2": {
"type": "boolean"
}
},
"type": "object"
},
"cores": {
"format": "int32",
"type": "integer"
},
"memory_mib": {
"format": "int64",
"type": "integer"
},
"name": {
"type": "string"
},
"storage_gb": {
"format": "int64",
"type": "integer"
},
"supported": {
"type": "boolean"
},
"vcpus": {
"format": "int32",
"type": "integer"
}
},
"type": "object"
},
"v1.LaunchTemplatesResponse": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"type": "object"
},
"v1.ListGenericReservationResponse": {
"properties": {
"data": {
"items": {
"nullable": true,
"properties": {
"created_at": {
"format": "date-time",
"type": "string"
},
"error": {
"type": "string"
},
"finished_at": {
"format": "date-time",
"nullable": true,
"type": "string"
},
"id": {
"format": "int64",
"type": "integer"
},
"provider": {
"type": "integer"
},
"status": {
"type": "string"
},
"step": {
"format": "int32",
"type": "integer"
},
"step_titles": {
"items": {
"type": "string"
},
"type": "array"
},
"steps": {
"format": "int32",
"type": "integer"
},
"success": {
"nullable": true,
"type": "boolean"
}
},
"type": "object"
},
"type": "array"
},
"metadata": {
"properties": {
"links": {
"properties": {
"next": {
"type": "string"
},
"previous": {
"type": "string"
}
},
"type": "object"
},
"total": {
"type": "integer"
}
},
"type": "object"
}
},
"type": "object"
},
"v1.ListInstaceTypeResponse": {
"properties": {
"data": {
"items": {
"nullable": true,
"properties": {
"architecture": {
"type": "string"
},
"azure": {
"nullable": true,
"properties": {
"gen_v1": {
"type": "boolean"
},
"gen_v2": {
"type": "boolean"
}
},
"type": "object"
},
"cores": {
"format": "int32",
"type": "integer"
},
"memory_mib": {
"format": "int64",
"type": "integer"
},
"name": {
"type": "string"
},
"storage_gb": {
"format": "int64",
"type": "integer"
},
"supported": {
"type": "boolean"
},
"vcpus": {
"format": "int32",
"type": "integer"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
},
"v1.ListLaunchTemplateResponse": {
"properties": {
"data": {
"items": {
"nullable": true,
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"metadata": {
"properties": {
"links": {
"properties": {
"next": {
"type": "string"
},
"previous": {
"type": "string"
}
},
"type": "object"
},
"total": {
"type": "integer"
}
},
"type": "object"
}
},
"type": "object"
},
"v1.ListPubkeyResponse": {
"properties": {
"data": {
"items": {
"nullable": true,
"properties": {
"body": {
"type": "string"
},
"fingerprint": {
"type": "string"
},
"fingerprint_legacy": {
"type": "string"
},
"id": {
"format": "int64",
"type": "integer"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"metadata": {
"properties": {
"links": {
"properties": {
"next": {
"type": "string"
},
"previous": {
"type": "string"
}
},
"type": "object"
},
"total": {
"type": "integer"
}
},
"type": "object"
}
},
"type": "object"
},
"v1.ListSourceResponse": {
"properties": {
"data": {
"items": {
"nullable": true,
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"provider": {
"description": "One of ('azure', 'aws', 'gcp')",
"type": "string"
},
"source_type_id": {
"deprecated": true,
"type": "string"
},
"status": {
"type": "string"
},
"uid": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"metadata": {
"properties": {
"links": {
"properties": {
"next": {
"type": "string"
},
"previous": {
"type": "string"
}
},
"type": "object"
},
"total": {
"type": "integer"
}
},
"type": "object"
}
},
"type": "object"
},
"v1.NoopReservationResponse": {
"properties": {
"reservation_id": {
"format": "int64",
"type": "integer"
}
},
"type": "object"
},
"v1.PubkeyRequest": {
"properties": {
"body": {
"description": "Add a public part of a SSH key pair.",
"type": "string"
},
"name": {
"description": "Enter the name of the newly created pubkey.",
"type": "string"
}
},
"type": "object"
},
"v1.PubkeyResponse": {
"properties": {
"body": {
"type": "string"
},
"fingerprint": {
"type": "string"
},
"fingerprint_legacy": {
"type": "string"
},
"id": {
"format": "int64",
"type": "integer"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
}
},
"type": "object"
},
"v1.ResponseError": {
"properties": {
"build_time": {
"type": "string"
},
"edge_id": {
"type": "string"
},
"environment": {
"type": "string"
},
"error": {
"type": "string"
},
"msg": {
"type": "string"
},
"trace_id": {
"type": "string"
},
"version": {
"type": "string"
}
},
"type": "object"
},
"v1.SourceResponse": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"provider": {
"description": "One of ('azure', 'aws', 'gcp')",
"type": "string"
},
"source_type_id": {
"deprecated": true,
"type": "string"
},
"status": {
"type": "string"
},
"uid": {
"type": "string"
}
},
"type": "object"
},
"v1.SourceUploadInfoResponse": {
"properties": {
"aws": {
"nullable": true,
"properties": {
"account_id": {
"type": "string"
}
},
"type": "object"
},
"azure": {
"nullable": true,
"properties": {
"resource_groups": {
"items": {
"type": "string"
},
"type": "array"
},
"subscription_id": {
"type": "string"
},
"tenant_id": {
"type": "string"
}
},
"type": "object"
},
"gcp": {
"nullable": true
},
"provider": {
"type": "string"
}
},
"type": "object"
}
}
},
"info": {
"description": "Provisioning service API",
"license": {
"name": "GPL-3.0"
},
"title": "provisioning-api",
"version": "1.13.0"
},
"openapi": "3.0.0",
"paths": {
"/availability_status/sources": {
"post": {
"description": "Schedules a background operation of Sources availability check. These checks are are performed in separate process at it's own pace. Results are sent via Kafka to Sources. There is no output from this REST operation available, no tracking of jobs is possible.\n",
"operationId": "availabilityStatus",
"requestBody": {
"content": {
"application/json": {
"examples": {
"example": {
"$ref": "#/components/examples/v1.AvailabilityStatusRequest"
}
},
"schema": {
"$ref": "#/components/schemas/v1.AvailabilityStatusRequest"
}
}
},
"description": "availability status request with source id",
"required": true
},
"responses": {
"200": {
"description": "Returned on success, empty response."
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"tags": [
"Source"
]
}
},
"/instance_types/{PROVIDER}": {
"get": {
"description": "Return a list of instance types for particular provider. A region must be provided. A zone must be provided for Azure.\n",
"operationId": "getInstanceTypeListAll",
"parameters": [
{
"description": "Cloud provider: aws, azure",
"in": "path",
"name": "PROVIDER",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "Region to list instance types within. This is required.",
"in": "query",
"name": "region",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "Availability zone (or location) to list instance types within. Not applicable for AWS EC2 as all zones within a region are the same (will lead to an error when used). Required for Azure.",
"in": "query",
"name": "zone",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"examples": {
"aws": {
"$ref": "#/components/examples/v1.InstanceTypesAWSResponse"
},
"azure": {
"$ref": "#/components/examples/v1.InstanceTypesAzureResponse"
}
},
"schema": {
"$ref": "#/components/schemas/v1.ListInstaceTypeResponse"
}
}
},
"description": "Return on success. Instance types have a field \"supported\" that indicates whether that particular type is supported by Red Hat. Typically, instances with less than 1.5 GiB RAM are not supported, but other rules may apply.\n"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"tags": [
"InstanceType"
]
}
},
"/pubkeys": {
"get": {
"description": "Returns a list of all public keys available in a particular account.\n",
"operationId": "getPubkeyList",
"parameters": [
{
"$ref": "#/components/parameters/Limit"
},
{
"$ref": "#/components/parameters/Offset"
}
],
"responses": {
"200": {
"content": {
"application/json": {
"examples": {
"example": {
"$ref": "#/components/examples/v1.PubkeyListResponseExample"
}
},
"schema": {
"$ref": "#/components/schemas/v1.ListPubkeyResponse"
}
}
},
"description": "OK. Returned on success."
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"tags": [
"Pubkey"
]
},
"post": {
"description": "Creates a new public key and stores it in the provisioning database. Public keys are uploaded to clouds at the time of launching an instance. Some fields such as type or fingerprint are read-only.\n",
"operationId": "createPubkey",
"requestBody": {
"content": {
"application/json": {
"examples": {
"example": {
"$ref": "#/components/examples/v1.PubkeyRequestExample"
}
},
"schema": {
"$ref": "#/components/schemas/v1.PubkeyRequest"
}
}
},
"description": "request body",
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"examples": {
"example": {
"$ref": "#/components/examples/v1.PubkeyRequestExample"
}
},
"schema": {
"$ref": "#/components/schemas/v1.PubkeyResponse"
}
}
},
"description": "OK. Returned on success."
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"tags": [
"Pubkey"
]
}
},
"/pubkeys/{ID}": {
"delete": {
"description": "Deletes SSH keys that were uploaded with the specified public key from all the clouds. If a public key (pubkey) has been uploaded to one or more cloud providers, the deletion request attempts to remove those SSH keys from all associated clouds. Therefore, to delete a public key, the account must possess valid credentials for all cloud accounts to which the pubkey was uploaded. Otherwise, the delete operation fails, and the public key is not removed from the Provisioning database. This operation does not return a response body.\n",
"operationId": "removePubkeyById",
"parameters": [
{
"description": "Enter the database ID of resource.",
"in": "path",
"name": "ID",
"required": true,
"schema": {
"format": "int64",
"type": "integer"
}
}
],
"responses": {
"204": {
"description": "The Pubkey was deleted successfully."
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"tags": [
"Pubkey"
]
},
"get": {
"description": "Gets details of the specified public key.",
"operationId": "getPubkeyById",
"parameters": [
{
"description": "Database ID to search for",
"in": "path",
"name": "ID",
"required": true,
"schema": {
"format": "int64",
"type": "integer"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"examples": {
"example": {
"$ref": "#/components/examples/v1.PubkeyResponseExample"
}
},
"schema": {
"$ref": "#/components/schemas/v1.PubkeyResponse"
}
}
},
"description": "OK. Returned on success"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"tags": [
"Pubkey"
]
}
},
"/reservations": {
"get": {
"description": "A reservation is a way to activate a job, keeps all data needed for a job to start. This operation returns list of all reservations for particular account. To get a reservation with common fields, use /reservations/ID. To get a detailed reservation with all fields which are different per provider, use /reservations/aws/ID. Reservation can be in three states: pending, success, failed. This can be recognized by the success field (null for pending, true for success, false for failure). See the examples.\n",
"operationId": "getReservationsList",
"parameters": [
{
"$ref": "#/components/parameters/Limit"
},
{
"$ref": "#/components/parameters/Offset"
}
],
"responses": {
"200": {
"content": {
"application/json": {
"examples": {
"example": {
"$ref": "#/components/examples/v1.GenericReservationResponsePayloadListExample"
}
},
"schema": {
"$ref": "#/components/schemas/v1.ListGenericReservationResponse"
}
}
},
"description": "Returned on success."
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"tags": [
"Reservation"
]
}
},
"/reservations/aws": {
"post": {
"description": "A reservation is a way to activate a job, keeps all data needed for a job to start. An AWS reservation is a reservation created for an AWS job. Image Builder UUID image is required, the service will also launch any AMI image prefixed with \"ami-\". Optionally, AWS EC2 launch template ID can be provided. All flags set through this endpoint override template values. Public key must exist prior calling this endpoint and ID must be provided, even when AWS EC2 launch template provides ssh-keys. Public key will be always be overwritten. A single account can create maximum of 2 reservations per second.\n",
"operationId": "createAwsReservation",
"requestBody": {
"content": {
"application/json": {
"examples": {
"example": {
"$ref": "#/components/examples/v1.AwsReservationRequestPayloadExample"
}
},
"schema": {
"$ref": "#/components/schemas/v1.AWSReservationRequest"
}
}
},
"description": "aws request body",
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/v1.AWSReservationResponse"
}
}
},
"description": "Returned on success."
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"tags": [
"Reservation"
]
}
},
"/reservations/aws/{ID}": {
"get": {
"description": "Return an AWS reservation with details by id",
"operationId": "getAWSReservationByID",
"parameters": [
{
"description": "Reservation ID, must be an AWS reservation otherwise 404 is returned",
"in": "path",
"name": "ID",
"required": true,
"schema": {
"format": "int64",
"type": "integer"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"examples": {
"done": {
"$ref": "#/components/examples/v1.AwsReservationResponsePayloadDoneExample"
},
"pending": {
"$ref": "#/components/examples/v1.AwsReservationResponsePayloadPendingExample"
}
},
"schema": {
"$ref": "#/components/schemas/v1.AWSReservationResponse"
}
}
},
"description": "Returns detailed reservation information for an AWS reservation."
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"tags": [
"Reservation"
]
}
},
"/reservations/azure": {
"post": {
"description": "A reservation is a way to activate a job, keeps all data needed for a job to start. An Azure reservation is a reservation created for an Azure job. Image Builder UUID image is required and needs to be stored under same account as provided by SourceID. A single account can create maximum of 2 reservations per second.\n",
"operationId": "createAzureReservation",
"requestBody": {
"content": {
"application/json": {
"examples": {
"example": {
"$ref": "#/components/examples/v1.AzureReservationRequestPayloadExample"
}
},
"schema": {
"$ref": "#/components/schemas/v1.AzureReservationRequest"
}
}
},
"description": "azure request body",
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/v1.AzureReservationResponse"
}
}
},
"description": "Returned on success."
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"tags": [
"Reservation"
]
}
},
"/reservations/azure/{ID}": {
"get": {
"description": "Return an Azure reservation with details by id",
"operationId": "getAzureReservationByID",
"parameters": [
{
"description": "Reservation ID, must be an Azure reservation otherwise 404 is returned",
"in": "path",
"name": "ID",
"required": true,
"schema": {
"format": "int64",
"type": "integer"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"examples": {
"done": {
"$ref": "#/components/examples/v1.AzureReservationResponsePayloadDoneExample"
},
"pending": {
"$ref": "#/components/examples/v1.AzureReservationResponsePayloadPendingExample"
}
},
"schema": {
"$ref": "#/components/schemas/v1.AzureReservationResponse"
}
}
},
"description": "Returns detailed reservation information for an Azure reservation."
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"tags": [
"Reservation"
]
}
},
"/reservations/gcp": {
"post": {
"description": "A reservation is a way to activate a job, keeps all data needed for a job to start. A GCP reservation is a reservation created for a GCP job. Image Builder UUID image is required and needs to be shared with the service account. Furthermore, by specifying the RFC-1035 compatible name pattern for example as \"instance\", instances names will be created in the format: \"instance-#####\". A single account can create maximum of 2 reservations per second.\n",
"operationId": "createGCPReservation",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/v1.GCPReservationRequest"
}
}
},
"description": "gcp request body",
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/v1.GCPReservationResponse"
}
}
},
"description": "Returned on success."
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"tags": [
"Reservation"
]
}
},
"/reservations/gcp/{ID}": {
"get": {
"description": "Return an GCP reservation with details by id",
"operationId": "getGCPReservationByID",
"parameters": [
{
"description": "Reservation ID, must be an GCP reservation otherwise 404 is returned",
"in": "path",
"name": "ID",
"required": true,
"schema": {
"format": "int64",
"type": "integer"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/v1.GCPReservationResponse"
}
}
},
"description": "Returns detailed reservation information for an GCP reservation."
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"tags": [
"Reservation"
]
}
},
"/reservations/noop": {
"post": {
"description": "A reservation is a way to activate a job, keeps all data needed for a job to start. A Noop reservation actually does nothing and immediately finish background job. This reservation has no input payload\n",
"operationId": "createNoopReservation",
"responses": {
"200": {
"content": {
"application/json": {
"examples": {
"example": {
"$ref": "#/components/examples/v1.NoopReservationResponsePayloadExample"
}
},
"schema": {
"$ref": "#/components/schemas/v1.NoopReservationResponse"
}
}
},
"description": "Returned on success."
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"tags": [
"Reservation"
]
}
},
"/reservations/{ID}": {
"get": {
"description": "Return a generic reservation by id",
"operationId": "getReservationByID",
"parameters": [
{
"description": "Reservation ID",
"in": "path",
"name": "ID",
"required": true,
"schema": {
"format": "int64",
"type": "integer"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"examples": {
"failure": {
"$ref": "#/components/examples/v1.GenericReservationResponsePayloadFailureExample"
},
"pending": {
"$ref": "#/components/examples/v1.GenericReservationResponsePayloadPendingExample"
},
"success": {
"$ref": "#/components/examples/v1.GenericReservationResponsePayloadSuccessExample"
}
},
"schema": {
"$ref": "#/components/schemas/v1.GenericReservationResponse"
}
}
},
"description": "Returns generic reservation information like status or creation time."
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"tags": [
"Reservation"
]
}
},
"/sources": {
"get": {
"description": "Cloud credentials are kept in the sources application. This endpoint lists available sources for the particular account per individual type (AWS, Azure, ...). All the fields in the response are optional and can be omitted if Sources application also omits them.\n",
"operationId": "getSourceList",
"parameters": [
{
"in": "query",
"name": "provider",
"schema": {
"enum": [
"aws",
"azure",
"gcp"
],
"type": "string"
}
},
{
"$ref": "#/components/parameters/Limit"
},
{
"$ref": "#/components/parameters/Offset"
}
],
"responses": {
"200": {
"content": {
"application/json": {
"examples": {
"example": {
"$ref": "#/components/examples/v1.SourceListResponseExample"
}
},
"schema": {
"$ref": "#/components/schemas/v1.ListSourceResponse"
}
}
},
"description": "Returned on success."
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"tags": [
"Source"
]
}
},
"/sources/{ID}/launch_templates": {
"get": {
"description": "Return a list of launch templates.\nA launch template is a configuration set with a name that is available through hyperscaler API. When creating reservations, launch template can be provided in order to set additional configuration for instances. In GCP, when using templates, propagated user attributes are not overridden or updated. Only new attributes are added to the instance.\nCurrently AWS and GCP Launch Templates are supported.\n",
"operationId": "getLaunchTemplatesList",
"parameters": [
{
"description": "Source ID from Sources Database",
"in": "path",
"name": "ID",
"required": true,
"schema": {
"format": "int64",
"type": "integer"
}
},
{
"description": "Hyperscaler region",
"in": "query",
"name": "region",
"required": true,
"schema": {
"type": "string"
}
},
{
"$ref": "#/components/parameters/Token"
},
{
"$ref": "#/components/parameters/Limit"
}
],
"responses": {
"200": {
"content": {
"application/json": {
"examples": {
"example": {
"$ref": "#/components/examples/v1.LaunchTemplateListResponse"
}
},
"schema": {
"$ref": "#/components/schemas/v1.ListLaunchTemplateResponse"
}
}
},
"description": "Return on success."
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"tags": [
"Source"
]
}
},
"/sources/{ID}/upload_info": {
"get": {
"description": "Provides all necessary information to upload an image for given Source. Typically, this is account number, subscription ID but some hyperscaler types also provide additional data.\nThe response contains \"provider\" field which can be one of aws, azure or gcp and then exactly one field named \"aws\", \"azure\" or \"gcp\". Enum is not used due to limitation of the language (Go).\nSome types may perform more than one calls (e.g. Azure) so latency might be increased. Caching of static information is performed to improve latency of consequent calls.\n",
"operationId": "getSourceUploadInfo",
"parameters": [
{
"description": "Source ID from Sources Database",
"in": "path",
"name": "ID",
"required": true,
"schema": {
"format": "int64",
"type": "integer"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"examples": {
"aws": {
"$ref": "#/components/examples/v1.SourceUploadInfoAWSResponse"
},
"azure": {
"$ref": "#/components/examples/v1.SourceUploadInfoAzureResponse"
}
},
"schema": {
"$ref": "#/components/schemas/v1.SourceUploadInfoResponse"
}
}
},
"description": "Return on success."
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"tags": [
"Source"
]
}
}
},
"servers": [
{
"description": "Local development",
"url": "http://0.0.0.0:{port}/api/{applicationName}",
"variables": {
"applicationName": {
"default": "provisioning"
},
"port": {
"default": "8000"
}
}
}
],
"tags": [
{
"description": "A pubkey represents the SSH public portion of a key pair with a name and body. Public key types and fingerprints are detected during their creation process. Two types are supported: RSA and ssh-ed25519. Fingerprints are calculated in two ways: using the standard SHA method and the legacy MD5 method, which is available under the fingerprint_legacy field. Each public key has a unique name and body and helps in verifying the uniqueness of the keys. Using this API, you can perform the following operations.\n",
"name": "Pubkey"
},
{
"description": "A reservation represents a request for launching one or more instances from a single image. This reservation triggers a background job, that will Launch set amount of instances with the same configuration. The configuration decides target provider, instance size and ssh pubkey to use for the default user.\n",
"name": "Reservation"
},
{
"description": "A Source represents a connection with public cloud account. These endpoints serve as convenient way to read information about available Sources to deploy instances into. The source of through is different application called Sources.\n",
"name": "Source"
}
]
}