Skip to content
Structly Docs
한국어

stly

Common workflows

On this page

The examples below assume you have logged in and selected an Organization. Replace IDs with values from your actual results.

stly apis list --fields id,name,summary
stly apis list --q Orders --page 1 --per-page 50

List commands that support --q search fields such as the name, summary, and description by case-sensitive partial match. The searched fields differ by command, so check them with stly schema <resource> list. When you specify --page and --per-page, the response includes pagination (page, per_page, has_more).

To search several Catalogs at once, use the Catalog-wide search.

stly catalog search --q orders

Create#

If you do not know the command, go through search → schema → dry-run → run.

stly cli search "API create"
stly schema apis create
stly apis create --input api.json --dry-run
stly apis create --input api.json

Edit#

An edit sends the full input. Look up the detail to check the current values and the etag, then create an input file with your changes applied.

stly apis get 4pkKFh2ojXs
stly apis update 4pkKFh2ojXs --input api-update.json --if-match '"api-json3-4pkKFh2ojXs-r1"'

Example api-update.json:

{"name": "Orders API", "summary": "Create, look up, and cancel orders", "description": "Public API provided by the orders Service."}

If you get a 412 error, follow the steps in Concurrent edit conflicts.

Delete#

A delete also needs the etag from the detail lookup. On success, status is 204 and data is null.

stly apis delete 4pkKFh2ojXs --if-match '"api-json3-4pkKFh2ojXs-r2"'

Call the API directly#

For requests without a dedicated command, use stly api to call a public API path directly. It authenticates the same way as other commands.

stly api /api/me --method GET
stly api /api/apis --method GET

You can send a request body with --input and an ETag with --if-match. The output format is the same as other commands.

Use from an AI Coding Agent#

Give your AI Coding Agent the following rules so it can use stly safely.

  • Find commands with stly cli search and check input with stly schema.
  • Check commands that change records with --dry-run first.
  • Before editing or deleting, look up the detail and pass its etag with --if-match.
  • Check the exit code and the outcome in stderr, and if it is unknown, look the entry up before sending again.