Read-only demo.Generated sample data. Changes cannot be saved.

inventory_grant

inventory_grant POST YAML steps Enabled Public

Calls this month
0
Errors
0
Error rate
No calls yet
Avg response
No calls yet

This month, UTC.

Definition preview

Read-only outline of the saved source. Edit it under the Edit tab.

Input fields

item_id
string
name
string

Pipeline (1)

  1. give write collection inventory_state

Response

Status
200
Body
keys: success, item_id
Full source
sourceVersion: 1
kind: endpoint
id: inventory_grant
name: Grant item
description: Adds an item to the caller's inventory. The server stamps the grant time.
method: POST
enabled: true
input:
  type: object
  properties:
    item_id:
      type: string
    name:
      type: string
  required:
  - item_id
  - name
steps:
- id: give
  type: write
  collection: inventory_state
  key: '{{steamId}}'
  ops:
  - op: push
    path: inventory
    value:
      item_id: '{{input.item_id}}'
      name: '{{input.name}}'
      granted_at: '{{now}}'
response:
  status: 200
  body:
    success: true
    item_id: '{{input.item_id}}'
module: inventory

New endpoint

Choose an id using letters, numbers, underscore or hyphen. A fresh draft opens with this id; nothing is published until you save.

Confirm