Skip to content

Latest commit

 

History

History
692 lines (483 loc) · 19.6 KB

ApiKeysApi.md

File metadata and controls

692 lines (483 loc) · 19.6 KB

Id4iApi.ApiKeysApi

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

Method HTTP request Description
addApiKeyPrivilege POST /api/v1/apikeys/{key}/privileges Add privilege
addApiKeyPrivilegeForId4ns POST /api/v1/apikeys/{key}/privileges/{privilege}/id4ns Add ID4ns of a privilege
createNewApiKey POST /api/v1/apikeys Create API key
deleteApiKey DELETE /api/v1/apikeys/{key} Delete API key
getApiKey GET /api/v1/apikeys/{key} Show API key
listAllApiKeyPrivileges GET /api/v1/apikeys/privileges List all privileges
listAllApiKeysOfOrganization GET /api/v1/apikeys Find API key by organization
listApiKeyPrivileges GET /api/v1/apikeys/{key}/privileges List privileges
listId4ns GET /api/v1/apikeys/{key}/privileges/{privilege}/id4ns ID4ns of a privilege
removeApiKeyPrivilege DELETE /api/v1/apikeys/{key}/privileges Remove privilege
removeApiKeyPrivilegeForId4ns DELETE /api/v1/apikeys/{key}/privileges/{privilege}/id4ns Remove id4ns of a privilege
updateApiKey PUT /api/v1/apikeys/{key} Update API keys

addApiKeyPrivilege

addApiKeyPrivilege(key, addApiKeyPrivilegeRequest)

Add privilege

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

var key = "key_example"; // String | key

var addApiKeyPrivilegeRequest = new Id4iApi.AddApiKeyPrivilegeRequest(); // AddApiKeyPrivilegeRequest | addApiKeyPrivilegeRequest


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

Parameters

Name Type Description Notes
key String key
addApiKeyPrivilegeRequest AddApiKeyPrivilegeRequest addApiKeyPrivilegeRequest

Return type

null (empty response body)

Authorization

Authorization

HTTP request headers

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

addApiKeyPrivilegeForId4ns

addApiKeyPrivilegeForId4ns(key, privilege, id4ns)

Add ID4ns of a privilege

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

var key = "key_example"; // String | key

var privilege = "privilege_example"; // String | privilege

var id4ns = new Id4iApi.ListOfId4ns(); // ListOfId4ns | id4ns


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

Parameters

Name Type Description Notes
key String key
privilege String privilege
id4ns ListOfId4ns id4ns

Return type

null (empty response body)

Authorization

Authorization

HTTP request headers

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

createNewApiKey

ApiKeyPresentation createNewApiKey(creationRequest)

Create API key

Creation of a new API key.

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

var creationRequest = new Id4iApi.ApiKeyCreationRequest(); // ApiKeyCreationRequest | API key to be created.


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

Parameters

Name Type Description Notes
creationRequest ApiKeyCreationRequest API key to be created.

Return type

ApiKeyPresentation

Authorization

Authorization

HTTP request headers

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

deleteApiKey

deleteApiKey(key)

Delete API key

Deletion of an API key.

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

var key = "key_example"; // String | The API key to delete.


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

Parameters

Name Type Description Notes
key String The API key to delete.

Return type

null (empty response body)

Authorization

Authorization

HTTP request headers

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

getApiKey

ApiKeyPresentation getApiKey(key)

Show API key

Showing the details of an API key.

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

var key = "key_example"; // String | The API key to show.


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

Parameters

Name Type Description Notes
key String The API key to show.

Return type

ApiKeyPresentation

Authorization

Authorization

HTTP request headers

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

listAllApiKeyPrivileges

PaginatedResponseOfApiKeyPrivilegeInfo listAllApiKeyPrivileges(opts)

List all privileges

Listing all possible API key privileges.

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

var opts = { 
  'id4nConcerning': true, // Boolean | id4nConcerning
  '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.listAllApiKeyPrivileges(opts, callback);

Parameters

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

Return type

PaginatedResponseOfApiKeyPrivilegeInfo

Authorization

Authorization

HTTP request headers

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

listAllApiKeysOfOrganization

PaginatedResponseOfApiKeyPresentation listAllApiKeysOfOrganization(opts)

Find API key by organization

Finding all API key assigned to 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.ApiKeysApi();

var opts = { 
  'organizationId': "organizationId_example", // String | The namespace of the organization to search in.
  '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.listAllApiKeysOfOrganization(opts, callback);

Parameters

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

Return type

PaginatedResponseOfApiKeyPresentation

Authorization

Authorization

HTTP request headers

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

listApiKeyPrivileges

PaginatedResponseOfApiKeyPrivilege listApiKeyPrivileges(key, opts)

List privileges

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

var key = "key_example"; // String | key

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.listApiKeyPrivileges(key, opts, callback);

Parameters

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

Return type

PaginatedResponseOfApiKeyPrivilege

Authorization

Authorization

HTTP request headers

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

listId4ns

PaginatedResponseOfId4nPresentation listId4ns(key, privilege, opts)

ID4ns of a privilege

Listing ID4ns of a id4n concerning privilege

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

var key = "key_example"; // String | key

var privilege = "privilege_example"; // String | privilege

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.listId4ns(key, privilege, opts, callback);

Parameters

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

Return type

PaginatedResponseOfId4nPresentation

Authorization

Authorization

HTTP request headers

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

removeApiKeyPrivilege

removeApiKeyPrivilege(key, removeApiKeyPrivilegeRequest)

Remove privilege

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

var key = "key_example"; // String | key

var removeApiKeyPrivilegeRequest = new Id4iApi.RemoveApiKeyPrivilegeRequest(); // RemoveApiKeyPrivilegeRequest | removeApiKeyPrivilegeRequest


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

Parameters

Name Type Description Notes
key String key
removeApiKeyPrivilegeRequest RemoveApiKeyPrivilegeRequest removeApiKeyPrivilegeRequest

Return type

null (empty response body)

Authorization

Authorization

HTTP request headers

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

removeApiKeyPrivilegeForId4ns

removeApiKeyPrivilegeForId4ns(key, privilege, id4ns)

Remove id4ns of a privilege

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

var key = "key_example"; // String | key

var privilege = "privilege_example"; // String | privilege

var id4ns = new Id4iApi.ListOfId4ns(); // ListOfId4ns | id4ns


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

Parameters

Name Type Description Notes
key String key
privilege String privilege
id4ns ListOfId4ns id4ns

Return type

null (empty response body)

Authorization

Authorization

HTTP request headers

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

updateApiKey

updateApiKey(key, apiKeyChange)

Update API keys

API keys can be updated with new labels, and be activated and deactivated. The secret or UUID cannot be changed.

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

var key = "key_example"; // String | The API key to be updated.

var apiKeyChange = new Id4iApi.ApiKeyChangeRequest(); // ApiKeyChangeRequest | The new values to apply.


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

Parameters

Name Type Description Notes
key String The API key to be updated.
apiKeyChange ApiKeyChangeRequest The new values to apply.

Return type

null (empty response body)

Authorization

Authorization

HTTP request headers

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