Skip to main content

ApiGateway API

SaaSus Smart API Gateway API Schema (1.0.0)

SaaSus Smart API Gateway API Schema

smartApiGateway

SaaSus Smart API Gateway

Obtain configuration information for api gateway function

Obtain configuration information for api gateway function.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "generated_file_status": "finished",
  • "status": "published",
  • "role_arn": "arn:aws:iam::123456789012:role/role-name",
  • "role_external_id": 1234567890,
  • "internal_endpoint_health_check_path": "/health",
  • "internal_endpoint_health_check_port": 80,
  • "internal_endpoint_health_check_protocol": "HTTP or HTTPS",
  • "internal_endpoint_health_status_codes": 200,
  • "saas_subnet_ids": [
    ],
  • "saas_vpc_id": "vpc-12345678",
  • "domain_name": "dev.saasus.io",
  • "is_dns_validated": false,
  • "certificate_dns_record": {
    },
  • "cloud_front_dns_record": {
    },
  • "vpc_endpoint_dns_record": {
    },
  • "default_domain_name": "d78bh0l3saarv.cloudfront.net",
  • "saas_alb_arn": "arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188",
  • "rest_api_endpoint": "https://api.example.com",
  • "endpoint_settings_list": [
    ],
  • "tenant_routing_type": "path",
  • "docs_cloud_front_fqdn": "0123456789abc.cloudfront.net",
  • "mcp_server_url": "https://mcp.example.com"
}

Update configuration information for api gateway function

Update configuration information for api gateway function.

Authorizations:
Bearer
Request Body schema: application/json
required
role_arn
string (ARN of the role to be AssumeRole)

ARN of the role for SaaSus Platform to AssumeRole

role_external_id
string (External id to use when AssumeRole)

External id used by SaaSus when AssumeRole to operate SaaS

internal_endpoint_health_check_path
string (Internal endpoint health check path)

The path to be used for health checks on the internal endpoint.

internal_endpoint_health_check_port
integer (Internal endpoint health check port)

The port to be used for health checks on the internal endpoint.

internal_endpoint_health_check_protocol
string (Internal endpoint health check protocol)

The protocol to be used for health checks on the internal endpoint.

internal_endpoint_health_status_codes
string (Internal endpoint health check status codes)

The status codes to be used for health checks on the internal endpoint.

saas_subnet_ids
Array of strings (SaaS Subnet IDs)

Subnet IDs for SaaS

saas_vpc_id
string (SaaS VPC ID)

VPC ID for SaaS

domain_name
string

Domain Name

saas_alb_arn
string (SaaS Application Load Balancer ARN)

SaaS Application Load Balancer ARN

Array of objects (Endpoint Settings List)

Endpoint Settings List

tenant_routing_type
string (Tenant Routing Type)
Enum: "path" "hostName" "headerValue" "none"

Tenant Routing Type

Responses

Request samples

Content type
application/json
{
  • "role_arn": "arn:aws:iam::123456789012:role/role-name",
  • "role_external_id": 1234567890,
  • "internal_endpoint_health_check_path": "/health",
  • "internal_endpoint_health_check_port": 80,
  • "internal_endpoint_health_check_protocol": "HTTP or HTTPS",
  • "internal_endpoint_health_status_codes": 200,
  • "saas_subnet_ids": [
    ],
  • "saas_vpc_id": "vpc-12345678",
  • "domain_name": "dev.saasus.io",
  • "saas_alb_arn": "arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188",
  • "endpoint_settings_list": [
    ],
  • "tenant_routing_type": "path"
}

Response samples

Content type
application/json
{
  • "type": "permission_denied",
  • "message": "Error message"
}

Update OpenAPI definition file

Update OpenAPI definition file. The OpenAPI definition file is used for automatically generated documentation.

Authorizations:
Bearer
Request Body schema: application/json
required
content
required
string <base64> (OpenAPI Definition File Content)

OpenAPI definition file content

Responses

Request samples

Content type
application/json
{
  • "content": "UEsDBBQACAAIAJr6oFQmTAuRfvOGAA=="
}

Response samples

Content type
application/json
{
  • "type": "permission_denied",
  • "message": "Error message"
}

Obtain draft configuration information for Smart API Gateway function

Obtain draft configuration information for Smart API Gateway function. You can check the settings generated from the uploaded source code before applying them.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{}

Apply draft configuration information for Smart API Gateway function

Apply draft configuration information for Smart API Gateway function. This applies the changes made in the draft settings to the actual Smart API Gateway.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "type": "permission_denied",
  • "message": "Error message"
}

Cancel draft configuration information for Smart API Gateway function

Cancel draft configuration information for Smart API Gateway function. This cancels the changes made in the draft settings without applying them to the actual Smart API Gateway.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "type": "permission_denied",
  • "message": "Error message"
}

Create the API Gateway

Create the API Gateway.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "type": "permission_denied",
  • "message": "Error message"
}

API key list or get API key by condition

The response content changes based on the combination of parameters tenant_id, env_id, and user_id.

  • If tenant_id is not specified, the full list is returned.
  • If only tenant_id is specified, the API keys within that tenant are returned.
  • If tenant_id and env_id are specified, the keys are filtered by the environment.
  • If tenant_id, env_id, and user_id are specified, a complete match returns the API keys for the target user.
  • Additionally, searching is supported even when only env_id or only user_id are provided.
Authorizations:
Bearer
query Parameters
tenant_id
string

If specified, the API keys for the target tenant are returned.

env_id
integer

If specified, the API keys for the target environment are returned.

user_id
string

If specified, the API keys for the target user (up to 2) are returned.

tenant_only
boolean

If true, only API keys that do not have a User_id specified are returned.

Responses

Response samples

Content type
application/json
{
  • "api_keys": [
    ]
}

Create an API key

Creates or updates an API key based on the contents of the request body. All parameters are in the request body:

  • tenant_id, env_id (required)
  • user_id (optional)
Authorizations:
Bearer
Request Body schema: application/json
required

Payload for API key creation or update.

tenant_id
required
string (Uuid)
env_id
required
integer (Id)
user_id
string (Uuid)

Responses

Request samples

Content type
application/json
{
  • "tenant_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
  • "env_id": 1,
  • "user_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775"
}

Response samples

Content type
application/json
{
  • "api_key": "1234567890abcdef",
  • "client_secret": "1234567890abcdef",
  • "tenant_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
  • "env_id": 1,
  • "user_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775"
}

get API key details by API key

Get the details of the API key by specifying the API key.

Authorizations:
Bearer
path Parameters
api_key
required
string
Example: 1234567890abcdef

API Key

Responses

Response samples

Content type
application/json
{
  • "api_key": "1234567890abcdef",
  • "client_secret": "1234567890abcdef",
  • "tenant_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
  • "env_id": 1,
  • "user_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775"
}

Update the client secret of the API key

Update the client secret of the API key.

Authorizations:
Bearer
path Parameters
api_key
required
string
Example: 1234567890abcdef

API Key

Responses

Response samples

Content type
application/json
{
  • "api_key": "1234567890abcdef",
  • "client_secret": "1234567890abcdef",
  • "tenant_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
  • "env_id": 1,
  • "user_id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775"
}

Update tenant information

Update tenant information.

Authorizations:
Bearer
path Parameters
tenant_id
required
string (Uuid)
Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775

Tenant ID

Request Body schema: application/json
required
allowed_ips
Array of strings (Allowed IP addresses)

Allowed IP addresses in CIDR format

object (Tenant Routing)

Information about tenant routing. Refer to the tenant_routing_type in ApiGatewaySettings and route the request.

Responses

Request samples

Content type
application/json
{
  • "allowed_ips": [
    ],
  • "routing": {
    }
}

Response samples

Content type
application/json
{
  • "type": "permission_denied",
  • "message": "Error message"
}

Get tenant information

Get tenant information.

Authorizations:
Bearer
path Parameters
tenant_id
required
string (Uuid)
Example: 69e732d6-8ecc-45c4-c2eb-8438f7ffe775

Tenant ID

Responses

Response samples

Content type
application/json
{
  • "id": "69e732d6-8ecc-45c4-c2eb-8438f7ffe775",
  • "allowed_ips": [
    ],
  • "routing": {
    }
}

Publish the API Gateway

Publish the API Gateway.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "type": "permission_denied",
  • "message": "Error message"
}

Unpublish the API Gateway

Unpublish the API Gateway.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "type": "permission_denied",
  • "message": "Error message"
}

Upload files to create an API Gateway

Upload files to create an API Gateway

Authorizations:
Bearer
Request Body schema: application/json
content
required
string <base64> (Api Gateway Input File Content)

The content of the file to be uploaded to create an API Gateway.

Responses

Request samples

Content type
application/json
{
  • "content": "UEsDBBQACAAIAJr6oFQmTAuRfvOGAA=="
}

Response samples

Content type
application/json
{
  • "type": "permission_denied",
  • "message": "Error message"
}