Skip to content

Commit

Permalink
docs: update api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
reubenmiller committed Apr 20, 2023
1 parent aa5307b commit 29d0af1
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ $ c8y binaries create --file "myConfig.json" --type c8y_upload --data "c8y_Globa
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 Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ $ 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 Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,20 @@ c8y measurements create [flags]
### Examples

```
$ c8y measurements create --device 12345 --time "0s" --type "myType" --data "{\"c8y_Winding\":{ \"temperature\":{\"value\": 1.2345,\"unit\":\"°C\"}}}"
Create measurement
$ c8y measurements create --device 12345 --type "myType" --data "c8y_Winding.temperature.value=25.0,c8y_Winding.temperature.unit=°C"
Create measurement using shorthand data
$ c8y measurements create --device 12345 --type "myType" --template "{c8y_Winding:{temperature:{value: 25.0,unit:'°C'}}}"
Create measurement using a template (more portable across shells)
$ c8y measurements create --device 12345 --type "myType" --template ./mymeasurement.jsonnet
Create measurement using a template file
$ c8y measurements create --device 12345 --type "myType" --data "{\"c8y_Winding\":{ \"temperature\":{\"value\": 25,\"unit\":\"°C\"}}}"
Create measurement using json data (sh/bash/zsh/fish only)
$ c8y measurements create --device 12345 --type "myType" --data '{\"c8y_Winding\":{\"temperature\":{\"value\": 25,\"unit\":\"C\"}}}'
Create measurement using json data (powershell only)
$ c8y measurements list --device 12345 --select '!id,**' | c8y measurements create --device 22222 --template input.value
Copy measurements from one device to another
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ $ c8y notification2 subscriptions create --name deviceSub --device 12345 --conte
Create a new subscription to operations for a specific device
$ echo -e "1111\n2222" | c8y notification2 subscriptions create --name devicegroup --context mo --apiFilter operations
Create a subscription which groups all devices in a single subscription name
$ c8y devices list | c8y notification2 subscriptions create --name devicegroup --context mo --apiFilter operations
Create a subscription which groups all devices in a single subscription name
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ $ c8y usergroups update --id 12345 --name "customGroup2"
Update a user group
$ c8y usergroups update --id 12345 --name "customGroup2" --template "{example: 'value'}"
Update a user group with custom properties
```
Expand Down
1 change: 0 additions & 1 deletion docs/go-c8y-cli/docs/cli/c8y/users/c8y_users_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ $ c8y users create --userName "testuser1" --email "[email protected]"
Create a user
$ c8y users create --template "{email: '[email protected]', userName: $.email, firstName: 'Peter'}" --sendPasswordResetEmail
Create a user using a template
```
Expand Down
1 change: 0 additions & 1 deletion docs/go-c8y-cli/docs/cli/c8y/users/c8y_users_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ $ c8y users update --id "myuser" --firstName "Simon"
Update a user
$ c8y users list --filter "id like *@*" | c8y users update --template "{email: input.value.id}"
Update the email field in each user to match the id (if the id includes the @ sign)
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Create a new measurement

### EXAMPLE 1
```
New-Measurement -Device {{ randomdevice }} -Time "0s" -Type "myType" -Data @{ c8y_Winding = @{ temperature = @{ value = 1.2345; unit = "°C" } } }
New-Measurement -Device {{ randomdevice }} -Time "0s" -Type "myType" -Data @{ c8y_Winding = @{ temperature = @{ value = 25.0; unit = "°C" } } }
```

Create measurement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Object
## OUTPUTS
### System.String
### System.Object
## NOTES
## RELATED LINKS
Expand Down
6 changes: 3 additions & 3 deletions docs/go-c8y-cli/docs/cli/psc8y/Misc/set-c8ymode.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
category: Misc
external help file: PSc8y-help.xml
id: set-c8ymode
id: Set-c8yMode
Module Name: PSc8y
online version:
schema: 2.0.0
slug: /docs/cli/psc8y/Misc/set-c8ymode
title: set-c8ymode
title: Set-c8yMode
---


Expand All @@ -17,7 +17,7 @@ Set cli mode temporarily
## SYNTAX

```
set-c8ymode
Set-c8yMode
[-Mode] <String>
[<CommonParameters>]
```
Expand Down
6 changes: 3 additions & 3 deletions docs/go-c8y-cli/docs/cli/psc8y/Sessions/clear-session.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
category: Sessions
external help file: PSc8y-help.xml
id: clear-session
id: Clear-Session
Module Name: PSc8y
online version:
schema: 2.0.0
slug: /docs/cli/psc8y/Sessions/clear-session
title: clear-session
title: Clear-Session
---


Expand All @@ -17,7 +17,7 @@ Clear the active Cumulocity Session
## SYNTAX

```
clear-session
Clear-Session
[<CommonParameters>]
```

Expand Down
6 changes: 3 additions & 3 deletions docs/go-c8y-cli/docs/cli/psc8y/Sessions/set-session.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
category: Sessions
external help file: PSc8y-help.xml
id: set-session
id: Set-Session
Module Name: PSc8y
online version:
schema: 2.0.0
slug: /docs/cli/psc8y/Sessions/set-session
title: set-session
title: Set-Session
---


Expand All @@ -17,7 +17,7 @@ Set/activate a Cumulocity Session.
## SYNTAX

```
set-session
Set-Session
[[-SessionFilter] <String[]>]
[-TfaCode <String>]
[-Clear]
Expand Down

0 comments on commit 29d0af1

Please sign in to comment.