Grants
Scoped SVM API grants that share one SVM
Resource, request and plan limits are listed on Limits.
Download OpenAPI specification · Version 0.1.0
Mint an SVM API grant
Mints a stateless JWT for the SVM API host; the gate checks the method and decoded path before it forwards a request, and a refused request never wakes the SVM. The guest resolves paths beneath the scope root, so a symlink cannot leave it, and a grant for a terminal (GET of /bin/bash or /bin/hc) wakes the SVM early.
Authorization
apiKeyAuthorizationBearer <token>An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.
Path Parameters
ref*stringThe SVM id, or its name in the organization of the key: ten symbols of 0123456789abcdefghjkmnpqrstvwxyz is an id, any other reference is a name.
1 <= lengthQuery Parameters
project?stringThe project id or name, default when omitted; an unknown project answers 404 project_not_found.
Request Body
What an SVM API grant admits, and for how long.
- body
What an SVM API grant admits, and for how long.
args?array<>The exact arg values that a request must carry, in order; a request with other arguments is refused, and omitting it leaves the arguments open.
items <= 64methods*array<>The methods of the scope; a request with another method is refused before it reaches the SVM.
items <= 16paths*array<>The path globs of the scope.
items <= 32ttl_s?numberThe life of the grant in seconds, 3600 by default; the longest is the max_url_ttl_s of the plan, 30 days on both plans.
Response Body
An SVM API grant and its expiry.
application/json- response
An SVM API grant and its expiry.
expires_at*integerThe expiry of the grant in milliseconds since the Unix epoch.
generation*integerThe access_generation that the grant is bound to; a rotate increments it and ends every grant minted before it.
url*stringThe link of the grant: https://<id>.<SVM domain>/?si_access=<JWT>; the token may also be sent in Authorization, X-Si-Authorization or ?si_access.
curl -X POST 'https://api.slashinfra.com/svms/build-1/grants' \ -H 'Content-Type: application/json' \ -d '{ "methods": [ "GET", "HEAD" ], "paths": [ "/home/user/out/**" ]}'{ "expires_at": 1767229200000, "generation": 0, "url": "https://6f1c0f0e8a.slashinfra.dev/?si_access=..."}Rotate the SVM API grants of an SVM
Increments the access_generation of the SVM, so every SVM API grant minted before it answers 401 unauthorized. Port links keep their own generation.
Authorization
apiKeyAuthorizationBearer <token>An API key (si_ and 43 base64url characters), sent as Authorization: Bearer si_...; see Using the API.
Path Parameters
ref*stringThe SVM id, or its name in the organization of the key: ten symbols of 0123456789abcdefghjkmnpqrstvwxyz is an id, any other reference is a name.
1 <= lengthQuery Parameters
project?stringThe project id or name, default when omitted; an unknown project answers 404 project_not_found.
Response Body
The generation of the grants of an SVM after a rotation.
application/json- response
The generation of the grants of an SVM after a rotation.
generation*integerThe new access_generation of the SVM.
curl -X POST 'https://api.slashinfra.com/svms/build-1/grants/rotate'{ "generation": 1}curl -X POST 'https://api.slashinfra.com/svms/build-1/grants' \
-H 'Content-Type: application/json' \
-d '{
"methods": [
"GET",
"HEAD"
],
"paths": [
"/home/user/out/**"
]
}'{
"expires_at": 1767229200000,
"generation": 0,
"url": "https://6f1c0f0e8a.slashinfra.dev/?si_access=..."
}curl -X POST 'https://api.slashinfra.com/svms/build-1/grants/rotate'{
"generation": 1
}