APIs
Get one API
Get an API using HRID
get/organizations/{orgId}/environments/{envId}/apis/{hrid}
Path parameters
orgIdstring required
Example:dedd0e0f-b3e9-4d2f-89cd-b2a9de7cb145
organization ID
envIdstring required
Example:a44e0d1b-9fa9-4d64-8b76-3634623a2e27
environment ID
hridstring required
Example:my_demo_api
Human-readable ID of a spec
Response
API successfully retrieved
Example response
{
"hrid": "demo_api",
"name": "My Api",
"version": "1.0.0",
"type": "MESSAGE",
"description": "I can use many characters to describe this API.",
"tags": [
"europe"
],
"listeners": [
{
"type": "HTTP",
"entrypoints": [
{
"type": "http-get",
"qos": "NONE"
}
],
"cors": {
"allowOrigin": [
"*",
"http://api.acme\\.com",
".*\\.api\\.acme\\.com"
],
"exposeHeaders": [
"Content-Type"
]
}
}
],
"endpointGroups": [
{
"name": "default-endpoint-group",
"type": "http-proxy",
"loadBalancer": {
"type": "ROUND_ROBIN"
},
"endpoints": [
{
"name": "default-endpoint",
"type": "http-proxy"
}
]
}
],
"analytics": {
"logging": {
"condition": "{#request.headers['Content-Type'][0] == 'application/json'}",
"messageCondition": "{ #message.headers['Content-Type'][0] == 'application/json'}"
}
},
"resources": [
{
"type": "cache"
}
],
"plans": [
{
"hrid": "demo_api",
"security": {
"type": "KEY_LESS"
},
"status": "STAGING",
"type": "API",
"validation": "AUTO",
"flows": [
{
"name": "My Flow",
"selectors": [
{
"type": "HTTP",
"path": "/my/path",
"pathOperator": "EQUALS",
"methods": [
"GET"
]
}
],
"tags": [
"tag1",
"tag2"
]
}
],
"mode": "STANDARD",
"bootstrapPort": 9092,
"brokerRangeStart": 9100,
"brokerRangeEnd": 9102
}
],
"flowExecution": {
"mode": "BEST_MATCH"
},
"flows": [
{
"name": "My Flow",
"selectors": [
{
"type": "HTTP",
"path": "/my/path",
"pathOperator": "EQUALS",
"methods": [
"GET"
]
}
],
"tags": [
"tag1",
"tag2"
]
}
],
"groups": [
"developers"
],
"visibility": "PUBLIC",
"state": "STARTED",
"primaryOwner": {
"id": "00f8c9e7-78fc-4907-b8c9-e778fc790750",
"email": "john.doe@example.com",
"displayName": "John Doe",
"type": "USER"
},
"labels": [
"example"
],
"metadata": [
{
"format": "STRING"
}
],
"lifecycleState": "CREATED",
"categories": [
"Example APIs"
],
"members": [
{
"source": "gravitee",
"sourceId": "john.doe@example.com",
"role": "REVIEWER"
}
],
"pages": [
{
"hrid": "demo_api",
"crossId": "00f8c9e7-78fc-4907-b8c9-e778fc790750",
"name": "My Page",
"type": "MARKDOWN",
"content": "My Page content",
"published": true,
"visibility": "PUBLIC",
"source": {
"type": "http-fetcher"
},
"configuration": {
"viewer": "Redoc"
},
"homepage": true,
"parentHrid": "guides"
}
],
"portalNavigation": [
{
"path": "/projects/alpha",
"displayName": "Alpha",
"order": 1
}
]
}