Install a discovered API
const url = 'http://localhost:11044/api/v1/discovery/install';const options = { method: 'POST', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>', 'Content-Type': 'application/json'}, body: '{"name":"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 http://localhost:11044/api/v1/discovery/install \ --header 'Content-Type: application/json' \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \ --data '{ "name": "example" }'Looks up a cached discovery result by name and installs it: learns the real spec when possible, or synthesizes one from the endpoints discovery found. The same path Vaadin’s Discover tab uses.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”The name a prior discovery assigned, as GET /discovery/cache lists it; that cached result is installed into the caller’s world, learning the real spec when possible. A name not in the cache, which does not survive a restart, is a 404
Body of POST /discovery/install: which cached discovery to install into the world.
object
The name of a discovery this server has cached since it started, matched case-insensitively
Example generated
{ "name": "example"}Responses
Section titled “Responses”API installed
object
No cached discovery with that name — run discovery again
An install refused because no discovery of that name is cached
object
Why, naming the discovery asked for, and what to do: run discovery again
Always “error”

