Skip to main content
PATCH
Update Connection by ID and Organization ID

Authorizations

X-API-KEY
string
header
required

Headers

X-CONNECTION-INVITE-TOKEN
string | null

Path Parameters

organization_id
string<uuid>
required
connection_id
string<uuid>
required

Body

application/json
credentials
AikidoCredentials · object

Connection credentials

identifier
string | null

An optional identifier for the connection, you can use this to reference the connection in your own system

options
BaseConnectionOptionsModel · object

Connection options

state
enum<string> | null
default:ACTIVE
Available options:
PENDING,
ACTIVE,
PAUSED,
DELETED,
HARD_DELETED

Response

Successful Response

created_at
string<date-time>
required

When the connection was created.

health
ConnectionHealthRespModel · object
required

Whether the connection is working, and who has to act if it is not -- a revoked credential is yours to fix, a vendor outage is not.

id
string<uuid>
required

Leen's identifier for this connection. Pass it as connection_id when reading data.

is_active
boolean
required

Whether scheduled syncing runs. Separate from state: a connection can be ACTIVE with syncing switched off.

organization_id
string<uuid>
required

The organization this connection belongs to.

refresh_interval_secs
integer
required

Seconds between scheduled syncs. Defaults to 14400 -- four hours.

state
enum<string>
required

Lifecycle state. PENDING until credentials are accepted, then ACTIVE. PAUSED stops syncing without discarding anything; DELETED is a soft delete and its data is no longer readable.

Available options:
PENDING,
ACTIVE,
PAUSED,
DELETED,
HARD_DELETED
timeout_secs
integer
required

How long a single sync may run before it is abandoned. Defaults to 3600.

updated_at
string<date-time>
required

When any field on the connection last changed.

vendor
string
required

The tool this connection reads from or writes to, e.g. SNYK, QUALYS.

direction
enum<string>
default:SOURCE

Which way data moves. SOURCE reads from the vendor; the destination kinds write to it, and are what a push or pull integration uses.

Available options:
SOURCE,
PUSH_DESTINATION,
PULL_DESTINATION
identifier
string | null

Your own reference for this connection, set when it was created. Leen does not interpret it; it is here so you can match a connection to a record in your system.

last_token_issued_at
string<date-time> | null

Pull destinations only: latest access-token mint time across active secrets. Used as a freshness proxy since these connections never sync.

oauth2_authorize_url
string | null

Where to send the user to authorise this connection, for vendors that use OAuth2. Null once authorisation is complete, and for every vendor that authenticates another way.

pull_destination_health
enum<string> | null

Pull destinations only: HEALTHY if a token was minted within the staleness window, STALE otherwise (including if none was ever minted).

Available options:
HEALTHY,
STALE
source_connection_id
string<uuid> | null

For a destination connection, the source whose data it forwards. Null on a source connection.