Workflows - Client Connections
Create Client Connection Request
POST
Create Client Connection Request
Autorizaciones
Cuerpo
application/json
Respuesta
Successful Response
Create Client Connection Request
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
import requests
url = "https://api.diga.io/v1/workflow/client-connection-requests"
payload = {
"piece_name": "<string>",
"piece_version": "<string>",
"display_name": "<string>",
"auth_method": { "auth_property_index": 1 },
"purpose": "<string>",
"expires_in_days": 7,
"target_connection_external_id": "<string>",
"locale": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
piece_name: '<string>',
piece_version: '<string>',
display_name: '<string>',
auth_method: {auth_property_index: 1},
purpose: '<string>',
expires_in_days: 7,
target_connection_external_id: '<string>',
locale: '<string>'
})
};
fetch('https://api.diga.io/v1/workflow/client-connection-requests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.diga.io/v1/workflow/client-connection-requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"piece_name": "<string>",
"piece_version": "<string>",
"display_name": "<string>",
"auth_method": {
"auth_property_index": 1
},
"purpose": "<string>",
"expires_in_days": 7,
"target_connection_external_id": "<string>",
"locale": "<string>"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.diga.io/v1/workflow/client-connection-requests"
payload := strings.NewReader("{\n \"piece_name\": \"<string>\",\n \"piece_version\": \"<string>\",\n \"display_name\": \"<string>\",\n \"auth_method\": {\n \"auth_property_index\": 1\n },\n \"purpose\": \"<string>\",\n \"expires_in_days\": 7,\n \"target_connection_external_id\": \"<string>\",\n \"locale\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"piece_name": "<string>",
"piece_version": "<string>",
"piece_display_name": "<string>",
"piece_logo_url": "<string>",
"display_name": "<string>",
"purpose": "<string>",
"requester_name": "<string>",
"requester_company_name": "<string>",
"auth_property_index": 123,
"connection_type": "OAUTH2",
"oauth_grant_type": "AUTHORIZATION_CODE",
"status": "AWAITING_CLIENT",
"expires_at": "2023-11-07T05:31:56Z",
"target_connection_external_id": "<string>",
"result_connection_external_id": "<string>",
"safe_identity": {},
"last_error_code": "<string>",
"last_error_message": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"opened_at": "2023-11-07T05:31:56Z",
"authentication_started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"link": "<string>",
"resource_type": "CLIENT_CONNECTION_REQUEST",
"events": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"event_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"data": {}
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Successful Response
import requests
url = "https://api.diga.io/v1/workflow/client-connection-requests"
payload = {
"piece_name": "<string>",
"piece_version": "<string>",
"display_name": "<string>",
"auth_method": { "auth_property_index": 1 },
"purpose": "<string>",
"expires_in_days": 7,
"target_connection_external_id": "<string>",
"locale": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
piece_name: '<string>',
piece_version: '<string>',
display_name: '<string>',
auth_method: {auth_property_index: 1},
purpose: '<string>',
expires_in_days: 7,
target_connection_external_id: '<string>',
locale: '<string>'
})
};
fetch('https://api.diga.io/v1/workflow/client-connection-requests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.diga.io/v1/workflow/client-connection-requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"piece_name": "<string>",
"piece_version": "<string>",
"display_name": "<string>",
"auth_method": {
"auth_property_index": 1
},
"purpose": "<string>",
"expires_in_days": 7,
"target_connection_external_id": "<string>",
"locale": "<string>"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.diga.io/v1/workflow/client-connection-requests"
payload := strings.NewReader("{\n \"piece_name\": \"<string>\",\n \"piece_version\": \"<string>\",\n \"display_name\": \"<string>\",\n \"auth_method\": {\n \"auth_property_index\": 1\n },\n \"purpose\": \"<string>\",\n \"expires_in_days\": 7,\n \"target_connection_external_id\": \"<string>\",\n \"locale\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"piece_name": "<string>",
"piece_version": "<string>",
"piece_display_name": "<string>",
"piece_logo_url": "<string>",
"display_name": "<string>",
"purpose": "<string>",
"requester_name": "<string>",
"requester_company_name": "<string>",
"auth_property_index": 123,
"connection_type": "OAUTH2",
"oauth_grant_type": "AUTHORIZATION_CODE",
"status": "AWAITING_CLIENT",
"expires_at": "2023-11-07T05:31:56Z",
"target_connection_external_id": "<string>",
"result_connection_external_id": "<string>",
"safe_identity": {},
"last_error_code": "<string>",
"last_error_message": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"opened_at": "2023-11-07T05:31:56Z",
"authentication_started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"link": "<string>",
"resource_type": "CLIENT_CONNECTION_REQUEST",
"events": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"event_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"data": {}
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}