All URIs are relative to *https://ci.appveyor.com/api*
Method | HTTP request | Description |
---|---|---|
addRole | POST /roles | Add role |
deleteRole | DELETE /roles/{roleId} | Delete role |
getRole | GET /roles/{roleId} | Get role |
getRoles | GET /roles | Get roles |
updateRole | PUT /roles | Update role |
RoleWithGroups addRole(body)
Add role
// 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.RoleApi; 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"); RoleApi apiInstance = new RoleApi(); RoleAddition body = new RoleAddition(); // RoleAddition | try { RoleWithGroups result = apiInstance.addRole(body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling RoleApi#addRole"); e.printStackTrace(); }
Name | Type | Description | Notes |
---|---|---|---|
body | RoleAddition |
deleteRole(roleId)
Delete role
// 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.RoleApi; 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"); RoleApi apiInstance = new RoleApi(); Integer roleId = 56; // Integer | Role ID try { apiInstance.deleteRole(roleId); } catch (ApiException e) { System.err.println("Exception when calling RoleApi#deleteRole"); e.printStackTrace(); }
RoleWithGroups getRole(roleId)
Get role
// 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.RoleApi; 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"); RoleApi apiInstance = new RoleApi(); Integer roleId = 56; // Integer | Role ID try { RoleWithGroups result = apiInstance.getRole(roleId); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling RoleApi#getRole"); e.printStackTrace(); }
List<Role> getRoles()
Get roles
// 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.RoleApi; 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"); RoleApi apiInstance = new RoleApi(); try { List<Role> result = apiInstance.getRoles(); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling RoleApi#getRoles"); e.printStackTrace(); }
RoleWithGroups updateRole(body)
Update role
// 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.RoleApi; 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"); RoleApi apiInstance = new RoleApi(); RoleWithGroups body = new RoleWithGroups(); // RoleWithGroups | try { RoleWithGroups result = apiInstance.updateRole(body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling RoleApi#updateRole"); e.printStackTrace(); }
Name | Type | Description | Notes |
---|---|---|---|
body | RoleWithGroups |