Skip to content

Latest commit

 

History

History
531 lines (400 loc) · 20.6 KB

UserApi.md

File metadata and controls

531 lines (400 loc) · 20.6 KB

UserApi

All URIs are relative to https://localhost/api/v5

Method HTTP request Description
createUser POST /user Create a user
deleteUser DELETE /user/{name} Delete a user
getMe GET /user/me Check info
getUsers GET /user List users
login POST /user/login Login
logout POST /user/logout Logout
logoutRedirect GET /user/logout
modifyUser PUT /user/{name} Update a user

createUser

UserPermissionStruct createUser(body, details, accept, pretty)

Create a user

Creates a new Web-API user with the specified username and password. Required permissions: - user.create

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.UserApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: ApiKeyHeader
ApiKeyAuth ApiKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyHeader");
ApiKeyHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyHeader.setApiKeyPrefix("Token");

// Configure API key authorization: ApiKeyQuery
ApiKeyAuth ApiKeyQuery = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyQuery");
ApiKeyQuery.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyQuery.setApiKeyPrefix("Token");

UserApi apiInstance = new UserApi();
CreateUserRequest body = new CreateUserRequest(); // CreateUserRequest | 
Boolean details = true; // Boolean | Add to include additional details, omit or false otherwise
String accept = "accept_example"; // String | Override the 'Accept' request header (useful for debugging your requests)
Boolean pretty = true; // Boolean | Add to make the Web-API pretty print the response (useful for debugging your requests)
try {
    UserPermissionStruct result = apiInstance.createUser(body, details, accept, pretty);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling UserApi#createUser");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body CreateUserRequest [optional]
details Boolean Add to include additional details, omit or false otherwise [optional]
accept String Override the 'Accept' request header (useful for debugging your requests) [optional] [enum: json, xml]
pretty Boolean Add to make the Web-API pretty print the response (useful for debugging your requests) [optional]

Return type

UserPermissionStruct

Authorization

ApiKeyHeader, ApiKeyQuery

HTTP request headers

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

deleteUser

UserPermissionStruct deleteUser(name, details, accept, pretty)

Delete a user

Removes a Web-API user. Required permissions: - user.delete

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.UserApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: ApiKeyHeader
ApiKeyAuth ApiKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyHeader");
ApiKeyHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyHeader.setApiKeyPrefix("Token");

// Configure API key authorization: ApiKeyQuery
ApiKeyAuth ApiKeyQuery = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyQuery");
ApiKeyQuery.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyQuery.setApiKeyPrefix("Token");

UserApi apiInstance = new UserApi();
String name = "name_example"; // String | The username of the user to delete
Boolean details = true; // Boolean | Add to include additional details, omit or false otherwise
String accept = "accept_example"; // String | Override the 'Accept' request header (useful for debugging your requests)
Boolean pretty = true; // Boolean | Add to make the Web-API pretty print the response (useful for debugging your requests)
try {
    UserPermissionStruct result = apiInstance.deleteUser(name, details, accept, pretty);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling UserApi#deleteUser");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
name String The username of the user to delete
details Boolean Add to include additional details, omit or false otherwise [optional]
accept String Override the 'Accept' request header (useful for debugging your requests) [optional] [enum: json, xml]
pretty Boolean Add to make the Web-API pretty print the response (useful for debugging your requests) [optional]

Return type

UserPermissionStruct

Authorization

ApiKeyHeader, ApiKeyQuery

HTTP request headers

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

getMe

PermissionStruct getMe(details, accept, pretty)

Check info

Checks to see if the passed api key is still valid and retrieves the user info and permissions associated with this key Required permissions: - user.

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.UserApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: ApiKeyHeader
ApiKeyAuth ApiKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyHeader");
ApiKeyHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyHeader.setApiKeyPrefix("Token");

// Configure API key authorization: ApiKeyQuery
ApiKeyAuth ApiKeyQuery = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyQuery");
ApiKeyQuery.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyQuery.setApiKeyPrefix("Token");

UserApi apiInstance = new UserApi();
Boolean details = true; // Boolean | Add to include additional details, omit or false otherwise
String accept = "accept_example"; // String | Override the 'Accept' request header (useful for debugging your requests)
Boolean pretty = true; // Boolean | Add to make the Web-API pretty print the response (useful for debugging your requests)
try {
    PermissionStruct result = apiInstance.getMe(details, accept, pretty);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling UserApi#getMe");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
details Boolean Add to include additional details, omit or false otherwise [optional]
accept String Override the 'Accept' request header (useful for debugging your requests) [optional] [enum: json, xml]
pretty Boolean Add to make the Web-API pretty print the response (useful for debugging your requests) [optional]

Return type

PermissionStruct

Authorization

ApiKeyHeader, ApiKeyQuery

HTTP request headers

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

getUsers

List<UserPermissionStruct> getUsers(details, accept, pretty)

List users

Gets a list of all the Web-API users. Required permissions: - user.list

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.UserApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: ApiKeyHeader
ApiKeyAuth ApiKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyHeader");
ApiKeyHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyHeader.setApiKeyPrefix("Token");

// Configure API key authorization: ApiKeyQuery
ApiKeyAuth ApiKeyQuery = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyQuery");
ApiKeyQuery.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyQuery.setApiKeyPrefix("Token");

UserApi apiInstance = new UserApi();
Boolean details = true; // Boolean | Add to include additional details, omit or false otherwise
String accept = "accept_example"; // String | Override the 'Accept' request header (useful for debugging your requests)
Boolean pretty = true; // Boolean | Add to make the Web-API pretty print the response (useful for debugging your requests)
try {
    List<UserPermissionStruct> result = apiInstance.getUsers(details, accept, pretty);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling UserApi#getUsers");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
details Boolean Add to include additional details, omit or false otherwise [optional]
accept String Override the 'Accept' request header (useful for debugging your requests) [optional] [enum: json, xml]
pretty Boolean Add to make the Web-API pretty print the response (useful for debugging your requests) [optional]

Return type

List<UserPermissionStruct>

Authorization

ApiKeyHeader, ApiKeyQuery

HTTP request headers

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

login

PermissionStruct login(body, details, accept, pretty)

Login

Tries to acquire an api key with the passed credentials.

Example

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


UserApi apiInstance = new UserApi();
AuthenticationRequest body = new AuthenticationRequest(); // AuthenticationRequest | 
Boolean details = true; // Boolean | Add to include additional details, omit or false otherwise
String accept = "accept_example"; // String | Override the 'Accept' request header (useful for debugging your requests)
Boolean pretty = true; // Boolean | Add to make the Web-API pretty print the response (useful for debugging your requests)
try {
    PermissionStruct result = apiInstance.login(body, details, accept, pretty);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling UserApi#login");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body AuthenticationRequest [optional]
details Boolean Add to include additional details, omit or false otherwise [optional]
accept String Override the 'Accept' request header (useful for debugging your requests) [optional] [enum: json, xml]
pretty Boolean Add to make the Web-API pretty print the response (useful for debugging your requests) [optional]

Return type

PermissionStruct

Authorization

No authorization required

HTTP request headers

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

logout

PermissionStruct logout(details, accept, pretty)

Logout

Invalidate the current API key, logging out the active user. Required permissions: - user.

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.UserApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: ApiKeyHeader
ApiKeyAuth ApiKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyHeader");
ApiKeyHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyHeader.setApiKeyPrefix("Token");

// Configure API key authorization: ApiKeyQuery
ApiKeyAuth ApiKeyQuery = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyQuery");
ApiKeyQuery.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyQuery.setApiKeyPrefix("Token");

UserApi apiInstance = new UserApi();
Boolean details = true; // Boolean | Add to include additional details, omit or false otherwise
String accept = "accept_example"; // String | Override the 'Accept' request header (useful for debugging your requests)
Boolean pretty = true; // Boolean | Add to make the Web-API pretty print the response (useful for debugging your requests)
try {
    PermissionStruct result = apiInstance.logout(details, accept, pretty);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling UserApi#logout");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
details Boolean Add to include additional details, omit or false otherwise [optional]
accept String Override the 'Accept' request header (useful for debugging your requests) [optional] [enum: json, xml]
pretty Boolean Add to make the Web-API pretty print the response (useful for debugging your requests) [optional]

Return type

PermissionStruct

Authorization

ApiKeyHeader, ApiKeyQuery

HTTP request headers

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

logoutRedirect

logoutRedirect(redirect, details, accept, pretty)

null Required permissions: - user.

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.UserApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: ApiKeyHeader
ApiKeyAuth ApiKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyHeader");
ApiKeyHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyHeader.setApiKeyPrefix("Token");

// Configure API key authorization: ApiKeyQuery
ApiKeyAuth ApiKeyQuery = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyQuery");
ApiKeyQuery.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyQuery.setApiKeyPrefix("Token");

UserApi apiInstance = new UserApi();
String redirect = "redirect_example"; // String | The URL the client should be redirect to after logout
Boolean details = true; // Boolean | Add to include additional details, omit or false otherwise
String accept = "accept_example"; // String | Override the 'Accept' request header (useful for debugging your requests)
Boolean pretty = true; // Boolean | Add to make the Web-API pretty print the response (useful for debugging your requests)
try {
    apiInstance.logoutRedirect(redirect, details, accept, pretty);
} catch (ApiException e) {
    System.err.println("Exception when calling UserApi#logoutRedirect");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
redirect String The URL the client should be redirect to after logout [optional]
details Boolean Add to include additional details, omit or false otherwise [optional]
accept String Override the 'Accept' request header (useful for debugging your requests) [optional] [enum: json, xml]
pretty Boolean Add to make the Web-API pretty print the response (useful for debugging your requests) [optional]

Return type

null (empty response body)

Authorization

ApiKeyHeader, ApiKeyQuery

HTTP request headers

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

modifyUser

UserPermissionStruct modifyUser(name, body, details, accept, pretty)

Update a user

Changes the properties of a Web-API user Required permissions: - user.modify

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.UserApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: ApiKeyHeader
ApiKeyAuth ApiKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyHeader");
ApiKeyHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyHeader.setApiKeyPrefix("Token");

// Configure API key authorization: ApiKeyQuery
ApiKeyAuth ApiKeyQuery = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyQuery");
ApiKeyQuery.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyQuery.setApiKeyPrefix("Token");

UserApi apiInstance = new UserApi();
String name = "name_example"; // String | The username of the user to delete
ModifyUserRequest body = new ModifyUserRequest(); // ModifyUserRequest | 
Boolean details = true; // Boolean | Add to include additional details, omit or false otherwise
String accept = "accept_example"; // String | Override the 'Accept' request header (useful for debugging your requests)
Boolean pretty = true; // Boolean | Add to make the Web-API pretty print the response (useful for debugging your requests)
try {
    UserPermissionStruct result = apiInstance.modifyUser(name, body, details, accept, pretty);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling UserApi#modifyUser");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
name String The username of the user to delete
body ModifyUserRequest [optional]
details Boolean Add to include additional details, omit or false otherwise [optional]
accept String Override the 'Accept' request header (useful for debugging your requests) [optional] [enum: json, xml]
pretty Boolean Add to make the Web-API pretty print the response (useful for debugging your requests) [optional]

Return type

UserPermissionStruct

Authorization

ApiKeyHeader, ApiKeyQuery

HTTP request headers

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