Verify and store a write-only tenant compute credential
POST
/
api
/
v1
/
compute
/
connections
Verify and store a write-only tenant compute credential
curl --request POST \
--url http://127.0.0.1:18000/api/v1/compute/connections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"credential": "<string>",
"name": "<string>",
"provider": "runpod"
}
'import requests
url = "http://127.0.0.1:18000/api/v1/compute/connections"
payload = {
"credential": "<string>",
"name": "<string>",
"provider": "runpod"
}
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({credential: '<string>', name: '<string>', provider: 'runpod'})
};
fetch('http://127.0.0.1:18000/api/v1/compute/connections', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:18000/api/v1/compute/connections"
payload := strings.NewReader("{\n \"credential\": \"<string>\",\n \"name\": \"<string>\",\n \"provider\": \"runpod\"\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": {
"adapter": "runpod-pods",
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"name": "<string>",
"provider": "runpod",
"status": "verified",
"updated_at": "2023-11-07T05:31:56Z",
"verified_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"category": "<string>",
"remediation": "<string>",
"request_id": "<string>",
"retryable": true
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Write-only provider API key. The plaintext value is never returned.
Required string length:
16 - 4096Human-readable connection name. It is normalized to lowercase and may contain letters, numbers, dots, underscores, and hyphens.
Required string length:
1 - 64Allowed value:
"runpod"Response
Created
Show child attributes
Show child attributes
⌘I
Verify and store a write-only tenant compute credential
curl --request POST \
--url http://127.0.0.1:18000/api/v1/compute/connections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"credential": "<string>",
"name": "<string>",
"provider": "runpod"
}
'import requests
url = "http://127.0.0.1:18000/api/v1/compute/connections"
payload = {
"credential": "<string>",
"name": "<string>",
"provider": "runpod"
}
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({credential: '<string>', name: '<string>', provider: 'runpod'})
};
fetch('http://127.0.0.1:18000/api/v1/compute/connections', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:18000/api/v1/compute/connections"
payload := strings.NewReader("{\n \"credential\": \"<string>\",\n \"name\": \"<string>\",\n \"provider\": \"runpod\"\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": {
"adapter": "runpod-pods",
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"name": "<string>",
"provider": "runpod",
"status": "verified",
"updated_at": "2023-11-07T05:31:56Z",
"verified_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"category": "<string>",
"remediation": "<string>",
"request_id": "<string>",
"retryable": true
}
}