Get a provider connection URL
curl --request POST \
--url https://api.agentsfleet.net/v1/workspaces/{workspace_id}/connectors/{provider}/connect \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.agentsfleet.net/v1/workspaces/{workspace_id}/connectors/{provider}/connect"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.agentsfleet.net/v1/workspaces/{workspace_id}/connectors/{provider}/connect', 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.agentsfleet.net/v1/workspaces/{workspace_id}/connectors/{provider}/connect",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.agentsfleet.net/v1/workspaces/{workspace_id}/connectors/{provider}/connect"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.agentsfleet.net/v1/workspaces/{workspace_id}/connectors/{provider}/connect")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentsfleet.net/v1/workspaces/{workspace_id}/connectors/{provider}/connect")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"install_url": "<string>"
}{
"docs_uri": "https://docs.agentsfleet.net/api-reference/error-codes#UZ-AGT-009",
"title": "Fleet not found",
"detail": "No fleet with id 'abc123' in this workspace.",
"error_code": "UZ-AGT-009",
"request_id": "<string>",
"current_state": "paused",
"user_message": "We couldn't find that Fleet. It may have been deleted, or the ID doesn't match one in this workspace.",
"etag": "<string>"
}{
"docs_uri": "https://docs.agentsfleet.net/api-reference/error-codes#UZ-AGT-009",
"title": "Fleet not found",
"detail": "No fleet with id 'abc123' in this workspace.",
"error_code": "UZ-AGT-009",
"request_id": "<string>",
"current_state": "paused",
"user_message": "We couldn't find that Fleet. It may have been deleted, or the ID doesn't match one in this workspace.",
"etag": "<string>"
}{
"docs_uri": "https://docs.agentsfleet.net/api-reference/error-codes#UZ-AGT-009",
"title": "Fleet not found",
"detail": "No fleet with id 'abc123' in this workspace.",
"error_code": "UZ-AGT-009",
"request_id": "<string>",
"current_state": "paused",
"user_message": "We couldn't find that Fleet. It may have been deleted, or the ID doesn't match one in this workspace.",
"etag": "<string>"
}{
"docs_uri": "https://docs.agentsfleet.net/api-reference/error-codes#UZ-AGT-009",
"title": "Fleet not found",
"detail": "No fleet with id 'abc123' in this workspace.",
"error_code": "UZ-AGT-009",
"request_id": "<string>",
"current_state": "paused",
"user_message": "We couldn't find that Fleet. It may have been deleted, or the ID doesn't match one in this workspace.",
"etag": "<string>"
}{
"docs_uri": "https://docs.agentsfleet.net/api-reference/error-codes#UZ-AGT-009",
"title": "Fleet not found",
"detail": "No fleet with id 'abc123' in this workspace.",
"error_code": "UZ-AGT-009",
"request_id": "<string>",
"current_state": "paused",
"user_message": "We couldn't find that Fleet. It may have been deleted, or the ID doesn't match one in this workspace.",
"etag": "<string>"
}{
"docs_uri": "https://docs.agentsfleet.net/api-reference/error-codes#UZ-AGT-009",
"title": "Fleet not found",
"detail": "No fleet with id 'abc123' in this workspace.",
"error_code": "UZ-AGT-009",
"request_id": "<string>",
"current_state": "paused",
"user_message": "We couldn't find that Fleet. It may have been deleted, or the ID doesn't match one in this workspace.",
"etag": "<string>"
}Connectors
Get a provider connection URL
Returns a URL for connecting the workspace to the provider. Open the URL in a browser.
An unknown provider returns 404 UZ-CONN-004. An unavailable provider returns 503 UZ-CONN-001.
POST
/
v1
/
workspaces
/
{workspace_id}
/
connectors
/
{provider}
/
connect
Get a provider connection URL
curl --request POST \
--url https://api.agentsfleet.net/v1/workspaces/{workspace_id}/connectors/{provider}/connect \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.agentsfleet.net/v1/workspaces/{workspace_id}/connectors/{provider}/connect"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.agentsfleet.net/v1/workspaces/{workspace_id}/connectors/{provider}/connect', 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.agentsfleet.net/v1/workspaces/{workspace_id}/connectors/{provider}/connect",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.agentsfleet.net/v1/workspaces/{workspace_id}/connectors/{provider}/connect"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.agentsfleet.net/v1/workspaces/{workspace_id}/connectors/{provider}/connect")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentsfleet.net/v1/workspaces/{workspace_id}/connectors/{provider}/connect")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"install_url": "<string>"
}{
"docs_uri": "https://docs.agentsfleet.net/api-reference/error-codes#UZ-AGT-009",
"title": "Fleet not found",
"detail": "No fleet with id 'abc123' in this workspace.",
"error_code": "UZ-AGT-009",
"request_id": "<string>",
"current_state": "paused",
"user_message": "We couldn't find that Fleet. It may have been deleted, or the ID doesn't match one in this workspace.",
"etag": "<string>"
}{
"docs_uri": "https://docs.agentsfleet.net/api-reference/error-codes#UZ-AGT-009",
"title": "Fleet not found",
"detail": "No fleet with id 'abc123' in this workspace.",
"error_code": "UZ-AGT-009",
"request_id": "<string>",
"current_state": "paused",
"user_message": "We couldn't find that Fleet. It may have been deleted, or the ID doesn't match one in this workspace.",
"etag": "<string>"
}{
"docs_uri": "https://docs.agentsfleet.net/api-reference/error-codes#UZ-AGT-009",
"title": "Fleet not found",
"detail": "No fleet with id 'abc123' in this workspace.",
"error_code": "UZ-AGT-009",
"request_id": "<string>",
"current_state": "paused",
"user_message": "We couldn't find that Fleet. It may have been deleted, or the ID doesn't match one in this workspace.",
"etag": "<string>"
}{
"docs_uri": "https://docs.agentsfleet.net/api-reference/error-codes#UZ-AGT-009",
"title": "Fleet not found",
"detail": "No fleet with id 'abc123' in this workspace.",
"error_code": "UZ-AGT-009",
"request_id": "<string>",
"current_state": "paused",
"user_message": "We couldn't find that Fleet. It may have been deleted, or the ID doesn't match one in this workspace.",
"etag": "<string>"
}{
"docs_uri": "https://docs.agentsfleet.net/api-reference/error-codes#UZ-AGT-009",
"title": "Fleet not found",
"detail": "No fleet with id 'abc123' in this workspace.",
"error_code": "UZ-AGT-009",
"request_id": "<string>",
"current_state": "paused",
"user_message": "We couldn't find that Fleet. It may have been deleted, or the ID doesn't match one in this workspace.",
"etag": "<string>"
}{
"docs_uri": "https://docs.agentsfleet.net/api-reference/error-codes#UZ-AGT-009",
"title": "Fleet not found",
"detail": "No fleet with id 'abc123' in this workspace.",
"error_code": "UZ-AGT-009",
"request_id": "<string>",
"current_state": "paused",
"user_message": "We couldn't find that Fleet. It may have been deleted, or the ID doesn't match one in this workspace.",
"etag": "<string>"
}Authorizations
Obtain a token via the CLI auth flow (POST /v1/auth/sessions) or GitHub OAuth
Path Parameters
Workspace identifier.
Provider identifier, such as slack or github.
Response
Connection URL created.
URL to open in the user's browser.
⌘I