Prepare an integration connection
Prepare an integration connection. Request: POST /v1/integrations/catalog/prepare. Scope: agents:create.
POST
Resolves what connecting a catalog provider needs: the inputs and credentials it asks for, the hosts its API and OAuth credentials reach, and whether it can connect. Pass input for server inputs such as an API description URL. An unavailable provider carries a reason.
apiKeyheader
x-api-key<token>application/json- body
provider*IntegrationKeyMatch
^[a-z0-9][a-z0-9_-]{0,63}$input?Success
application/json- response
connectSpec*hosts*array<string>connectState*stringValue in
"ready""checkedAtConnect""unavailable"reason*string|nullimport { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.integrationCatalog.prepare({
"provider": "example"
});Example Response
{
"connectSpec": {
"provider": "string",
"auth": "discover",
"inputs": {
"property1": {
"label": "string",
"description": "string",
"pattern": "string",
"maxLength": 1,
"example": "string",
"default": "string",
"kind": "hostnameLabel"
},
"property2": {
"label": "string",
"description": "string",
"pattern": "string",
"maxLength": 1,
"example": "string",
"default": "string",
"kind": "hostnameLabel"
}
},
"credentials": {
"property1": {
"label": "string"
},
"property2": {
"label": "string"
}
}
},
"hosts": [
"string"
],
"connectState": "ready",
"reason": "string"
}