Skip to content

Commit 691e171

Browse files
author
Pavel Petroshenko
authored
Merge pull request #46 from electricimp/develop
v2.4.0
2 parents ea75ced + 13a995a commit 691e171

File tree

87 files changed

+2244
-1179
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+2244
-1179
lines changed

Diff for: CommandsManual.md

+59-18
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## List Of Commands ##
44

5+
**[impt account info](#account-info)**<br />
6+
**[impt account list](#account-list)**<br />
7+
58
**[impt auth info](#auth-info)**<br />
69
**[impt auth login](#auth-login)**<br />
710
**[impt auth logout](#auth-logout)**<br />
@@ -72,6 +75,7 @@
7275

7376
- [Command Syntax](#command-syntax)
7477
- [The Help Option](#the-help-option)
78+
- [The Version Option](#the-version-option)
7579
- [Command Output](#command-output)
7680
- [Entity Identification](#entity-identification)
7781
- [Device Group Type](#device-group-type)
@@ -116,6 +120,10 @@ The `--help` option (alias: `-h`) can be used with a fully or a partially specif
116120
- `impt <command_group> --help` &mdash; Displays a list of all of the group’s commands.
117121
- `impt <command_group> <command_name> --help` &mdash; Displays a detailed description of the command.
118122

123+
## The Version Option ##
124+
125+
- `impt --version` or `impt -v` &mdash; Displays the version of *impt*.
126+
119127
## Command Output ##
120128

121129
The `--output <mode>` option (alias: `-z`) can be used to adjust the output generated by a command. If the option is not specified, the default verbose output is generated.
@@ -130,46 +138,50 @@ The `--output` option has the following `<mode>` values:
130138

131139
## Entity Identification ##
132140

133-
Applicable to the following impCentral API entities &mdash; Account, Product, Device Group, Device and Deployment &mdash; these rules govern how *impt* searches an entity:
141+
For the impCentral API entities described in this section &mdash; Account, Product, Device Group, Device and Deployment &mdash; *impt* obeys the following rules when searching one of these entities:
134142

135-
- There is an order of attributes for every entity type (see below).
136-
- *impt* starts from the first attribute in the order and searches the specified value for this attribute.
143+
- *impt* defines a specific order of attributes for every entity type (described in the subsections below).
144+
- Some of the entity types additionally support hierarchical identifiers (described in the subsections below).
145+
- If an entity type supports a hierarchical identifier and the specified value matches the hierarchical identifier pattern, *impt* searches the entity by parsing the hierarchical identifier. If only one entity is found, the search is stopped.
146+
- Otherwise, *impt* starts from the first attribute in the list of the entity type's supported attributes and searches the specified value for this attribute.
137147
- If no entity is found for this attribute, the tool searches the specified value for the next attribute in the order.
138148
- If at least one entity is found for the particular attribute, the search is stopped.
139149
- If no entity is found for all attributes, or more than one entity is found, then, depending on a particular command, that may be considered as a success (for all `list` commands) or as a fail (for all other commands).
140150

141-
### Account Identifier ###
151+
An Entity Identifier must not be empty.
142152

143-
Option: `--owner <ACCOUNT_IDENTIFIER>`
153+
### Account Identifier ###
144154

145-
Attributes accepted as <ACCOUNT_IDENTIFIER> (in order of search):
155+
Attributes accepted as `<ACCOUNT_IDENTIFIER>` (in order of search):
146156

147-
- `"me"` (a predefined word, means the current logged-in account)
157+
- `"me"` (a predefined word which means the current logged-in account)
148158
- Account ID (always unique)
149159
- Email (always unique)
150160
- Username (always unique)
151161

152162
### Product Identifier ###
153163

154-
Option: `--product <PRODUCT_IDENTIFIER>`
155-
156164
Attributes accepted as `<PRODUCT_IDENTIFIER>` (in order of search):
157165

158166
- Product ID (always unique)
159167
- Product name (unique among all Products owned by a particular user)
160168

161-
### Device Group Identifier ###
169+
Hierarchical identifier pattern: `{<ACCOUNT_IDENTIFIER>}{<PRODUCT_IDENTIFIER>}`
162170

163-
Option: `--dg <DEVICE_GROUP_IDENTIFIER>`
171+
Where `<ACCOUNT_IDENTIFIER>` is an [Account identifier](#account-identifier) attribute and `<PRODUCT_IDENTIFIER>` is a [Product identifier](#product-identifier) attribute. An attribute of the hierarchical identifier must not itself be a hierarchical identifier. An attribute of the hierarchical identifier must not contain the `}{` substring.
172+
173+
### Device Group Identifier ###
164174

165175
Attributes accepted as `<DEVICE_GROUP_IDENTIFIER>` (in order of search):
166176

167177
- Device Group ID (always unique)
168178
- Device Group name (unique among all the Device Groups within a Product)
169179

170-
### Device Identifier ###
180+
Hierarchical identifier pattern: `{<ACCOUNT_IDENTIFIER>}{<PRODUCT_IDENTIFIER>}{<DEVICE_GROUP_IDENTIFIER}`
181+
182+
Where `<ACCOUNT_IDENTIFIER>` is an [Account identifier](#account-identifier) attribute, `<PRODUCT_IDENTIFIER>` is a [Product identifier](#product-identifier) attribute and `<DEVICE_GROUP_IDENTIFIER>` is a [Device Group identifier](#device-group-identifier) attribute. An attribute of the hierarchical identifier must not itself be a hierarchical identifier. An attribute of the hierarchical identifier must not contain the `}{` substring.
171183

172-
Option: `--device <DEVICE_IDENTIFIER>`
184+
### Device Identifier ###
173185

174186
Attributes accepted as `<DEVICE_IDENTIFIER>` (in order of search):
175187

@@ -180,8 +192,6 @@ Attributes accepted as `<DEVICE_IDENTIFIER>` (in order of search):
180192

181193
### Build Identifier ###
182194

183-
Option: `--build <BUILD_IDENTIFIER>`
184-
185195
Attributes accepted as `<BUILD_IDENTIFIER>` (in order of search):
186196

187197
- Deployment ID (always unique)
@@ -268,6 +278,35 @@ A test configuration file contains settings to run unit tests which are created
268278

269279
## Command Description ##
270280

281+
### Account Information Commands ###
282+
283+
#### Account Info ####
284+
285+
```
286+
impt account info [--user <ACCOUNT_IDENTIFIER>] [--output <mode>] [--help]
287+
```
288+
289+
Displays information about the specified account.
290+
291+
| Option | Alias | Mandatory? | Value Required? | Description |
292+
| --- | --- | --- | --- | --- |
293+
| --user | -u | No | Yes | An [Account identifier](#account-identifier). If no account is specified, the current account is used |
294+
| --output | -z | No | Yes | Adjusts the [command's output](#command-output) |
295+
| --help | -h | No | No | Displays a description of the command. Ignores any other options |
296+
297+
#### Account List ####
298+
299+
```
300+
impt account list [--output <mode>] [--help]
301+
```
302+
303+
Displays information about the current account and any other accounts on which the current account is collaborating.
304+
305+
| Option | Alias | Mandatory? | Value Required? | Description |
306+
| --- | --- | --- | --- | --- |
307+
| --output | -z | No | Yes | Adjusts the [command's output](#command-output) |
308+
| --help | -h | No | No | Displays a description of the command. Ignores any other options |
309+
271310
### Authentication Commands ###
272311

273312
#### Auth Info ####
@@ -893,7 +932,7 @@ The command allows you to add multiple devices to the newly created log stream.
893932
| Option | Alias | Mandatory? | Value Required? | Description |
894933
| --- | --- | --- | --- | --- |
895934
| --device | -d | No | Yes | The [device identifier](#device-identifier) of the device to be added to the log stream. This option may be repeated multiple times to specify multiple devices |
896-
| --dg | -g | no/[Project](#project-files) | Yes | A [Device Group identifier](#device-group-identifier). This option may be repeated multiple times to specify multiple Device Groups. Logs from all of the devices assigned to the specified Device Groups will be added to the log stream. `--device` and `--dg` options are cumulative. If neither the `--device` nor the `--dg` options are specified but there is a [Project file](#project-files) in the current directory, all of the devices assigned to the Device Group referenced by the [Project file](#project-files) are added |
935+
| --dg | -g | No/[Project](#project-files) | Yes | A [Device Group identifier](#device-group-identifier). This option may be included multiple times to specify multiple Device Groups. Logs from all of the devices assigned to the specified Device Groups will be added to the log stream. `--device` and `--dg` options are cumulative. If neither the `--device` nor the `--dg` options are specified but there is a [Project file](#project-files) in the current directory, all of the devices assigned to the Device Group referenced by the [Project file](#project-files) are added |
897936
| --output | -z | No | Yes | Adjusts the [command's output](#command-output) |
898937
| --help | -h | No | No | Displays a description of the command. Ignores any other options |
899938

@@ -981,7 +1020,8 @@ Updates the specified login key’s description.
9811020
#### Product Create ####
9821021

9831022
```
984-
impt product create --name <product_name> [--descr <product_description>] [--output <mode>] [--help]
1023+
impt product create --name <product_name> [--descr <product_description>] [--owner <ACCOUNT_IDENTIFIER>]
1024+
[--output <mode>] [--help]
9851025
```
9861026

9871027
Creates a new Product. Fails if a Product with the specified name already exists.
@@ -990,6 +1030,7 @@ Creates a new Product. Fails if a Product with the specified name already exists
9901030
| --- | --- | --- | --- | --- |
9911031
| --name | -n | Yes | Yes | The Product’s name. Must be unique among all of the current account’s Products |
9921032
| --descr | -s | No | Yes | An optional description of the Product |
1033+
| --owner | -o | No | Yes | The Product will be created in the [specified Account](#account-identifier). If no account is specified, the current account is used |
9931034
| --output | -z | No | Yes | Adjusts the [command's output](#command-output) |
9941035
| --help | -h | No | No | Displays a description of the command. Ignores any other options |
9951036

@@ -1468,7 +1509,7 @@ Updates the specified webhook with a new target URL and/or MIME content-type. Fa
14681509
| -s | --descr, --sha, --page-size, --stop-on-fail |
14691510
| -t | --tag, --timeout, --temp, --target, --to, --tests |
14701511
| -u | --user, --full, --unflagged, --unflag, --unassigned, --unbond, --url |
1471-
| -v | |
1512+
| -v | --version |
14721513
| -w | --wh, --pwd |
14731514
| -x | --device-file |
14741515
| -y | --agent-file, --dg-type |

0 commit comments

Comments
 (0)