Aptem Public API

Admins

activateAdmin

Reactivate admin


/tenants/{tenant}/admins/{userId}/activate

Usage and SDK Samples

curl -X POST \
-H "X-API-Token: [[apiKey]]" \
 "https://{tenant}.aptem.co.uk/api/1.0/tenants/{tenant}/admins/{userId}/activate"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AdminsApi;

import java.io.File;
import java.util.*;

public class AdminsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        // Create an instance of the API class
        AdminsApi apiInstance = new AdminsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | User Id of the admin to activate

        try {
            apiInstance.activateAdmin(tenant, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminsApi#activateAdmin");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final Integer userId = new Integer(); // Integer | User Id of the admin to activate

try {
    final result = await api_instance.activateAdmin(tenant, userId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->activateAdmin: $e\n');
}

import org.openapitools.client.api.AdminsApi;

public class AdminsApiExample {
    public static void main(String[] args) {
        AdminsApi apiInstance = new AdminsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | User Id of the admin to activate

        try {
            apiInstance.activateAdmin(tenant, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminsApi#activateAdmin");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Token"];


// Create an instance of the API class
AdminsApi *apiInstance = [[AdminsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // User Id of the admin to activate (default to null)

// Reactivate admin
[apiInstance activateAdminWith:tenant
    userId:userId
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AptemPublicApi = require('aptem_public_api');
var defaultClient = AptemPublicApi.ApiClient.instance;

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

// Create an instance of the API class
var api = new AptemPublicApi.AdminsApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} User Id of the admin to activate

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.activateAdmin(tenant, userId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class activateAdminExample
    {
        public void main()
        {
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("X-API-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new AdminsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | User Id of the admin to activate (default to null)

            try {
                // Reactivate admin
                apiInstance.activateAdmin(tenant, userId);
            } catch (Exception e) {
                Debug.Print("Exception when calling AdminsApi.activateAdmin: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AdminsApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | User Id of the admin to activate

try {
    $api_instance->activateAdmin($tenant, $userId);
} catch (Exception $e) {
    echo 'Exception when calling AdminsApi->activateAdmin: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AdminsApi;

# Configure API key authorization: api_key
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AdminsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | User Id of the admin to activate

eval {
    $api_instance->activateAdmin(tenant => $tenant, userId => $userId);
};
if ($@) {
    warn "Exception when calling AdminsApi->activateAdmin: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
openapi_client.configuration.api_key['X-API-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.AdminsApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | User Id of the admin to activate (default to null)

try:
    # Reactivate admin
    api_instance.activate_admin(tenant, userId)
except ApiException as e:
    print("Exception when calling AdminsApi->activateAdmin: %s\n" % e)
extern crate AdminsApi;

pub fn main() {
    let tenant = tenant_example; // String
    let userId = 56; // Integer

    let mut context = AdminsApi::Context::default();
    let result = client.activateAdmin(tenant, userId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
User Id of the admin to activate
Required

Responses


addAdmin

Add a new admin to Aptem


/tenants/{tenant}/admins

Usage and SDK Samples

curl -X POST \
-H "X-API-Token: [[apiKey]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://{tenant}.aptem.co.uk/api/1.0/tenants/{tenant}/admins" \
 -d '{
  "lastName" : "Smith",
  "gender" : "Unknown",
  "roles" : [ "roles", "roles" ],
  "mobile" : "mobile",
  "groups" : [ 0, 0 ],
  "userName" : "JohnSmith",
  "samlUserId" : "samlUserId",
  "firstName" : "John",
  "idP" : "idP",
  "referenceNumber" : "referenceNumber",
  "usePWA" : true,
  "authenticationType" : "authenticationType",
  "authType" : "Aptem",
  "email" : "johnsmith@domain.com"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AdminsApi;

import java.io.File;
import java.util.*;

public class AdminsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        // Create an instance of the API class
        AdminsApi apiInstance = new AdminsApi();
        String tenant = tenant_example; // String | The tenant name
        RequestAdmin requestAdmin = ; // RequestAdmin | 

        try {
            Admin result = apiInstance.addAdmin(tenant, requestAdmin);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminsApi#addAdmin");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final RequestAdmin requestAdmin = new RequestAdmin(); // RequestAdmin | 

try {
    final result = await api_instance.addAdmin(tenant, requestAdmin);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->addAdmin: $e\n');
}

import org.openapitools.client.api.AdminsApi;

public class AdminsApiExample {
    public static void main(String[] args) {
        AdminsApi apiInstance = new AdminsApi();
        String tenant = tenant_example; // String | The tenant name
        RequestAdmin requestAdmin = ; // RequestAdmin | 

        try {
            Admin result = apiInstance.addAdmin(tenant, requestAdmin);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminsApi#addAdmin");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Token"];


// Create an instance of the API class
AdminsApi *apiInstance = [[AdminsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
RequestAdmin *requestAdmin = ; // 

// Add a new admin to Aptem
[apiInstance addAdminWith:tenant
    requestAdmin:requestAdmin
              completionHandler: ^(Admin output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AptemPublicApi = require('aptem_public_api');
var defaultClient = AptemPublicApi.ApiClient.instance;

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

// Create an instance of the API class
var api = new AptemPublicApi.AdminsApi()
var tenant = tenant_example; // {String} The tenant name
var requestAdmin = ; // {RequestAdmin} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addAdmin(tenant, requestAdmin, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class addAdminExample
    {
        public void main()
        {
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("X-API-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new AdminsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var requestAdmin = new RequestAdmin(); // RequestAdmin | 

            try {
                // Add a new admin to Aptem
                Admin result = apiInstance.addAdmin(tenant, requestAdmin);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AdminsApi.addAdmin: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AdminsApi();
$tenant = tenant_example; // String | The tenant name
$requestAdmin = ; // RequestAdmin | 

try {
    $result = $api_instance->addAdmin($tenant, $requestAdmin);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AdminsApi->addAdmin: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AdminsApi;

# Configure API key authorization: api_key
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AdminsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $requestAdmin = WWW::OPenAPIClient::Object::RequestAdmin->new(); # RequestAdmin | 

eval {
    my $result = $api_instance->addAdmin(tenant => $tenant, requestAdmin => $requestAdmin);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AdminsApi->addAdmin: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
openapi_client.configuration.api_key['X-API-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.AdminsApi()
tenant = tenant_example # String | The tenant name (default to null)
requestAdmin =  # RequestAdmin | 

try:
    # Add a new admin to Aptem
    api_response = api_instance.add_admin(tenant, requestAdmin)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AdminsApi->addAdmin: %s\n" % e)
extern crate AdminsApi;

pub fn main() {
    let tenant = tenant_example; // String
    let requestAdmin = ; // RequestAdmin

    let mut context = AdminsApi::Context::default();
    let result = client.addAdmin(tenant, requestAdmin, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
Body parameters
Name Description
requestAdmin *

Admin object that needs to be added to Aptem

Responses


deactivateAdmin

Deactivate an admin


/tenants/{tenant}/admins/{userId}

Usage and SDK Samples

curl -X DELETE \
-H "X-API-Token: [[apiKey]]" \
 "https://{tenant}.aptem.co.uk/api/1.0/tenants/{tenant}/admins/{userId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AdminsApi;

import java.io.File;
import java.util.*;

public class AdminsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        // Create an instance of the API class
        AdminsApi apiInstance = new AdminsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | User Id of the admin to deactivate

        try {
            apiInstance.deactivateAdmin(tenant, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminsApi#deactivateAdmin");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final Integer userId = new Integer(); // Integer | User Id of the admin to deactivate

try {
    final result = await api_instance.deactivateAdmin(tenant, userId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->deactivateAdmin: $e\n');
}

import org.openapitools.client.api.AdminsApi;

public class AdminsApiExample {
    public static void main(String[] args) {
        AdminsApi apiInstance = new AdminsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | User Id of the admin to deactivate

        try {
            apiInstance.deactivateAdmin(tenant, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminsApi#deactivateAdmin");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Token"];


// Create an instance of the API class
AdminsApi *apiInstance = [[AdminsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // User Id of the admin to deactivate (default to null)

// Deactivate an admin
[apiInstance deactivateAdminWith:tenant
    userId:userId
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AptemPublicApi = require('aptem_public_api');
var defaultClient = AptemPublicApi.ApiClient.instance;

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

// Create an instance of the API class
var api = new AptemPublicApi.AdminsApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} User Id of the admin to deactivate

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deactivateAdmin(tenant, userId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deactivateAdminExample
    {
        public void main()
        {
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("X-API-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new AdminsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | User Id of the admin to deactivate (default to null)

            try {
                // Deactivate an admin
                apiInstance.deactivateAdmin(tenant, userId);
            } catch (Exception e) {
                Debug.Print("Exception when calling AdminsApi.deactivateAdmin: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AdminsApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | User Id of the admin to deactivate

try {
    $api_instance->deactivateAdmin($tenant, $userId);
} catch (Exception $e) {
    echo 'Exception when calling AdminsApi->deactivateAdmin: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AdminsApi;

# Configure API key authorization: api_key
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AdminsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | User Id of the admin to deactivate

eval {
    $api_instance->deactivateAdmin(tenant => $tenant, userId => $userId);
};
if ($@) {
    warn "Exception when calling AdminsApi->deactivateAdmin: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
openapi_client.configuration.api_key['X-API-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.AdminsApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | User Id of the admin to deactivate (default to null)

try:
    # Deactivate an admin
    api_instance.deactivate_admin(tenant, userId)
except ApiException as e:
    print("Exception when calling AdminsApi->deactivateAdmin: %s\n" % e)
extern crate AdminsApi;

pub fn main() {
    let tenant = tenant_example; // String
    let userId = 56; // Integer

    let mut context = AdminsApi::Context::default();
    let result = client.deactivateAdmin(tenant, userId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
User Id of the admin to deactivate
Required

Responses


getAdminRoles

Get admin roles

Returns admin roles


/tenants/{tenant}/admins/roles

Usage and SDK Samples

curl -X GET \
-H "X-API-Token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://{tenant}.aptem.co.uk/api/1.0/tenants/{tenant}/admins/roles"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AdminsApi;

import java.io.File;
import java.util.*;

public class AdminsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        // Create an instance of the API class
        AdminsApi apiInstance = new AdminsApi();
        String tenant = tenant_example; // String | The tenant name

        try {
            array['String'] result = apiInstance.getAdminRoles(tenant);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminsApi#getAdminRoles");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name

try {
    final result = await api_instance.getAdminRoles(tenant);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getAdminRoles: $e\n');
}

import org.openapitools.client.api.AdminsApi;

public class AdminsApiExample {
    public static void main(String[] args) {
        AdminsApi apiInstance = new AdminsApi();
        String tenant = tenant_example; // String | The tenant name

        try {
            array['String'] result = apiInstance.getAdminRoles(tenant);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminsApi#getAdminRoles");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Token"];


// Create an instance of the API class
AdminsApi *apiInstance = [[AdminsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)

// Get admin roles
[apiInstance getAdminRolesWith:tenant
              completionHandler: ^(array['String'] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AptemPublicApi = require('aptem_public_api');
var defaultClient = AptemPublicApi.ApiClient.instance;

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

// Create an instance of the API class
var api = new AptemPublicApi.AdminsApi()
var tenant = tenant_example; // {String} The tenant name

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAdminRoles(tenant, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getAdminRolesExample
    {
        public void main()
        {
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("X-API-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new AdminsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)

            try {
                // Get admin roles
                array['String'] result = apiInstance.getAdminRoles(tenant);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AdminsApi.getAdminRoles: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AdminsApi();
$tenant = tenant_example; // String | The tenant name

try {
    $result = $api_instance->getAdminRoles($tenant);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AdminsApi->getAdminRoles: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AdminsApi;

# Configure API key authorization: api_key
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AdminsApi->new();
my $tenant = tenant_example; # String | The tenant name

eval {
    my $result = $api_instance->getAdminRoles(tenant => $tenant);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AdminsApi->getAdminRoles: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
openapi_client.configuration.api_key['X-API-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.AdminsApi()
tenant = tenant_example # String | The tenant name (default to null)

try:
    # Get admin roles
    api_response = api_instance.get_admin_roles(tenant)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AdminsApi->getAdminRoles: %s\n" % e)
extern crate AdminsApi;

pub fn main() {
    let tenant = tenant_example; // String

    let mut context = AdminsApi::Context::default();
    let result = client.getAdminRoles(tenant, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required

Responses


searchAdmins

Get user by reference number and/or email and/or user id

Returns an admin by reference number and/or email and/or user id. Any one of the parameters is required. In case of matching reference numbers, the request by reference number returns only one user.


/tenants/{tenant}/admins/search

Usage and SDK Samples

curl -X GET \
-H "X-API-Token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://{tenant}.aptem.co.uk/api/1.0/tenants/{tenant}/admins/search?userId=56&referenceNumber=referenceNumber_example&email=email_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AdminsApi;

import java.io.File;
import java.util.*;

public class AdminsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        // Create an instance of the API class
        AdminsApi apiInstance = new AdminsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | user id to return
        String referenceNumber = referenceNumber_example; // String | referenceNumber to return
        String email = email_example; // String | email to return. Value must be encoded.

        try {
            User result = apiInstance.searchAdmins(tenant, userId, referenceNumber, email);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminsApi#searchAdmins");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final Integer userId = new Integer(); // Integer | user id to return
final String referenceNumber = new String(); // String | referenceNumber to return
final String email = new String(); // String | email to return. Value must be encoded.

try {
    final result = await api_instance.searchAdmins(tenant, userId, referenceNumber, email);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->searchAdmins: $e\n');
}

import org.openapitools.client.api.AdminsApi;

public class AdminsApiExample {
    public static void main(String[] args) {
        AdminsApi apiInstance = new AdminsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | user id to return
        String referenceNumber = referenceNumber_example; // String | referenceNumber to return
        String email = email_example; // String | email to return. Value must be encoded.

        try {
            User result = apiInstance.searchAdmins(tenant, userId, referenceNumber, email);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminsApi#searchAdmins");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Token"];


// Create an instance of the API class
AdminsApi *apiInstance = [[AdminsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // user id to return (optional) (default to null)
String *referenceNumber = referenceNumber_example; // referenceNumber to return (optional) (default to null)
String *email = email_example; // email to return. Value must be encoded. (optional) (default to null)

// Get user by reference number and/or email and/or user id
[apiInstance searchAdminsWith:tenant
    userId:userId
    referenceNumber:referenceNumber
    email:email
              completionHandler: ^(User output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AptemPublicApi = require('aptem_public_api');
var defaultClient = AptemPublicApi.ApiClient.instance;

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

// Create an instance of the API class
var api = new AptemPublicApi.AdminsApi()
var tenant = tenant_example; // {String} The tenant name
var opts = {
  'userId': 56, // {Integer} user id to return
  'referenceNumber': referenceNumber_example, // {String} referenceNumber to return
  'email': email_example // {String} email to return. Value must be encoded.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.searchAdmins(tenant, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class searchAdminsExample
    {
        public void main()
        {
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("X-API-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new AdminsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | user id to return (optional)  (default to null)
            var referenceNumber = referenceNumber_example;  // String | referenceNumber to return (optional)  (default to null)
            var email = email_example;  // String | email to return. Value must be encoded. (optional)  (default to null)

            try {
                // Get user by reference number and/or email and/or user id
                User result = apiInstance.searchAdmins(tenant, userId, referenceNumber, email);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AdminsApi.searchAdmins: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AdminsApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | user id to return
$referenceNumber = referenceNumber_example; // String | referenceNumber to return
$email = email_example; // String | email to return. Value must be encoded.

try {
    $result = $api_instance->searchAdmins($tenant, $userId, $referenceNumber, $email);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AdminsApi->searchAdmins: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AdminsApi;

# Configure API key authorization: api_key
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AdminsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | user id to return
my $referenceNumber = referenceNumber_example; # String | referenceNumber to return
my $email = email_example; # String | email to return. Value must be encoded.

eval {
    my $result = $api_instance->searchAdmins(tenant => $tenant, userId => $userId, referenceNumber => $referenceNumber, email => $email);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AdminsApi->searchAdmins: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
openapi_client.configuration.api_key['X-API-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.AdminsApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | user id to return (optional) (default to null)
referenceNumber = referenceNumber_example # String | referenceNumber to return (optional) (default to null)
email = email_example # String | email to return. Value must be encoded. (optional) (default to null)

try:
    # Get user by reference number and/or email and/or user id
    api_response = api_instance.search_admins(tenant, userId=userId, referenceNumber=referenceNumber, email=email)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AdminsApi->searchAdmins: %s\n" % e)
extern crate AdminsApi;

pub fn main() {
    let tenant = tenant_example; // String
    let userId = 56; // Integer
    let referenceNumber = referenceNumber_example; // String
    let email = email_example; // String

    let mut context = AdminsApi::Context::default();
    let result = client.searchAdmins(tenant, userId, referenceNumber, email, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
Query parameters
Name Description
userId
Integer
user id to return
referenceNumber
String
referenceNumber to return
email
String
email to return. Value must be encoded.

Responses


updateAdmin

Update an admin in Aptem


/tenants/{tenant}/admins/{userId}

Usage and SDK Samples

curl -X PUT \
-H "X-API-Token: [[apiKey]]" \
 -H "Content-Type: application/json" \
 "https://{tenant}.aptem.co.uk/api/1.0/tenants/{tenant}/admins/{userId}" \
 -d '{
  "lastName" : "Smith",
  "gender" : "Unknown",
  "roles" : [ "roles", "roles" ],
  "mobile" : "mobile",
  "groups" : [ 0, 0 ],
  "userName" : "JohnSmith",
  "samlUserId" : "samlUserId",
  "firstName" : "John",
  "idP" : "idP",
  "referenceNumber" : "referenceNumber",
  "usePWA" : true,
  "authenticationType" : "authenticationType",
  "authType" : "Aptem",
  "email" : "johnsmith@domain.com"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AdminsApi;

import java.io.File;
import java.util.*;

public class AdminsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        // Create an instance of the API class
        AdminsApi apiInstance = new AdminsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | User Id of the admin to be updated
        RequestAdmin requestAdmin = ; // RequestAdmin | 

        try {
            apiInstance.updateAdmin(tenant, userId, requestAdmin);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminsApi#updateAdmin");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final Integer userId = new Integer(); // Integer | User Id of the admin to be updated
final RequestAdmin requestAdmin = new RequestAdmin(); // RequestAdmin | 

try {
    final result = await api_instance.updateAdmin(tenant, userId, requestAdmin);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->updateAdmin: $e\n');
}

import org.openapitools.client.api.AdminsApi;

public class AdminsApiExample {
    public static void main(String[] args) {
        AdminsApi apiInstance = new AdminsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | User Id of the admin to be updated
        RequestAdmin requestAdmin = ; // RequestAdmin | 

        try {
            apiInstance.updateAdmin(tenant, userId, requestAdmin);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminsApi#updateAdmin");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Token"];


// Create an instance of the API class
AdminsApi *apiInstance = [[AdminsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // User Id of the admin to be updated (default to null)
RequestAdmin *requestAdmin = ; // 

// Update an admin in Aptem
[apiInstance updateAdminWith:tenant
    userId:userId
    requestAdmin:requestAdmin
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AptemPublicApi = require('aptem_public_api');
var defaultClient = AptemPublicApi.ApiClient.instance;

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

// Create an instance of the API class
var api = new AptemPublicApi.AdminsApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} User Id of the admin to be updated
var requestAdmin = ; // {RequestAdmin} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateAdmin(tenant, userId, requestAdmin, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class updateAdminExample
    {
        public void main()
        {
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("X-API-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new AdminsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | User Id of the admin to be updated (default to null)
            var requestAdmin = new RequestAdmin(); // RequestAdmin | 

            try {
                // Update an admin in Aptem
                apiInstance.updateAdmin(tenant, userId, requestAdmin);
            } catch (Exception e) {
                Debug.Print("Exception when calling AdminsApi.updateAdmin: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AdminsApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | User Id of the admin to be updated
$requestAdmin = ; // RequestAdmin | 

try {
    $api_instance->updateAdmin($tenant, $userId, $requestAdmin);
} catch (Exception $e) {
    echo 'Exception when calling AdminsApi->updateAdmin: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AdminsApi;

# Configure API key authorization: api_key
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AdminsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | User Id of the admin to be updated
my $requestAdmin = WWW::OPenAPIClient::Object::RequestAdmin->new(); # RequestAdmin | 

eval {
    $api_instance->updateAdmin(tenant => $tenant, userId => $userId, requestAdmin => $requestAdmin);
};
if ($@) {
    warn "Exception when calling AdminsApi->updateAdmin: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
openapi_client.configuration.api_key['X-API-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.AdminsApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | User Id of the admin to be updated (default to null)
requestAdmin =  # RequestAdmin | 

try:
    # Update an admin in Aptem
    api_instance.update_admin(tenant, userId, requestAdmin)
except ApiException as e:
    print("Exception when calling AdminsApi->updateAdmin: %s\n" % e)
extern crate AdminsApi;

pub fn main() {
    let tenant = tenant_example; // String
    let userId = 56; // Integer
    let requestAdmin = ; // RequestAdmin

    let mut context = AdminsApi::Context::default();
    let result = client.updateAdmin(tenant, userId, requestAdmin, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
User Id of the admin to be updated
Required
Body parameters
Name Description
requestAdmin *

Admin object that needs to be updated in Aptem

Responses


Employergroups

addEmployerGroup

Add a new employer group to Aptem


/tenants/{tenant}/groups/employer

Usage and SDK Samples

curl -X POST \
-H "X-API-Token: [[apiKey]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://{tenant}.aptem.co.uk/api/1.0/tenants/{tenant}/groups/employer" \
 -d '{
  "name" : "name",
  "parentEmployerGroupId" : 1234
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.EmployergroupsApi;

import java.io.File;
import java.util.*;

public class EmployergroupsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        // Create an instance of the API class
        EmployergroupsApi apiInstance = new EmployergroupsApi();
        String tenant = tenant_example; // String | The tenant name
        RequestEmployerGroup requestEmployerGroup = ; // RequestEmployerGroup | 

        try {
            EmployerGroup result = apiInstance.addEmployerGroup(tenant, requestEmployerGroup);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EmployergroupsApi#addEmployerGroup");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final RequestEmployerGroup requestEmployerGroup = new RequestEmployerGroup(); // RequestEmployerGroup | 

try {
    final result = await api_instance.addEmployerGroup(tenant, requestEmployerGroup);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->addEmployerGroup: $e\n');
}

import org.openapitools.client.api.EmployergroupsApi;

public class EmployergroupsApiExample {
    public static void main(String[] args) {
        EmployergroupsApi apiInstance = new EmployergroupsApi();
        String tenant = tenant_example; // String | The tenant name
        RequestEmployerGroup requestEmployerGroup = ; // RequestEmployerGroup | 

        try {
            EmployerGroup result = apiInstance.addEmployerGroup(tenant, requestEmployerGroup);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EmployergroupsApi#addEmployerGroup");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Token"];


// Create an instance of the API class
EmployergroupsApi *apiInstance = [[EmployergroupsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
RequestEmployerGroup *requestEmployerGroup = ; // 

// Add a new employer group to Aptem
[apiInstance addEmployerGroupWith:tenant
    requestEmployerGroup:requestEmployerGroup
              completionHandler: ^(EmployerGroup output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AptemPublicApi = require('aptem_public_api');
var defaultClient = AptemPublicApi.ApiClient.instance;

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

// Create an instance of the API class
var api = new AptemPublicApi.EmployergroupsApi()
var tenant = tenant_example; // {String} The tenant name
var requestEmployerGroup = ; // {RequestEmployerGroup} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addEmployerGroup(tenant, requestEmployerGroup, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class addEmployerGroupExample
    {
        public void main()
        {
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("X-API-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new EmployergroupsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var requestEmployerGroup = new RequestEmployerGroup(); // RequestEmployerGroup | 

            try {
                // Add a new employer group to Aptem
                EmployerGroup result = apiInstance.addEmployerGroup(tenant, requestEmployerGroup);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling EmployergroupsApi.addEmployerGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\EmployergroupsApi();
$tenant = tenant_example; // String | The tenant name
$requestEmployerGroup = ; // RequestEmployerGroup | 

try {
    $result = $api_instance->addEmployerGroup($tenant, $requestEmployerGroup);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling EmployergroupsApi->addEmployerGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::EmployergroupsApi;

# Configure API key authorization: api_key
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::EmployergroupsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $requestEmployerGroup = WWW::OPenAPIClient::Object::RequestEmployerGroup->new(); # RequestEmployerGroup | 

eval {
    my $result = $api_instance->addEmployerGroup(tenant => $tenant, requestEmployerGroup => $requestEmployerGroup);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling EmployergroupsApi->addEmployerGroup: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
openapi_client.configuration.api_key['X-API-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.EmployergroupsApi()
tenant = tenant_example # String | The tenant name (default to null)
requestEmployerGroup =  # RequestEmployerGroup | 

try:
    # Add a new employer group to Aptem
    api_response = api_instance.add_employer_group(tenant, requestEmployerGroup)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EmployergroupsApi->addEmployerGroup: %s\n" % e)
extern crate EmployergroupsApi;

pub fn main() {
    let tenant = tenant_example; // String
    let requestEmployerGroup = ; // RequestEmployerGroup

    let mut context = EmployergroupsApi::Context::default();
    let result = client.addEmployerGroup(tenant, requestEmployerGroup, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
Body parameters
Name Description
requestEmployerGroup *

Employer group object that needs to be added to Aptem

Responses


deleteEmployerGroup

Delete an employer group


/tenants/{tenant}/groups/employer/{employerGroupId}

Usage and SDK Samples

curl -X DELETE \
-H "X-API-Token: [[apiKey]]" \
 "https://{tenant}.aptem.co.uk/api/1.0/tenants/{tenant}/groups/employer/{employerGroupId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.EmployergroupsApi;

import java.io.File;
import java.util.*;

public class EmployergroupsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        // Create an instance of the API class
        EmployergroupsApi apiInstance = new EmployergroupsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer employerGroupId = 56; // Integer | Employer group id to delete

        try {
            apiInstance.deleteEmployerGroup(tenant, employerGroupId);
        } catch (ApiException e) {
            System.err.println("Exception when calling EmployergroupsApi#deleteEmployerGroup");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final Integer employerGroupId = new Integer(); // Integer | Employer group id to delete

try {
    final result = await api_instance.deleteEmployerGroup(tenant, employerGroupId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->deleteEmployerGroup: $e\n');
}

import org.openapitools.client.api.EmployergroupsApi;

public class EmployergroupsApiExample {
    public static void main(String[] args) {
        EmployergroupsApi apiInstance = new EmployergroupsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer employerGroupId = 56; // Integer | Employer group id to delete

        try {
            apiInstance.deleteEmployerGroup(tenant, employerGroupId);
        } catch (ApiException e) {
            System.err.println("Exception when calling EmployergroupsApi#deleteEmployerGroup");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Token"];


// Create an instance of the API class
EmployergroupsApi *apiInstance = [[EmployergroupsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *employerGroupId = 56; // Employer group id to delete (default to null)

// Delete an employer group
[apiInstance deleteEmployerGroupWith:tenant
    employerGroupId:employerGroupId
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AptemPublicApi = require('aptem_public_api');
var defaultClient = AptemPublicApi.ApiClient.instance;

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

// Create an instance of the API class
var api = new AptemPublicApi.EmployergroupsApi()
var tenant = tenant_example; // {String} The tenant name
var employerGroupId = 56; // {Integer} Employer group id to delete

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteEmployerGroup(tenant, employerGroupId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteEmployerGroupExample
    {
        public void main()
        {
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("X-API-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new EmployergroupsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var employerGroupId = 56;  // Integer | Employer group id to delete (default to null)

            try {
                // Delete an employer group
                apiInstance.deleteEmployerGroup(tenant, employerGroupId);
            } catch (Exception e) {
                Debug.Print("Exception when calling EmployergroupsApi.deleteEmployerGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\EmployergroupsApi();
$tenant = tenant_example; // String | The tenant name
$employerGroupId = 56; // Integer | Employer group id to delete

try {
    $api_instance->deleteEmployerGroup($tenant, $employerGroupId);
} catch (Exception $e) {
    echo 'Exception when calling EmployergroupsApi->deleteEmployerGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::EmployergroupsApi;

# Configure API key authorization: api_key
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::EmployergroupsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $employerGroupId = 56; # Integer | Employer group id to delete

eval {
    $api_instance->deleteEmployerGroup(tenant => $tenant, employerGroupId => $employerGroupId);
};
if ($@) {
    warn "Exception when calling EmployergroupsApi->deleteEmployerGroup: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
openapi_client.configuration.api_key['X-API-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.EmployergroupsApi()
tenant = tenant_example # String | The tenant name (default to null)
employerGroupId = 56 # Integer | Employer group id to delete (default to null)

try:
    # Delete an employer group
    api_instance.delete_employer_group(tenant, employerGroupId)
except ApiException as e:
    print("Exception when calling EmployergroupsApi->deleteEmployerGroup: %s\n" % e)
extern crate EmployergroupsApi;

pub fn main() {
    let tenant = tenant_example; // String
    let employerGroupId = 56; // Integer

    let mut context = EmployergroupsApi::Context::default();
    let result = client.deleteEmployerGroup(tenant, employerGroupId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
employerGroupId*
Integer (int32)
Employer group id to delete
Required

Responses


getEmployerGroupById

Get employer group by ID

Returns an employer group


/tenants/{tenant}/groups/employer/{employerGroupId}

Usage and SDK Samples

curl -X GET \
-H "X-API-Token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://{tenant}.aptem.co.uk/api/1.0/tenants/{tenant}/groups/employer/{employerGroupId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.EmployergroupsApi;

import java.io.File;
import java.util.*;

public class EmployergroupsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        // Create an instance of the API class
        EmployergroupsApi apiInstance = new EmployergroupsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer employerGroupId = 56; // Integer | ID of employer group to return

        try {
            EmployerGroup result = apiInstance.getEmployerGroupById(tenant, employerGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EmployergroupsApi#getEmployerGroupById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final Integer employerGroupId = new Integer(); // Integer | ID of employer group to return

try {
    final result = await api_instance.getEmployerGroupById(tenant, employerGroupId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getEmployerGroupById: $e\n');
}

import org.openapitools.client.api.EmployergroupsApi;

public class EmployergroupsApiExample {
    public static void main(String[] args) {
        EmployergroupsApi apiInstance = new EmployergroupsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer employerGroupId = 56; // Integer | ID of employer group to return

        try {
            EmployerGroup result = apiInstance.getEmployerGroupById(tenant, employerGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EmployergroupsApi#getEmployerGroupById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Token"];


// Create an instance of the API class
EmployergroupsApi *apiInstance = [[EmployergroupsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *employerGroupId = 56; // ID of employer group to return (default to null)

// Get employer group by ID
[apiInstance getEmployerGroupByIdWith:tenant
    employerGroupId:employerGroupId
              completionHandler: ^(EmployerGroup output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AptemPublicApi = require('aptem_public_api');
var defaultClient = AptemPublicApi.ApiClient.instance;

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

// Create an instance of the API class
var api = new AptemPublicApi.EmployergroupsApi()
var tenant = tenant_example; // {String} The tenant name
var employerGroupId = 56; // {Integer} ID of employer group to return

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getEmployerGroupById(tenant, employerGroupId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getEmployerGroupByIdExample
    {
        public void main()
        {
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("X-API-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new EmployergroupsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var employerGroupId = 56;  // Integer | ID of employer group to return (default to null)

            try {
                // Get employer group by ID
                EmployerGroup result = apiInstance.getEmployerGroupById(tenant, employerGroupId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling EmployergroupsApi.getEmployerGroupById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\EmployergroupsApi();
$tenant = tenant_example; // String | The tenant name
$employerGroupId = 56; // Integer | ID of employer group to return

try {
    $result = $api_instance->getEmployerGroupById($tenant, $employerGroupId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling EmployergroupsApi->getEmployerGroupById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::EmployergroupsApi;

# Configure API key authorization: api_key
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::EmployergroupsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $employerGroupId = 56; # Integer | ID of employer group to return

eval {
    my $result = $api_instance->getEmployerGroupById(tenant => $tenant, employerGroupId => $employerGroupId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling EmployergroupsApi->getEmployerGroupById: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
openapi_client.configuration.api_key['X-API-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.EmployergroupsApi()
tenant = tenant_example # String | The tenant name (default to null)
employerGroupId = 56 # Integer | ID of employer group to return (default to null)

try:
    # Get employer group by ID
    api_response = api_instance.get_employer_group_by_id(tenant, employerGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EmployergroupsApi->getEmployerGroupById: %s\n" % e)
extern crate EmployergroupsApi;

pub fn main() {
    let tenant = tenant_example; // String
    let employerGroupId = 56; // Integer

    let mut context = EmployergroupsApi::Context::default();
    let result = client.getEmployerGroupById(tenant, employerGroupId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
employerGroupId*
Integer (int32)
ID of employer group to return
Required

Responses


updateEmployerGroup

Update an employer group in Aptem


/tenants/{tenant}/groups/employer/{employerGroupId}

Usage and SDK Samples

curl -X PUT \
-H "X-API-Token: [[apiKey]]" \
 -H "Content-Type: application/json" \
 "https://{tenant}.aptem.co.uk/api/1.0/tenants/{tenant}/groups/employer/{employerGroupId}" \
 -d '{
  "name" : "name",
  "parentEmployerGroupId" : 1234
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.EmployergroupsApi;

import java.io.File;
import java.util.*;

public class EmployergroupsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        // Create an instance of the API class
        EmployergroupsApi apiInstance = new EmployergroupsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer employerGroupId = 56; // Integer | ID of employer group to be updated
        RequestEmployerGroup requestEmployerGroup = ; // RequestEmployerGroup | 

        try {
            apiInstance.updateEmployerGroup(tenant, employerGroupId, requestEmployerGroup);
        } catch (ApiException e) {
            System.err.println("Exception when calling EmployergroupsApi#updateEmployerGroup");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final Integer employerGroupId = new Integer(); // Integer | ID of employer group to be updated
final RequestEmployerGroup requestEmployerGroup = new RequestEmployerGroup(); // RequestEmployerGroup | 

try {
    final result = await api_instance.updateEmployerGroup(tenant, employerGroupId, requestEmployerGroup);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->updateEmployerGroup: $e\n');
}

import org.openapitools.client.api.EmployergroupsApi;

public class EmployergroupsApiExample {
    public static void main(String[] args) {
        EmployergroupsApi apiInstance = new EmployergroupsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer employerGroupId = 56; // Integer | ID of employer group to be updated
        RequestEmployerGroup requestEmployerGroup = ; // RequestEmployerGroup | 

        try {
            apiInstance.updateEmployerGroup(tenant, employerGroupId, requestEmployerGroup);
        } catch (ApiException e) {
            System.err.println("Exception when calling EmployergroupsApi#updateEmployerGroup");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Token"];


// Create an instance of the API class
EmployergroupsApi *apiInstance = [[EmployergroupsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *employerGroupId = 56; // ID of employer group to be updated (default to null)
RequestEmployerGroup *requestEmployerGroup = ; // 

// Update an employer group in Aptem
[apiInstance updateEmployerGroupWith:tenant
    employerGroupId:employerGroupId
    requestEmployerGroup:requestEmployerGroup
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AptemPublicApi = require('aptem_public_api');
var defaultClient = AptemPublicApi.ApiClient.instance;

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

// Create an instance of the API class
var api = new AptemPublicApi.EmployergroupsApi()
var tenant = tenant_example; // {String} The tenant name
var employerGroupId = 56; // {Integer} ID of employer group to be updated
var requestEmployerGroup = ; // {RequestEmployerGroup} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateEmployerGroup(tenant, employerGroupId, requestEmployerGroup, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class updateEmployerGroupExample
    {
        public void main()
        {
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("X-API-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new EmployergroupsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var employerGroupId = 56;  // Integer | ID of employer group to be updated (default to null)
            var requestEmployerGroup = new RequestEmployerGroup(); // RequestEmployerGroup | 

            try {
                // Update an employer group in Aptem
                apiInstance.updateEmployerGroup(tenant, employerGroupId, requestEmployerGroup);
            } catch (Exception e) {
                Debug.Print("Exception when calling EmployergroupsApi.updateEmployerGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\EmployergroupsApi();
$tenant = tenant_example; // String | The tenant name
$employerGroupId = 56; // Integer | ID of employer group to be updated
$requestEmployerGroup = ; // RequestEmployerGroup | 

try {
    $api_instance->updateEmployerGroup($tenant, $employerGroupId, $requestEmployerGroup);
} catch (Exception $e) {
    echo 'Exception when calling EmployergroupsApi->updateEmployerGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::EmployergroupsApi;

# Configure API key authorization: api_key
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::EmployergroupsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $employerGroupId = 56; # Integer | ID of employer group to be updated
my $requestEmployerGroup = WWW::OPenAPIClient::Object::RequestEmployerGroup->new(); # RequestEmployerGroup | 

eval {
    $api_instance->updateEmployerGroup(tenant => $tenant, employerGroupId => $employerGroupId, requestEmployerGroup => $requestEmployerGroup);
};
if ($@) {
    warn "Exception when calling EmployergroupsApi->updateEmployerGroup: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
openapi_client.configuration.api_key['X-API-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.EmployergroupsApi()
tenant = tenant_example # String | The tenant name (default to null)
employerGroupId = 56 # Integer | ID of employer group to be updated (default to null)
requestEmployerGroup =  # RequestEmployerGroup | 

try:
    # Update an employer group in Aptem
    api_instance.update_employer_group(tenant, employerGroupId, requestEmployerGroup)
except ApiException as e:
    print("Exception when calling EmployergroupsApi->updateEmployerGroup: %s\n" % e)
extern crate EmployergroupsApi;

pub fn main() {
    let tenant = tenant_example; // String
    let employerGroupId = 56; // Integer
    let requestEmployerGroup = ; // RequestEmployerGroup

    let mut context = EmployergroupsApi::Context::default();
    let result = client.updateEmployerGroup(tenant, employerGroupId, requestEmployerGroup, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
employerGroupId*
Integer (int32)
ID of employer group to be updated
Required
Body parameters
Name Description
requestEmployerGroup *

Employer Group object that needs to be updated in Aptem

Responses


Employerlogins

activateEmployerLogin

Activate employer login


/tenants/{tenant}/users/employer/{employerLoginId}/activate

Usage and SDK Samples

curl -X PUT \
-H "X-API-Token: [[apiKey]]" \
 "https://{tenant}.aptem.co.uk/api/1.0/tenants/{tenant}/users/employer/{employerLoginId}/activate"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.EmployerloginsApi;

import java.io.File;
import java.util.*;

public class EmployerloginsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        // Create an instance of the API class
        EmployerloginsApi apiInstance = new EmployerloginsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer employerLoginId = 56; // Integer | User Id of the employer login to activate

        try {
            apiInstance.activateEmployerLogin(tenant, employerLoginId);
        } catch (ApiException e) {
            System.err.println("Exception when calling EmployerloginsApi#activateEmployerLogin");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final Integer employerLoginId = new Integer(); // Integer | User Id of the employer login to activate

try {
    final result = await api_instance.activateEmployerLogin(tenant, employerLoginId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->activateEmployerLogin: $e\n');
}

import org.openapitools.client.api.EmployerloginsApi;

public class EmployerloginsApiExample {
    public static void main(String[] args) {
        EmployerloginsApi apiInstance = new EmployerloginsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer employerLoginId = 56; // Integer | User Id of the employer login to activate

        try {
            apiInstance.activateEmployerLogin(tenant, employerLoginId);
        } catch (ApiException e) {
            System.err.println("Exception when calling EmployerloginsApi#activateEmployerLogin");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Token"];


// Create an instance of the API class
EmployerloginsApi *apiInstance = [[EmployerloginsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *employerLoginId = 56; // User Id of the employer login to activate (default to null)

// Activate employer login
[apiInstance activateEmployerLoginWith:tenant
    employerLoginId:employerLoginId
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AptemPublicApi = require('aptem_public_api');
var defaultClient = AptemPublicApi.ApiClient.instance;

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

// Create an instance of the API class
var api = new AptemPublicApi.EmployerloginsApi()
var tenant = tenant_example; // {String} The tenant name
var employerLoginId = 56; // {Integer} User Id of the employer login to activate

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.activateEmployerLogin(tenant, employerLoginId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class activateEmployerLoginExample
    {
        public void main()
        {
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("X-API-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new EmployerloginsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var employerLoginId = 56;  // Integer | User Id of the employer login to activate (default to null)

            try {
                // Activate employer login
                apiInstance.activateEmployerLogin(tenant, employerLoginId);
            } catch (Exception e) {
                Debug.Print("Exception when calling EmployerloginsApi.activateEmployerLogin: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\EmployerloginsApi();
$tenant = tenant_example; // String | The tenant name
$employerLoginId = 56; // Integer | User Id of the employer login to activate

try {
    $api_instance->activateEmployerLogin($tenant, $employerLoginId);
} catch (Exception $e) {
    echo 'Exception when calling EmployerloginsApi->activateEmployerLogin: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::EmployerloginsApi;

# Configure API key authorization: api_key
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::EmployerloginsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $employerLoginId = 56; # Integer | User Id of the employer login to activate

eval {
    $api_instance->activateEmployerLogin(tenant => $tenant, employerLoginId => $employerLoginId);
};
if ($@) {
    warn "Exception when calling EmployerloginsApi->activateEmployerLogin: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
openapi_client.configuration.api_key['X-API-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.EmployerloginsApi()
tenant = tenant_example # String | The tenant name (default to null)
employerLoginId = 56 # Integer | User Id of the employer login to activate (default to null)

try:
    # Activate employer login
    api_instance.activate_employer_login(tenant, employerLoginId)
except ApiException as e:
    print("Exception when calling EmployerloginsApi->activateEmployerLogin: %s\n" % e)
extern crate EmployerloginsApi;

pub fn main() {
    let tenant = tenant_example; // String
    let employerLoginId = 56; // Integer

    let mut context = EmployerloginsApi::Context::default();
    let result = client.activateEmployerLogin(tenant, employerLoginId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
employerLoginId*
Integer (int32)
User Id of the employer login to activate
Required

Responses


addEmployerLogin

Add a new employer login to Aptem


/tenants/{tenant}/users/employer

Usage and SDK Samples

curl -X POST \
-H "X-API-Token: [[apiKey]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://{tenant}.aptem.co.uk/api/1.0/tenants/{tenant}/users/employer" \
 -d '{
  "firstName" : "firstName",
  "lastName" : "lastName",
  "mobile" : "mobile",
  "referenceNumber" : "referenceNumber",
  "email" : "email",
  "username" : "username",
  "postCode" : "postCode",
  "address1" : "address1",
  "address2" : "address2",
  "townCity" : "townCity",
  "countyState" : "countyState",
  "groupIds" : [ 48, 34, 65 ],
  "employerGroupIds" : [ 348, 324, 165 ],
  "gender" : "gender",
  "status" : "Full access",
  "usePWA" : true,
  "roles" : [ "Role1", "Role2" ],
  "sendEmailInvitation" : true
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.EmployerloginsApi;

import java.io.File;
import java.util.*;

public class EmployerloginsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        // Create an instance of the API class
        EmployerloginsApi apiInstance = new EmployerloginsApi();
        String tenant = tenant_example; // String | The tenant name
        RequestEmployerLogin requestEmployerLogin = ; // RequestEmployerLogin | 

        try {
            ResponseEmployerLogin result = apiInstance.addEmployerLogin(tenant, requestEmployerLogin);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EmployerloginsApi#addEmployerLogin");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final RequestEmployerLogin requestEmployerLogin = new RequestEmployerLogin(); // RequestEmployerLogin | 

try {
    final result = await api_instance.addEmployerLogin(tenant, requestEmployerLogin);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->addEmployerLogin: $e\n');
}

import org.openapitools.client.api.EmployerloginsApi;

public class EmployerloginsApiExample {
    public static void main(String[] args) {
        EmployerloginsApi apiInstance = new EmployerloginsApi();
        String tenant = tenant_example; // String | The tenant name
        RequestEmployerLogin requestEmployerLogin = ; // RequestEmployerLogin | 

        try {
            ResponseEmployerLogin result = apiInstance.addEmployerLogin(tenant, requestEmployerLogin);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EmployerloginsApi#addEmployerLogin");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Token"];


// Create an instance of the API class
EmployerloginsApi *apiInstance = [[EmployerloginsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
RequestEmployerLogin *requestEmployerLogin = ; // 

// Add a new employer login to Aptem
[apiInstance addEmployerLoginWith:tenant
    requestEmployerLogin:requestEmployerLogin
              completionHandler: ^(ResponseEmployerLogin output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AptemPublicApi = require('aptem_public_api');
var defaultClient = AptemPublicApi.ApiClient.instance;

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

// Create an instance of the API class
var api = new AptemPublicApi.EmployerloginsApi()
var tenant = tenant_example; // {String} The tenant name
var requestEmployerLogin = ; // {RequestEmployerLogin} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addEmployerLogin(tenant, requestEmployerLogin, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class addEmployerLoginExample
    {
        public void main()
        {
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("X-API-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new EmployerloginsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var requestEmployerLogin = new RequestEmployerLogin(); // RequestEmployerLogin | 

            try {
                // Add a new employer login to Aptem
                ResponseEmployerLogin result = apiInstance.addEmployerLogin(tenant, requestEmployerLogin);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling EmployerloginsApi.addEmployerLogin: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\EmployerloginsApi();
$tenant = tenant_example; // String | The tenant name
$requestEmployerLogin = ; // RequestEmployerLogin | 

try {
    $result = $api_instance->addEmployerLogin($tenant, $requestEmployerLogin);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling EmployerloginsApi->addEmployerLogin: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::EmployerloginsApi;

# Configure API key authorization: api_key
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::EmployerloginsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $requestEmployerLogin = WWW::OPenAPIClient::Object::RequestEmployerLogin->new(); # RequestEmployerLogin | 

eval {
    my $result = $api_instance->addEmployerLogin(tenant => $tenant, requestEmployerLogin => $requestEmployerLogin);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling EmployerloginsApi->addEmployerLogin: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
openapi_client.configuration.api_key['X-API-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.EmployerloginsApi()
tenant = tenant_example # String | The tenant name (default to null)
requestEmployerLogin =  # RequestEmployerLogin | 

try:
    # Add a new employer login to Aptem
    api_response = api_instance.add_employer_login(tenant, requestEmployerLogin)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EmployerloginsApi->addEmployerLogin: %s\n" % e)
extern crate EmployerloginsApi;

pub fn main() {
    let tenant = tenant_example; // String
    let requestEmployerLogin = ; // RequestEmployerLogin

    let mut context = EmployerloginsApi::Context::default();
    let result = client.addEmployerLogin(tenant, requestEmployerLogin, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
Body parameters
Name Description
requestEmployerLogin *

Employer login object that needs to be added to Aptem

Responses


deactivateEmployerLogin

Deactivate employer login


/tenants/{tenant}/users/employer/{employerLoginId}

Usage and SDK Samples

curl -X DELETE \
-H "X-API-Token: [[apiKey]]" \
 "https://{tenant}.aptem.co.uk/api/1.0/tenants/{tenant}/users/employer/{employerLoginId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.EmployerloginsApi;

import java.io.File;
import java.util.*;

public class EmployerloginsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        // Create an instance of the API class
        EmployerloginsApi apiInstance = new EmployerloginsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer employerLoginId = 56; // Integer | Employer login id to delete

        try {
            apiInstance.deactivateEmployerLogin(tenant, employerLoginId);
        } catch (ApiException e) {
            System.err.println("Exception when calling EmployerloginsApi#deactivateEmployerLogin");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final Integer employerLoginId = new Integer(); // Integer | Employer login id to delete

try {
    final result = await api_instance.deactivateEmployerLogin(tenant, employerLoginId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->deactivateEmployerLogin: $e\n');
}

import org.openapitools.client.api.EmployerloginsApi;

public class EmployerloginsApiExample {
    public static void main(String[] args) {
        EmployerloginsApi apiInstance = new EmployerloginsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer employerLoginId = 56; // Integer | Employer login id to delete

        try {
            apiInstance.deactivateEmployerLogin(tenant, employerLoginId);
        } catch (ApiException e) {
            System.err.println("Exception when calling EmployerloginsApi#deactivateEmployerLogin");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Token"];


// Create an instance of the API class
EmployerloginsApi *apiInstance = [[EmployerloginsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *employerLoginId = 56; // Employer login id to delete (default to null)

// Deactivate employer login
[apiInstance deactivateEmployerLoginWith:tenant
    employerLoginId:employerLoginId
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AptemPublicApi = require('aptem_public_api');
var defaultClient = AptemPublicApi.ApiClient.instance;

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

// Create an instance of the API class
var api = new AptemPublicApi.EmployerloginsApi()
var tenant = tenant_example; // {String} The tenant name
var employerLoginId = 56; // {Integer} Employer login id to delete

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deactivateEmployerLogin(tenant, employerLoginId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deactivateEmployerLoginExample
    {
        public void main()
        {
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("X-API-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new EmployerloginsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var employerLoginId = 56;  // Integer | Employer login id to delete (default to null)

            try {
                // Deactivate employer login
                apiInstance.deactivateEmployerLogin(tenant, employerLoginId);
            } catch (Exception e) {
                Debug.Print("Exception when calling EmployerloginsApi.deactivateEmployerLogin: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\EmployerloginsApi();
$tenant = tenant_example; // String | The tenant name
$employerLoginId = 56; // Integer | Employer login id to delete

try {
    $api_instance->deactivateEmployerLogin($tenant, $employerLoginId);
} catch (Exception $e) {
    echo 'Exception when calling EmployerloginsApi->deactivateEmployerLogin: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::EmployerloginsApi;

# Configure API key authorization: api_key
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::EmployerloginsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $employerLoginId = 56; # Integer | Employer login id to delete

eval {
    $api_instance->deactivateEmployerLogin(tenant => $tenant, employerLoginId => $employerLoginId);
};
if ($@) {
    warn "Exception when calling EmployerloginsApi->deactivateEmployerLogin: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
openapi_client.configuration.api_key['X-API-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.EmployerloginsApi()
tenant = tenant_example # String | The tenant name (default to null)
employerLoginId = 56 # Integer | Employer login id to delete (default to null)

try:
    # Deactivate employer login
    api_instance.deactivate_employer_login(tenant, employerLoginId)
except ApiException as e:
    print("Exception when calling EmployerloginsApi->deactivateEmployerLogin: %s\n" % e)
extern crate EmployerloginsApi;

pub fn main() {
    let tenant = tenant_example; // String
    let employerLoginId = 56; // Integer

    let mut context = EmployerloginsApi::Context::default();
    let result = client.deactivateEmployerLogin(tenant, employerLoginId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
employerLoginId*
Integer (int32)
Employer login id to delete
Required

Responses


getEmployerLoginRoles

Get employer login roles

Returns employer login roles


/tenants/{tenant}/users/employer/roles

Usage and SDK Samples

curl -X GET \
-H "X-API-Token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://{tenant}.aptem.co.uk/api/1.0/tenants/{tenant}/users/employer/roles"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.EmployerloginsApi;

import java.io.File;
import java.util.*;

public class EmployerloginsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        // Create an instance of the API class
        EmployerloginsApi apiInstance = new EmployerloginsApi();
        String tenant = tenant_example; // String | The tenant name

        try {
            array['String'] result = apiInstance.getEmployerLoginRoles(tenant);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EmployerloginsApi#getEmployerLoginRoles");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name

try {
    final result = await api_instance.getEmployerLoginRoles(tenant);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getEmployerLoginRoles: $e\n');
}

import org.openapitools.client.api.EmployerloginsApi;

public class EmployerloginsApiExample {
    public static void main(String[] args) {
        EmployerloginsApi apiInstance = new EmployerloginsApi();
        String tenant = tenant_example; // String | The tenant name

        try {
            array['String'] result = apiInstance.getEmployerLoginRoles(tenant);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EmployerloginsApi#getEmployerLoginRoles");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Token"];


// Create an instance of the API class
EmployerloginsApi *apiInstance = [[EmployerloginsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)

// Get employer login roles
[apiInstance getEmployerLoginRolesWith:tenant
              completionHandler: ^(array['String'] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AptemPublicApi = require('aptem_public_api');
var defaultClient = AptemPublicApi.ApiClient.instance;

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

// Create an instance of the API class
var api = new AptemPublicApi.EmployerloginsApi()
var tenant = tenant_example; // {String} The tenant name

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getEmployerLoginRoles(tenant, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getEmployerLoginRolesExample
    {
        public void main()
        {
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("X-API-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new EmployerloginsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)

            try {
                // Get employer login roles
                array['String'] result = apiInstance.getEmployerLoginRoles(tenant);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling EmployerloginsApi.getEmployerLoginRoles: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\EmployerloginsApi();
$tenant = tenant_example; // String | The tenant name

try {
    $result = $api_instance->getEmployerLoginRoles($tenant);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling EmployerloginsApi->getEmployerLoginRoles: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::EmployerloginsApi;

# Configure API key authorization: api_key
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::EmployerloginsApi->new();
my $tenant = tenant_example; # String | The tenant name

eval {
    my $result = $api_instance->getEmployerLoginRoles(tenant => $tenant);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling EmployerloginsApi->getEmployerLoginRoles: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
openapi_client.configuration.api_key['X-API-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.EmployerloginsApi()
tenant = tenant_example # String | The tenant name (default to null)

try:
    # Get employer login roles
    api_response = api_instance.get_employer_login_roles(tenant)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EmployerloginsApi->getEmployerLoginRoles: %s\n" % e)
extern crate EmployerloginsApi;

pub fn main() {
    let tenant = tenant_example; // String

    let mut context = EmployerloginsApi::Context::default();
    let result = client.getEmployerLoginRoles(tenant, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required

Responses


searchEmployerLogin

Get employer login by ID and/or refNum

Returns employer login


/tenants/{tenant}/users/employer/search

Usage and SDK Samples

curl -X GET \
-H "X-API-Token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://{tenant}.aptem.co.uk/api/1.0/tenants/{tenant}/users/employer/search?id=56&refNum=refNum_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.EmployerloginsApi;

import java.io.File;
import java.util.*;

public class EmployerloginsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        // Create an instance of the API class
        EmployerloginsApi apiInstance = new EmployerloginsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer id = 56; // Integer | id to search employer by
        String refNum = refNum_example; // String | reference number to search employer by

        try {
            EmployerLogin result = apiInstance.searchEmployerLogin(tenant, id, refNum);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EmployerloginsApi#searchEmployerLogin");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final Integer id = new Integer(); // Integer | id to search employer by
final String refNum = new String(); // String | reference number to search employer by

try {
    final result = await api_instance.searchEmployerLogin(tenant, id, refNum);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->searchEmployerLogin: $e\n');
}

import org.openapitools.client.api.EmployerloginsApi;

public class EmployerloginsApiExample {
    public static void main(String[] args) {
        EmployerloginsApi apiInstance = new EmployerloginsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer id = 56; // Integer | id to search employer by
        String refNum = refNum_example; // String | reference number to search employer by

        try {
            EmployerLogin result = apiInstance.searchEmployerLogin(tenant, id, refNum);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EmployerloginsApi#searchEmployerLogin");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Token"];


// Create an instance of the API class
EmployerloginsApi *apiInstance = [[EmployerloginsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *id = 56; // id to search employer by (optional) (default to null)
String *refNum = refNum_example; // reference number to search employer by (optional) (default to null)

// Get employer login by ID and/or refNum
[apiInstance searchEmployerLoginWith:tenant
    id:id
    refNum:refNum
              completionHandler: ^(EmployerLogin output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AptemPublicApi = require('aptem_public_api');
var defaultClient = AptemPublicApi.ApiClient.instance;

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

// Create an instance of the API class
var api = new AptemPublicApi.EmployerloginsApi()
var tenant = tenant_example; // {String} The tenant name
var opts = {
  'id': 56, // {Integer} id to search employer by
  'refNum': refNum_example // {String} reference number to search employer by
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.searchEmployerLogin(tenant, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class searchEmployerLoginExample
    {
        public void main()
        {
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("X-API-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new EmployerloginsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var id = 56;  // Integer | id to search employer by (optional)  (default to null)
            var refNum = refNum_example;  // String | reference number to search employer by (optional)  (default to null)

            try {
                // Get employer login by ID and/or refNum
                EmployerLogin result = apiInstance.searchEmployerLogin(tenant, id, refNum);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling EmployerloginsApi.searchEmployerLogin: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\EmployerloginsApi();
$tenant = tenant_example; // String | The tenant name
$id = 56; // Integer | id to search employer by
$refNum = refNum_example; // String | reference number to search employer by

try {
    $result = $api_instance->searchEmployerLogin($tenant, $id, $refNum);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling EmployerloginsApi->searchEmployerLogin: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::EmployerloginsApi;

# Configure API key authorization: api_key
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::EmployerloginsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $id = 56; # Integer | id to search employer by
my $refNum = refNum_example; # String | reference number to search employer by

eval {
    my $result = $api_instance->searchEmployerLogin(tenant => $tenant, id => $id, refNum => $refNum);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling EmployerloginsApi->searchEmployerLogin: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
openapi_client.configuration.api_key['X-API-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.EmployerloginsApi()
tenant = tenant_example # String | The tenant name (default to null)
id = 56 # Integer | id to search employer by (optional) (default to null)
refNum = refNum_example # String | reference number to search employer by (optional) (default to null)

try:
    # Get employer login by ID and/or refNum
    api_response = api_instance.search_employer_login(tenant, id=id, refNum=refNum)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EmployerloginsApi->searchEmployerLogin: %s\n" % e)
extern crate EmployerloginsApi;

pub fn main() {
    let tenant = tenant_example; // String
    let id = 56; // Integer
    let refNum = refNum_example; // String

    let mut context = EmployerloginsApi::Context::default();
    let result = client.searchEmployerLogin(tenant, id, refNum, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
Query parameters
Name Description
id
Integer
id to search employer by
refNum
String
reference number to search employer by

Responses


updateEmployerLogin

Update an employer login in Aptem


/tenants/{tenant}/users/employer/{employerLoginId}

Usage and SDK Samples

curl -X PUT \
-H "X-API-Token: [[apiKey]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://{tenant}.aptem.co.uk/api/1.0/tenants/{tenant}/users/employer/{employerLoginId}" \
 -d '{
  "firstName" : "firstName",
  "lastName" : "lastName",
  "mobile" : "mobile",
  "referenceNumber" : "referenceNumber",
  "email" : "email",
  "username" : "username",
  "postCode" : "postCode",
  "address1" : "address1",
  "address2" : "address2",
  "townCity" : "townCity",
  "countyState" : "countyState",
  "groupIds" : [ 48, 34, 65 ],
  "employerGroupIds" : [ 348, 324, 165 ],
  "gender" : "gender",
  "status" : "Full access",
  "usePWA" : true,
  "roles" : [ "Role1", "Role2" ],
  "sendEmailInvitation" : true
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.EmployerloginsApi;

import java.io.File;
import java.util.*;

public class EmployerloginsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        // Create an instance of the API class
        EmployerloginsApi apiInstance = new EmployerloginsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer employerLoginId = 56; // Integer | User Id of the employer login to be updated
        UpdateEmployerLogin updateEmployerLogin = ; // UpdateEmployerLogin | 

        try {
            EmployerLogin result = apiInstance.updateEmployerLogin(tenant, employerLoginId, updateEmployerLogin);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EmployerloginsApi#updateEmployerLogin");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final Integer employerLoginId = new Integer(); // Integer | User Id of the employer login to be updated
final UpdateEmployerLogin updateEmployerLogin = new UpdateEmployerLogin(); // UpdateEmployerLogin | 

try {
    final result = await api_instance.updateEmployerLogin(tenant, employerLoginId, updateEmployerLogin);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->updateEmployerLogin: $e\n');
}

import org.openapitools.client.api.EmployerloginsApi;

public class EmployerloginsApiExample {
    public static void main(String[] args) {
        EmployerloginsApi apiInstance = new EmployerloginsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer employerLoginId = 56; // Integer | User Id of the employer login to be updated
        UpdateEmployerLogin updateEmployerLogin = ; // UpdateEmployerLogin | 

        try {
            EmployerLogin result = apiInstance.updateEmployerLogin(tenant, employerLoginId, updateEmployerLogin);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EmployerloginsApi#updateEmployerLogin");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Token"];


// Create an instance of the API class
EmployerloginsApi *apiInstance = [[EmployerloginsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *employerLoginId = 56; // User Id of the employer login to be updated (default to null)
UpdateEmployerLogin *updateEmployerLogin = ; // 

// Update an employer login in Aptem
[apiInstance updateEmployerLoginWith:tenant
    employerLoginId:employerLoginId
    updateEmployerLogin:updateEmployerLogin
              completionHandler: ^(EmployerLogin output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AptemPublicApi = require('aptem_public_api');
var defaultClient = AptemPublicApi.ApiClient.instance;

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

// Create an instance of the API class
var api = new AptemPublicApi.EmployerloginsApi()
var tenant = tenant_example; // {String} The tenant name
var employerLoginId = 56; // {Integer} User Id of the employer login to be updated
var updateEmployerLogin = ; // {UpdateEmployerLogin} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateEmployerLogin(tenant, employerLoginId, updateEmployerLogin, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class updateEmployerLoginExample
    {
        public void main()
        {
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("X-API-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new EmployerloginsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var employerLoginId = 56;  // Integer | User Id of the employer login to be updated (default to null)
            var updateEmployerLogin = new UpdateEmployerLogin(); // UpdateEmployerLogin | 

            try {
                // Update an employer login in Aptem
                EmployerLogin result = apiInstance.updateEmployerLogin(tenant, employerLoginId, updateEmployerLogin);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling EmployerloginsApi.updateEmployerLogin: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\EmployerloginsApi();
$tenant = tenant_example; // String | The tenant name
$employerLoginId = 56; // Integer | User Id of the employer login to be updated
$updateEmployerLogin = ; // UpdateEmployerLogin | 

try {
    $result = $api_instance->updateEmployerLogin($tenant, $employerLoginId, $updateEmployerLogin);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling EmployerloginsApi->updateEmployerLogin: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::EmployerloginsApi;

# Configure API key authorization: api_key
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::EmployerloginsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $employerLoginId = 56; # Integer | User Id of the employer login to be updated
my $updateEmployerLogin = WWW::OPenAPIClient::Object::UpdateEmployerLogin->new(); # UpdateEmployerLogin | 

eval {
    my $result = $api_instance->updateEmployerLogin(tenant => $tenant, employerLoginId => $employerLoginId, updateEmployerLogin => $updateEmployerLogin);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling EmployerloginsApi->updateEmployerLogin: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
openapi_client.configuration.api_key['X-API-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.EmployerloginsApi()
tenant = tenant_example # String | The tenant name (default to null)
employerLoginId = 56 # Integer | User Id of the employer login to be updated (default to null)
updateEmployerLogin =  # UpdateEmployerLogin | 

try:
    # Update an employer login in Aptem
    api_response = api_instance.update_employer_login(tenant, employerLoginId, updateEmployerLogin)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EmployerloginsApi->updateEmployerLogin: %s\n" % e)
extern crate EmployerloginsApi;

pub fn main() {
    let tenant = tenant_example; // String
    let employerLoginId = 56; // Integer
    let updateEmployerLogin = ; // UpdateEmployerLogin

    let mut context = EmployerloginsApi::Context::default();
    let result = client.updateEmployerLogin(tenant, employerLoginId, updateEmployerLogin, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
employerLoginId*
Integer (int32)
User Id of the employer login to be updated
Required
Body parameters
Name Description
updateEmployerLogin *

Employer login object that needs to be updated in Aptem

Responses


Groups

addGroup

Add a new group to Aptem


/tenants/{tenant}/groups

Usage and SDK Samples

curl -X POST \
-H "X-API-Token: [[apiKey]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://{tenant}.aptem.co.uk/api/1.0/tenants/{tenant}/groups" \
 -d '{
  "subscriptionLength" : 0,
  "name" : "name"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.GroupsApi;

import java.io.File;
import java.util.*;

public class GroupsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        // Create an instance of the API class
        GroupsApi apiInstance = new GroupsApi();
        String tenant = tenant_example; // String | The tenant name
        RequestGroup requestGroup = ; // RequestGroup | 

        try {
            Group result = apiInstance.addGroup(tenant, requestGroup);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupsApi#addGroup");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final RequestGroup requestGroup = new RequestGroup(); // RequestGroup | 

try {
    final result = await api_instance.addGroup(tenant, requestGroup);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->addGroup: $e\n');
}

import org.openapitools.client.api.GroupsApi;

public class GroupsApiExample {
    public static void main(String[] args) {
        GroupsApi apiInstance = new GroupsApi();
        String tenant = tenant_example; // String | The tenant name
        RequestGroup requestGroup = ; // RequestGroup | 

        try {
            Group result = apiInstance.addGroup(tenant, requestGroup);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupsApi#addGroup");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Token"];


// Create an instance of the API class
GroupsApi *apiInstance = [[GroupsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
RequestGroup *requestGroup = ; // 

// Add a new group to Aptem
[apiInstance addGroupWith:tenant
    requestGroup:requestGroup
              completionHandler: ^(Group output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AptemPublicApi = require('aptem_public_api');
var defaultClient = AptemPublicApi.ApiClient.instance;

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

// Create an instance of the API class
var api = new AptemPublicApi.GroupsApi()
var tenant = tenant_example; // {String} The tenant name
var requestGroup = ; // {RequestGroup} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addGroup(tenant, requestGroup, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class addGroupExample
    {
        public void main()
        {
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("X-API-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new GroupsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var requestGroup = new RequestGroup(); // RequestGroup | 

            try {
                // Add a new group to Aptem
                Group result = apiInstance.addGroup(tenant, requestGroup);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling GroupsApi.addGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\GroupsApi();
$tenant = tenant_example; // String | The tenant name
$requestGroup = ; // RequestGroup | 

try {
    $result = $api_instance->addGroup($tenant, $requestGroup);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupsApi->addGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::GroupsApi;

# Configure API key authorization: api_key
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::GroupsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $requestGroup = WWW::OPenAPIClient::Object::RequestGroup->new(); # RequestGroup | 

eval {
    my $result = $api_instance->addGroup(tenant => $tenant, requestGroup => $requestGroup);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GroupsApi->addGroup: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
openapi_client.configuration.api_key['X-API-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.GroupsApi()
tenant = tenant_example # String | The tenant name (default to null)
requestGroup =  # RequestGroup | 

try:
    # Add a new group to Aptem
    api_response = api_instance.add_group(tenant, requestGroup)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupsApi->addGroup: %s\n" % e)
extern crate GroupsApi;

pub fn main() {
    let tenant = tenant_example; // String
    let requestGroup = ; // RequestGroup

    let mut context = GroupsApi::Context::default();
    let result = client.addGroup(tenant, requestGroup, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
Body parameters
Name Description
requestGroup *

Group object that needs to be added to Aptem

Responses


deleteGroup

Delete a group


/tenants/{tenant}/groups/{groupId}

Usage and SDK Samples

curl -X DELETE \
-H "X-API-Token: [[apiKey]]" \
 "https://{tenant}.aptem.co.uk/api/1.0/tenants/{tenant}/groups/{groupId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.GroupsApi;

import java.io.File;
import java.util.*;

public class GroupsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        // Create an instance of the API class
        GroupsApi apiInstance = new GroupsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer groupId = 56; // Integer | Group id to delete

        try {
            apiInstance.deleteGroup(tenant, groupId);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupsApi#deleteGroup");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final Integer groupId = new Integer(); // Integer | Group id to delete

try {
    final result = await api_instance.deleteGroup(tenant, groupId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->deleteGroup: $e\n');
}

import org.openapitools.client.api.GroupsApi;

public class GroupsApiExample {
    public static void main(String[] args) {
        GroupsApi apiInstance = new GroupsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer groupId = 56; // Integer | Group id to delete

        try {
            apiInstance.deleteGroup(tenant, groupId);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupsApi#deleteGroup");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Token"];


// Create an instance of the API class
GroupsApi *apiInstance = [[GroupsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *groupId = 56; // Group id to delete (default to null)

// Delete a group
[apiInstance deleteGroupWith:tenant
    groupId:groupId
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AptemPublicApi = require('aptem_public_api');
var defaultClient = AptemPublicApi.ApiClient.instance;

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

// Create an instance of the API class
var api = new AptemPublicApi.GroupsApi()
var tenant = tenant_example; // {String} The tenant name
var groupId = 56; // {Integer} Group id to delete

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteGroup(tenant, groupId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteGroupExample
    {
        public void main()
        {
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("X-API-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new GroupsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var groupId = 56;  // Integer | Group id to delete (default to null)

            try {
                // Delete a group
                apiInstance.deleteGroup(tenant, groupId);
            } catch (Exception e) {
                Debug.Print("Exception when calling GroupsApi.deleteGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\GroupsApi();
$tenant = tenant_example; // String | The tenant name
$groupId = 56; // Integer | Group id to delete

try {
    $api_instance->deleteGroup($tenant, $groupId);
} catch (Exception $e) {
    echo 'Exception when calling GroupsApi->deleteGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::GroupsApi;

# Configure API key authorization: api_key
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::GroupsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $groupId = 56; # Integer | Group id to delete

eval {
    $api_instance->deleteGroup(tenant => $tenant, groupId => $groupId);
};
if ($@) {
    warn "Exception when calling GroupsApi->deleteGroup: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
openapi_client.configuration.api_key['X-API-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.GroupsApi()
tenant = tenant_example # String | The tenant name (default to null)
groupId = 56 # Integer | Group id to delete (default to null)

try:
    # Delete a group
    api_instance.delete_group(tenant, groupId)
except ApiException as e:
    print("Exception when calling GroupsApi->deleteGroup: %s\n" % e)
extern crate GroupsApi;

pub fn main() {
    let tenant = tenant_example; // String
    let groupId = 56; // Integer

    let mut context = GroupsApi::Context::default();
    let result = client.deleteGroup(tenant, groupId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
groupId*
Integer (int32)
Group id to delete
Required

Responses


getGroupById

Get group by ID

Returns a group


/tenants/{tenant}/groups/{groupId}

Usage and SDK Samples

curl -X GET \
-H "X-API-Token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://{tenant}.aptem.co.uk/api/1.0/tenants/{tenant}/groups/{groupId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.GroupsApi;

import java.io.File;
import java.util.*;

public class GroupsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        // Create an instance of the API class
        GroupsApi apiInstance = new GroupsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer groupId = 56; // Integer | ID of group to return

        try {
            Group result = apiInstance.getGroupById(tenant, groupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupsApi#getGroupById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final Integer groupId = new Integer(); // Integer | ID of group to return

try {
    final result = await api_instance.getGroupById(tenant, groupId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getGroupById: $e\n');
}

import org.openapitools.client.api.GroupsApi;

public class GroupsApiExample {
    public static void main(String[] args) {
        GroupsApi apiInstance = new GroupsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer groupId = 56; // Integer | ID of group to return

        try {
            Group result = apiInstance.getGroupById(tenant, groupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupsApi#getGroupById");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Token"];


// Create an instance of the API class
GroupsApi *apiInstance = [[GroupsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *groupId = 56; // ID of group to return (default to null)

// Get group by ID
[apiInstance getGroupByIdWith:tenant
    groupId:groupId
              completionHandler: ^(Group output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AptemPublicApi = require('aptem_public_api');
var defaultClient = AptemPublicApi.ApiClient.instance;

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

// Create an instance of the API class
var api = new AptemPublicApi.GroupsApi()
var tenant = tenant_example; // {String} The tenant name
var groupId = 56; // {Integer} ID of group to return

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getGroupById(tenant, groupId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getGroupByIdExample
    {
        public void main()
        {
            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("X-API-Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new GroupsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var groupId = 56;  // Integer | ID of group to return (default to null)

            try {
                // Get group by ID
                Group result = apiInstance.getGroupById(tenant, groupId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling GroupsApi.getGroupById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\GroupsApi();
$tenant = tenant_example; // String | The tenant name
$groupId = 56; // Integer | ID of group to return

try {
    $result = $api_instance->getGroupById($ten