BVS ID-M1280xF1-xx-xxx
english
65
•
•
•
•
•
•
Depending on the type and the specific request itself,
arguments
to HTTP requests can be transmitted as part
of the
path
(
URI
) to the resource, as
query
string, as
form data
, or in the
body
of the request. For the following
GET examples the command line tool
curl
, which is available for various operating systems, is used.
Examples HTTP mode:
Get API version (Example with cURL)
curl -X GET
'http://HOSTNAME/api/balluff/versions'
Login via HTTP POST command with JSON data (username and password) in the body section
curl -X
'POST'
'http://HOSTNAME/api/balluff/v1/users/login'
-H
'accept: application/json'
-H
'Content-Type: application/json'
-d '{
"username"
:
"expert"
,
"password"
:
"123456789098"
}'
Examples for the encrypted HTTPS mode
Send a trigger with an authentication bearer. Due to the self-signed certificate used by the
BVS ID
the parameter -insecure must be provided to work right. Not every curl version worked with the
secure HTTPS mode see next command with openssl s_client as an alternative.
curl -X
'POST'
'https://192.168.165.84/api/balluff/v1/vision/inspection/
trigger'
-H
'accept: */*'
-H
'Authorization: Bearer
23d6c502-6e5d-433f-8213-35bab1a37c39'
-d
''
--insecure
Let the LED blink (Example with Bash, Wget and openssl s_client. Due to security reasons every
POST commando should be send with an openssl s_client.)
echo
-
ne
"POST /api/balluff/v1/moduleblink HTTP/1.1\r\nUser-Agent: Wget/
1.11.4\r\nAccept: /\r\nHost: HOSTNAME:443\r\nConnection: Keep-
Alive\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-
Length: 0\r\n\r\n"
| openssl s_client -connect HOSTNAME:443 -debug
NOTE
Depending on the https activation of the
Security
tab in the
System Settings
the URL of all requests
changed from
http
→
https
.
Summary of Contents for BVS ID-M1280 F1 Series
Page 1: ...deutsch Konfigurationsanleitung english Configuration Guide BVS ID M1280xF1 xx xxx...
Page 2: ...www balluff com...
Page 3: ...deutsch Konfigurationsanleitung BVS ID M1280xF1 xx xxx...
Page 4: ...www balluff com...
Page 41: ...BVS ID M1280xF1 xx xxx deutsch 39...
Page 96: ...BVS ID M1280xF1 xx xxx 94 deutsch Ablaufdiagramm Handshake mit Input Toggle...
Page 157: ...956115_AB DE E23 nderungen vorbehalten Ersetzt K22...
Page 158: ......
Page 159: ...english Configuration Guide BVS ID M1280xF1 xx xxx...
Page 160: ...www balluff com...
Page 197: ...BVS ID M1280xF1 xx xxx english 39...
Page 250: ...BVS ID M1280xF1 xx xxx 92 english Flowchart Handshake with Input Toggle...
Page 315: ...956115_AB EN E23 Subject to modification Replaces K22...