@api-now/cli 1.15.0 → 1.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +50 -0
  2. package/dist/index.js +603 -126
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -14,6 +14,7 @@ The **API NOW! CLI** is a robust, cross-platform command-line tool designed to m
14
14
  - **API Model Management & Code Generation**: Search, list, create, and read API Model files, generate OpenAPI Specifications (OAS 3.1), and generate type-safe TypeScript client SDKs.
15
15
  - **Local & Remote Schema Validation**: Validate Data Domain and API Model schemas from local files, STDIN, or directly from remote organization files.
16
16
  - **Data Catalog Publishing**: Publish schemas and datasets to the global/private catalog with automatic semantic versioning support, deprecation, and unpublishing.
17
+ - **Deployment Management**: List deployments filtered by API ID, inspect environments (production, staging, development), deployment statuses, model versions, and base URIs with robust permission and error handling.
17
18
  - **Developer Formatting Options**: Toggle outputs between human-friendly ASCII tables and machine-readable JSON.
18
19
 
19
20
  ---
@@ -425,6 +426,55 @@ apinow runtime users update --api <api_file_id_or_slug> --user-id <user_id> --pr
425
426
  apinow runtime users update --api api-123 --user-id user-123 --property role=admin tier=premium --org org-123
426
427
  ```
427
428
 
429
+ ### 10. Deployments (`deployment`)
430
+
431
+ Manage API deployments in your organizations.
432
+
433
+ #### List Deployments (`deployment list`)
434
+
435
+ List all deployments for a specific API model file. Filter deployments by providing the API ID as a positional argument or with the `--api` option (alias: `--file`, `--id`).
436
+
437
+ > [!NOTE]
438
+ > Viewing deployments requires appropriate organization permissions. If your user account or token does not have permission to view deployments, the command returns an error (`CLI_ERR_FORBIDDEN`).
439
+
440
+ ```bash
441
+ # List deployments for an API by ID (positional argument)
442
+ apinow deployment list <api_file_id> [--org <org_id>]
443
+
444
+ # List deployments using the --api flag
445
+ apinow deployment list --api <api_file_id> [--org <org_id>]
446
+
447
+ # List deployments using the --file flag alias
448
+ apinow deployment list --file <api_file_id> [--org <org_id>]
449
+
450
+ # Limit the number of deployment records returned
451
+ apinow deployment list <api_file_id> --limit 10
452
+
453
+ # Output deployment details in machine-readable JSON format
454
+ apinow deployment list <api_file_id> --format json
455
+ ```
456
+
457
+ #### Read Deployment Details (`deployment read` / `deployment get`)
458
+
459
+ Read the detailed status and configuration of a specific deployment (including environments, base URI, portal URI, versions, and CORS settings).
460
+
461
+ ```bash
462
+ # Read deployment details by ID (positional argument)
463
+ apinow deployment read <deployment_id> [--org <org_id>]
464
+
465
+ # Using the 'get' alias
466
+ apinow deployment get <deployment_id> [--org <org_id>]
467
+
468
+ # Read deployment using the --id flag
469
+ apinow deployment read --id <deployment_id> [--org <org_id>]
470
+
471
+ # Read deployment using the --deployment flag alias
472
+ apinow deployment get --deployment <deployment_id> [--org <org_id>]
473
+
474
+ # Output deployment details in machine-readable JSON format
475
+ apinow deployment read <deployment_id> --format json
476
+ ```
477
+
428
478
  ---
429
479
 
430
480
  ## Development