CollaboratorApi

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

Method HTTP request Description
addCollaborator POST /collaborators Add collaborator
deleteCollaborator DELETE /collaborators/{userId} Delete collaborator
getCollaborator GET /collaborators/{userId} Get collaborator
getCollaborators GET /collaborators Get collaborators
updateCollaborator PUT /collaborators Update collaborator

addCollaborator

addCollaborator(body)

Add collaborator

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

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");

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

Parameters

Name Type Description Notes
body CollaboratorAddition

Return type

null (empty response body)

Authorization

apiToken

HTTP request headers

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

deleteCollaborator

deleteCollaborator(userId)

Delete collaborator

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

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");

CollaboratorApi apiInstance = new CollaboratorApi();
Integer userId = 56; // Integer | User ID
try {
    apiInstance.deleteCollaborator(userId);
} catch (ApiException e) {
    System.err.println("Exception when calling CollaboratorApi#deleteCollaborator");
    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

getCollaborator

UserAccountRolesResults getCollaborator(userId)

Get collaborator

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

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");

CollaboratorApi apiInstance = new CollaboratorApi();
Integer userId = 56; // Integer | User ID
try {
    UserAccountRolesResults result = apiInstance.getCollaborator(userId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling CollaboratorApi#getCollaborator");
    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

getCollaborators

List<UserAccount> getCollaborators()

Get collaborators

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

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");

CollaboratorApi apiInstance = new CollaboratorApi();
try {
    List<UserAccount> result = apiInstance.getCollaborators();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling CollaboratorApi#getCollaborators");
    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

updateCollaborator

updateCollaborator(body)

Update collaborator

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

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");

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

Parameters

Name Type Description Notes
body CollaboratorUpdate

Return type

null (empty response body)

Authorization

apiToken

HTTP request headers

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