Skip to content

Commit

Permalink
docs: updating doc pages for release
Browse files Browse the repository at this point in the history
  • Loading branch information
reubenmiller committed Jun 26, 2022
1 parent b88ba4f commit a0d3fbf
Show file tree
Hide file tree
Showing 9 changed files with 105 additions and 29 deletions.
34 changes: 21 additions & 13 deletions docs/go-c8y-cli/docs/cli/c8y/agents/c8y_agents_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ Get a collection of agents with type "myType", and their names start with "senso
$ echo "name eq 'sensor*'" | c8y agents list
Get a collection of agents with names starting with "sensor" using a piped inventory query (or could be piped from a file)
$ c8y agents list --creationTimeDateFrom -7d
Get agents which where registered longer than 7 days ago
$ c8y agents list --creationTimeDateTo -1d
Get agents which where registered in the last day
$ c8y agents list --name "my example agent" --select type --output csv | c8y agents list --queryTemplate "type eq '%s'"
Find an agent by name, then find other agents which the same type
Expand All @@ -29,19 +35,21 @@ Find an agent by name, then find other agents which the same type
### Options

```
--availability string Filter by c8y_Availability.status
--fragmentType string Filter by fragment type
--group string Filter by group inclusion
-h, --help help for list
--lastMessageDateFrom string Filter c8y_Availability.lastMessage from a specific date
--lastMessageDateTo string Filter c8y_Availability.lastMessage to a specific date
--name string Filter by name
--orderBy string Order by. e.g. _id asc or name asc or creationTime.date desc (default "name")
--owner string Filter by owner
--query string Additional query filter (accepts pipeline)
--queryTemplate string String template to be used when applying the given query. Use %s to reference the query/pipeline input
--type string Filter by type
--withParents Include a flat list of all parents and grandparents of the given object
--availability string Filter by c8y_Availability.status
--creationTimeDateFrom string Filter creationTime.date from a specific date
--creationTimeDateTo string Filter creationTime.date to a specific date
--fragmentType string Filter by fragment type
--group string Filter by group inclusion
-h, --help help for list
--lastMessageDateFrom string Filter c8y_Availability.lastMessage from a specific date
--lastMessageDateTo string Filter c8y_Availability.lastMessage to a specific date
--name string Filter by name
--orderBy string Order by. e.g. _id asc or name asc or creationTime.date desc (default "name")
--owner string Filter by owner
--query string Additional query filter (accepts pipeline)
--queryTemplate string String template to be used when applying the given query. Use %s to reference the query/pipeline input
--type string Filter by type
--withParents Include a flat list of all parents and grandparents of the given object
```

### Options inherited from parent commands
Expand Down
5 changes: 5 additions & 0 deletions docs/go-c8y-cli/docs/cli/c8y/binaries/c8y_binaries_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ Upload a log file
$ c8y binaries create --file "myConfig.json" --type c8y_upload --data "c8y_Global={}"
Upload a config file and make it globally accessible for all users
$ c8y binaries create --file "myConfig.json" --file "device01-myConfig.json" --type c8y_upload --template "{collectedAt: _.Now('-5min')}"
Upload a file with a custom name and custom meta information
```

Expand All @@ -29,6 +33,7 @@ Upload a config file and make it globally accessible for all users
-d, --data string static data to be applied to body. accepts json or shorthand json, i.e. --data 'value1=1,my.nested.value=100'
--file string File to be uploaded as a binary (required)
-h, --help help for create
--name string Set the name of the binary file. This will be the name of the file when it is downloaded in the UI
--processingMode string Cumulocity processing mode
--template string Body template
--templateVars string Body template variables
Expand Down
36 changes: 22 additions & 14 deletions docs/go-c8y-cli/docs/cli/c8y/devices/c8y_devices_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ Get a collection of devices of type "myType", and their names start with "sensor
$ c8y devices list --query "name eq '*sensor*' and creationTime.date gt '2021-04-02T00:00:00'"
Get devices which names containing 'sensor' and were created after 2021-04-02
$ c8y devices list --creationTimeDateFrom -7d
Get devices which where registered longer than 7 days ago
$ c8y devices list --creationTimeDateTo -1d
Get devices which where registered in the last day
$ echo -e "c8y_MacOS\nc8y_Linux" | c8y devices list --queryTemplate "type eq '%s'"
Get devices with type 'c8y_MacOS' then devices with type 'c8y_Linux' (using pipeline)
Expand All @@ -29,20 +35,22 @@ Get devices with type 'c8y_MacOS' then devices with type 'c8y_Linux' (using pipe
### Options

```
--agents Only include agents.
--availability string Filter by c8y_Availability.status
--fragmentType string Filter by fragment type
--group string Filter by group inclusion
-h, --help help for list
--lastMessageDateFrom string Filter c8y_Availability.lastMessage from a specific date
--lastMessageDateTo string Filter c8y_Availability.lastMessage to a specific date
--name string Filter by name
--orderBy string Order by. e.g. _id asc or name asc or creationTime.date desc (default "name")
--owner string Filter by owner
--query string Additional query filter (accepts pipeline)
--queryTemplate string String template to be used when applying the given query. Use %s to reference the query/pipeline input
--type string Filter by type
--withParents Include a flat list of all parents and grandparents of the given object
--agents Only include agents.
--availability string Filter by c8y_Availability.status
--creationTimeDateFrom string Filter creationTime.date from a specific date
--creationTimeDateTo string Filter creationTime.date to a specific date
--fragmentType string Filter by fragment type
--group string Filter by group inclusion
-h, --help help for list
--lastMessageDateFrom string Filter c8y_Availability.lastMessage from a specific date
--lastMessageDateTo string Filter c8y_Availability.lastMessage to a specific date
--name string Filter by name
--orderBy string Order by. e.g. _id asc or name asc or creationTime.date desc (default "name")
--owner string Filter by owner
--query string Additional query filter (accepts pipeline)
--queryTemplate string String template to be used when applying the given query. Use %s to reference the query/pipeline input
--type string Filter by type
--withParents Include a flat list of all parents and grandparents of the given object
```

### Options inherited from parent commands
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ c8y events createBinary [flags]
```
$ c8y events createBinary --id 12345 --file ./myfile.log
Add a binary to an event
$ c8y events createBinary --id 12345 --file ./myfile.log --name "myfile-2022-03-31.log"
Add a binary to an event using a custom name
```

Expand All @@ -26,6 +30,7 @@ Add a binary to an event
--file string File to be uploaded as a binary (required)
-h, --help help for createBinary
--id strings Event id (required) (accepts pipeline)
--name string Set the name of the binary file. This will be the name of the file when it is downloaded in the UI
--processingMode string Cumulocity processing mode
```

Expand Down
10 changes: 10 additions & 0 deletions docs/go-c8y-cli/docs/cli/c8y/events/c8y_events_downloadBinary.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ Get event binary

Get the binary associated with an event

When downloading a binary it is useful to use the outputFileRaw global parameter and to use one of the following references:

* {filename} - Filename found in the Content-Disposition response header
* {id} - An id like value found in the request path (/event/events/12345/binaries => 12345)
* {basename} - The last path section of the request path (/some/nested/url/withafilename.json => withafilename.json)


```
c8y events downloadBinary [flags]
```
Expand All @@ -17,6 +24,9 @@ c8y events downloadBinary [flags]
```
$ c8y events downloadBinary --id 12345 --outputFileRaw ./eventbinary.txt
Download a binary related to an event
$ c8y events list --fragmentType "c8y_IsBinary" | c8y events downloadBinary --outputFileRaw "./output/binary-{id}-{filename}" > /dev/null
Download a list of event binaries and use a template name to save each binary individually
```

Expand Down
19 changes: 18 additions & 1 deletion docs/go-c8y-cli/docs/cli/psc8y/Binaries/New-Binary.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Create binary
```
New-Binary
[-File] <String>
[[-Name] <String>]
[[-Type] <String>]
[-Data <Object>]
[-NoAccept]
Expand Down Expand Up @@ -106,6 +107,22 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -Name
Set the name of the binary file.
This will be the name of the file when it is downloaded in the UI
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Type
Custom type.
If left blank, the MIME type will be detected from the file extension
Expand All @@ -116,7 +133,7 @@ Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Expand Down
6 changes: 6 additions & 0 deletions docs/go-c8y-cli/docs/cli/psc8y/Events/Get-EventBinary.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ Get-EventBinary
## DESCRIPTION
Get the binary associated with an event

When downloading a binary it is useful to use the outputFileRaw global parameter and to use one of the following references:

* {filename} - Filename found in the Content-Disposition response header
* {id} - An id like value found in the request path (/event/events/12345/binaries =\> 12345)
* {basename} - The last path section of the request path (/some/nested/url/withafilename.json =\> withafilename.json)

## EXAMPLES

### EXAMPLE 1
Expand Down
17 changes: 17 additions & 0 deletions docs/go-c8y-cli/docs/cli/psc8y/Events/New-EventBinary.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Create event binary
New-EventBinary
[-Id] <Object[]>
[-File] <String>
[[-Name] <String>]
[-Data <Object>]
[-NoAccept]
[-ProcessingMode <String>]
Expand Down Expand Up @@ -114,6 +115,22 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -Name
Set the name of the binary file.
This will be the name of the file when it is downloaded in the UI
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -AbortOnErrors
Abort batch when reaching specified number of errors
Expand Down
2 changes: 1 addition & 1 deletion docs/go-c8y-cli/docs/cli/psc8y/Users/Invoke-UserLogout.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ This will invalidate the token associated with the user when using OAUTH_INTERNA

### EXAMPLE 1
```
Invoke-UserLogout
Invoke-UserLogout -Dry
```

Log out the current user
Expand Down

0 comments on commit a0d3fbf

Please sign in to comment.