- Home
- API Enriched
- Virtual
- config
- Assign API Definition.
Assign API Definition.
const url = 'https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/config/namespaces/example/http_loadbalancers/example/api_definitions/assign';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"api_definition":{"name":"example","namespace":"example"},"create_if_not_exists":true,"name":"example","namespace":"example"}'};
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/config/namespaces/example/http_loadbalancers/example/api_definitions/assign \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "api_definition": { "name": "example", "namespace": "example" }, "create_if_not_exists": true, "name": "example", "namespace": "example" }'Set a reference to the API Definition, with an option to create an empty one if not exists. DEPRECATED. Instead use virtual host public custom API - AssignAPIDefinition.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Namespace Namespace of the HTTP Load Balancer.
Name Name of the HTTP Load Balancer.
Request Bodyrequired
Section titled “Request Bodyrequired”Request form for Assign API Definition.
object
object
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name. Required: YES.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant.
Create an empty API Definition object, if not exists.
Name of the HTTP Load Balancer.
Namespace of the HTTP Load Balancer.
Examplegenerated
{ "api_definition": { "name": "example", "namespace": "example" }, "create_if_not_exists": true, "name": "example", "namespace": "example"}Responses
Section titled “Responses”A successful response.
Response form for Assign API Definition.
object
Examplegenerated
{}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