Create a token connection
curl --request POST \
--url https://api.matrices.com/v1/connections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"owner": {
"type": "workspace"
},
"token": "<string>",
"remoteSubject": "<string>",
"remoteTenant": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
owner: {type: 'workspace'},
token: '<string>',
remoteSubject: '<string>',
remoteTenant: '<string>'
})
};
fetch('https://api.matrices.com/v1/connections', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.matrices.com/v1/connections"
payload = {
"name": "<string>",
"owner": { "type": "workspace" },
"token": "<string>",
"remoteSubject": "<string>",
"remoteTenant": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.matrices.com/v1/connections"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"owner\": {\n \"type\": \"workspace\"\n },\n \"token\": \"<string>\",\n \"remoteSubject\": \"<string>\",\n \"remoteTenant\": \"<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))
}{
"connection": {
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"kind": "token",
"name": "<string>",
"owner": {
"type": "workspace"
},
"status": "ready",
"updatedAt": "2023-11-07T05:31:56Z",
"version": 2,
"workspaceId": "<string>",
"namespace": "<string>",
"products": [
{
"namespace": "<string>",
"presets": [
"default"
]
}
],
"provider": "google",
"remoteResource": {
"id": "<string>",
"kind": "workspace",
"name": "<string>"
},
"remoteSubject": "<string>",
"remoteTenant": "<string>",
"revokedAt": "2023-11-07T05:31:56Z"
}
}{
"connection": {
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"kind": "token",
"name": "<string>",
"owner": {
"type": "workspace"
},
"status": "ready",
"updatedAt": "2023-11-07T05:31:56Z",
"version": 2,
"workspaceId": "<string>",
"namespace": "<string>",
"products": [
{
"namespace": "<string>",
"presets": [
"default"
]
}
],
"provider": "google",
"remoteResource": {
"id": "<string>",
"kind": "workspace",
"name": "<string>"
},
"remoteSubject": "<string>",
"remoteTenant": "<string>",
"revokedAt": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}Connections
Create a token connection
Encrypts a one-way token write and returns only safe connection metadata.
POST
/
v1
/
connections
Create a token connection
curl --request POST \
--url https://api.matrices.com/v1/connections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"owner": {
"type": "workspace"
},
"token": "<string>",
"remoteSubject": "<string>",
"remoteTenant": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
owner: {type: 'workspace'},
token: '<string>',
remoteSubject: '<string>',
remoteTenant: '<string>'
})
};
fetch('https://api.matrices.com/v1/connections', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.matrices.com/v1/connections"
payload = {
"name": "<string>",
"owner": { "type": "workspace" },
"token": "<string>",
"remoteSubject": "<string>",
"remoteTenant": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.matrices.com/v1/connections"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"owner\": {\n \"type\": \"workspace\"\n },\n \"token\": \"<string>\",\n \"remoteSubject\": \"<string>\",\n \"remoteTenant\": \"<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))
}{
"connection": {
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"kind": "token",
"name": "<string>",
"owner": {
"type": "workspace"
},
"status": "ready",
"updatedAt": "2023-11-07T05:31:56Z",
"version": 2,
"workspaceId": "<string>",
"namespace": "<string>",
"products": [
{
"namespace": "<string>",
"presets": [
"default"
]
}
],
"provider": "google",
"remoteResource": {
"id": "<string>",
"kind": "workspace",
"name": "<string>"
},
"remoteSubject": "<string>",
"remoteTenant": "<string>",
"revokedAt": "2023-11-07T05:31:56Z"
}
}{
"connection": {
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"kind": "token",
"name": "<string>",
"owner": {
"type": "workspace"
},
"status": "ready",
"updatedAt": "2023-11-07T05:31:56Z",
"version": 2,
"workspaceId": "<string>",
"namespace": "<string>",
"products": [
{
"namespace": "<string>",
"presets": [
"default"
]
}
],
"provider": "google",
"remoteResource": {
"id": "<string>",
"kind": "workspace",
"name": "<string>"
},
"remoteSubject": "<string>",
"remoteTenant": "<string>",
"revokedAt": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
- Option 1
- Option 2
Show child attributes
Show child attributes
Available options:
google, slack, notion, github, linear, vercel, figma, stripe, posthog, datadog, cloudflare, apollo Response
Replayed connection creation.
Safe connection metadata. Credential material is never returned.
Show child attributes
Show child attributes