Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
1,717 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
# NGSI Registration | ||
|
||
This custom node is a simple node that allows to create or delete an NGSIv2 registration. | ||
|
||
![](https://raw.githubusercontent.com/lets-fiware/node-red-contrib-letsfiware-NGSI/gh-pages/images/registration/registration-01.png) | ||
|
||
<details> | ||
<summary><strong>Details</strong></summary> | ||
|
||
- [Create a registration](#create-a-registration) | ||
- [Delete a registration](#delete-a-registration) | ||
- [Use value of actionType in payload](#use-value-of-actiontype-in-payload) | ||
|
||
</details> | ||
|
||
## Create a registration | ||
|
||
This operation allows to create a new registration. | ||
|
||
### Properties | ||
|
||
![](https://raw.githubusercontent.com/lets-fiware/node-red-contrib-letsfiware-NGSI/gh-pages/images/registration/registration-02.png) | ||
|
||
- `name`: A name for a node instance | ||
- `Context Broker`: An endpoint of a context broker | ||
- `ServicePath`: FIWARE Service Path | ||
- `Action type`: `create` | ||
|
||
### Examples | ||
|
||
#### Input | ||
|
||
Payload *JSON Object* | ||
|
||
A `msg.payload` contains a NGSIv2 registration data. | ||
|
||
```json | ||
{ | ||
"description": "Relative Humidity Context Source", | ||
"dataProvided": { | ||
"entities": [ | ||
{ | ||
"id": "room", | ||
"type": "Room" | ||
} | ||
], | ||
"attrs": [ | ||
"relativeHumidity" | ||
] | ||
}, | ||
"provider": { | ||
"http": { | ||
"url": "http://orion:1026" | ||
} | ||
} | ||
} | ||
``` | ||
|
||
#### Output | ||
|
||
Payload *string* | ||
|
||
A `msg.payload` contains a registration id. | ||
|
||
```text | ||
63ed51173bdeaadaf909c57b | ||
``` | ||
|
||
## Delete a registration | ||
|
||
This operation allows to delete a existing registration. | ||
|
||
### Properties | ||
|
||
![](https://raw.githubusercontent.com/lets-fiware/node-red-contrib-letsfiware-NGSI/gh-pages/images/registration/registration-03.png) | ||
|
||
- `name`: A name for a node instance | ||
- `Context Broker`: An endpoint of a context broker | ||
- `ServicePath`: FIWARE Service Path | ||
- `Action type`: `delete` | ||
|
||
### Example | ||
|
||
#### Input | ||
|
||
Payload *string* | ||
|
||
A `msg.payload` contains a registration id. | ||
|
||
``` | ||
63ed51173bdeaadaf909c57b | ||
``` | ||
|
||
#### Output | ||
|
||
Payload *Number* or *null* | ||
|
||
A `msg.payload` contains a status code. | ||
|
||
``` | ||
204 | ||
``` | ||
|
||
``` | ||
null | ||
``` | ||
|
||
## Use value of actionType in payload | ||
|
||
This operation allows to create or delete a registration. | ||
|
||
### Properties | ||
|
||
![](https://raw.githubusercontent.com/lets-fiware/node-red-contrib-letsfiware-NGSI/gh-pages/images/registration/registration-04.png) | ||
|
||
- `name`: A name for a node instance | ||
- `Context Broker`: An endpoint of a context broker | ||
- `ServicePath`: FIWARE Service Path | ||
- `Action type`: `value of actionType in payload` | ||
|
||
### Example | ||
|
||
When creating a new registration, A `msg.payload` should contain a JSON Object with actionType and registration data. | ||
|
||
#### Input | ||
|
||
```json | ||
{ | ||
"actionType": "delete", | ||
"id": "63ed53123bdeaadaf909c57d" | ||
} | ||
``` | ||
|
||
#### Output | ||
|
||
Payload *string* | ||
|
||
A `msg.payload` contains a registration id. | ||
|
||
```text | ||
63ed51173bdeaadaf909c57b | ||
``` | ||
|
||
When deleting a existing registration, A `msg.payload` should contain a JSON Object with actionType and registration id. | ||
|
||
#### Input | ||
|
||
```json | ||
{ | ||
"actionType": "delete", | ||
"id": "63ea11e4a0cec98fc6017aae" | ||
} | ||
``` | ||
|
||
#### Output | ||
|
||
Payload *Number* or *null* | ||
|
||
A `msg.payload` contains a status code. | ||
|
||
``` | ||
204 | ||
``` | ||
|
||
``` | ||
null | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
# NGSI Registration | ||
|
||
このカスタム・ノードは、NGSIv2 レジストレーションを作成または削除できるノードです。 | ||
|
||
![](https://raw.githubusercontent.com/lets-fiware/node-red-contrib-letsfiware-NGSI/gh-pages/images/registration/registration-01.png) | ||
|
||
## コンテンツ | ||
|
||
<details> | ||
<summary><strong>詳細</strong></summary> | ||
|
||
- [レジストレーションの作成](#create-a-registration) | ||
- [レジストレーションの削除](#delete-a-registration) | ||
- [Payload 内の actionType の値を使用](#use-value-of-actiontype-in-payload) | ||
|
||
</details> | ||
|
||
<a name="create-a-registration"></a> | ||
|
||
## レジストレーションの作成 | ||
|
||
新しい登録を作成できます。 | ||
|
||
### プロパティ | ||
|
||
![](https://raw.githubusercontent.com/lets-fiware/node-red-contrib-letsfiware-NGSI/gh-pages/images/registration/registration-02.png) | ||
|
||
- `name`: ノード・インスタンスの名前 | ||
- `Context Broker`: Context Broker のエンドポイント | ||
- `ServicePath`: FIWARE Service Path | ||
- `Action type`: `create` | ||
|
||
### 例 | ||
|
||
#### 入力 | ||
|
||
Payload *JSON Object* | ||
|
||
`msg.payload`には、NGSIv2 レジストレーション・データを含める必要があります。 | ||
|
||
```json | ||
{ | ||
"description": "Relative Humidity Context Source", | ||
"dataProvided": { | ||
"entities": [ | ||
{ | ||
"id": "room", | ||
"type": "Room" | ||
} | ||
], | ||
"attrs": [ | ||
"relativeHumidity" | ||
] | ||
}, | ||
"provider": { | ||
"http": { | ||
"url": "http://orion:1026" | ||
} | ||
} | ||
} | ||
``` | ||
|
||
#### 出力 | ||
|
||
Payload *string* | ||
|
||
`msg.payload` には、レジストレーション id が含まれます。 | ||
|
||
```text | ||
63ed51173bdeaadaf909c57b | ||
``` | ||
|
||
<a name="delete-a-registration"></a> | ||
|
||
## レジストレーションの削除 | ||
|
||
既存のレジストレーションを更新できます。 | ||
|
||
### プロパティ | ||
|
||
![](https://raw.githubusercontent.com/lets-fiware/node-red-contrib-letsfiware-NGSI/gh-pages/images/registration/registration-03.png) | ||
|
||
- `name`: ノード・インスタンスの名前 | ||
- `Context Broker`: Context Broker のエンドポイント | ||
- `ServicePath`: FIWARE Service Path | ||
- `Action type`: `delete` | ||
|
||
### 例 | ||
|
||
#### 入力 | ||
|
||
Payload *string* | ||
|
||
msg.payload` には、レジストレーション id を含める必要があります。 | ||
|
||
``` | ||
63ed51173bdeaadaf909c57b | ||
``` | ||
|
||
#### 出力 | ||
|
||
Payload *Number* or *null* | ||
|
||
`msg.payload` にはステータス・コードが含まれています。 | ||
|
||
``` | ||
204 | ||
``` | ||
|
||
``` | ||
null | ||
``` | ||
|
||
<a name="use-value-of-actiontype-in-payload"></a> | ||
|
||
## Payload 内の actionType の値を使用 | ||
|
||
レジストレーションを作成、または削除できます。 | ||
|
||
### プロパティ | ||
|
||
![](https://raw.githubusercontent.com/lets-fiware/node-red-contrib-letsfiware-NGSI/gh-pages/images/registration/registration-04.png) | ||
|
||
- `name`: ノード・インスタンスの名前 | ||
- `Context Broker`: Context Broker のエンドポイント | ||
- `ServicePath`: FIWARE Service Path | ||
- `Action type`: `value of actionType in payload` | ||
|
||
### 例 | ||
|
||
新しいレジストレーションを作成する場合、`msg.payload` には、actionType とレジストレーション・データを含む JSON オブジェクトが含まれている必要があります。 | ||
|
||
#### 入力 | ||
|
||
```json | ||
{ | ||
"actionType": "delete", | ||
"id": "63ed53123bdeaadaf909c57d" | ||
} | ||
``` | ||
|
||
#### 出力 | ||
|
||
Payload *string* | ||
|
||
`msg.payload` には、レジストレーション id が含まれます。 | ||
|
||
```text | ||
63ed51173bdeaadaf909c57b | ||
``` | ||
|
||
既存の登録を削除する場合、`msg.payload` には、actionType とレジストレーション id を持つ JSON オブジェクトが含まれている必要があります。 | ||
|
||
#### 入力 | ||
|
||
```json | ||
{ | ||
"actionType": "delete", | ||
"id": "63ea11e4a0cec98fc6017aae" | ||
} | ||
``` | ||
|
||
#### 出力 | ||
|
||
Payload *Number* or *null* | ||
|
||
`msg.payload` にはステータス・コードが含まれています。 | ||
|
||
``` | ||
204 | ||
``` | ||
|
||
``` | ||
null | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.