UserApi

All URIs are relative to *https://ci.appveyor.com/api*

Method HTTP request Description
addUser POST /users Add user
deleteUser DELETE /users/{userId} Delete user
getUser GET /users/{userId} Get user
getUsers GET /users Get users
updateUser PUT /users Update user

addUser

addUser(body)

Add user

Example

// Import classes:
//import name.kevinlocke.appveyor.ApiClient;
//import name.kevinlocke.appveyor.ApiException;
//import name.kevinlocke.appveyor.Configuration;
//import name.kevinlocke.appveyor.auth.*;
//import name.kevinlocke.appveyor.api.UserApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

UserApi apiInstance = new UserApi();
UserAddition body = new UserAddition(); // UserAddition | 
try {
    apiInstance.addUser(body);
} catch (ApiException e) {
    System.err.println("Exception when calling UserApi#addUser");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body UserAddition

Return type

null (empty response body)

Authorization

apiToken

HTTP request headers

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

deleteUser

deleteUser(userId)

Delete user

Example

// Import classes:
//import name.kevinlocke.appveyor.ApiClient;
//import name.kevinlocke.appveyor.ApiException;
//import name.kevinlocke.appveyor.Configuration;
//import name.kevinlocke.appveyor.auth.*;
//import name.kevinlocke.appveyor.api.UserApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

UserApi apiInstance = new UserApi();
Integer userId = 56; // Integer | User ID
try {
    apiInstance.deleteUser(userId);
} catch (ApiException e) {
    System.err.println("Exception when calling UserApi#deleteUser");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
userId Integer User ID

Return type

null (empty response body)

Authorization

apiToken

HTTP request headers

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

getUser

UserAccountRolesResults getUser(userId)

Get user

Example

// Import classes:
//import name.kevinlocke.appveyor.ApiClient;
//import name.kevinlocke.appveyor.ApiException;
//import name.kevinlocke.appveyor.Configuration;
//import name.kevinlocke.appveyor.auth.*;
//import name.kevinlocke.appveyor.api.UserApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

UserApi apiInstance = new UserApi();
Integer userId = 56; // Integer | User ID
try {
    UserAccountRolesResults result = apiInstance.getUser(userId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling UserApi#getUser");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
userId Integer User ID

Authorization

apiToken

HTTP request headers

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

getUsers

List<UserAccount> getUsers()

Get users

Example

// Import classes:
//import name.kevinlocke.appveyor.ApiClient;
//import name.kevinlocke.appveyor.ApiException;
//import name.kevinlocke.appveyor.Configuration;
//import name.kevinlocke.appveyor.auth.*;
//import name.kevinlocke.appveyor.api.UserApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

Parameters

This endpoint does not need any parameter.

Return type

List<UserAccount>

Authorization

apiToken

HTTP request headers

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

updateUser

updateUser(body)

Update user

Example

// Import classes:
//import name.kevinlocke.appveyor.ApiClient;
//import name.kevinlocke.appveyor.ApiException;
//import name.kevinlocke.appveyor.Configuration;
//import name.kevinlocke.appveyor.auth.*;
//import name.kevinlocke.appveyor.api.UserApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

UserApi apiInstance = new UserApi();
UserAccount body = new UserAccount(); // UserAccount | 
try {
    apiInstance.updateUser(body);
} catch (ApiException e) {
    System.err.println("Exception when calling UserApi#updateUser");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body UserAccount

Return type

null (empty response body)

Authorization

apiToken

HTTP request headers

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