Skip to main content

Command Line Interface

Installation​

Requirements:

  npm i -g @apio/cli

Configuration​

To complete this tutorial you need an account.

apio account login

The default target is the platform athttps://api.apio.network, but you can change it with

apio config set apiBaseUrl https://example.com

documentation​

Open the documentation​

Opens the browser at the documentation page

apio docs

accounts​

Signup​

Create an account

apio account create

Login​

Authenticate with the platform

apio account login

Logout​

Forgets authentication

apio account logout

config​

Get configuration​

Prints the current configuration to the terminal

apio config get

Updates configuration​

Changes a configuration value

apio config set apiBaseUrl https://api.example.com

projects​

List projects​

Returns a filtered sorted and paginated list of projects.

apio projects list

Get projects by uuid​

Get projects by uuid, if any matches.

apio projects get <resourceId>

Create projects​

Creates projects. Body can be passed from a JSON file specifying it as @path.json or by passing fields as --field=value

apio projects create @resource.json --someField=someValue

Update projects​

Update projects. Update can be passed from a JSON file specifying it as @path.json or by passing fields as --field=value

apio projects update <resourceId> @resource.json --someField=someValue

Delete projects by uuid​

Delete projects by uuid.

apio projects delete <resourceId>

devices​

List devices​

Returns a filtered sorted and paginated list of devices.

apio devices list

Get devices by uuid​

Get devices by uuid, if any matches.

apio devices get <resourceId>

Create devices​

Creates devices. Body can be passed from a JSON file specifying it as @path.json or by passing fields as --field=value

apio devices create @resource.json --someField=someValue

Update devices​

Update devices. Update can be passed from a JSON file specifying it as @path.json or by passing fields as --field=value

apio devices update <resourceId> @resource.json --someField=someValue

Delete devices by uuid​

Delete devices by uuid.

apio devices delete <resourceId>

plants​

List plants​

Returns a filtered sorted and paginated list of plants.

apio plants list

Get plants by uuid​

Get plants by uuid, if any matches.

apio plants get <resourceId>

Create plants​

Creates plants. Body can be passed from a JSON file specifying it as @path.json or by passing fields as --field=value

apio plants create @resource.json --someField=someValue

Update plants​

Update plants. Update can be passed from a JSON file specifying it as @path.json or by passing fields as --field=value

apio plants update <resourceId> @resource.json --someField=someValue

Delete plants by uuid​

Delete plants by uuid.

apio plants delete <resourceId>

nodes​

List nodes​

Returns a filtered sorted and paginated list of nodes.

apio nodes list

Get nodes by uuid​

Get nodes by uuid, if any matches.

apio nodes get <resourceId>

Create nodes​

Creates nodes. Body can be passed from a JSON file specifying it as @path.json or by passing fields as --field=value

apio nodes create @resource.json --someField=someValue

Update nodes​

Update nodes. Update can be passed from a JSON file specifying it as @path.json or by passing fields as --field=value

apio nodes update <resourceId> @resource.json --someField=someValue

Delete nodes by uuid​

Delete nodes by uuid.

apio nodes delete <resourceId>

apikeys​

List apikeys​

Returns a filtered sorted and paginated list of apikeys.

apio apikeys list

Get apikeys by uuid​

Get apikeys by uuid, if any matches.

apio apikeys get <resourceId>

Create apikeys​

Creates apikeys. Body can be passed from a JSON file specifying it as @path.json or by passing fields as --field=value

apio apikeys create @resource.json --someField=someValue

Update apikeys​

Update apikeys. Update can be passed from a JSON file specifying it as @path.json or by passing fields as --field=value

apio apikeys update <resourceId> @resource.json --someField=someValue

Delete apikeys by uuid​

Delete apikeys by uuid.

apio apikeys delete <resourceId>

roles​

List roles​

Returns a filtered sorted and paginated list of roles.

apio roles list

Get roles by uuid​

Get roles by uuid, if any matches.

apio roles get <resourceId>

Create roles​

Creates roles. Body can be passed from a JSON file specifying it as @path.json or by passing fields as --field=value

apio roles create @resource.json --someField=someValue

Update roles​

Update roles. Update can be passed from a JSON file specifying it as @path.json or by passing fields as --field=value

apio roles update <resourceId> @resource.json --someField=someValue

Delete roles by uuid​

Delete roles by uuid.

apio roles delete <resourceId>

aclrules​

List aclrules​

Returns a filtered sorted and paginated list of aclrules.

apio aclrules list

Get aclrules by uuid​

Get aclrules by uuid, if any matches.

apio aclrules get <resourceId>

Create aclrules​

Creates aclrules. Body can be passed from a JSON file specifying it as @path.json or by passing fields as --field=value

apio aclrules create @resource.json --someField=someValue

Update aclrules​

Update aclrules. Update can be passed from a JSON file specifying it as @path.json or by passing fields as --field=value

apio aclrules update <resourceId> @resource.json --someField=someValue

Delete aclrules by uuid​

Delete aclrules by uuid.

apio aclrules delete <resourceId>