Get a cached discovery by name
const url = 'http://localhost:11044/api/v1/discovery?name=example';const options = {method: 'GET', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'http://localhost:11044/api/v1/discovery?name=example' \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”The discovery name assigned when the API was discovered
Responses
Section titled “Responses”The cached discovery
An API found by discovery. Returned by POST /discovery, GET /discovery and GET /discovery/cache; a result discovered by reading docs is kept in the server’s in-memory cache, which POST /discovery/install reads by name.
object
Auth specifics read from the docs, keyed headerName and keyLocation when known. Empty when none were found
object
Authentication the API appears to need: none, apiKey, bearer or oauth2, as read from its docs
The API’s base URL. Null when discovery did not establish one
What the API does, as discovery summarised it
When this discovery ran, as an ISO-8601 instant
Key endpoints discovery found in the docs. Unauthenticated GET endpoints that did not answer a probe with 2xx are dropped. Empty when the API was found from a spec URL directly
One endpoint of a discovered API, as read from its documentation; listed in a discovery’s endpoints.
object
What the endpoint does, as discovery read it from the docs
HTTP method, e.g. GET or POST
Query and path parameters the endpoint takes, as discovery read them
A query or path parameter on a discovered endpoint, used when install has to synthesize the API’s spec.
object
Short description of the parameter for tooling and model hints. Null when the docs gave none
Where the parameter goes: query or path
Parameter name exactly as the API expects it, e.g. latitude
Whether the API requires the parameter
JSON Schema primitive type: string, integer, number, boolean or array
Path relative to the API’s base URL, possibly with {param} templates
True when a live GET to the endpoint answered 2xx. Only unauthenticated GET endpoints without path templates are probed; false for every other endpoint means not probed, not failed
Human-readable API name (e.g. OpenWeatherMap); the key, case-insensitive, that the cache and install look it up by
URLs of the documentation read during discovery
Kind of spec at specUrl, lowercase: normally openapi or graphql
Where install learns the API from: the OpenAPI document or GraphQL endpoint. When no spec was found (synthesized true) this is the API’s base URL instead
True when no spec file was found and install will have to assemble one from endpoints; false when specUrl names a real spec
No cached discovery with that name

