Documentation for C-Werk 2.0.

Previous page Next page

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Web server responds to method calls in the JSON format.

Note

Configuring the Web-Server.

The default Web server port is 80 (Windows), 8000 (Lunix), the prefix is / (empty).

Authorization

Authorization is needed for requests. Two types of authorization are supported: Basic and Bearer.

With the Basic authorization type, it is necessary to add user data to all HTTP requests in the following form:

http://[username]:[password]@[IP-address]:[port]/[prefix]

With the Bearer authorization type, the token received from the Web server is used (see Bearer authorization).

POST requests must have JSON body.

Time format in requests

In all requests, the time is specified in the YYYYMMDDTHHMMSS format in the time zone UTC+0.

Time interval is specified in some requests, for example:

GET http://IP-address:port/prefix/archive/contents/intervals/{VIDEOSOURCEID}/{ENDTIME}/{BEGINTIME}

These requests return data starting at BEGINTIME and ending at ENDTIME.

If BEGINTIME is not specified, infinite future is considered. If ENDTIME is also not specified, infinite past is considered. Instead of BEGINTIME and ENDTIME, the words "past" and "future" can be used to set infinite past and infinite future respectively.

Interval sequence corresponds to the ratio between the specified BEGINTIME and ENDTIME (in ascending order if BEGINTIME<ENDTIME, and in descending order if ENDTIME<BEGINTIME). The start and end points of the interval are returned in the sequential order, i.e. the interval start time is less than the interval end time or equal to it.

Requests limit

The number of active requests and requests in queue is limited.

The 503 error (Search query rejected. Too many requests) returns when there are too many requests.

  • No labels