>_ RESTERM
v1.18.2

examples Start here

nested.http

File and request variables with nested environment values in a JSON body, with tags.

runs as-is

shell
resterm run --all _examples/nested.http

Run this from the root of a clone of the Resterm repository.

Editor
@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}}

_examples/nested.http on GitHub

Variables and environments docs
Search

↑↓ moveEnter openEsc close

Help

These keys work like the ones in the TUI.

/
Search the docs (also Ctrl K)
j k
Scroll down and up
g g G
Jump to the top or the bottom
[ ]
Previous and next page
g d
Docs index
g h
Home page
t
Switch between dark and light
?
Show this help
Esc
Close a dialog