Skip to content

Latest commit

 

History

History
867 lines (600 loc) · 24.7 KB

File metadata and controls

867 lines (600 loc) · 24.7 KB

Id4iApi.AccountsApi

All URIs are relative to https://backend.id4i.de

Method HTTP request Description
addUserRoles POST /api/v1/organizations/{organizationId}/users/{username}/roles Add role(s) to user
completeRegistration PUT /account/registration Complete registration
findUserByUsername GET /api/v1/users/{username} Find by username
findUsers GET /api/v1/users Find users
getAllOrganizationRoles GET /api/v1/organizations/{organizationId}/roles List users and their roles
getOrganizationsOfUser GET /api/v1/user/organizations Retrieve organizations of user
getUserRoles GET /api/v1/organizations/{organizationId}/users/{username}/roles Get user roles by username
getUsersOfOrganization GET /api/v1/organizations/{organizationId}/users Find users in organization
inviteUsers POST /api/v1/organizations/{organizationId}/users/invite Invite Users
listAllRoles GET /api/v1/roles List roles
login POST /login
registerUser POST /account/registration Register user
removeUserRoles DELETE /api/v1/organizations/{organizationId}/users/{username}/roles Remove role(s) from user
requestPasswordReset POST /account/password Request password reset
verifyPasswordReset PUT /account/password Verify password reset
verifyUserRegistration POST /account/verification Verify registration

addUserRoles

addUserRoles(organizationId, username, changeRoleRequest)

Add role(s) to user

Example

var Id4iApi = require('id4i_api');
var defaultClient = Id4iApi.ApiClient.instance;

// Configure API key authorization: Authorization
var Authorization = defaultClient.authentications['Authorization'];
Authorization.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Authorization.apiKeyPrefix = 'Token';

var apiInstance = new Id4iApi.AccountsApi();

var organizationId = "organizationId_example"; // String | The namespace of the organization

var username = "username_example"; // String | username

var changeRoleRequest = new Id4iApi.ChangeRoleRequest(); // ChangeRoleRequest | changeRoleRequest


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.addUserRoles(organizationId, username, changeRoleRequest, callback);

Parameters

Name Type Description Notes
organizationId String The namespace of the organization
username String username
changeRoleRequest ChangeRoleRequest changeRoleRequest

Return type

null (empty response body)

Authorization

Authorization

HTTP request headers

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

completeRegistration

completeRegistration(completeRegistration)

Complete registration

Completing a registration e.g. for invited users. Finish registration with a username and a password.

Example

var Id4iApi = require('id4i_api');

var apiInstance = new Id4iApi.AccountsApi();

var completeRegistration = new Id4iApi.CompleteUserRegistrationRequest(); // CompleteUserRegistrationRequest | Contains the verification token, the username and the initial password.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.completeRegistration(completeRegistration, callback);

Parameters

Name Type Description Notes
completeRegistration CompleteUserRegistrationRequest Contains the verification token, the username and the initial password.

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

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

findUserByUsername

UserPresentation findUserByUsername(username)

Find by username

Example

var Id4iApi = require('id4i_api');
var defaultClient = Id4iApi.ApiClient.instance;

// Configure API key authorization: Authorization
var Authorization = defaultClient.authentications['Authorization'];
Authorization.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Authorization.apiKeyPrefix = 'Token';

var apiInstance = new Id4iApi.AccountsApi();

var username = "username_example"; // String | username


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.findUserByUsername(username, callback);

Parameters

Name Type Description Notes
username String username

Return type

UserPresentation

Authorization

Authorization

HTTP request headers

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

findUsers

PaginatedResponseOfUserPresentation findUsers(opts)

Find users

Example

var Id4iApi = require('id4i_api');
var defaultClient = Id4iApi.ApiClient.instance;

// Configure API key authorization: Authorization
var Authorization = defaultClient.authentications['Authorization'];
Authorization.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Authorization.apiKeyPrefix = 'Token';

var apiInstance = new Id4iApi.AccountsApi();

var opts = { 
  'usernamePrefix': "usernamePrefix_example", // String | 
  'offset': 56, // Number | Start with the n-th element
  'limit': 56 // Number | The maximum count of returned elements
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.findUsers(opts, callback);

Parameters

Name Type Description Notes
usernamePrefix String [optional]
offset Number Start with the n-th element [optional]
limit Number The maximum count of returned elements [optional]

Return type

PaginatedResponseOfUserPresentation

Authorization

Authorization

HTTP request headers

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

getAllOrganizationRoles

PaginatedResponseOfUserRoles getAllOrganizationRoles(organizationId, opts)

List users and their roles

Listing users and their roles in a paginated manner.

Example

var Id4iApi = require('id4i_api');
var defaultClient = Id4iApi.ApiClient.instance;

// Configure API key authorization: Authorization
var Authorization = defaultClient.authentications['Authorization'];
Authorization.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Authorization.apiKeyPrefix = 'Token';

var apiInstance = new Id4iApi.AccountsApi();

var organizationId = "organizationId_example"; // String | organizationId

var opts = { 
  'offset': 56, // Number | Start with the n-th element
  'limit': 56 // Number | The maximum count of returned elements
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getAllOrganizationRoles(organizationId, opts, callback);

Parameters

Name Type Description Notes
organizationId String organizationId
offset Number Start with the n-th element [optional]
limit Number The maximum count of returned elements [optional]

Return type

PaginatedResponseOfUserRoles

Authorization

Authorization

HTTP request headers

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

getOrganizationsOfUser

PaginatedResponseOfOrganization getOrganizationsOfUser(opts)

Retrieve organizations of user

Example

var Id4iApi = require('id4i_api');
var defaultClient = Id4iApi.ApiClient.instance;

// Configure API key authorization: Authorization
var Authorization = defaultClient.authentications['Authorization'];
Authorization.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Authorization.apiKeyPrefix = 'Token';

var apiInstance = new Id4iApi.AccountsApi();

var opts = { 
  'role': "role_example", // String | role
  'offset': 56, // Number | Start with the n-th element
  'limit': 56 // Number | The maximum count of returned elements
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getOrganizationsOfUser(opts, callback);

Parameters

Name Type Description Notes
role String role [optional]
offset Number Start with the n-th element [optional]
limit Number The maximum count of returned elements [optional]

Return type

PaginatedResponseOfOrganization

Authorization

Authorization

HTTP request headers

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

getUserRoles

PaginatedResponseOfstring getUserRoles(organizationId, username, opts)

Get user roles by username

Example

var Id4iApi = require('id4i_api');
var defaultClient = Id4iApi.ApiClient.instance;

// Configure API key authorization: Authorization
var Authorization = defaultClient.authentications['Authorization'];
Authorization.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Authorization.apiKeyPrefix = 'Token';

var apiInstance = new Id4iApi.AccountsApi();

var organizationId = "organizationId_example"; // String | The namespace of the organization

var username = "username_example"; // String | username

var opts = { 
  'offset': 56, // Number | Start with the n-th element
  'limit': 56 // Number | The maximum count of returned elements
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getUserRoles(organizationId, username, opts, callback);

Parameters

Name Type Description Notes
organizationId String The namespace of the organization
username String username
offset Number Start with the n-th element [optional]
limit Number The maximum count of returned elements [optional]

Return type

PaginatedResponseOfstring

Authorization

Authorization

HTTP request headers

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

getUsersOfOrganization

PaginatedResponseOfUserPresentation getUsersOfOrganization(organizationId, opts)

Find users in organization

Finding users in the specified organization in a paginated manner.

Example

var Id4iApi = require('id4i_api');
var defaultClient = Id4iApi.ApiClient.instance;

// Configure API key authorization: Authorization
var Authorization = defaultClient.authentications['Authorization'];
Authorization.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Authorization.apiKeyPrefix = 'Token';

var apiInstance = new Id4iApi.AccountsApi();

var organizationId = "organizationId_example"; // String | organizationId

var opts = { 
  'offset': 56, // Number | Start with the n-th element
  'limit': 56 // Number | The maximum count of returned elements
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getUsersOfOrganization(organizationId, opts, callback);

Parameters

Name Type Description Notes
organizationId String organizationId
offset Number Start with the n-th element [optional]
limit Number The maximum count of returned elements [optional]

Return type

PaginatedResponseOfUserPresentation

Authorization

Authorization

HTTP request headers

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

inviteUsers

inviteUsers(organizationId, invitationList)

Invite Users

Example

var Id4iApi = require('id4i_api');
var defaultClient = Id4iApi.ApiClient.instance;

// Configure API key authorization: Authorization
var Authorization = defaultClient.authentications['Authorization'];
Authorization.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Authorization.apiKeyPrefix = 'Token';

var apiInstance = new Id4iApi.AccountsApi();

var organizationId = "organizationId_example"; // String | The namespace of the organization where users should be invited

var invitationList = new Id4iApi.OrganizationUserInvitationListRequest(); // OrganizationUserInvitationListRequest | invitationList


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.inviteUsers(organizationId, invitationList, callback);

Parameters

Name Type Description Notes
organizationId String The namespace of the organization where users should be invited
invitationList OrganizationUserInvitationListRequest invitationList

Return type

null (empty response body)

Authorization

Authorization

HTTP request headers

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

listAllRoles

PaginatedResponseOfRole listAllRoles(opts)

List roles

Listing of roles.

Example

var Id4iApi = require('id4i_api');
var defaultClient = Id4iApi.ApiClient.instance;

// Configure API key authorization: Authorization
var Authorization = defaultClient.authentications['Authorization'];
Authorization.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Authorization.apiKeyPrefix = 'Token';

var apiInstance = new Id4iApi.AccountsApi();

var opts = { 
  'privilege': "privilege_example", // String | If specified the roles will be filtered containing that privilege.
  'offset': 56, // Number | Start with the n-th element
  'limit': 56 // Number | The maximum count of returned elements
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.listAllRoles(opts, callback);

Parameters

Name Type Description Notes
privilege String If specified the roles will be filtered containing that privilege. [optional]
offset Number Start with the n-th element [optional]
limit Number The maximum count of returned elements [optional]

Return type

PaginatedResponseOfRole

Authorization

Authorization

HTTP request headers

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

login

login(accountCredentials)

ID4i API Login

Example

var Id4iApi = require('id4i_api');

var apiInstance = new Id4iApi.AccountsApi();

var accountCredentials = new Id4iApi.AccountCredentials(); // AccountCredentials | 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.login(accountCredentials, callback);

Parameters

Name Type Description Notes
accountCredentials AccountCredentials

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

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

registerUser

UserRegistrationResponse registerUser(userRegistration)

Register user

Registering a new user.

Example

var Id4iApi = require('id4i_api');

var apiInstance = new Id4iApi.AccountsApi();

var userRegistration = new Id4iApi.UserRegistrationRequest(); // UserRegistrationRequest | The user information about the new created user.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.registerUser(userRegistration, callback);

Parameters

Name Type Description Notes
userRegistration UserRegistrationRequest The user information about the new created user.

Return type

UserRegistrationResponse

Authorization

No authorization required

HTTP request headers

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

removeUserRoles

removeUserRoles(organizationId, username, changeRoleRequest)

Remove role(s) from user

Example

var Id4iApi = require('id4i_api');
var defaultClient = Id4iApi.ApiClient.instance;

// Configure API key authorization: Authorization
var Authorization = defaultClient.authentications['Authorization'];
Authorization.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Authorization.apiKeyPrefix = 'Token';

var apiInstance = new Id4iApi.AccountsApi();

var organizationId = "organizationId_example"; // String | The namespace of the organization

var username = "username_example"; // String | username

var changeRoleRequest = new Id4iApi.ChangeRoleRequest(); // ChangeRoleRequest | changeRoleRequest


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.removeUserRoles(organizationId, username, changeRoleRequest, callback);

Parameters

Name Type Description Notes
organizationId String The namespace of the organization
username String username
changeRoleRequest ChangeRoleRequest changeRoleRequest

Return type

null (empty response body)

Authorization

Authorization

HTTP request headers

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

requestPasswordReset

SimpleMessageResponse requestPasswordReset(resetRequest)

Request password reset

Requesting a reset for a new password.

Example

var Id4iApi = require('id4i_api');

var apiInstance = new Id4iApi.AccountsApi();

var resetRequest = new Id4iApi.PasswordResetRequest(); // PasswordResetRequest | Contains the required information to request a new password.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.requestPasswordReset(resetRequest, callback);

Parameters

Name Type Description Notes
resetRequest PasswordResetRequest Contains the required information to request a new password.

Return type

SimpleMessageResponse

Authorization

No authorization required

HTTP request headers

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

verifyPasswordReset

SimpleMessageResponse verifyPasswordReset(verificationRequest)

Verify password reset

Setting a new password and verifying the request to set the password.

Example

var Id4iApi = require('id4i_api');

var apiInstance = new Id4iApi.AccountsApi();

var verificationRequest = new Id4iApi.PasswordResetVerificationRequest(); // PasswordResetVerificationRequest | Contains the new password and the verification token to set the new password.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.verifyPasswordReset(verificationRequest, callback);

Parameters

Name Type Description Notes
verificationRequest PasswordResetVerificationRequest Contains the new password and the verification token to set the new password.

Return type

SimpleMessageResponse

Authorization

No authorization required

HTTP request headers

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

verifyUserRegistration

verifyUserRegistration(token)

Verify registration

Verifies a new user registration.

Example

var Id4iApi = require('id4i_api');

var apiInstance = new Id4iApi.AccountsApi();

var token = new Id4iApi.RegistrationVerificationTokenPresentation(); // RegistrationVerificationTokenPresentation | The token for user verification.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.verifyUserRegistration(token, callback);

Parameters

Name Type Description Notes
token RegistrationVerificationTokenPresentation The token for user verification.

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

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