Skip to content

Commit 2ef09d8

Browse files
committed
adds api key docs
1 parent abf9975 commit 2ef09d8

1 file changed

Lines changed: 127 additions & 9 deletions

File tree

api/bringyour.yml

Lines changed: 127 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,6 +1231,61 @@ paths:
12311231
schema:
12321232
$ref: "#/components/schemas/HelloResult"
12331233

1234+
/account/api-key:
1235+
post:
1236+
description: |
1237+
Create an API key for the account.
1238+
operationId: Account Create API Key
1239+
security:
1240+
- BearerAuth: []
1241+
requestBody:
1242+
required: true
1243+
content:
1244+
application/json:
1245+
schema:
1246+
$ref: "#/components/schemas/CreateApiKeyArgs"
1247+
responses:
1248+
"200":
1249+
content:
1250+
application/json:
1251+
schema:
1252+
$ref: "#/components/schemas/CreateApiKeyResult"
1253+
1254+
/account/api-key/remove:
1255+
post:
1256+
description: |
1257+
Remove an API key for the account.
1258+
operationId: Account Remove API Key
1259+
security:
1260+
- BearerAuth: []
1261+
requestBody:
1262+
required: true
1263+
content:
1264+
application/json:
1265+
schema:
1266+
$ref: "#/components/schemas/DeleteApiKeyArgs"
1267+
responses:
1268+
"200":
1269+
content:
1270+
application/json:
1271+
schema:
1272+
$ref: "#/components/schemas/DeleteApiKeyResult"
1273+
1274+
/account/api-keys:
1275+
get:
1276+
description: |
1277+
Fetches a list of API keys associated with the account.
1278+
The list does not include the API key secrets, only metadata.
1279+
operationId: Account Get API Keys
1280+
security:
1281+
- BearerAuth: []
1282+
responses:
1283+
"200":
1284+
content:
1285+
application/json:
1286+
schema:
1287+
$ref: "#/components/schemas/GetApiKeysResult"
1288+
12341289
/account/payout-wallet:
12351290
post:
12361291
description: |
@@ -2082,14 +2137,14 @@ components:
20822137
# the returned proxy urls are valid as long as the client is not removed
20832138
proxy_config_result:
20842139
description: |
2085-
The following proxy URLs and auths may be used:
2086-
| URL | Auth |
2087-
|-----|------|
2088-
| https://<auth_token>.<proxy_host>:<https_proxy_port> | no auth needed when the client connects with TLS |
2089-
| https://<proxy_host>:<https_proxy_port> | use HTTP Proxy-Authorization Basic with `access_token` as the username (empty pass), or Bearer with `access_token` as the bearer token |
2090-
| http://<proxy_host>:<http_proxy_port> | use HTTP Proxy-Authorization Basic with `access_token` as the username (empty pass), or Bearer with `access_token` as the bearer token |
2091-
| tcp://<proxy_host>:<socks_proxy_port> | use `access_token` as the username (empty pass) |
2092-
| wg://<proxy_host>:<wg_proxy_port> | use `wg_config.config` as the full WireGuard config file content, which contains all the necessary keys |
2140+
The following proxy URLs and auths may be used:
2141+
| URL | Auth |
2142+
|-----|------|
2143+
| https://<auth_token>.<proxy_host>:<https_proxy_port> | no auth needed when the client connects with TLS |
2144+
| https://<proxy_host>:<https_proxy_port> | use HTTP Proxy-Authorization Basic with `access_token` as the username (empty pass), or Bearer with `access_token` as the bearer token |
2145+
| http://<proxy_host>:<http_proxy_port> | use HTTP Proxy-Authorization Basic with `access_token` as the username (empty pass), or Bearer with `access_token` as the bearer token |
2146+
| tcp://<proxy_host>:<socks_proxy_port> | use `access_token` as the username (empty pass) |
2147+
| wg://<proxy_host>:<wg_proxy_port> | use `wg_config.config` as the full WireGuard config file content, which contains all the necessary keys |
20932148
allOf:
20942149
- type: object
20952150
properties:
@@ -2102,7 +2157,7 @@ components:
21022157
If the proxy is removed from memmory, the next call to the proxy will
21032158
create a new device set up to the `initial_device_state` (if present).
21042159
type: integer
2105-
- $ref: '#/components/schemas/ProxyClient'
2160+
- $ref: "#/components/schemas/ProxyClient"
21062161

21072162
error:
21082163
type: object
@@ -3641,3 +3696,66 @@ components:
36413696
$ref: "#/components/schemas/NetworkRedeemedBalanceCode"
36423697
error:
36433698
$ref: "#/components/schemas/NetworkBalanceCodesError"
3699+
3700+
CreateApiKeyArgs:
3701+
type: object
3702+
properties:
3703+
name:
3704+
type: string
3705+
3706+
CreateApiKeyResult:
3707+
type: object
3708+
properties:
3709+
id:
3710+
description: uuid
3711+
type: string
3712+
api_key:
3713+
type: string
3714+
name:
3715+
type: string
3716+
error:
3717+
type: object
3718+
properties:
3719+
message:
3720+
type: string
3721+
3722+
PublicAccountApiKey:
3723+
type: object
3724+
properties:
3725+
id:
3726+
description: uuid
3727+
type: string
3728+
name:
3729+
type: string
3730+
create_time:
3731+
description: datetime
3732+
type: string
3733+
3734+
GetApiKeysResult:
3735+
type: object
3736+
properties:
3737+
api_keys:
3738+
type: array
3739+
items:
3740+
$ref: "#/components/schemas/PublicAccountApiKey"
3741+
error:
3742+
type: object
3743+
properties:
3744+
message:
3745+
type: string
3746+
3747+
DeleteApiKeyArgs:
3748+
type: object
3749+
properties:
3750+
id:
3751+
description: uuid
3752+
type: string
3753+
3754+
DeleteApiKeyResult:
3755+
type: object
3756+
properties:
3757+
error:
3758+
type: object
3759+
properties:
3760+
message:
3761+
type: string

0 commit comments

Comments
 (0)