@1claw/openapi-spec 0.18.0 → 0.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/openapi.json +199 -1
- package/openapi.yaml +125 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,7 +40,7 @@ openapi-generator generate \
|
|
|
40
40
|
import spec from "@1claw/openapi-spec/openapi.json";
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
## What's in the spec (v0.
|
|
43
|
+
## What's in the spec (v0.19.x)
|
|
44
44
|
|
|
45
45
|
- **Auth — agent JWT** — `POST /v1/auth/agent-token` documents optional JWT claim **`shroud_config`** when the agent has Shroud enabled (mirrors DB; consumed by Shroud PolicyEngine on LLM requests). Re-exchange after changing agent Shroud settings.
|
|
46
46
|
- **Auth — password reset** — `POST /v1/auth/forgot-password`, `POST /v1/auth/reset-password` (public; anti-enumeration on forgot)
|
|
@@ -48,7 +48,7 @@ import spec from "@1claw/openapi-spec/openapi.json";
|
|
|
48
48
|
- **Treasury** — Safe multisig treasuries: `POST/GET /v1/treasury`, `GET/PATCH/DELETE /v1/treasury/{id}`, signers, agent access requests (`requests[]` on list)
|
|
49
49
|
- **Vaults** — CRUD, CMEK enable/disable, key rotation with job tracking, MPC enable/disable (`POST /v1/vaults/{id}/mpc`, `DELETE /v1/vaults/{id}/mpc`)
|
|
50
50
|
- **Secrets** — CRUD, versioning, CMEK-encrypted flag, `client_share` in responses (MPC vaults)
|
|
51
|
-
- **Agents** — CRUD with `auth_method` (api_key, mtls, oidc_client_credentials), auto-generated SSH keypairs, `token_ttl_seconds`, `vault_ids`, Intents API, transaction guardrails
|
|
51
|
+
- **Agents** — CRUD with `auth_method` (api_key, mtls, oidc_client_credentials), auto-generated SSH keypairs, `token_ttl_seconds`, `vault_ids`, Intents API, transaction guardrails (`tx_to_allowlist`, `tx_max_value_eth`, `tx_daily_limit_eth`, `tx_allowed_chains`); **`GET /v1/agents/{id}`** includes **`tx_spent_today_eth`** (rolling UTC-day spend from recorded txs) for clients such as **Shroud** that enforce the daily cap alongside per-tx limits
|
|
52
52
|
- **Policies** — Glob-based access control
|
|
53
53
|
- **Sharing** — Links, user/agent shares, accept/decline
|
|
54
54
|
- **Billing** — Subscriptions, credits, x402, LLM token billing (see above)
|
package/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.1.0",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "1Claw API",
|
|
5
|
-
"version": "2.
|
|
5
|
+
"version": "2.9.0",
|
|
6
6
|
"description": "Secure secret management for AI agents. Provides vaults, secrets,\npolicy-based access control, agent identity, Intents API,\nsharing, billing, and audit logging.\n\nAll endpoints require JWT Bearer authentication unless marked with\n`security: []`.\n",
|
|
7
7
|
"contact": {
|
|
8
8
|
"email": "ops@1claw.xyz"
|
|
@@ -1434,6 +1434,160 @@
|
|
|
1434
1434
|
}
|
|
1435
1435
|
}
|
|
1436
1436
|
},
|
|
1437
|
+
"/v1/vaults/{vault_id}/secret-versions/{path}": {
|
|
1438
|
+
"get": {
|
|
1439
|
+
"tags": [
|
|
1440
|
+
"Secrets"
|
|
1441
|
+
],
|
|
1442
|
+
"summary": "List all versions of a secret",
|
|
1443
|
+
"operationId": "listSecretVersions",
|
|
1444
|
+
"parameters": [
|
|
1445
|
+
{
|
|
1446
|
+
"$ref": "#/components/parameters/VaultId"
|
|
1447
|
+
},
|
|
1448
|
+
{
|
|
1449
|
+
"$ref": "#/components/parameters/SecretPath"
|
|
1450
|
+
}
|
|
1451
|
+
],
|
|
1452
|
+
"responses": {
|
|
1453
|
+
"200": {
|
|
1454
|
+
"description": "Version list",
|
|
1455
|
+
"content": {
|
|
1456
|
+
"application/json": {
|
|
1457
|
+
"schema": {
|
|
1458
|
+
"$ref": "#/components/schemas/SecretVersionListResponse"
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
},
|
|
1463
|
+
"404": {
|
|
1464
|
+
"$ref": "#/components/responses/NotFound"
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
},
|
|
1469
|
+
"/v1/vaults/{vault_id}/secret-version/{path}/{version}": {
|
|
1470
|
+
"get": {
|
|
1471
|
+
"tags": [
|
|
1472
|
+
"Secrets"
|
|
1473
|
+
],
|
|
1474
|
+
"summary": "Retrieve a specific version of a secret",
|
|
1475
|
+
"operationId": "getSecretVersion",
|
|
1476
|
+
"parameters": [
|
|
1477
|
+
{
|
|
1478
|
+
"$ref": "#/components/parameters/VaultId"
|
|
1479
|
+
},
|
|
1480
|
+
{
|
|
1481
|
+
"$ref": "#/components/parameters/SecretPath"
|
|
1482
|
+
},
|
|
1483
|
+
{
|
|
1484
|
+
"name": "version",
|
|
1485
|
+
"in": "path",
|
|
1486
|
+
"required": true,
|
|
1487
|
+
"schema": {
|
|
1488
|
+
"type": "integer"
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
],
|
|
1492
|
+
"responses": {
|
|
1493
|
+
"200": {
|
|
1494
|
+
"description": "Decrypted secret value at the specified version",
|
|
1495
|
+
"content": {
|
|
1496
|
+
"application/json": {
|
|
1497
|
+
"schema": {
|
|
1498
|
+
"$ref": "#/components/schemas/SecretResponse"
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1501
|
+
}
|
|
1502
|
+
},
|
|
1503
|
+
"404": {
|
|
1504
|
+
"$ref": "#/components/responses/NotFound"
|
|
1505
|
+
},
|
|
1506
|
+
"410": {
|
|
1507
|
+
"description": "Version has been disabled or expired"
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
}
|
|
1511
|
+
},
|
|
1512
|
+
"/v1/vaults/{vault_id}/secret-version/{path}/{version}/disable": {
|
|
1513
|
+
"post": {
|
|
1514
|
+
"tags": [
|
|
1515
|
+
"Secrets"
|
|
1516
|
+
],
|
|
1517
|
+
"summary": "Disable a specific secret version",
|
|
1518
|
+
"operationId": "disableSecretVersion",
|
|
1519
|
+
"description": "Disables a version so it can no longer be read. The version is\nretained for audit purposes but returns 410 on read attempts.\n",
|
|
1520
|
+
"parameters": [
|
|
1521
|
+
{
|
|
1522
|
+
"$ref": "#/components/parameters/VaultId"
|
|
1523
|
+
},
|
|
1524
|
+
{
|
|
1525
|
+
"$ref": "#/components/parameters/SecretPath"
|
|
1526
|
+
},
|
|
1527
|
+
{
|
|
1528
|
+
"name": "version",
|
|
1529
|
+
"in": "path",
|
|
1530
|
+
"required": true,
|
|
1531
|
+
"schema": {
|
|
1532
|
+
"type": "integer"
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
],
|
|
1536
|
+
"responses": {
|
|
1537
|
+
"204": {
|
|
1538
|
+
"description": "Version disabled"
|
|
1539
|
+
},
|
|
1540
|
+
"404": {
|
|
1541
|
+
"$ref": "#/components/responses/NotFound"
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
}
|
|
1545
|
+
},
|
|
1546
|
+
"/v1/vaults/{vault_id}/secret-rotate/{path}": {
|
|
1547
|
+
"post": {
|
|
1548
|
+
"tags": [
|
|
1549
|
+
"Secrets"
|
|
1550
|
+
],
|
|
1551
|
+
"summary": "Server-side secret rotation",
|
|
1552
|
+
"operationId": "rotateSecret",
|
|
1553
|
+
"description": "Generates a cryptographically random value and stores it as a new\nversion of the secret. The previous version is preserved in history.\nRequires rotate or write permission.\n",
|
|
1554
|
+
"parameters": [
|
|
1555
|
+
{
|
|
1556
|
+
"$ref": "#/components/parameters/VaultId"
|
|
1557
|
+
},
|
|
1558
|
+
{
|
|
1559
|
+
"$ref": "#/components/parameters/SecretPath"
|
|
1560
|
+
}
|
|
1561
|
+
],
|
|
1562
|
+
"requestBody": {
|
|
1563
|
+
"content": {
|
|
1564
|
+
"application/json": {
|
|
1565
|
+
"schema": {
|
|
1566
|
+
"$ref": "#/components/schemas/RotateSecretRequest"
|
|
1567
|
+
}
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
},
|
|
1571
|
+
"responses": {
|
|
1572
|
+
"201": {
|
|
1573
|
+
"description": "New version created with server-generated value",
|
|
1574
|
+
"content": {
|
|
1575
|
+
"application/json": {
|
|
1576
|
+
"schema": {
|
|
1577
|
+
"$ref": "#/components/schemas/SecretCreatedResponse"
|
|
1578
|
+
}
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
},
|
|
1582
|
+
"400": {
|
|
1583
|
+
"$ref": "#/components/responses/BadRequest"
|
|
1584
|
+
},
|
|
1585
|
+
"404": {
|
|
1586
|
+
"$ref": "#/components/responses/NotFound"
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
},
|
|
1437
1591
|
"/v1/vaults/{vault_id}/policies": {
|
|
1438
1592
|
"post": {
|
|
1439
1593
|
"tags": [
|
|
@@ -5143,6 +5297,10 @@
|
|
|
5143
5297
|
"expires_at": {
|
|
5144
5298
|
"type": "string",
|
|
5145
5299
|
"format": "date-time"
|
|
5300
|
+
},
|
|
5301
|
+
"is_disabled": {
|
|
5302
|
+
"type": "boolean",
|
|
5303
|
+
"description": "Whether this version has been disabled (retained for audit but unreadable)"
|
|
5146
5304
|
}
|
|
5147
5305
|
}
|
|
5148
5306
|
},
|
|
@@ -5247,6 +5405,42 @@
|
|
|
5247
5405
|
}
|
|
5248
5406
|
}
|
|
5249
5407
|
},
|
|
5408
|
+
"SecretVersionListResponse": {
|
|
5409
|
+
"type": "object",
|
|
5410
|
+
"properties": {
|
|
5411
|
+
"versions": {
|
|
5412
|
+
"type": "array",
|
|
5413
|
+
"items": {
|
|
5414
|
+
"$ref": "#/components/schemas/SecretMetadataResponse"
|
|
5415
|
+
}
|
|
5416
|
+
}
|
|
5417
|
+
}
|
|
5418
|
+
},
|
|
5419
|
+
"RotateSecretRequest": {
|
|
5420
|
+
"type": "object",
|
|
5421
|
+
"properties": {
|
|
5422
|
+
"length": {
|
|
5423
|
+
"type": "integer",
|
|
5424
|
+
"minimum": 8,
|
|
5425
|
+
"maximum": 1024,
|
|
5426
|
+
"description": "Length of the generated value (default 32)"
|
|
5427
|
+
},
|
|
5428
|
+
"charset": {
|
|
5429
|
+
"type": "string",
|
|
5430
|
+
"enum": [
|
|
5431
|
+
"hex",
|
|
5432
|
+
"base64",
|
|
5433
|
+
"alphanumeric",
|
|
5434
|
+
"ascii"
|
|
5435
|
+
],
|
|
5436
|
+
"description": "Character set for the generated value (default hex)"
|
|
5437
|
+
},
|
|
5438
|
+
"type": {
|
|
5439
|
+
"type": "string",
|
|
5440
|
+
"description": "Override the secret type (defaults to existing secret's type)"
|
|
5441
|
+
}
|
|
5442
|
+
}
|
|
5443
|
+
},
|
|
5250
5444
|
"CreatePolicyRequest": {
|
|
5251
5445
|
"type": "object",
|
|
5252
5446
|
"required": [
|
|
@@ -5609,6 +5803,10 @@
|
|
|
5609
5803
|
"tx_daily_limit_eth": {
|
|
5610
5804
|
"type": "string"
|
|
5611
5805
|
},
|
|
5806
|
+
"tx_spent_today_eth": {
|
|
5807
|
+
"type": "string",
|
|
5808
|
+
"description": "ETH value already spent today (UTC) from recorded transactions; used with daily limit guardrails"
|
|
5809
|
+
},
|
|
5612
5810
|
"tx_allowed_chains": {
|
|
5613
5811
|
"type": "array",
|
|
5614
5812
|
"items": {
|
package/openapi.yaml
CHANGED
|
@@ -2,7 +2,7 @@ openapi: 3.1.0
|
|
|
2
2
|
|
|
3
3
|
info:
|
|
4
4
|
title: 1Claw API
|
|
5
|
-
version: 2.
|
|
5
|
+
version: 2.9.0
|
|
6
6
|
description: |
|
|
7
7
|
Secure secret management for AI agents. Provides vaults, secrets,
|
|
8
8
|
policy-based access control, agent identity, Intents API,
|
|
@@ -937,6 +937,100 @@ paths:
|
|
|
937
937
|
"404":
|
|
938
938
|
$ref: "#/components/responses/NotFound"
|
|
939
939
|
|
|
940
|
+
/v1/vaults/{vault_id}/secret-versions/{path}:
|
|
941
|
+
get:
|
|
942
|
+
tags: [Secrets]
|
|
943
|
+
summary: List all versions of a secret
|
|
944
|
+
operationId: listSecretVersions
|
|
945
|
+
parameters:
|
|
946
|
+
- $ref: "#/components/parameters/VaultId"
|
|
947
|
+
- $ref: "#/components/parameters/SecretPath"
|
|
948
|
+
responses:
|
|
949
|
+
"200":
|
|
950
|
+
description: Version list
|
|
951
|
+
content:
|
|
952
|
+
application/json:
|
|
953
|
+
schema:
|
|
954
|
+
$ref: "#/components/schemas/SecretVersionListResponse"
|
|
955
|
+
"404":
|
|
956
|
+
$ref: "#/components/responses/NotFound"
|
|
957
|
+
|
|
958
|
+
/v1/vaults/{vault_id}/secret-version/{path}/{version}:
|
|
959
|
+
get:
|
|
960
|
+
tags: [Secrets]
|
|
961
|
+
summary: Retrieve a specific version of a secret
|
|
962
|
+
operationId: getSecretVersion
|
|
963
|
+
parameters:
|
|
964
|
+
- $ref: "#/components/parameters/VaultId"
|
|
965
|
+
- $ref: "#/components/parameters/SecretPath"
|
|
966
|
+
- name: version
|
|
967
|
+
in: path
|
|
968
|
+
required: true
|
|
969
|
+
schema:
|
|
970
|
+
type: integer
|
|
971
|
+
responses:
|
|
972
|
+
"200":
|
|
973
|
+
description: Decrypted secret value at the specified version
|
|
974
|
+
content:
|
|
975
|
+
application/json:
|
|
976
|
+
schema:
|
|
977
|
+
$ref: "#/components/schemas/SecretResponse"
|
|
978
|
+
"404":
|
|
979
|
+
$ref: "#/components/responses/NotFound"
|
|
980
|
+
"410":
|
|
981
|
+
description: Version has been disabled or expired
|
|
982
|
+
|
|
983
|
+
/v1/vaults/{vault_id}/secret-version/{path}/{version}/disable:
|
|
984
|
+
post:
|
|
985
|
+
tags: [Secrets]
|
|
986
|
+
summary: Disable a specific secret version
|
|
987
|
+
operationId: disableSecretVersion
|
|
988
|
+
description: |
|
|
989
|
+
Disables a version so it can no longer be read. The version is
|
|
990
|
+
retained for audit purposes but returns 410 on read attempts.
|
|
991
|
+
parameters:
|
|
992
|
+
- $ref: "#/components/parameters/VaultId"
|
|
993
|
+
- $ref: "#/components/parameters/SecretPath"
|
|
994
|
+
- name: version
|
|
995
|
+
in: path
|
|
996
|
+
required: true
|
|
997
|
+
schema:
|
|
998
|
+
type: integer
|
|
999
|
+
responses:
|
|
1000
|
+
"204":
|
|
1001
|
+
description: Version disabled
|
|
1002
|
+
"404":
|
|
1003
|
+
$ref: "#/components/responses/NotFound"
|
|
1004
|
+
|
|
1005
|
+
/v1/vaults/{vault_id}/secret-rotate/{path}:
|
|
1006
|
+
post:
|
|
1007
|
+
tags: [Secrets]
|
|
1008
|
+
summary: Server-side secret rotation
|
|
1009
|
+
operationId: rotateSecret
|
|
1010
|
+
description: |
|
|
1011
|
+
Generates a cryptographically random value and stores it as a new
|
|
1012
|
+
version of the secret. The previous version is preserved in history.
|
|
1013
|
+
Requires rotate or write permission.
|
|
1014
|
+
parameters:
|
|
1015
|
+
- $ref: "#/components/parameters/VaultId"
|
|
1016
|
+
- $ref: "#/components/parameters/SecretPath"
|
|
1017
|
+
requestBody:
|
|
1018
|
+
content:
|
|
1019
|
+
application/json:
|
|
1020
|
+
schema:
|
|
1021
|
+
$ref: "#/components/schemas/RotateSecretRequest"
|
|
1022
|
+
responses:
|
|
1023
|
+
"201":
|
|
1024
|
+
description: New version created with server-generated value
|
|
1025
|
+
content:
|
|
1026
|
+
application/json:
|
|
1027
|
+
schema:
|
|
1028
|
+
$ref: "#/components/schemas/SecretCreatedResponse"
|
|
1029
|
+
"400":
|
|
1030
|
+
$ref: "#/components/responses/BadRequest"
|
|
1031
|
+
"404":
|
|
1032
|
+
$ref: "#/components/responses/NotFound"
|
|
1033
|
+
|
|
940
1034
|
# ---------------------------------------------------------------------------
|
|
941
1035
|
# Policies
|
|
942
1036
|
# ---------------------------------------------------------------------------
|
|
@@ -3370,6 +3464,9 @@ components:
|
|
|
3370
3464
|
expires_at:
|
|
3371
3465
|
type: string
|
|
3372
3466
|
format: date-time
|
|
3467
|
+
is_disabled:
|
|
3468
|
+
type: boolean
|
|
3469
|
+
description: Whether this version has been disabled (retained for audit but unreadable)
|
|
3373
3470
|
|
|
3374
3471
|
SecretCreatedResponse:
|
|
3375
3472
|
description: Returned when a secret is created or updated. Extends SecretMetadataResponse with an optional client_share for MPC vaults.
|
|
@@ -3436,6 +3533,30 @@ components:
|
|
|
3436
3533
|
items:
|
|
3437
3534
|
$ref: "#/components/schemas/SecretMetadataResponse"
|
|
3438
3535
|
|
|
3536
|
+
SecretVersionListResponse:
|
|
3537
|
+
type: object
|
|
3538
|
+
properties:
|
|
3539
|
+
versions:
|
|
3540
|
+
type: array
|
|
3541
|
+
items:
|
|
3542
|
+
$ref: "#/components/schemas/SecretMetadataResponse"
|
|
3543
|
+
|
|
3544
|
+
RotateSecretRequest:
|
|
3545
|
+
type: object
|
|
3546
|
+
properties:
|
|
3547
|
+
length:
|
|
3548
|
+
type: integer
|
|
3549
|
+
minimum: 8
|
|
3550
|
+
maximum: 1024
|
|
3551
|
+
description: Length of the generated value (default 32)
|
|
3552
|
+
charset:
|
|
3553
|
+
type: string
|
|
3554
|
+
enum: [hex, base64, alphanumeric, ascii]
|
|
3555
|
+
description: Character set for the generated value (default hex)
|
|
3556
|
+
type:
|
|
3557
|
+
type: string
|
|
3558
|
+
description: Override the secret type (defaults to existing secret's type)
|
|
3559
|
+
|
|
3439
3560
|
# --- Policies ---
|
|
3440
3561
|
|
|
3441
3562
|
CreatePolicyRequest:
|
|
@@ -3698,6 +3819,9 @@ components:
|
|
|
3698
3819
|
type: string
|
|
3699
3820
|
tx_daily_limit_eth:
|
|
3700
3821
|
type: string
|
|
3822
|
+
tx_spent_today_eth:
|
|
3823
|
+
type: string
|
|
3824
|
+
description: ETH value already spent today (UTC) from recorded transactions; used with daily limit guardrails
|
|
3701
3825
|
tx_allowed_chains:
|
|
3702
3826
|
type: array
|
|
3703
3827
|
items:
|