eai resources
Perform CRUD operations on platform resources stored in ResourceAPI.
Description
Resources are instances of your Object Types -- the actual data records in your vertical application. The eai resources command group provides subcommands for creating, reading, updating, deleting, and querying resources, as well as viewing the published schema.
Subcommands
| Subcommand | Description |
|---|---|
eai resources list | List resources of a given type |
eai resources get | Get a specific resource by ID |
eai resources create | Create a new resource |
eai resources update | Update an existing resource |
eai resources delete | Delete a resource |
eai resources query | Run cross-type queries |
eai resources schema | Show published Object Types |
eai resources list
List resources of a given Object Type.
Syntax
eai resources list <type> [options]
Arguments
| Argument | Description | Required |
|---|---|---|
type | Object Type name (e.g., Application) | Yes |
Options
| Flag | Description | Default |
|---|---|---|
--page <n> | Page number for pagination | 1 |
--limit <n> | Number of items per page | 20 |
--sort <field> | Sort field (prefix with - for descending) | -created_at |
--json | Output raw JSON | false |
Examples
# List all Applications
eai resources list Application
# List with pagination
eai resources list Application --page 2 --limit 10
# Sort by name ascending
eai resources list Application --sort name
# Sort by creation date descending (default)
eai resources list Application --sort -created_at
# Output as JSON
eai resources list Application --json
eai resources get
Retrieve a specific resource by its type and ID.
Syntax
eai resources get <type> <id> [options]
Arguments
| Argument | Description | Required |
|---|---|---|
type | Object Type name | Yes |
id | Resource ID | Yes |
Example
eai resources get Application abc123
eai resources create
Create a new resource of the specified Object Type.
Syntax
eai resources create <type> [options]
Arguments
| Argument | Description | Required |
|---|---|---|
type | Object Type name | Yes |
Options
| Flag | Description |
|---|---|
--data <json> | Resource data as a JSON string |
--file <path> | Read resource data from a JSON file |
You must provide either --data or --file.
Examples
# Create from inline JSON
eai resources create Application --data '{"applicantName":"Jane","status":"draft"}'
# Create from a JSON file
eai resources create Application --file ./seed-data/app1.json
eai resources update
Update an existing resource.
Syntax
eai resources update <type> <id> [options]
Arguments
| Argument | Description | Required |
|---|---|---|
type | Object Type name | Yes |
id | Resource ID | Yes |
Options
| Flag | Description |
|---|---|
--data <json> | Updated resource data as a JSON string |
--file <path> | Read updated data from a JSON file |
Example
eai resources update Application abc123 --data '{"status":"submitted"}'
eai resources delete
Delete a resource by its type and ID.
Syntax
eai resources delete <type> <id> [options]
Arguments
| Argument | Description | Required |
|---|---|---|
type | Object Type name | Yes |
id | Resource ID | Yes |
Example
eai resources delete Application abc123
Deletion is permanent. There is no undo. Make sure you have confirmed the correct resource ID before running this command.
eai resources query
Run cross-type queries for complex searches across multiple Object Types.
Syntax
eai resources query [options]
Description
The query subcommand allows you to perform advanced searches that span multiple Object Types. This is useful when you need to find resources based on relationships or complex criteria.
Example
eai resources query
eai resources schema
Show the published Object Types for the current tenant.
Syntax
eai resources schema
Description
Displays the Object Type schema that is currently published and active on the platform for your tenant. This shows what types and properties are available for resource operations.
Example
eai resources schema
Related Commands
eai types-- Manage Object Type definitions (the schema for resources)eai tenant list-- List tenants to identify which tenant's resources you are working with