Create or update API Subscriptions from Subscription Spec
Changed onCreate/update API Subscription from Subscription Spec
Request
- Base URLhttps://eu.cloudgate.gravitee.io/apim/automation
- URLhttps://eu.cloudgate.gravitee.io/apim/automation/organizations/{orgId}/environments/{envId}/apis/{apiHrid}/subscriptions
- Auth
- HTTP bearer
- or HTTP basic
- or HTTP bearer
Path parameters
organization ID
environment ID
Human-readable ID of api
Query parameters
When true, the HRID path or spec value is treated as an existing UUID rather than a human-readable identifier. This is to support backward compatibility for resources created before migration to the automation API and should not be used for new resources.
When true, the apiHrid path value (and, on create or update, the spec's planHrid) is treated as an existing UUID rather than a human-readable identifier. This is to support backward compatibility for resources created before migration to the automation API and should not be used for new resources.
When true, the spec's applicationHrid is treated as an existing UUID rather than a human-readable identifier. This is to support backward compatibility for resources created before migration to the automation API and should not be used for new resources.
Request body
Example request
{
"hrid": "demo_api",
"applicationHrid": "demo-app",
"planHrid": "demo-plan",
"endingAt": "2040-12-25T09:12:28Z",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"apiKeys": [
{
"key": "my-custom-api-key",
"expireAt": "2040-12-25T09:12:28Z"
}
],
"consumerConfiguration": {
"entrypointId": "webhook",
"channel": "/channel1"
}
}Response
State of the successfully created Subscription
Example response
{
"hrid": "demo_api",
"applicationHrid": "demo-app",
"planHrid": "demo-plan",
"endingAt": "2040-12-25T09:12:28Z",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"apiKeys": [
{
"key": "my-custom-api-key",
"expireAt": "2040-12-25T09:12:28Z"
}
],
"consumerConfiguration": {
"entrypointId": "webhook",
"channel": "/channel1"
},
"apiHrid": "demo-api",
"startingAt": "2040-12-25T09:12:28+01:00"
}Changes
- warning
changed the pattern of the request property
from^[a-zA-Z0-9][a-zA-Z0-9_-]+[a-zA-Z0-9]$to^[a-zA-Z0-9][a-zA-Z0-9_.-]+[a-zA-Z0-9]$ - info
added the non-success response with the status
- info
the
////response's property pattern was changed from^[a-zA-Z0-9][a-zA-Z0-9_-]+[a-zA-Z0-9]$to^[a-zA-Z0-9][a-zA-Z0-9_.-]+[a-zA-Z0-9]$for the status
- warning
- info
added the new optional
queryrequest parameterhridContainsApiUUID - info
added the new optional
queryrequest parameterhridContainsAppUUID - info
added the new optional
queryrequest parameterhridContainsUUID
- info