Register your API endpoint.

Important: This resource requires a local variable referencing the api attribute of the akamai_apidefinitions_openapi data source.

Use the returned id attribute as a local variable in the activation resource to activate your API on a network.

resource "akamai_apidefinitions_api" "my_api" {
  api         = data.akamai_apidefinitions_openapi.my_api.api
  contract_id = "C-0N7RAC7"
  group_id    = 12345
}
// local
api_id = data.akamai_apidefinitions_api.myapi.id

Arguments

Provide your contract and group IDs and create a local variable to the API Definitions data source.

ArgumentRequiredDescription
api✔️A local variable pointing to the api attribute of the akamai_apidefinitions_openapi data source.
contract_id✔️Your contract ID.
group_id✔️Your group ID.

Attributes

There is no standard output for this resource. Changes are reflected in your state file.

AttributeDescription
apiThe JSON-formatted conversion of your OpenAPI schema returned from the API Definitions data source. Contains:
  • name. The name of your collection. The value reflects your schema's info.title field.
  • hostnames. Your API's root path. The value reflects your schema's servers.url field.
  • matchCaseSensitive. Whether the URLs and parameters within the endpoint are case sensitive.
  • enableApiGateway. Whether the API Gateway product should be enabled for the endpoint.
  • resources. The path and method information about each of your endpoints. Maps to the resources property in your schema.
contract_idYour contract ID.
group_idYour group ID.
idYour API collection's ID
latest_versionThe version number for the latest created version of your collection. This version may or may not be active.
production_versionThe version number for the activated version of your configuration in the production environment.
staging_versionThe version number for the activated version of your configuration in the staging environment.