RoleApi

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

addRole

RoleWithGroups addRole(body)

Add role

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.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();
}

Parameters

Name Type Description Notes
body RoleAddition

Return type

RoleWithGroups

Authorization

apiToken

HTTP request headers

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

deleteRole

deleteRole(roleId)

Delete role

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.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();
}

Parameters

Name Type Description Notes
roleId Integer Role ID

Return type

null (empty response body)

Authorization

apiToken

HTTP request headers

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

getRole

RoleWithGroups getRole(roleId)

Get role

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.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();
}

Parameters

Name Type Description Notes
roleId Integer Role ID

Return type

RoleWithGroups

Authorization

apiToken

HTTP request headers

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

getRoles

List<Role> getRoles()

Get roles

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.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();
}

Parameters

This endpoint does not need any parameter.

Return type

List<Role>

Authorization

apiToken

HTTP request headers

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

updateRole

RoleWithGroups updateRole(body)

Update role

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.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();
}

Parameters

Name Type Description Notes
body RoleWithGroups

Return type

RoleWithGroups

Authorization

apiToken

HTTP request headers

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