Files
maptology/testing/api-client/docs/ServiceApi.md
T
Ole e3935842c7
lbs-gitea/maptology/master There was a failure building this commit
move generated client code in the projects source folder & successfully create devices
2018-01-25 01:33:33 +01:00

15 KiB

ServiceApi

All URIs are relative to http://localhost/api

Method HTTP request Description
addNotice POST /notices Adds a new notice and returns the notice as well as its location.
getActiveNotices GET /notices/active Returns a page of notices.
getBuildVersion GET /versions/build Returns the build version.
getEntityStatistics GET /log/entities Returns a list of entity statistics.
getLoadStatistic GET /log/load Returns the current load statistic.
getLogMessages GET /log/messages Returns a list of log messages starting from a particular id.
getNotice GET /notices/{id} Returns the notice with the specified id.
getNotices GET /notices Returns a page of notices.
getSystemStatistic GET /log/system Returns the system statistic.
getUpdatedNotices GET /notices/updated Returns all active notices modified after the date.
setNotice PUT /notices/{id} Updates an existing notice.

addNotice

Notice addNotice(body)

Adds a new notice and returns the notice as well as its location.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ServiceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: admin
HttpBasicAuth admin = (HttpBasicAuth) defaultClient.getAuthentication("admin");
admin.setUsername("YOUR USERNAME");
admin.setPassword("YOUR PASSWORD");

ServiceApi apiInstance = new ServiceApi();
Notice body = new Notice(); // Notice | The new notice to add.
try {
    Notice result = apiInstance.addNotice(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServiceApi#addNotice");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body Notice The new notice to add.

Return type

Notice

Authorization

admin

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/json, application/xml

getActiveNotices

NoticePage getActiveNotices(pageOffset, pageSize)

Returns a page of notices.

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.ServiceApi;


ServiceApi apiInstance = new ServiceApi();
Integer pageOffset = 0; // Integer | The offset in terms of elements.
Integer pageSize = 20; // Integer | The maximum number of elements on the page.
try {
    NoticePage result = apiInstance.getActiveNotices(pageOffset, pageSize);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServiceApi#getActiveNotices");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
pageOffset Integer The offset in terms of elements. [optional] [default to 0]
pageSize Integer The maximum number of elements on the page. [optional] [default to 20]

Return type

NoticePage

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/json, application/xml

getBuildVersion

BuildVersion getBuildVersion()

Returns the build version.

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.ServiceApi;


ServiceApi apiInstance = new ServiceApi();
try {
    BuildVersion result = apiInstance.getBuildVersion();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServiceApi#getBuildVersion");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

BuildVersion

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/xml

getEntityStatistics

List<EntityStatistic> getEntityStatistics()

Returns a list of entity statistics.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ServiceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: admin
HttpBasicAuth admin = (HttpBasicAuth) defaultClient.getAuthentication("admin");
admin.setUsername("YOUR USERNAME");
admin.setPassword("YOUR PASSWORD");

ServiceApi apiInstance = new ServiceApi();
try {
    List<EntityStatistic> result = apiInstance.getEntityStatistics();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServiceApi#getEntityStatistics");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

List<EntityStatistic>

Authorization

admin

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/xml

getLoadStatistic

LoadStatistic getLoadStatistic()

Returns the current load statistic.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ServiceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: admin
HttpBasicAuth admin = (HttpBasicAuth) defaultClient.getAuthentication("admin");
admin.setUsername("YOUR USERNAME");
admin.setPassword("YOUR PASSWORD");

ServiceApi apiInstance = new ServiceApi();
try {
    LoadStatistic result = apiInstance.getLoadStatistic();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServiceApi#getLoadStatistic");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

LoadStatistic

Authorization

admin

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/xml

getLogMessages

List<LogMessage> getLogMessages(from)

Returns a list of log messages starting from a particular id.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ServiceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: admin
HttpBasicAuth admin = (HttpBasicAuth) defaultClient.getAuthentication("admin");
admin.setUsername("YOUR USERNAME");
admin.setPassword("YOUR PASSWORD");

ServiceApi apiInstance = new ServiceApi();
Long from = 0L; // Long | The id of the first message to retrieve.
try {
    List<LogMessage> result = apiInstance.getLogMessages(from);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServiceApi#getLogMessages");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
from Long The id of the first message to retrieve. [optional] [default to 0]

Return type

List<LogMessage>

Authorization

admin

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/xml

getNotice

Notice getNotice(id)

Returns the notice with the specified id.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ServiceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: admin
HttpBasicAuth admin = (HttpBasicAuth) defaultClient.getAuthentication("admin");
admin.setUsername("YOUR USERNAME");
admin.setPassword("YOUR PASSWORD");

ServiceApi apiInstance = new ServiceApi();
Long id = 789L; // Long | The id of the notice.
try {
    Notice result = apiInstance.getNotice(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServiceApi#getNotice");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id Long The id of the notice.

Return type

Notice

Authorization

admin

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/json, application/xml

getNotices

NoticePage getNotices(pageOffset, pageSize)

Returns a page of notices.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ServiceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: admin
HttpBasicAuth admin = (HttpBasicAuth) defaultClient.getAuthentication("admin");
admin.setUsername("YOUR USERNAME");
admin.setPassword("YOUR PASSWORD");

ServiceApi apiInstance = new ServiceApi();
Integer pageOffset = 0; // Integer | The offset in terms of elements.
Integer pageSize = 20; // Integer | The maximum number of elements on the page.
try {
    NoticePage result = apiInstance.getNotices(pageOffset, pageSize);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServiceApi#getNotices");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
pageOffset Integer The offset in terms of elements. [optional] [default to 0]
pageSize Integer The maximum number of elements on the page. [optional] [default to 20]

Return type

NoticePage

Authorization

admin

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/json, application/xml

getSystemStatistic

LoadStatistic getSystemStatistic()

Returns the system statistic.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ServiceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: admin
HttpBasicAuth admin = (HttpBasicAuth) defaultClient.getAuthentication("admin");
admin.setUsername("YOUR USERNAME");
admin.setPassword("YOUR PASSWORD");

ServiceApi apiInstance = new ServiceApi();
try {
    LoadStatistic result = apiInstance.getSystemStatistic();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServiceApi#getSystemStatistic");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

LoadStatistic

Authorization

admin

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/xml

getUpdatedNotices

List<Notice> getUpdatedNotices(since)

Returns all active notices modified after the date.

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.ServiceApi;


ServiceApi apiInstance = new ServiceApi();
Long since = 0L; // Long | The earlies time in epoch milliseconds.
try {
    List<Notice> result = apiInstance.getUpdatedNotices(since);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServiceApi#getUpdatedNotices");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
since Long The earlies time in epoch milliseconds. [optional] [default to 0]

Return type

List<Notice>

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/json, application/xml

setNotice

Notice setNotice(id, body)

Updates an existing notice.

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ServiceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: admin
HttpBasicAuth admin = (HttpBasicAuth) defaultClient.getAuthentication("admin");
admin.setUsername("YOUR USERNAME");
admin.setPassword("YOUR PASSWORD");

ServiceApi apiInstance = new ServiceApi();
Long id = 789L; // Long | The id of the notice.
Notice body = new Notice(); // Notice | The data of the notice to set.
try {
    Notice result = apiInstance.setNotice(id, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServiceApi#setNotice");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id Long The id of the notice.
body Notice The data of the notice to set.

Return type

Notice

Authorization

admin

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/json, application/xml