>_ RESTERM
v1.18.2

examples Start here

service-groups.http

Requests grouped by tag, such as smoke checks and provisioning.

runs as-is

shell
resterm run --tag billing _examples/service-groups.http

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

Editor
### Health Checks
# @name API Health
# @tag smoke health
GET {{services.api.base}}/health
Accept: application/json
Authorization: Bearer {{auth.token}}

### Provisioning Flow
# @name Start Provisioning
# @tag provisioning create
@requestId = {{$uuid}}
POST {{services.api.base}}/provisioning
Content-Type: application/json
Authorization: Bearer {{auth.token}}

{
  "requestId": "{{requestId}}",
  "tenant": {
    "id": "{{tenant.id}}",
    "region": "{{tenant.region}}"
  },
  "options": {
    "plan": "{{plans.primary}}",
    "addons": ["{{plans.addons[0]}}", "{{plans.addons[1]}}"],
    "limits": {
      "projects": {{limits.projects}},
      "users": {{limits.users}}
    }
  }
}

### Billing Workflows
# @name Create Invoice
# @tag billing create
POST {{services.billing.base}}/invoices
Content-Type: application/json
Authorization: Bearer {{auth.token}}

{
  "tenantId": "{{tenant.id}}",
  "currency": "{{billing.currency}}",
  "lines": [
    {
      "sku": "workspace",
      "quantity": 1,
      "unitPrice": {{billing.pricing.workspace}}
    },
    {
      "sku": "seat",
      "quantity": {{limits.users}},
      "unitPrice": {{billing.pricing.seat}}
    }
  ]
}

### Billing Workflows
# @name Fetch Invoice
# @tag billing read
GET {{services.billing.base}}/invoices/{{billing.sampleInvoiceId}}
Accept: application/json
Authorization: Bearer {{auth.token}}

_examples/service-groups.http on GitHub

Selecting what to run 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