- Home
- API Enriched
- Virtual
- ml
- GET Top APIs Endpoints for Virtual Host.
GET Top APIs Endpoints for Virtual Host.
const url = 'https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/ml/data/namespaces/example/virtual_hosts/example/api_endpoints/summary/top_active';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"apiep_summary_filter":{"apiep_category":["APIEP_CATEGORY_DISCOVERED"],"domains":["example"],"end_time":"example","start_time":"example"},"name":"example","namespace":"example","top_by_metric":"ACTIVITY_METRIC_TYPE_SEC_EVENTS_PERCENTAGE","topk":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/ml/data/namespaces/example/virtual_hosts/example/api_endpoints/summary/top_active \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "apiep_summary_filter": { "apiep_category": [ "APIEP_CATEGORY_DISCOVERED" ], "domains": [ "example" ], "end_time": "example", "start_time": "example" }, "name": "example", "namespace": "example", "top_by_metric": "ACTIVITY_METRIC_TYPE_SEC_EVENTS_PERCENTAGE", "topk": 1 }'Top APIs by requested activity metric. For example most-active APIs or most-attacked APIs.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Namespace Namespace of the virtual host for current request.
Virtual Host Name Virtual Host name for current request.
Request Bodyrequired
Section titled “Request Bodyrequired”Request model for GetTopAPIEndpointsReq API.
object
object
Category of API endpoints. Can be DISCOVERED, INVENTORY or SHADOW API. Optional filter by api_category. If absent, endpoints of all categories are considered.
List of domains for which top API endpoints summary should be returned. Optional filter by domains. If absent, endpoints for all domains are considered.
Format: unix_timestamp|RFC 3339
Filters the APIEPs with access time < end_time.
Optional: If not specified, then the end_time will be evaluated to start_time+2h
If start_time is not specified, then the end_time will be evaluated to
Format: unix_timestamp|RFC 3339
Filters the APIEPs with access time >= start_time.
Optional: If not specified, then the start_time will be evaluated to end_time-2h
If end_time is not specified, then the start_time will be evaluated to
Virtual Host name for current request.
Namespace of the virtual host for current request.
Number of top API endpoints to return in the response.
Responses
Section titled “Responses”A successful response.
Response model for GetTopAttackedAPIEndpoints API.
object
Top Attacked API endpoints.
This represents the API endpoint’s activity metrics.
object
URL for API endpoint.
The field top_by_metric_value returns one of the following values based on the metric type passed in the request field top_by_metric
Example
{ "top_apieps": [ { "method": "ANY" } ]}Returned when operation is not authorized.
Examplegenerated
exampleReturned when there is no permission to access resource.
Examplegenerated
exampleReturned when resource is not found.
Examplegenerated
exampleReturned when operation on resource is conflicting with current value.
Examplegenerated
exampleReturned when operation has been rejected as it is happening too frequently.
Examplegenerated
exampleReturned when server encountered an error in processing API.
Examplegenerated
exampleReturned when service is unavailable temporarily.
Examplegenerated
exampleReturned when server timed out processing request.
Examplegenerated
example