Herunterladen Inhalt Inhalt Diese Seite drucken

Rest Api; Login; Requesting The Device Identification Of The Module - Balluff BNI PNT-508-055-P067 Bedienungsanleitung

Io-link-konfiguration
Vorschau ausblenden Andere Handbücher für BNI PNT-508-055-P067:
Inhaltsverzeichnis

Werbung

Verfügbare Sprachen

Verfügbare Sprachen

BNI PNT-508-055-P067 / BNI PNT-538-055-P067
Network interface
3
WebUI/web interface (continued)
3.8
Notifications
Via the navigation bar, click on the corresponding icon (see
chapter 3.2 on page 25) to access the notifications (see
Fig. 3-47).
Fig. 3-47: Notification: Request for password change
The notification history can be deleted with d
3.9
REST API
Via the REST-API interface, identification data, process
data and configuration settings of the IO-Link master and
other connected devices can be requested and modified.
The REST API interface is also used by the user interface
of the web interface for communication with the module.
The REST API specification implemented in the module is
saved in YAML files in the device and can be downloaded
(a
> O
bOut
nline dOcumentS
Swagger Editor (http://editor.swagger.io/).
The present module supports the following REST APIs:
Generic REST API for Balluff devices and applications.
Base path of the REST API in the module:
http://[ip-address]/api/balluff/v1/
The REST API (JSON for IO-Link) standardized by the
IO-Link community.
Link to the official documentation (JSON for IO-Link) in
the general download area of the IO-Link community:
https://io-link.com/de/Download/Download.php >
IO-Link Integration area > JSON Integration for IO-Link
(ZIP file)
Base path of the REST API in the module:
http://[ip-address]/iolink/v1/
The JSON for IO-Link REST API also specifies the
possibility of configuring an MQTT Publisher. This
function is not implemented in the current version
of this module.
The specification JSON for IO-Link REST API
describes a further functionality for process data
and parameters, which requires IODD support.
This functionality is also not fully implemented in
the current version.
The module only supports uploading of IODDs.
Writing/reading process data or parameters with
their names is not supported.
46
english
.
elete all
) and e.g. displayed in the
Some examples below explain how REST-API is applied.
GET requests (chapter 3.9.2 bis 3.9.4) can be
executed without login, as no system changes or
modifications are made.
POST methods (chapters 3.9.5 and 3.9.6) require the
use of a login.
3.9.1

Login

Login is possible by entering the following address:
http://[ip-address]/api/balluff/v1/users/login
A JSON object is also specified, in which, as shown below,
a user name and password are specified (see
chapter 3.3.5 on page 27):
{
"username": "[username]",
"password": "[password]",
}
If the login was successful, you receive
a token in the form of a JSESSIONID,
such as:
{
"JSESSIONID": " 7euh07tdfawjej"
}
This token can now be used below to implement POST
methods. A corresponding request can be equipped with
the header Authorization: Bearer
7euh07tdfawjej.
3.9.2
Requesting the device identification of the
module
The device identification data of an IO-Link master can be
requested via the following addresses:
http://[ip-address]/api/balluff/v1/identification
http://[ip-address]/iolink/v1/masters/1/identification
In the event of a successful request, an answer is supplied
in the form of a JSON object with parameters such as the
vendorID, the serialNumber of the firmwareRevision of the
respective IO-Link master.
Fig. 3-48: Requesting the device identification

Werbung

Kapitel

Inhaltsverzeichnis
loading

Diese Anleitung auch für:

Bni pnt-538-055-p067

Inhaltsverzeichnis