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(body)
Add user
// 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();
}
| Name | Type | Description | Notes |
|---|---|---|---|
| body | UserAddition |
deleteUser(userId)
Delete user
// 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();
}
UserAccountRolesResults getUser(userId)
Get user
// 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();
}
List<UserAccount> getUsers()
Get users
// 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();
}
updateUser(body)
Update user
// 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();
}
| Name | Type | Description | Notes |
|---|---|---|---|
| body | UserAccount |