Skip to content

Install a discovered API

POST
/api/v1/discovery/install
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.

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

Media typeapplication/json

Body of POST /discovery/install: which cached discovery to install into the world.

object
name
required

The name of a discovery this server has cached since it started, matched case-insensitively

string

Example generated

{
"name": "example"
}

API installed

Media type*/*
object
key
additional properties
string

No cached discovery with that name — run discovery again

Media type*/*

An install refused because no discovery of that name is cached

object
message
required

Why, naming the discovery asked for, and what to do: run discovery again

string
status
required

Always “error”

string