curl --request PATCH \
--url https://api.leen.dev/v1/provisioning/organizations/{organization_id}/connections/{connection_id} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"credentials": {
"client_id": "<string>",
"client_secret": "<string>"
},
"identifier": "<string>",
"options": {},
"state": "ACTIVE"
}
'import requests
url = "https://api.leen.dev/v1/provisioning/organizations/{organization_id}/connections/{connection_id}"
payload = {
"credentials": {
"client_id": "<string>",
"client_secret": "<string>"
},
"identifier": "<string>",
"options": {},
"state": "ACTIVE"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
credentials: {client_id: '<string>', client_secret: '<string>'},
identifier: '<string>',
options: {},
state: 'ACTIVE'
})
};
fetch('https://api.leen.dev/v1/provisioning/organizations/{organization_id}/connections/{connection_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.leen.dev/v1/provisioning/organizations/{organization_id}/connections/{connection_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'credentials' => [
'client_id' => '<string>',
'client_secret' => '<string>'
],
'identifier' => '<string>',
'options' => [
],
'state' => 'ACTIVE'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.leen.dev/v1/provisioning/organizations/{organization_id}/connections/{connection_id}"
payload := strings.NewReader("{\n \"credentials\": {\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\"\n },\n \"identifier\": \"<string>\",\n \"options\": {},\n \"state\": \"ACTIVE\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.leen.dev/v1/provisioning/organizations/{organization_id}/connections/{connection_id}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"credentials\": {\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\"\n },\n \"identifier\": \"<string>\",\n \"options\": {},\n \"state\": \"ACTIVE\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.leen.dev/v1/provisioning/organizations/{organization_id}/connections/{connection_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"credentials\": {\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\"\n },\n \"identifier\": \"<string>\",\n \"options\": {},\n \"state\": \"ACTIVE\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"health": {
"description": "<string>",
"name": "HEALTHY",
"resolution_owner": "LEEN",
"status": "HEALTHY",
"details": [
{
"endpoint": "<string>",
"data_export_type": "alerts"
}
]
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_active": true,
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"refresh_interval_secs": 123,
"state": "PENDING",
"timeout_secs": 123,
"updated_at": "2023-11-07T05:31:56Z",
"vendor": "<string>",
"direction": "SOURCE",
"identifier": "<string>",
"last_token_issued_at": "2023-11-07T05:31:56Z",
"oauth2_authorize_url": "<string>",
"pull_destination_health": "HEALTHY",
"source_connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Update Connection by ID and Organization ID
Update a connection’s credentials, identifier or state. Credentials are replaced rather than merged, so a partial set will overwrite the stored ones.
curl --request PATCH \
--url https://api.leen.dev/v1/provisioning/organizations/{organization_id}/connections/{connection_id} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"credentials": {
"client_id": "<string>",
"client_secret": "<string>"
},
"identifier": "<string>",
"options": {},
"state": "ACTIVE"
}
'import requests
url = "https://api.leen.dev/v1/provisioning/organizations/{organization_id}/connections/{connection_id}"
payload = {
"credentials": {
"client_id": "<string>",
"client_secret": "<string>"
},
"identifier": "<string>",
"options": {},
"state": "ACTIVE"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
credentials: {client_id: '<string>', client_secret: '<string>'},
identifier: '<string>',
options: {},
state: 'ACTIVE'
})
};
fetch('https://api.leen.dev/v1/provisioning/organizations/{organization_id}/connections/{connection_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.leen.dev/v1/provisioning/organizations/{organization_id}/connections/{connection_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'credentials' => [
'client_id' => '<string>',
'client_secret' => '<string>'
],
'identifier' => '<string>',
'options' => [
],
'state' => 'ACTIVE'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.leen.dev/v1/provisioning/organizations/{organization_id}/connections/{connection_id}"
payload := strings.NewReader("{\n \"credentials\": {\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\"\n },\n \"identifier\": \"<string>\",\n \"options\": {},\n \"state\": \"ACTIVE\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.leen.dev/v1/provisioning/organizations/{organization_id}/connections/{connection_id}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"credentials\": {\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\"\n },\n \"identifier\": \"<string>\",\n \"options\": {},\n \"state\": \"ACTIVE\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.leen.dev/v1/provisioning/organizations/{organization_id}/connections/{connection_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"credentials\": {\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\"\n },\n \"identifier\": \"<string>\",\n \"options\": {},\n \"state\": \"ACTIVE\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"health": {
"description": "<string>",
"name": "HEALTHY",
"resolution_owner": "LEEN",
"status": "HEALTHY",
"details": [
{
"endpoint": "<string>",
"data_export_type": "alerts"
}
]
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_active": true,
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"refresh_interval_secs": 123,
"state": "PENDING",
"timeout_secs": 123,
"updated_at": "2023-11-07T05:31:56Z",
"vendor": "<string>",
"direction": "SOURCE",
"identifier": "<string>",
"last_token_issued_at": "2023-11-07T05:31:56Z",
"oauth2_authorize_url": "<string>",
"pull_destination_health": "HEALTHY",
"source_connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
Headers
Body
Connection credentials
- AikidoCredentials
- ArnicaCredentials
- AwsAccessAnalyzerCredentials
- AwsGuardDutyCredentials
- AwsInspector2Credentials
- AwsSecurityHubCredentials
- BitSightCredentials
- BlackDuckCredentials
- BlackDuckSCACredentials
- BlackKiteCredentials
- CheckmarxCredentials
- CrowdStrikeCredentials
- CrowdStrikeSpotlightCredentials
- GitHubCredentials
- GitlabCredentials
- HeelerCredentials
- InsightVMCredentials
- JiraOAuth2Credentials
- LaceworkCSPMCredentials
- MendCredentials
- MSDefenderCloudCredentials
- MSDefenderEndpointCredentials
- MSDefenderVMSCredentials
- MSDefenderVMSGccHighCredentials
- MSEntraOAuth2Credentials
- MSEntraSecretCredentials
- MSIntuneCredentials
- OktaIDPCredentials
- OrcaCredentials
- ProcessUnityCredentials
- ProofPointCredentials
- QualysCredentials
- SecurityScorecardCredentials
- SemgrepCredentials
- SentinelOneEDRCredentials
- SentinelOneVMSCredentials
- ServiceNowCredentials
- ServiceNowVRCredentials
- SnykCredentials
- SocketCredentials
- SonarQubeCredentials
- TaniumVMSCredentials
- TenableCredentials
- UpwindCredentials
- WizCodeCredentials
- WizCSPMCredentials
- WizVMSCredentials
Show child attributes
Show child attributes
An optional identifier for the connection, you can use this to reference the connection in your own system
Connection options
- BaseConnectionOptionsModel
- AikidoConnectionOptions
- ArnicaConnectionOptions
- AwsAccessAnalyzerOptions
- AwsGuardDutyOptions
- AwsInspector2Options
- AwsSecurityHubOptions
- BitSightConnectionOptions
- BlackDuckConnectionOptions
- BlackDuckSCAConnectionOptions
- BlackKiteConnectionOptions
- CheckmarxConnectionOptions
- CrowdStrikeConnectionOptions
- CrowdStrikeSpotlightConnectionOptions
- GitHubConnectionOptions
- GitlabOptions
- HeelerOptions
- InsightVMConnectionOptions
- JiraConnectionOptions
- LaceworkCSPMOptions
- MendConnectionOptions
- MSDefenderCloudConnectionOptions
- MSDefenderEndpointConnectionOptions
- MSDefenderVMSConnectionOptions
- MSDefenderVMSGccHighConnectionOptions
- MSEntraConnectionOptions
- MSIntuneConnectionOptions
- OktaIDPOptions
- OrcaConnectionOptions
- ProcessUnityConnectionOptions
- ProofPointOptions
- QualysConnectionOptions
- SecurityScorecardConnectionOptions
- SemgrepOptions
- SentinelOneEDROptions
- SentinelOneVMSOptions
- ServiceNowGRCConnectionOptions
- ServiceNowITSMConnectionOptions
- ServiceNowVROptions
- SnykConnectionOptions
- SocketOptions
- SonarQubeConnectionOptions
- TaniumVMSOptions
- TenableConnectionOptions
- UpwindConnectionOptions
- WizCodeOptions
- WizCSPMOptions
- WizVMSOptions
PENDING, ACTIVE, PAUSED, DELETED, HARD_DELETED Response
Successful Response
When the connection was created.
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.
Show child attributes
Show child attributes
Leen's identifier for this connection. Pass it as connection_id when reading data.
Whether scheduled syncing runs. Separate from state: a connection can be ACTIVE with syncing switched off.
The organization this connection belongs to.
Seconds between scheduled syncs. Defaults to 14400 -- four hours.
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.
PENDING, ACTIVE, PAUSED, DELETED, HARD_DELETED How long a single sync may run before it is abandoned. Defaults to 3600.
When any field on the connection last changed.
The tool this connection reads from or writes to, e.g. SNYK, QUALYS.
Which way data moves. SOURCE reads from the vendor; the destination kinds write to it, and are what a push or pull integration uses.
SOURCE, PUSH_DESTINATION, PULL_DESTINATION 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.
Pull destinations only: latest access-token mint time across active secrets. Used as a freshness proxy since these connections never sync.
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 destinations only: HEALTHY if a token was minted within the staleness window, STALE otherwise (including if none was ever minted).
HEALTHY, STALE For a destination connection, the source whose data it forwards. Null on a source connection.