Method for Working with WEB Resource

To work with WEB resource on a mobile device, use API request with specifying parameters (before request execution determine user token).

The request contains resource parameters, and the Authorization title is specified for API user authentication, and if required, the Web-Authorization title is specified for authentication in data source:

curl -v  '<IP address or DNS server name>/api/v1/web/<resource name>/'  -H  "Authorization: Bearer <user token>" "Web-Authorization: Basic <user token>" -H "Content-Type: application/json" -d "{<data source request>}"

NOTE. If resource GET parameters are set in the mobile client request and via administrator console, only the specified GET parameters are used in the mobile client request.

The example in the JSON format:

Trying 0.0.0.0...

TCP_NODELAY set

Connected to <IP address or DNS name of server> (0.0.0.0) port 80 (#0)

> GET /api/v1/web/<resource name>/ HTTP/1.1

> Host: <IP address or DNS name of server>

> User-Agent: curl/7.55.1

> Content-Type: application/json

> Authorization: Bearer <user token>

> Accept: text/plain

>

< HTTP/1.1 200 OK

< Server: nginx/1.9.11

< Date: <date>

< Content-Type: *.*; charset=utf-8

< Content-Length: 139685

< Connection: keep-alive

< Cache-Control: no-cache,no-store,max-age=0,must-revalidate

< Expires: <date>

< Last-Modified: <date>

< X-Frame-Options: DENY

< X-Content-Type-Options: nosniff

< Allow: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS, TRACE

< Vary: Origin, Cookie, Accept-Encoding

<

<!DOCTYPE html>)<data source response></html>

See also:

Server API | Connecting Data Sources