Appearance
erp-keys
5 endpoints.
GET /api/v1/settings/erp-keys
List Keys
All managed connections (ERP sites + portal), secrets withheld.
200 — Successful Response
json
{}GET /api/v1/settings/erp-keys/dashboard-sites
Get Dashboard Sites
This site's own /erp/sites tab override, secrets withheld. Empty tabs means the site is on the global default (today's 4 real ERPs).
200 — Successful Response
json
{}PUT /api/v1/settings/erp-keys/dashboard-sites
Put Dashboard Sites
Replace this site's dashboard tab list. An empty tabs list clears the override, reverting the site to the global default. Returns the refreshed (masked) tab list.
Request body
json
{
"properties": {
"tabs": {
"items": {
"properties": {
"id": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"title": "Id"
},
"label": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"title": "Label"
},
"kind": {
"type": "string",
"pattern": "^(frappe|local)$",
"title": "Kind"
},
"url": {
"anyOf": [
{
"type": "string",
"maxLength": 512
},
{
"type": "null"
}
],
"title": "Url"
},
"key": {
"anyOf": [
{
"type": "string",
"maxLength": 512
},
{
"type": "null"
}
],
"title": "Key"
},
"secret": {
"anyOf": [
{
"type": "string",
"maxLength": 512
},
{
"type": "null"
}
],
"title": "Secret"
},
"segment": {
"anyOf": [
{
"type": "string",
"maxLength": 255
},
{
"type": "null"
}
],
"title": "Segment"
}
},
"type": "object",
"required": [
"id",
"label",
"kind"
],
"title": "DashboardTabIn"
},
"type": "array",
"title": "Tabs"
}
},
"type": "object",
"required": [
"tabs"
],
"title": "DashboardTabsIn"
}200 — Successful Response
json
{}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}PUT /api/v1/settings/erp-keys/{conn_id}
Update Key
Upsert one connection's credentials, then return the refreshed (masked) connection list so the UI reflects the new state.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
conn_id | path | yes | string |
Request body
json
{
"properties": {
"url": {
"anyOf": [
{
"type": "string",
"maxLength": 512
},
{
"type": "null"
}
],
"title": "Url"
},
"key": {
"anyOf": [
{
"type": "string",
"maxLength": 512
},
{
"type": "null"
}
],
"title": "Key"
},
"secret": {
"anyOf": [
{
"type": "string",
"maxLength": 512
},
{
"type": "null"
}
],
"title": "Secret"
}
},
"type": "object",
"title": "ErpKeyIn",
"description": "Partial update for one connection. A field omitted (``None``) is left\nuntouched; an empty string clears that field's override (falls back to\n``.env``). For the portal, ``key`` is the bearer token and ``secret`` is\nignored."
}200 — Successful Response
json
{}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}POST /api/v1/settings/erp-keys/{conn_id}/test
Test Key
Live connectivity check using the currently-resolved credentials (DB-over-env). Returns {ok, detail}.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
conn_id | path | yes | string |
200 — Successful Response
json
{}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}