Matches in other apps
zpe repo access
mount /repo-access · base https://zpe.vc/repo-access · v2.0.0 · 13 operations · 8 write · 0 need no account · wip
the document this app serves now. Contract: https://zpe.vc/repo-access/_/api/v1/openapi.json · sha256 126bce665402
GET
/_/api/v1/tenants
The caller's tenant, the names of its stored credentials, and how the call authenticated
getTenants
The caller's tenant, the names of its stored credentials, and how the call authenticated
Parameters
No parameters.
Request body
None: this operation takes its arguments in the path and the query.
Responses
| status | meaning | body |
|---|---|---|
200 | The caller's tenant, or `null` before one exists; the names of its stored credentials; and how the call authenticated (`session` or `token`). | object |
401 | The credential is missing or does not open this account | object |
403 | This account may not do that: the credential's grant does not name this app | object |
429 | Too many requests: this caller has spent its request ceiling, and `Retry-After` says when to come back | object |
500 | This app failed while answering | object |
503 | A service this app needs did not answer — the door could not be reached, so this request was not checked | object |
Example
The caller's tenant, the names of its stored credentials, and how the call authenticated, with a token from the door.
curl -X GET 'https://zpe.vc/repo-access/_/api/v1/tenants' \ -H 'Authorization: Bearer $ZPE_TOKEN'
{}The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.
POST
/_/api/v1/tenants
Create or update the caller's tenant (the same write as PUT)
postTenants
Create or update the caller's tenant (the same write as PUT)
Parameters
No parameters.
Request body
None: this operation takes its arguments in the path and the query.
Responses
| status | meaning | body |
|---|---|---|
200 | The tenant as saved, with the webhook address the engine calls for this seller's payments. | object |
400 | The body was not a JSON object, so there was no tenant to write. | object |
401 | The credential is missing or does not open this account | object |
403 | This account may not do that: the credential's grant does not name this app | object |
409 | That GitHub org already belongs to another tenant on this deployment; one org cannot be sold from twice. | object |
422 | `org`, `product_team_map` or `branding` did not pass the vendored guard: an org is `owner/name`, and the map and branding are objects. | object |
429 | Too many requests: this caller has spent its request ceiling, and `Retry-After` says when to come back | object |
500 | This app failed while answering | object |
503 | A service this app needs did not answer — the door could not be reached, so this request was not checked | object |
Example
Create or update the caller's tenant (the same write as PUT), with a token from the door.
curl -X POST 'https://zpe.vc/repo-access/_/api/v1/tenants' \ -H 'Authorization: Bearer $ZPE_TOKEN'
{}The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.
PUT
/_/api/v1/tenants
Create or update the caller's tenant: its label, org, product-to-team map and branding
putTenants
Create or update the caller's tenant: its label, org, product-to-team map and branding
Parameters
No parameters.
Request body
None: this operation takes its arguments in the path and the query.
Responses
| status | meaning | body |
|---|---|---|
200 | The tenant as saved, with the webhook address the engine calls for this seller's payments. | object |
400 | The body was not a JSON object, so there was no tenant to write. | object |
401 | The credential is missing or does not open this account | object |
403 | This account may not do that: the credential's grant does not name this app | object |
409 | That GitHub org already belongs to another tenant on this deployment; one org cannot be sold from twice. | object |
422 | `org`, `product_team_map` or `branding` did not pass the vendored guard: an org is `owner/name`, and the map and branding are objects. | object |
429 | Too many requests: this caller has spent its request ceiling, and `Retry-After` says when to come back | object |
500 | This app failed while answering | object |
503 | A service this app needs did not answer — the door could not be reached, so this request was not checked | object |
Example
Create or update the caller's tenant: its label, org, product-to-team map and branding, with a token from the door.
curl -X PUT 'https://zpe.vc/repo-access/_/api/v1/tenants' \ -H 'Authorization: Bearer $ZPE_TOKEN'
{}The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.
DELETE
/_/api/v1/tenants
Revoke the tenant: remove its buyers from the org, expire its claims, drop its credentials
deleteTenants
Revoke the tenant: remove its buyers from the org, expire its claims, drop its credentials
Parameters
No parameters.
Request body
None: this operation takes its arguments in the path and the query.
Responses
| status | meaning | body |
|---|---|---|
200 | The tenant is revoked: its claims expired, its stored credentials dropped and its queued jobs cancelled. The counts say what moved. | object |
401 | The credential is missing or does not open this account | object |
403 | This account may not do that: the credential's grant does not name this app | object |
429 | Too many requests: this caller has spent its request ceiling, and `Retry-After` says when to come back | object |
500 | This app failed while answering | object |
503 | A service this app needs did not answer — the door could not be reached, so this request was not checked | object |
Example
Revoke the tenant: remove its buyers from the org, expire its claims, drop its credentials, with a token from the door.
curl -X DELETE 'https://zpe.vc/repo-access/_/api/v1/tenants' \ -H 'Authorization: Bearer $ZPE_TOKEN'
{}The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.
GET
/_/api/v1/tenants/secrets
The names of the tenant's stored credentials, never their values
getTenantsSecrets
The names of the tenant's stored credentials, never their values
Parameters
No parameters.
Request body
None: this operation takes its arguments in the path and the query.
Responses
| status | meaning | body |
|---|---|---|
200 | The names of the tenant's stored credentials. No call returns a value. | object |
401 | The credential is missing or does not open this account | object |
403 | This account may not do that: the credential's grant does not name this app | object |
429 | Too many requests: this caller has spent its request ceiling, and `Retry-After` says when to come back | object |
500 | This app failed while answering | object |
503 | A service this app needs did not answer — the door could not be reached, so this request was not checked | object |
Example
The names of the tenant's stored credentials, never their values, with a token from the door.
curl -X GET 'https://zpe.vc/repo-access/_/api/v1/tenants/secrets' \ -H 'Authorization: Bearer $ZPE_TOKEN'
{}The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.
PUT
/_/api/v1/tenants/secrets/{name}
Store one credential (payment_webhook_secret or github_token), sealed under the tenant's key
putTenantsSecretsById
Store one credential (payment_webhook_secret or github_token), sealed under the tenant's key
Parameters
| name | in | required | type | notes |
|---|---|---|---|---|
name | path | yes | string |
Request body
None: this operation takes its arguments in the path and the query.
Responses
| status | meaning | body |
|---|---|---|
200 | The credential is stored and sealed under the tenant's key; the answer repeats every stored name. | object |
401 | The credential is missing or does not open this account | object |
403 | This account may not do that: the credential's grant does not name this app | object |
422 | `name` is not `payment_webhook_secret` or `github_token`, or `value` is missing or blank. | object |
429 | Too many requests: this caller has spent its request ceiling, and `Retry-After` says when to come back | object |
500 | This app failed while answering | object |
503 | The tenant's sealing key or the door did not answer, so nothing was stored. | object |
Example
Store one credential (payment_webhook_secret or github_token), sealed under the tenant's key, with a token from the door.
curl -X PUT 'https://zpe.vc/repo-access/_/api/v1/tenants/secrets/string' \ -H 'Authorization: Bearer $ZPE_TOKEN'
{}The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.
GET
/_/api/v1/tenants/purchases
The account's 100 most recently updated purchases
getTenantsPurchases
The account's 100 most recently updated purchases
Parameters
No parameters.
Request body
None: this operation takes its arguments in the path and the query.
Responses
| status | meaning | body |
|---|---|---|
200 | Up to 100 of the account's purchases, most recently updated first. | object |
401 | The credential is missing or does not open this account | object |
403 | This account may not do that: the credential's grant does not name this app | object |
429 | Too many requests: this caller has spent its request ceiling, and `Retry-After` says when to come back | object |
500 | This app failed while answering | object |
503 | A service this app needs did not answer — the door could not be reached, so this request was not checked | object |
Example
The account's 100 most recently updated purchases, with a token from the door.
curl -X GET 'https://zpe.vc/repo-access/_/api/v1/tenants/purchases' \ -H 'Authorization: Bearer $ZPE_TOKEN'
{}The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.
GET
/_/api/v1/tenants/events
The account's 100 most recent engine events
getTenantsEvents
The account's 100 most recent engine events
Parameters
No parameters.
Request body
None: this operation takes its arguments in the path and the query.
Responses
| status | meaning | body |
|---|---|---|
200 | Up to 100 of the account's engine events, most recent first, each with an ISO timestamp. | object |
401 | The credential is missing or does not open this account | object |
403 | This account may not do that: the credential's grant does not name this app | object |
429 | Too many requests: this caller has spent its request ceiling, and `Retry-After` says when to come back | object |
500 | This app failed while answering | object |
503 | A service this app needs did not answer — the door could not be reached, so this request was not checked | object |
Example
The account's 100 most recent engine events, with a token from the door.
curl -X GET 'https://zpe.vc/repo-access/_/api/v1/tenants/events' \ -H 'Authorization: Bearer $ZPE_TOKEN'
{}The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.
POST
/_/api/v1/tenants/reconcile
Re-assert every grant the tenant should hold against GitHub, and report what changed
postTenantsReconcile
Re-assert every grant the tenant should hold against GitHub, and report what changed
Parameters
No parameters.
Request body
None: this operation takes its arguments in the path and the query.
Responses
| status | meaning | body |
|---|---|---|
200 | Every grant the tenant should hold was re-asserted against GitHub; the report says what changed. | object |
401 | The credential is missing or does not open this account | object |
403 | This account may not do that: the credential's grant does not name this app | object |
404 | The caller has no tenant yet, so there is nothing to reconcile. | object |
429 | Too many requests: this caller has spent its request ceiling, and `Retry-After` says when to come back | object |
500 | This app failed while answering | object |
503 | A service this app needs did not answer — the door could not be reached, so this request was not checked | object |
Example
Re-assert every grant the tenant should hold against GitHub, and report what changed, with a token from the door.
curl -X POST 'https://zpe.vc/repo-access/_/api/v1/tenants/reconcile' \ -H 'Authorization: Bearer $ZPE_TOKEN'
{}The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.
POST
/_/api/v1/tenants/sweep
Run the queue sweep now: retry what is due, expire stale claim links
postTenantsSweep
Run the queue sweep now: retry what is due, expire stale claim links
Parameters
No parameters.
Request body
None: this operation takes its arguments in the path and the query.
Responses
| status | meaning | body |
|---|---|---|
200 | What the sweep retried, and how many stale claim links it expired. Counts only. | object |
401 | The credential is missing or does not open this account | object |
403 | This account may not do that: the credential's grant does not name this app | object |
429 | Too many requests: this caller has spent its request ceiling, and `Retry-After` says when to come back | object |
500 | This app failed while answering | object |
503 | A service this app needs did not answer — the door could not be reached, so this request was not checked | object |
Example
Run the queue sweep now: retry what is due, expire stale claim links, with a token from the door.
curl -X POST 'https://zpe.vc/repo-access/_/api/v1/tenants/sweep' \ -H 'Authorization: Bearer $ZPE_TOKEN'
{}The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.
GET
/_/api/v1/tokens
The account's API tokens: id, label and dates, never the token
getTokens
The account's API tokens: id, label and dates, never the token
Parameters
No parameters.
Request body
None: this operation takes its arguments in the path and the query.
Responses
| status | meaning | body |
|---|---|---|
200 | The account's tokens by id, label and dates. The token itself is never returned. | object |
401 | The credential is missing or does not open this account | object |
403 | This account may not do that: the credential's grant does not name this app | object |
429 | Too many requests: this caller has spent its request ceiling, and `Retry-After` says when to come back | object |
500 | This app failed while answering | object |
503 | A service this app needs did not answer — the door could not be reached, so this request was not checked | object |
Example
The account's API tokens: id, label and dates, never the token, with a token from the door.
curl -X GET 'https://zpe.vc/repo-access/_/api/v1/tokens' \ -H 'Authorization: Bearer $ZPE_TOKEN'
{}The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.
POST
/_/api/v1/tokens
Mint an API token. It is shown once, in this answer, and never again
postTokens
Mint an API token. It is shown once, in this answer, and never again
Parameters
| name | in | required | type | notes |
|---|---|---|---|---|
Idempotency-Key | header | no | string | A retry handle: a second POST carrying the same value answers `200` with the first call's token id and label, `token: null`, and mints nothing. |
Request body
None: this operation takes its arguments in the path and the query.
Responses
| status | meaning | body |
|---|---|---|
200 | A replay: this `Idempotency-Key` was already answered. The token id, label and date the first call returned, with `token: null`, and nothing minted. | object |
201 | A new token, shown once in this answer and never again. | object |
400 | The `Idempotency-Key` was sent empty or longer than 200 characters: a retry is found by that value, so a blank or oversized one names nothing and is refused rather than read as absent. | object |
401 | The credential is missing or does not open this account | object |
403 | This account may not do that: the credential's grant does not name this app | object |
409 | A live token already uses that label, or the store refused the write. | object |
429 | Too many requests: this caller has spent its request ceiling, and `Retry-After` says when to come back | object |
500 | This app failed while answering | object |
503 | The deployment has no token pepper or no store, so no token was minted; or the door did not answer. | object |
Example
Mint an API token. It is shown once, in this answer, and never again, with a token from the door.
curl -X POST 'https://zpe.vc/repo-access/_/api/v1/tokens' \ -H 'Authorization: Bearer $ZPE_TOKEN'
{}The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.
DELETE
/_/api/v1/tokens/{id}
Revoke an API token by id
deleteTokensById
Revoke an API token by id
Parameters
| name | in | required | type | notes |
|---|---|---|---|---|
id | path | yes | string |
Request body
None: this operation takes its arguments in the path and the query.
Responses
| status | meaning | body |
|---|---|---|
200 | The token is revoked. A caller presenting it is refused from now on. | object |
401 | The credential is missing or does not open this account | object |
403 | This account may not do that: the credential's grant does not name this app | object |
404 | No live token with that id belongs to this account. | object |
429 | Too many requests: this caller has spent its request ceiling, and `Retry-After` says when to come back | object |
500 | This app failed while answering | object |
503 | A service this app needs did not answer — the door could not be reached, so this request was not checked | object |
Example
Revoke an API token by id, with a token from the door.
curl -X DELETE 'https://zpe.vc/repo-access/_/api/v1/tokens/string' \ -H 'Authorization: Bearer $ZPE_TOKEN'
{}The example is generated from the schema in the contract: the shape is the document's, the values are placeholders.