Skip to content

API reference

Protection and network

Markdown

Who may open an app (password, signed links), what its machines may reach, and public UDP endpoints.

By default an app is public. Protection puts it behind a password or behind signed links that you hand out; the network policy says what the app’s machines may reach on the way out; a UDP endpoint gives one machine a public UDP port.

How the app is protected: public, password, or signed links.

Auth: API key with full access or the scope read. Every class of agent token may call it.

Name Description
name The app’s name.
curl -X GET "https://api.rytiv.app/v1/apps/<name>/protection" \
-H "Authorization: Bearer $RYTIV_TOKEN"

200 with a JSON body.

Status Code Meaning
401 unauthenticated No API key, or one that does not work.
403 token-scope The key’s scopes do not cover this route.
404 not-found Not found, or not yours. An object of another organization answers like one that does not exist.

Sets the protection mode.

Auth: API key with full access (a key with scopes cannot call this route). An agent token of class sandbox or twin may call it; class production is refused (agent-token-production-readonly).

Name Description
name The app’s name.

JSON, the shape SetProtectionRequest of the contract.

curl -X PUT "https://api.rytiv.app/v1/apps/<name>/protection" \
-H "Authorization: Bearer $RYTIV_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'

200 with a JSON body.

Status Code Meaning
400 bad-request The request is malformed or a field is out of range. error names every field; issues lists them.
401 unauthenticated No API key, or one that does not work.
403 token-scope The key’s scopes do not cover this route.
404 not-found Not found, or not yours. An object of another organization answers like one that does not exist.

Rotates the password or signing secret.

Auth: API key with full access (a key with scopes cannot call this route). An agent token of class sandbox or twin may call it; class production is refused (agent-token-production-readonly).

Name Description
name The app’s name.
curl -X POST "https://api.rytiv.app/v1/apps/<name>/protection/rotate" \
-H "Authorization: Bearer $RYTIV_TOKEN"

200 with a JSON body.

Status Code Meaning
401 unauthenticated No API key, or one that does not work.
403 token-scope The key’s scopes do not cover this route.
404 not-found Not found, or not yours. An object of another organization answers like one that does not exist.
409 not-protected

Creates a signed link that opens the app for a while.

Auth: API key with full access (a key with scopes cannot call this route). An agent token of class sandbox or twin may call it; class production is refused (agent-token-production-readonly).

Name Description
name The app’s name.

JSON, the shape CreateAccessLinkRequest of the contract.

Field Type Required Description
label string required 1 to 64 characters.
expiresAt string (ISO 8601) optional When the copy is deleted (a moment). Not together with ttlSeconds.
curl -X POST "https://api.rytiv.app/v1/apps/<name>/protection/links" \
-H "Authorization: Bearer $RYTIV_TOKEN" \
-H "Content-Type: application/json" \
-d '{"label":"before-migration"}'

201 with a JSON object carrying url and the fields of the object the handler builds.

Status Code Meaning
400 bad-request The request is malformed or a field is out of range. error names every field; issues lists them.
401 unauthenticated No API key, or one that does not work.
403 token-scope The key’s scopes do not cover this route.
404 not-found Not found, or not yours. An object of another organization answers like one that does not exist.
409 not-protected

DELETE /v1/apps/:name/protection/links/:id

Section titled “DELETE /v1/apps/:name/protection/links/:id”

Revokes a signed link.

Auth: API key with full access (a key with scopes cannot call this route). An agent token of class sandbox or twin may call it; class production is refused (agent-token-production-readonly).

Name Description
name The app’s name.
id The object’s id.
curl -X DELETE "https://api.rytiv.app/v1/apps/<name>/protection/links/<id>" \
-H "Authorization: Bearer $RYTIV_TOKEN"

204 with no body.

Status Code Meaning
401 unauthenticated No API key, or one that does not work.
403 token-scope The key’s scopes do not cover this route.
404 not-found Not found, or not yours. An object of another organization answers like one that does not exist.

Creates an access token for a protected app.

Auth: API key with full access (a key with scopes cannot call this route). An agent token of class sandbox or twin may call it; class production is refused (agent-token-production-readonly).

Name Description
name The app’s name.

JSON, the shape CreateAccessTokenRequest of the contract.

Field Type Required Description
ttlSeconds integer optional Lifetime from now, in seconds. 1 to 86400.
sub string optional 1 to 256 characters.
next string optional at most 512 characters.
curl -X POST "https://api.rytiv.app/v1/apps/<name>/protection/tokens" \
-H "Authorization: Bearer $RYTIV_TOKEN" \
-H "Content-Type: application/json" \
-d '{"ttlSeconds":1}'

201 with a JSON object carrying token, expiresAt, url, header.

Status Code Meaning
400 bad-request The request is malformed or a field is out of range. error names every field; issues lists them.
401 unauthenticated No API key, or one that does not work.
403 token-scope The key’s scopes do not cover this route.
404 not-found Not found, or not yours. An object of another organization answers like one that does not exist.
409 not-signed

What the app’s machines may reach on the way out.

Auth: API key with full access or the scope read. Every class of agent token may call it.

Name Description
name The app’s name.
curl -X GET "https://api.rytiv.app/v1/apps/<name>/policy/network" \
-H "Authorization: Bearer $RYTIV_TOKEN"

200 with a JSON body.

Status Code Meaning
401 unauthenticated No API key, or one that does not work.
403 token-scope The key’s scopes do not cover this route.
404 not-found Not found, or not yours. An object of another organization answers like one that does not exist.

Sets that policy.

Auth: API key with full access (a key with scopes cannot call this route). An agent token of class sandbox or twin may call it; class production is refused (agent-token-production-readonly).

Name Description
name The app’s name.

JSON, the shape PutNetworkPolicyRequest of the contract.

Field Type Required Description
bandwidthMbit integer or null required
newConnectionsPerMinute integer or null required
reason string optional at most 500 characters.
curl -X PUT "https://api.rytiv.app/v1/apps/<name>/policy/network" \
-H "Authorization: Bearer $RYTIV_TOKEN" \
-H "Content-Type: application/json" \
-d '{"bandwidthMbit":1,"newConnectionsPerMinute":1}'

200 with a JSON body.

Status Code Meaning
400 bad-request The request is malformed or a field is out of range. error names every field; issues lists them.
401 unauthenticated No API key, or one that does not work.
403 token-scope The key’s scopes do not cover this route.
404 not-found Not found, or not yours. An object of another organization answers like one that does not exist.

The app’s public UDP endpoints.

Auth: API key with full access or the scope read. Every class of agent token may call it.

Name Description
name The app’s name.
curl -X GET "https://api.rytiv.app/v1/apps/<name>/udp" \
-H "Authorization: Bearer $RYTIV_TOKEN"

200 with a JSON body.

Status Code Meaning
401 unauthenticated No API key, or one that does not work.
403 token-scope The key’s scopes do not cover this route.
404 not-found Not found, or not yours. An object of another organization answers like one that does not exist.

Requests a public UDP port for the app. The port is assigned by the platform.

Auth: API key with full access (a key with scopes cannot call this route). An agent token of class sandbox or twin may call it; class production is refused (agent-token-production-readonly).

Name Description
name The app’s name.

JSON, the shape CreateUdpEndpointRequest of the contract.

Field Type Required Description
targetPort integer optional 1 to 65535.
curl -X POST "https://api.rytiv.app/v1/apps/<name>/udp" \
-H "Authorization: Bearer $RYTIV_TOKEN" \
-H "Content-Type: application/json" \
-d '{"targetPort":1}'

201 with a JSON object carrying host, address, note and the fields of the object the handler builds.

Status Code Meaning
400 bad-request The request is malformed or a field is out of range. error names every field; issues lists them.
401 unauthenticated No API key, or one that does not work.
403 token-scope The key’s scopes do not cover this route.
404 not-found Not found, or not yours. An object of another organization answers like one that does not exist.

Releases a UDP endpoint.

Auth: API key with full access (a key with scopes cannot call this route). An agent token of class sandbox or twin may call it; class production is refused (agent-token-production-readonly).

Name Description
name The app’s name.
id The object’s id.
curl -X DELETE "https://api.rytiv.app/v1/apps/<name>/udp/<id>" \
-H "Authorization: Bearer $RYTIV_TOKEN"

204 with no body.

Status Code Meaning
401 unauthenticated No API key, or one that does not work.
403 token-scope The key’s scopes do not cover this route.
404 not-found Not found, or not yours. An object of another organization answers like one that does not exist.