Create CLI
curl --request POST \
--url http://127.0.0.1:8765/v1/clis \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "github",
"type": "gh",
"fields": {
"token": "<github-token>",
"repo": "owner/repository"
}
}
'import requests
url = "http://127.0.0.1:8765/v1/clis"
payload = {
"name": "github",
"type": "gh",
"fields": {
"token": "<github-token>",
"repo": "owner/repository"
}
}
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({
name: 'github',
type: 'gh',
fields: {token: '<github-token>', repo: 'owner/repository'}
})
};
fetch('http://127.0.0.1:8765/v1/clis', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "github",
"name": "github",
"kind": "cli",
"type": "gh",
"builtin": false,
"config": {
"repo": "owner/repository"
},
"created_by": null,
"created_at": null,
"updated_at": null
}CLI
Create CLI
POST
/
v1
/
clis
Create CLI
curl --request POST \
--url http://127.0.0.1:8765/v1/clis \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "github",
"type": "gh",
"fields": {
"token": "<github-token>",
"repo": "owner/repository"
}
}
'import requests
url = "http://127.0.0.1:8765/v1/clis"
payload = {
"name": "github",
"type": "gh",
"fields": {
"token": "<github-token>",
"repo": "owner/repository"
}
}
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({
name: 'github',
type: 'gh',
fields: {token: '<github-token>', repo: 'owner/repository'}
})
};
fetch('http://127.0.0.1:8765/v1/clis', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "github",
"name": "github",
"kind": "cli",
"type": "gh",
"builtin": false,
"config": {
"repo": "owner/repository"
},
"created_by": null,
"created_at": null,
"updated_at": null
}Save a named CLI configuration. Fields are validated for the selected type. Secret values are stored securely and omitted from read responses. String fields can reference secrets in a saved store. Returns
See error examples and recovery steps. The complete OpenAPI contract includes every response schema.
409 if the name exists.
Errors
Errors
| Status | Meaning |
|---|---|
400 | The request is malformed or a field is not valid for the type (param names it), or the fields refer to a secret store that is not saved yet (invalid_request; missing lists the stores to add first). |
401 | The token is missing or wrong (unauthorized). |
409 | The request conflicts with the current state. The id or name is taken (already_exists), the workspace is busy on another server or starting or stopping (workspace_busy), the workspace is stopped (workspace_stopped), a file changed since it was read (stale_write), or the state allows no such change (conflict). |
429 | Past a rate limit (rate_limited), or a new session past max_sessions (session_limit). |
501 | The server does not support this call (not_supported). Saved configs are kept only on a server of one account. |
Authorizations
Body
application/json
Response
201 - application/json
Created