- Home
- API Enriched
- Virtual
- ml
- Update API Endpoints Schemas.
Update API Endpoints Schemas.
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_inventory/api_endpoints/update_schemas';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"api_endpoints_schema_updates":[{"api_operation":{"method":"ANY","path":"example"},"schema_json":"example"}],"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/ml/data/namespaces/example/virtual_hosts/example/api_inventory/api_endpoints/update_schemas \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "api_endpoints_schema_updates": [ { "api_operation": { "method": "ANY", "path": "example" }, "schema_json": "example" } ], "name": "example", "namespace": "example" }'Update the payload schema for the specified endpoints or all pending changes if empty list is provided.
NOTE: only API endpoints returned by a call to GetAPIEndpointsSchemaStates can be updated.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Namespace The namespace of the Virtual Host for the current request.
Name The name of the Virtual Host for the current request.
Request Bodyrequired
Section titled “Request Bodyrequired”Request shape for Update API Endpoints Schemas.
object
The list of API Inventory API endpoints schema updates.
Required: YES.
API endpoint and its schema.
object
object
An endpoint path, as specified in OpenAPI, including parameters. The path should comply with RFC 3986 and may have parameters according to OpenAPI specification Required: YES.
The schema of the API endpoint Required: YES.
The name of the Virtual Host for the current request.
The namespace of the Virtual Host for the current request.
Responses
Section titled “Responses”A successful response.
Response shape for Update API Endpoints With Newly Discovered Schema.
object
The list of API endpoints which were successfully proceeded by the API Inventory request.
API operation according to OpenAPI specification.
object
An endpoint path, as specified in OpenAPI, including parameters. The path should comply with RFC 3986 and may have parameters according to OpenAPI specification Required: YES.
Example
{ "updated_api_endpoints": [ { "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