examples Start here
nested.http
File and request variables with nested environment values in a JSON body, with tags.
runs as-is
resterm run --all _examples/nested.httpRun this from the root of a clone of the Resterm repository.
Editor
Variables and environments docs@workspaceId = 4301
@limits.users = 25
### Create Workspace With Nested Settings
# @name Create Workspace
# @tag workspaces nested setup
@workspaceName = Terminal Toolkit
@limits.storage = 5GB
@featureA = realtime-updates
@featureB = script-hooks
POST {{base.url}}/anything/workspaces
Content-Type: application/json
Authorization: Bearer {{auth.token}}
X-Tenant-ID: {{tenant.id}}
{
"name": "{{workspaceName}}",
"limits": {
"users": {{limits.users}},
"storage": "{{limits.storage}}"
},
"features": [
"{{featureA}}",
"{{featureB}}",
"{{features[0]}}"
],
"metadata": {
"region": "{{meta.region}}",
"plan": "{{meta.plan}}",
"flags": {{meta.flags}}
}
}
### Retrieve Workspace Snapshot
# @name Get Workspace
# @tag workspaces read nested
GET {{base.url}}/anything/workspaces/{{workspaceId}}?include=settings,features&expand={{query.expand}}
Accept: application/json
Authorization: Bearer {{auth.token}}
### List Workspace Members
# @name List Members
# @tag workspaces members nested
GET {{base.url}}/anything/workspaces/{{workspaceId}}/members?limit={{limits.users}}&offset=0
Accept: application/json
Authorization: Bearer {{auth.token}}