Get your registered API.
data "akamai_apidefinitions_api" "my_api" {
id = 123456
}
output "my_api" {
value = data.akamai_apidefinitions_api.my_api
}
my_api = {
api = jsonencode(
{
basePath = "/api"
constraints = {
enforceOn = {
request = true
undefinedParameters = {
requestBody = true
requestCookie = true
requestHeader = true
requestQuery = true
responseBody = true
responseHeader = true
}
}
requestBody = {
consumeType = [
"any",
]
}
}
description = "Adding test endpoints."
enableApiGateway = true
hostnames = [
"my-apidefinitions-hostname.net"
]
name = "my_api"
resources = {
"/tests/{id}" = {
get = {
parameters = [
{
in = "header"
name = "X-Test"
required = true
type = "string"
},
{
in = "path"
maxLength = 5
minLength = 1
name = "id"
required = true
type = "string"
},
]
}
name = "movie"
}
}
}
)
contract_id = "C-0N7RAC7"
group_id = 12345
id = 123456
latest_version = 3
name = null
production_version = 2
staging_version = 3
}
Arguments
Provide either the ID or name of your API to get its details.
Argument | Description |
---|---|
id | Your API's ID. |
name | Your API's name. |
Attributes
Returned to you is a jsonencoded api
object containing your API details and information about its activation status on the networks.
Attribute | Description |
---|---|
contract_id | Your contract ID. |
group_id | Your group ID. |
id | Your API ID |
latest_version | The number of the latest created version of your API. |
production_version | The API version active on the production network. |
staging_version | The API version active on the staging network. |
api | |
basePath | The root path of your API. |
constraints | A list of request and response constraint types and their enablement statuses.
|
description | A human-readable statement about your API. |
enableApiGateway | The API Gateway enablement status. |
hostnames | An array of your API's hostnames. |
name | Your API's name. |
resources | Your API's resources. |
Updated 3 days ago