Skip to content

Commit

Permalink
Clean up configuration browser and add support for creation of assets…
Browse files Browse the repository at this point in the history
… and (#2323)

* Provide alternative close method option when opening stream for write
  • Loading branch information
marcschier authored Aug 23, 2024
1 parent 8d87129 commit f40c013
Show file tree
Hide file tree
Showing 98 changed files with 11,837 additions and 236 deletions.
125 changes: 124 additions & 1 deletion docs/opc-publisher/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1588,7 +1588,7 @@ Upload a file to the server.
|Type|Name|Description|Schema|
|---|---|---|---|
|**Header**|**x-ms-connection** <br>*required*|The connection information identifying the server to connect to perform the operation on. This is passed as json serialized via the header "x-ms-connection"|string|
|**Header**|**x-ms-mode** <br>*required*|The file write mode to use passed as header "x-ms-mode"|string|
|**Header**|**x-ms-options** <br>*required*|The file write options to use passed as header "x-ms-mode"|string|
|**Header**|**x-ms-target** <br>*required*|The file object to upload. This is passed as json serialized via the header "x-ms-target"|string|


Expand Down Expand Up @@ -3409,6 +3409,129 @@ Create a published nodes entry for a specific writer group and dataset writer. T
* `application/x-msgpack`


<a name="createorupdateasset"></a>
#### CreateOrUpdateAsset
```
POST /v2/writer/assets/create
```


##### Description
Creates an asset from the entry in the request and the configuration provided in the Web of Things Asset configuration file. The entry must contain a data set name which will be used as the asset name. The writer can stay empty. It will be set to the asset id on successful return. The server must support the WoT profile per <see href="https://reference.opcfoundation.org/WoT/v100/docs/" />. The asset will be created and the configuration updated to reference it. A wait time can be provided as optional query parameter to wait until the server has settled after uploading the configuration.


##### Parameters

|Type|Name|Description|Schema|
|---|---|---|---|
|**Body**|**body** <br>*required*|The contains the entry and WoT file to configure the server to expose the asset.|[ByteArrayPublishedNodeCreateAssetRequestModel](definitions.md#bytearraypublishednodecreateassetrequestmodel)|


##### Responses

|HTTP Code|Description|Schema|
|---|---|---|
|**200**|The asset was created|[PublishedNodesEntryModelServiceResponse](definitions.md#publishednodesentrymodelserviceresponse)|
|**400**|The passed in information is invalid|[ProblemDetails](definitions.md#problemdetails)|
|**403**|Forbidden|[ProblemDetails](definitions.md#problemdetails)|
|**408**|The operation timed out.|[ProblemDetails](definitions.md#problemdetails)|
|**500**|An unexpected error occurred|[ProblemDetails](definitions.md#problemdetails)|


##### Consumes

* `application/json`
* `application/x-msgpack`


##### Produces

* `application/json`
* `application/x-msgpack`


<a name="deleteasset"></a>
#### DeleteAsset
```
POST /v2/writer/assets/delete
```


##### Description
Delete the asset referenced by the entry in the request. The entry must contain the asset id to delete. The asset id is the data set writer id. The entry must also contain the writer group id or deletion of the asset in the configuration will fail before the asset is deleted. The server must support WoT connectivity profile per <see href="https://reference.opcfoundation.org/WoT/v100/docs/" />. First the entry in the configuration will be deleted and then the asset on the server. If deletion of the asset in the configuration fails it will not be deleted in the server. An optional request option force can be used to force the deletion of the asset in the server regardless of the failure to delete the entry in the configuration.


##### Parameters

|Type|Name|Description|Schema|
|---|---|---|---|
|**Body**|**body** <br>*required*|Request that contains the entry of the asset that should be deleted.|[PublishedNodeDeleteAssetRequestModel](definitions.md#publishednodedeleteassetrequestmodel)|


##### Responses

|HTTP Code|Description|Schema|
|---|---|---|
|**200**|The asset was deleted successfully|[ServiceResultModel](definitions.md#serviceresultmodel)|
|**400**|The passed in information is invalid|[ProblemDetails](definitions.md#problemdetails)|
|**403**|Forbidden|[ProblemDetails](definitions.md#problemdetails)|
|**408**|The operation timed out.|[ProblemDetails](definitions.md#problemdetails)|
|**500**|An unexpected error occurred|[ProblemDetails](definitions.md#problemdetails)|


##### Consumes

* `application/json`
* `application/x-msgpack`


##### Produces

* `application/json`
* `application/x-msgpack`


<a name="getallassets"></a>
#### GetAllAssets
```
POST /v2/writer/assets/list
```


##### Description
Get a list of entries representing the assets in the server. This will not touch the configuration, it will obtain the list from the server. If the server does not support <see href="https://reference.opcfoundation.org/WoT/v100/docs/" /> the result will be empty.


##### Parameters

|Type|Name|Description|Schema|
|---|---|---|---|
|**Body**|**body** <br>*required*|The entry to use to list the assets with the optional header information used when invoking services on the server.|[RequestHeaderModelPublishedNodesEntryRequestModel](definitions.md#requestheadermodelpublishednodesentryrequestmodel)|


##### Responses

|HTTP Code|Description|Schema|
|---|---|---|
|**200**|Successfully completed the listing|[PublishedNodesEntryModelServiceResponseIAsyncEnumerable](definitions.md#publishednodesentrymodelserviceresponseiasyncenumerable)|
|**400**|The passed in information is invalid|[ProblemDetails](definitions.md#problemdetails)|
|**403**|Forbidden|[ProblemDetails](definitions.md#problemdetails)|
|**408**|The operation timed out.|[ProblemDetails](definitions.md#problemdetails)|
|**500**|An unexpected error occurred|[ProblemDetails](definitions.md#problemdetails)|


##### Consumes

* `application/json`
* `application/x-msgpack`


##### Produces

* `application/json`
* `application/x-msgpack`


<a name="expandwriter"></a>
#### ExpandWriter
```
Expand Down
50 changes: 50 additions & 0 deletions docs/opc-publisher/definitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,19 @@ View to browse
|**viewId** <br>*required*|Node of the view to browse <br>**Minimum length** : `1`|string|


<a name="bytearraypublishednodecreateassetrequestmodel"></a>
### ByteArrayPublishedNodeCreateAssetRequestModel
Request to create an asset in the configuration api


|Name|Description|Schema|
|---|---|---|
|**configuration** <br>*required*|The asset configuration to use when creating the asset.|string (byte)|
|**entry** <br>*required*||[PublishedNodesEntryModel](definitions.md#publishednodesentrymodel)|
|**header** <br>*optional*||[RequestHeaderModel](definitions.md#requestheadermodel)|
|**waitTime** <br>*optional*|Time to wait after the configuration is applied to perform<br>the configuration of the asset in the configuration api.<br>This is to let the server settle.|string (date-span)|


<a name="channeldiagnosticmodel"></a>
### ChannelDiagnosticModel
Channel diagnostics model
Expand Down Expand Up @@ -1674,6 +1687,19 @@ A monitored and published item
|**samplingInterval** <br>*optional*|Sampling interval to use|string (date-span)|


<a name="publishednodedeleteassetrequestmodel"></a>
### PublishedNodeDeleteAssetRequestModel
Contains entry in the published nodes configuration representing
the asset as well as an optional request header.


|Name|Description|Schema|
|---|---|---|
|**entry** <br>*required*||[PublishedNodesEntryModel](definitions.md#publishednodesentrymodel)|
|**force** <br>*optional*|The asset on the server is deleted no matter whether<br>the removal in the publisher configuration was successful<br>or not.|boolean|
|**header** <br>*optional*||[RequestHeaderModel](definitions.md#requestheadermodel)|


<a name="publishednodeexpansionmodel"></a>
### PublishedNodeExpansionModel
Node expansion configuration. Configures how an entry should
Expand Down Expand Up @@ -1790,6 +1816,17 @@ Contains the nodes which should be published
|**WriterGroupTransport** <br>*optional*||[WriterGroupTransport](definitions.md#writergrouptransport)|


<a name="publishednodesentrymodelserviceresponse"></a>
### PublishedNodesEntryModelServiceResponse
Response envelope


|Name|Schema|
|---|---|
|**errorInfo** <br>*optional*|[ServiceResultModel](definitions.md#serviceresultmodel)|
|**result** <br>*optional*|[PublishedNodesEntryModel](definitions.md#publishednodesentrymodel)|


<a name="publishednodesentrymodelserviceresponseiasyncenumerable"></a>
### PublishedNodesEntryModelServiceResponseIAsyncEnumerable
*Type* : object
Expand Down Expand Up @@ -2104,6 +2141,19 @@ Request header model
|**serviceCallTimeout** <br>*optional*|Service call timeout in ms. As opposed to the<br>operation timeout this terminates the entire<br>transaction if it takes longer than the timeout to<br>complete. Note that a connect and reconnect during<br>the service call is gated by the connect timeout<br>setting. If a connect timeout is not specified<br>this timeout is used also for connect timeout.|integer (int32)|


<a name="requestheadermodelpublishednodesentryrequestmodel"></a>
### RequestHeaderModelPublishedNodesEntryRequestModel
Wraps a request and a published nodes entry to bind to a
body more easily for api that requires an entry and additional
configuration


|Name|Schema|
|---|---|
|**entry** <br>*required*|[PublishedNodesEntryModel](definitions.md#publishednodesentrymodel)|
|**request** <br>*optional*|[RequestHeaderModel](definitions.md#requestheadermodel)|


<a name="requestheadermodelrequestenvelope"></a>
### RequestHeaderModelRequestEnvelope
Wraps a request and a connection to bind to a
Expand Down
9 changes: 7 additions & 2 deletions docs/opc-publisher/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The following table shows the supported features of OPC Publisher and planned fe
| | Download files |-|X|Experimental|
| | Upload files to directory |-|X|Experimental|
| | Delete files and directories |-|X|Experimental|
| | Substitutable Close method |-|-|#2322|
| | Substitutable Close method |-|X|Experimental|
| | Temporary file transfer |-|-||
| Subscribe to [value changes](./readme.md#configuration-schema) |||||
| | Value change subscriptions |X|X||
Expand Down Expand Up @@ -114,8 +114,13 @@ The following table shows the supported features of OPC Publisher and planned fe
| | v2.9 |-|X||
| | JSON schema validation |X|-||
| | Bootstrapped from Azure Storage blob |-|-|#2284|
| API to configure and subscribe to Objects, Types and Assets |||||
| | All variables under an object as writers |-|X|Experimental|
| | All variables of objects of a certain object type or subtype |-|X|Experimental|
| | All variables of a variable type or subtype |-|X|Experimental|
| | Asset configuration using Web of Things Description per [Part 10100-1](https://reference.opcfoundation.org/WoT/v100/docs/)|-|X|Experimental|
| | Asset admin shell support per [Part 30270](https://reference.opcfoundation.org/I4AAS/v100/docs/)|-|-||
| OPC UA Pub/Sub configuration API ([Part 14](https://reference.opcfoundation.org/Core/Part14/v105/docs/))||-|-||
| Asset WoT configuration API ([Part 10100-1](https://reference.opcfoundation.org/WoT/v100/docs/))||-|-||
| Data contextualization |||||
| | Add Endpoint/Dataset name to message header (Routing) |X|X||
| | [Enrichment](./readme.md#key-frames-delta-frames-and-extension-fields) |-|X||
Expand Down
Loading

0 comments on commit f40c013

Please sign in to comment.