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


sendInvitationEmployerLogin

Send invitation email to employer login


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

Usage and SDK Samples

curl -X POST \
-H "X-API-Token: [[apiKey]]" \
 "https://{tenant}.aptem.co.uk/api/1.0/tenants/{tenant}/users/employer/{employerLoginId}/invitation"
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 to invite

        try {
            apiInstance.sendInvitationEmployerLogin(tenant, employerLoginId);
        } catch (ApiException e) {
            System.err.println("Exception when calling EmployerloginsApi#sendInvitationEmployerLogin");
            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 to invite

try {
    final result = await api_instance.sendInvitationEmployerLogin(tenant, employerLoginId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->sendInvitationEmployerLogin: $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 to invite

        try {
            apiInstance.sendInvitationEmployerLogin(tenant, employerLoginId);
        } catch (ApiException e) {
            System.err.println("Exception when calling EmployerloginsApi#sendInvitationEmployerLogin");
            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 to invite (default to null)

// Send invitation email to employer login
[apiInstance sendInvitationEmployerLoginWith: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 to invite

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

namespace Example
{
    public class sendInvitationEmployerLoginExample
    {
        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 to invite (default to null)

            try {
                // Send invitation email to employer login
                apiInstance.sendInvitationEmployerLogin(tenant, employerLoginId);
            } catch (Exception e) {
                Debug.Print("Exception when calling EmployerloginsApi.sendInvitationEmployerLogin: " + 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 to invite

try {
    $api_instance->sendInvitationEmployerLogin($tenant, $employerLoginId);
} catch (Exception $e) {
    echo 'Exception when calling EmployerloginsApi->sendInvitationEmployerLogin: ', $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 to invite

eval {
    $api_instance->sendInvitationEmployerLogin(tenant => $tenant, employerLoginId => $employerLoginId);
};
if ($@) {
    warn "Exception when calling EmployerloginsApi->sendInvitationEmployerLogin: $@\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 to invite (default to null)

try:
    # Send invitation email to employer login
    api_instance.send_invitation_employer_login(tenant, employerLoginId)
except ApiException as e:
    print("Exception when calling EmployerloginsApi->sendInvitationEmployerLogin: %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.sendInvitationEmployerLogin(tenant, employerLoginId, &context).wait();

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

Scopes

Parameters

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

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. Please note that "sendEmailInvitation" property is ignored. Use [sendInvitationEmployerLogin](#api-Employerlogins-sendInvitationEmployerLogin) to send invitation emails to employer logins.

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($tenant, $groupId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupsApi->getGroupById: ', $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 | ID of group to return

eval {
    my $result = $api_instance->getGroupById(tenant => $tenant, groupId => $groupId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GroupsApi->getGroupById: $@\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 | ID of group to return (default to null)

try:
    # Get group by ID
    api_response = api_instance.get_group_by_id(tenant, groupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupsApi->getGroupById: %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.getGroupById(tenant, groupId, &context).wait();

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

Scopes

Parameters

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

Responses


updateGroup

Update a group in Aptem


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

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/{groupId}" \
 -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
        Integer groupId = 56; // Integer | ID of group to be updated
        RequestGroup requestGroup = ; // RequestGroup | 

        try {
            apiInstance.updateGroup(tenant, groupId, requestGroup);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupsApi#updateGroup");
            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 be updated
final RequestGroup requestGroup = new RequestGroup(); // RequestGroup | 

try {
    final result = await api_instance.updateGroup(tenant, groupId, requestGroup);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->updateGroup: $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 be updated
        RequestGroup requestGroup = ; // RequestGroup | 

        try {
            apiInstance.updateGroup(tenant, groupId, requestGroup);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupsApi#updateGroup");
            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 be updated (default to null)
RequestGroup *requestGroup = ; // 

// Update a group in Aptem
[apiInstance updateGroupWith:tenant
    groupId:groupId
    requestGroup:requestGroup
              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} ID of group to be updated
var requestGroup = ; // {RequestGroup} 

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

namespace Example
{
    public class updateGroupExample
    {
        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 be updated (default to null)
            var requestGroup = new RequestGroup(); // RequestGroup | 

            try {
                // Update a group in Aptem
                apiInstance.updateGroup(tenant, groupId, requestGroup);
            } catch (Exception e) {
                Debug.Print("Exception when calling GroupsApi.updateGroup: " + 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 be updated
$requestGroup = ; // RequestGroup | 

try {
    $api_instance->updateGroup($tenant, $groupId, $requestGroup);
} catch (Exception $e) {
    echo 'Exception when calling GroupsApi->updateGroup: ', $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 | ID of group to be updated
my $requestGroup = WWW::OPenAPIClient::Object::RequestGroup->new(); # RequestGroup | 

eval {
    $api_instance->updateGroup(tenant => $tenant, groupId => $groupId, requestGroup => $requestGroup);
};
if ($@) {
    warn "Exception when calling GroupsApi->updateGroup: $@\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 | ID of group to be updated (default to null)
requestGroup =  # RequestGroup | 

try:
    # Update a group in Aptem
    api_instance.update_group(tenant, groupId, requestGroup)
except ApiException as e:
    print("Exception when calling GroupsApi->updateGroup: %s\n" % e)
extern crate GroupsApi;

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

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

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

Scopes

Parameters

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

Group object that needs to be updated in Aptem

Responses


Jobs

addJob

Add a new job to Aptem


/tenants/{tenant}/jobs

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}/jobs" \
 -d '{
  "hours" : "Full time",
  "groupId" : 1,
  "description" : "description",
  "employer" : {
    "address" : {
      "countyState" : "countyState",
      "address2" : "address2",
      "address1" : "address1",
      "townCity" : "townCity",
      "postCode" : "postCode"
    },
    "contact" : {
      "phone" : "phone",
      "name" : "name",
      "email" : "email"
    },
    "name" : "name",
    "category" : "category"
  },
  "title" : "title",
  "type" : "Temporary",
  "salaryMin" : 0,
  "url" : "url",
  "salaryMax" : 6,
  "expirationDate" : "2000-01-23",
  "caseOwner" : "10,",
  "wageType" : "FixedWage,",
  "fixedWageYearlyAmount" : "500,"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.JobsApi;

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

public class JobsApiExample {
    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
        JobsApi apiInstance = new JobsApi();
        String tenant = tenant_example; // String | The tenant name
        RequestJob requestJob = ; // RequestJob | 

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

final api_instance = DefaultApi();

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

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

import org.openapitools.client.api.JobsApi;

public class JobsApiExample {
    public static void main(String[] args) {
        JobsApi apiInstance = new JobsApi();
        String tenant = tenant_example; // String | The tenant name
        RequestJob requestJob = ; // RequestJob | 

        try {
            Job result = apiInstance.addJob(tenant, requestJob);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobsApi#addJob");
            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
JobsApi *apiInstance = [[JobsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
RequestJob *requestJob = ; // 

// Add a new job to Aptem
[apiInstance addJobWith:tenant
    requestJob:requestJob
              completionHandler: ^(Job 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.JobsApi()
var tenant = tenant_example; // {String} The tenant name
var requestJob = ; // {RequestJob} 

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

namespace Example
{
    public class addJobExample
    {
        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 JobsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var requestJob = new RequestJob(); // RequestJob | 

            try {
                // Add a new job to Aptem
                Job result = apiInstance.addJob(tenant, requestJob);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling JobsApi.addJob: " + 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\JobsApi();
$tenant = tenant_example; // String | The tenant name
$requestJob = ; // RequestJob | 

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

# 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::JobsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $requestJob = WWW::OPenAPIClient::Object::RequestJob->new(); # RequestJob | 

eval {
    my $result = $api_instance->addJob(tenant => $tenant, requestJob => $requestJob);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling JobsApi->addJob: $@\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.JobsApi()
tenant = tenant_example # String | The tenant name (default to null)
requestJob =  # RequestJob | 

try:
    # Add a new job to Aptem
    api_response = api_instance.add_job(tenant, requestJob)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling JobsApi->addJob: %s\n" % e)
extern crate JobsApi;

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

    let mut context = JobsApi::Context::default();
    let result = client.addJob(tenant, requestJob, &context).wait();

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

Scopes

Parameters

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

Job object that needs to be added to Aptem

Responses


applyJob

Apply a job - link a job and user with creating CV.


/tenants/{tenant}/jobs/{jobId}/apply

Usage and SDK Samples

curl -X POST \
-H "X-API-Token: [[apiKey]]" \
 -H "Content-Type: application/json" \
 "https://{tenant}.aptem.co.uk/api/1.0/tenants/{tenant}/jobs/{jobId}/apply" \
 -d '{
  "cv" : {
    "fileName" : "fileName",
    "fileContent" : "fileContent"
  },
  "userId" : 0
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.JobsApi;

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

public class JobsApiExample {
    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
        JobsApi apiInstance = new JobsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer jobId = 56; // Integer | ID of applied job
        JobApplication jobApplication = ; // JobApplication | 

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

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final Integer jobId = new Integer(); // Integer | ID of applied job
final JobApplication jobApplication = new JobApplication(); // JobApplication | 

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

import org.openapitools.client.api.JobsApi;

public class JobsApiExample {
    public static void main(String[] args) {
        JobsApi apiInstance = new JobsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer jobId = 56; // Integer | ID of applied job
        JobApplication jobApplication = ; // JobApplication | 

        try {
            apiInstance.applyJob(tenant, jobId, jobApplication);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobsApi#applyJob");
            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
JobsApi *apiInstance = [[JobsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *jobId = 56; // ID of applied job (default to null)
JobApplication *jobApplication = ; // 

// Apply a job - link a job and user with creating CV.
[apiInstance applyJobWith:tenant
    jobId:jobId
    jobApplication:jobApplication
              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.JobsApi()
var tenant = tenant_example; // {String} The tenant name
var jobId = 56; // {Integer} ID of applied job
var jobApplication = ; // {JobApplication} 

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

namespace Example
{
    public class applyJobExample
    {
        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 JobsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var jobId = 56;  // Integer | ID of applied job (default to null)
            var jobApplication = new JobApplication(); // JobApplication | 

            try {
                // Apply a job - link a job and user with creating CV.
                apiInstance.applyJob(tenant, jobId, jobApplication);
            } catch (Exception e) {
                Debug.Print("Exception when calling JobsApi.applyJob: " + 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\JobsApi();
$tenant = tenant_example; // String | The tenant name
$jobId = 56; // Integer | ID of applied job
$jobApplication = ; // JobApplication | 

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

# 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::JobsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $jobId = 56; # Integer | ID of applied job
my $jobApplication = WWW::OPenAPIClient::Object::JobApplication->new(); # JobApplication | 

eval {
    $api_instance->applyJob(tenant => $tenant, jobId => $jobId, jobApplication => $jobApplication);
};
if ($@) {
    warn "Exception when calling JobsApi->applyJob: $@\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.JobsApi()
tenant = tenant_example # String | The tenant name (default to null)
jobId = 56 # Integer | ID of applied job (default to null)
jobApplication =  # JobApplication | 

try:
    # Apply a job - link a job and user with creating CV.
    api_instance.apply_job(tenant, jobId, jobApplication)
except ApiException as e:
    print("Exception when calling JobsApi->applyJob: %s\n" % e)
extern crate JobsApi;

pub fn main() {
    let tenant = tenant_example; // String
    let jobId = 56; // Integer
    let jobApplication = ; // JobApplication

    let mut context = JobsApi::Context::default();
    let result = client.applyJob(tenant, jobId, jobApplication, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
jobId*
Integer (int32)
ID of applied job
Required
Body parameters
Name Description
jobApplication *

Description of job application - user id, base64 encoded file of CV and file name

Responses


deleteJob

Deletes a job


/tenants/{tenant}/jobs/{jobId}

Usage and SDK Samples

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

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

public class JobsApiExample {
    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
        JobsApi apiInstance = new JobsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer jobId = 56; // Integer | Job id to delete

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

final api_instance = DefaultApi();

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

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

import org.openapitools.client.api.JobsApi;

public class JobsApiExample {
    public static void main(String[] args) {
        JobsApi apiInstance = new JobsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer jobId = 56; // Integer | Job id to delete

        try {
            apiInstance.deleteJob(tenant, jobId);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobsApi#deleteJob");
            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
JobsApi *apiInstance = [[JobsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *jobId = 56; // Job id to delete (default to null)

// Deletes a job
[apiInstance deleteJobWith:tenant
    jobId:jobId
              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.JobsApi()
var tenant = tenant_example; // {String} The tenant name
var jobId = 56; // {Integer} Job id to delete

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

namespace Example
{
    public class deleteJobExample
    {
        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 JobsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var jobId = 56;  // Integer | Job id to delete (default to null)

            try {
                // Deletes a job
                apiInstance.deleteJob(tenant, jobId);
            } catch (Exception e) {
                Debug.Print("Exception when calling JobsApi.deleteJob: " + 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\JobsApi();
$tenant = tenant_example; // String | The tenant name
$jobId = 56; // Integer | Job id to delete

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

# 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::JobsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $jobId = 56; # Integer | Job id to delete

eval {
    $api_instance->deleteJob(tenant => $tenant, jobId => $jobId);
};
if ($@) {
    warn "Exception when calling JobsApi->deleteJob: $@\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.JobsApi()
tenant = tenant_example # String | The tenant name (default to null)
jobId = 56 # Integer | Job id to delete (default to null)

try:
    # Deletes a job
    api_instance.delete_job(tenant, jobId)
except ApiException as e:
    print("Exception when calling JobsApi->deleteJob: %s\n" % e)
extern crate JobsApi;

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

    let mut context = JobsApi::Context::default();
    let result = client.deleteJob(tenant, jobId, &context).wait();

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

Scopes

Parameters

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

Responses


getJobById

Get job by ID

Returns a job


/tenants/{tenant}/jobs/{jobId}

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}/jobs/{jobId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.JobsApi;

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

public class JobsApiExample {
    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
        JobsApi apiInstance = new JobsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer jobId = 56; // Integer | ID of job to return

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

final api_instance = DefaultApi();

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

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

import org.openapitools.client.api.JobsApi;

public class JobsApiExample {
    public static void main(String[] args) {
        JobsApi apiInstance = new JobsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer jobId = 56; // Integer | ID of job to return

        try {
            Job result = apiInstance.getJobById(tenant, jobId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobsApi#getJobById");
            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
JobsApi *apiInstance = [[JobsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *jobId = 56; // ID of job to return (default to null)

// Get job by ID
[apiInstance getJobByIdWith:tenant
    jobId:jobId
              completionHandler: ^(Job 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.JobsApi()
var tenant = tenant_example; // {String} The tenant name
var jobId = 56; // {Integer} ID of job to return

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

namespace Example
{
    public class getJobByIdExample
    {
        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 JobsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var jobId = 56;  // Integer | ID of job to return (default to null)

            try {
                // Get job by ID
                Job result = apiInstance.getJobById(tenant, jobId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling JobsApi.getJobById: " + 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\JobsApi();
$tenant = tenant_example; // String | The tenant name
$jobId = 56; // Integer | ID of job to return

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

# 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::JobsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $jobId = 56; # Integer | ID of job to return

eval {
    my $result = $api_instance->getJobById(tenant => $tenant, jobId => $jobId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling JobsApi->getJobById: $@\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.JobsApi()
tenant = tenant_example # String | The tenant name (default to null)
jobId = 56 # Integer | ID of job to return (default to null)

try:
    # Get job by ID
    api_response = api_instance.get_job_by_id(tenant, jobId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling JobsApi->getJobById: %s\n" % e)
extern crate JobsApi;

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

    let mut context = JobsApi::Context::default();
    let result = client.getJobById(tenant, jobId, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
jobId*
Integer (int32)
ID of job to return
Required

Responses


updateJob

Updates a job in Aptem


/tenants/{tenant}/jobs/{jobId}

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}/jobs/{jobId}" \
 -d '{
  "hours" : "Full time",
  "groupId" : 1,
  "description" : "description",
  "employer" : {
    "address" : {
      "countyState" : "countyState",
      "address2" : "address2",
      "address1" : "address1",
      "townCity" : "townCity",
      "postCode" : "postCode"
    },
    "contact" : {
      "phone" : "phone",
      "name" : "name",
      "email" : "email"
    },
    "name" : "name",
    "category" : "category"
  },
  "title" : "title",
  "type" : "Temporary",
  "salaryMin" : 0,
  "url" : "url",
  "salaryMax" : 6,
  "expirationDate" : "2000-01-23",
  "caseOwner" : "10,",
  "wageType" : "FixedWage,",
  "fixedWageYearlyAmount" : "500,"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.JobsApi;

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

public class JobsApiExample {
    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
        JobsApi apiInstance = new JobsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer jobId = 56; // Integer | ID of job to be updated
        RequestJob requestJob = ; // RequestJob | 

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

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final Integer jobId = new Integer(); // Integer | ID of job to be updated
final RequestJob requestJob = new RequestJob(); // RequestJob | 

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

import org.openapitools.client.api.JobsApi;

public class JobsApiExample {
    public static void main(String[] args) {
        JobsApi apiInstance = new JobsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer jobId = 56; // Integer | ID of job to be updated
        RequestJob requestJob = ; // RequestJob | 

        try {
            apiInstance.updateJob(tenant, jobId, requestJob);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobsApi#updateJob");
            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
JobsApi *apiInstance = [[JobsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *jobId = 56; // ID of job to be updated (default to null)
RequestJob *requestJob = ; // 

// Updates a job in Aptem
[apiInstance updateJobWith:tenant
    jobId:jobId
    requestJob:requestJob
              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.JobsApi()
var tenant = tenant_example; // {String} The tenant name
var jobId = 56; // {Integer} ID of job to be updated
var requestJob = ; // {RequestJob} 

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

namespace Example
{
    public class updateJobExample
    {
        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 JobsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var jobId = 56;  // Integer | ID of job to be updated (default to null)
            var requestJob = new RequestJob(); // RequestJob | 

            try {
                // Updates a job in Aptem
                apiInstance.updateJob(tenant, jobId, requestJob);
            } catch (Exception e) {
                Debug.Print("Exception when calling JobsApi.updateJob: " + 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\JobsApi();
$tenant = tenant_example; // String | The tenant name
$jobId = 56; // Integer | ID of job to be updated
$requestJob = ; // RequestJob | 

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

# 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::JobsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $jobId = 56; # Integer | ID of job to be updated
my $requestJob = WWW::OPenAPIClient::Object::RequestJob->new(); # RequestJob | 

eval {
    $api_instance->updateJob(tenant => $tenant, jobId => $jobId, requestJob => $requestJob);
};
if ($@) {
    warn "Exception when calling JobsApi->updateJob: $@\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.JobsApi()
tenant = tenant_example # String | The tenant name (default to null)
jobId = 56 # Integer | ID of job to be updated (default to null)
requestJob =  # RequestJob | 

try:
    # Updates a job in Aptem
    api_instance.update_job(tenant, jobId, requestJob)
except ApiException as e:
    print("Exception when calling JobsApi->updateJob: %s\n" % e)
extern crate JobsApi;

pub fn main() {
    let tenant = tenant_example; // String
    let jobId = 56; // Integer
    let requestJob = ; // RequestJob

    let mut context = JobsApi::Context::default();
    let result = client.updateJob(tenant, jobId, requestJob, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
jobId*
Integer (int32)
ID of job to be updated
Required
Body parameters
Name Description
requestJob *

Job object that needs to be updated in Aptem

Responses


OfflineLearning

addOfflineLearning

Create new Aptem offline learning


/tenants/{tenant}/users/{userId}/offlinelearning

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/{userId}/offlinelearning" \
 -d '{
  "address" : {
    "id" : 45,
    "countyState" : "countyState",
    "address2" : "address2",
    "address1" : "address1",
    "townCity" : "townCity",
    "postCode" : "postCode",
    "isPrimary" : false
  },
  "tutorName" : "tutor name",
  "tutorEmail" : "tutor@mail.com",
  "title" : "offline learning",
  "description" : "offline learning description",
  "instructions" : "offline learning instructions",
  "dates" : [ "2019-05-05", "2019-05-06" ],
  "startTime" : "09:00",
  "endTime" : "18:00",
  "plannedHours" : 9,
  "requireEvidence" : true
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.OfflineLearningApi;

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

public class OfflineLearningApiExample {
    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
        OfflineLearningApi apiInstance = new OfflineLearningApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId for offline learning to get
        RequestOfflineLearning requestOfflineLearning = ; // RequestOfflineLearning | 

        try {
            OfflineLearning result = apiInstance.addOfflineLearning(tenant, userId, requestOfflineLearning);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OfflineLearningApi#addOfflineLearning");
            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 | userId for offline learning to get
final RequestOfflineLearning requestOfflineLearning = new RequestOfflineLearning(); // RequestOfflineLearning | 

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

import org.openapitools.client.api.OfflineLearningApi;

public class OfflineLearningApiExample {
    public static void main(String[] args) {
        OfflineLearningApi apiInstance = new OfflineLearningApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId for offline learning to get
        RequestOfflineLearning requestOfflineLearning = ; // RequestOfflineLearning | 

        try {
            OfflineLearning result = apiInstance.addOfflineLearning(tenant, userId, requestOfflineLearning);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OfflineLearningApi#addOfflineLearning");
            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
OfflineLearningApi *apiInstance = [[OfflineLearningApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // userId for offline learning to get (default to null)
RequestOfflineLearning *requestOfflineLearning = ; // 

// Create new Aptem offline learning
[apiInstance addOfflineLearningWith:tenant
    userId:userId
    requestOfflineLearning:requestOfflineLearning
              completionHandler: ^(OfflineLearning 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.OfflineLearningApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} userId for offline learning to get
var requestOfflineLearning = ; // {RequestOfflineLearning} 

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

namespace Example
{
    public class addOfflineLearningExample
    {
        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 OfflineLearningApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | userId for offline learning to get (default to null)
            var requestOfflineLearning = new RequestOfflineLearning(); // RequestOfflineLearning | 

            try {
                // Create new Aptem offline learning
                OfflineLearning result = apiInstance.addOfflineLearning(tenant, userId, requestOfflineLearning);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling OfflineLearningApi.addOfflineLearning: " + 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\OfflineLearningApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | userId for offline learning to get
$requestOfflineLearning = ; // RequestOfflineLearning | 

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

# 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::OfflineLearningApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | userId for offline learning to get
my $requestOfflineLearning = WWW::OPenAPIClient::Object::RequestOfflineLearning->new(); # RequestOfflineLearning | 

eval {
    my $result = $api_instance->addOfflineLearning(tenant => $tenant, userId => $userId, requestOfflineLearning => $requestOfflineLearning);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OfflineLearningApi->addOfflineLearning: $@\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.OfflineLearningApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | userId for offline learning to get (default to null)
requestOfflineLearning =  # RequestOfflineLearning | 

try:
    # Create new Aptem offline learning
    api_response = api_instance.add_offline_learning(tenant, userId, requestOfflineLearning)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OfflineLearningApi->addOfflineLearning: %s\n" % e)
extern crate OfflineLearningApi;

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

    let mut context = OfflineLearningApi::Context::default();
    let result = client.addOfflineLearning(tenant, userId, requestOfflineLearning, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
userId for offline learning to get
Required
Body parameters
Name Description
requestOfflineLearning *

OfflineLearning object that needs to be created for user

Responses


deleteOfflineLearning

Delete offline learning


/tennants/{tenant}/users/{userId}/offlinelearning/{aptemRef}

Usage and SDK Samples

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

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

public class OfflineLearningApiExample {
    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
        OfflineLearningApi apiInstance = new OfflineLearningApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId for offline learning to delete
        Integer aptemRef = 56; // Integer | aptemRef of offline learning component to delete

        try {
            apiInstance.deleteOfflineLearning(tenant, userId, aptemRef);
        } catch (ApiException e) {
            System.err.println("Exception when calling OfflineLearningApi#deleteOfflineLearning");
            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 | userId for offline learning to delete
final Integer aptemRef = new Integer(); // Integer | aptemRef of offline learning component to delete

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

import org.openapitools.client.api.OfflineLearningApi;

public class OfflineLearningApiExample {
    public static void main(String[] args) {
        OfflineLearningApi apiInstance = new OfflineLearningApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId for offline learning to delete
        Integer aptemRef = 56; // Integer | aptemRef of offline learning component to delete

        try {
            apiInstance.deleteOfflineLearning(tenant, userId, aptemRef);
        } catch (ApiException e) {
            System.err.println("Exception when calling OfflineLearningApi#deleteOfflineLearning");
            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
OfflineLearningApi *apiInstance = [[OfflineLearningApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // userId for offline learning to delete (default to null)
Integer *aptemRef = 56; // aptemRef of offline learning component to delete (default to null)

// Delete offline learning
[apiInstance deleteOfflineLearningWith:tenant
    userId:userId
    aptemRef:aptemRef
              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.OfflineLearningApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} userId for offline learning to delete
var aptemRef = 56; // {Integer} aptemRef of offline learning component to delete

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

namespace Example
{
    public class deleteOfflineLearningExample
    {
        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 OfflineLearningApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | userId for offline learning to delete (default to null)
            var aptemRef = 56;  // Integer | aptemRef of offline learning component to delete (default to null)

            try {
                // Delete offline learning
                apiInstance.deleteOfflineLearning(tenant, userId, aptemRef);
            } catch (Exception e) {
                Debug.Print("Exception when calling OfflineLearningApi.deleteOfflineLearning: " + 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\OfflineLearningApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | userId for offline learning to delete
$aptemRef = 56; // Integer | aptemRef of offline learning component to delete

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

# 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::OfflineLearningApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | userId for offline learning to delete
my $aptemRef = 56; # Integer | aptemRef of offline learning component to delete

eval {
    $api_instance->deleteOfflineLearning(tenant => $tenant, userId => $userId, aptemRef => $aptemRef);
};
if ($@) {
    warn "Exception when calling OfflineLearningApi->deleteOfflineLearning: $@\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.OfflineLearningApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | userId for offline learning to delete (default to null)
aptemRef = 56 # Integer | aptemRef of offline learning component to delete (default to null)

try:
    # Delete offline learning
    api_instance.delete_offline_learning(tenant, userId, aptemRef)
except ApiException as e:
    print("Exception when calling OfflineLearningApi->deleteOfflineLearning: %s\n" % e)
extern crate OfflineLearningApi;

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

    let mut context = OfflineLearningApi::Context::default();
    let result = client.deleteOfflineLearning(tenant, userId, aptemRef, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
userId for offline learning to delete
Required
aptemRef*
Integer (int32)
aptemRef of offline learning component to delete
Required

Responses


getOfflineLearning

Get offline learning components by user id

Returns a collection of placement-based LP components


/tenants/{tenant}/users/{userId}/offlinelearning

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/{userId}/offlinelearning"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.OfflineLearningApi;

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

public class OfflineLearningApiExample {
    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
        OfflineLearningApi apiInstance = new OfflineLearningApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId for offline learning to get

        try {
            OfflineLearning result = apiInstance.getOfflineLearning(tenant, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OfflineLearningApi#getOfflineLearning");
            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 | userId for offline learning to get

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

import org.openapitools.client.api.OfflineLearningApi;

public class OfflineLearningApiExample {
    public static void main(String[] args) {
        OfflineLearningApi apiInstance = new OfflineLearningApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId for offline learning to get

        try {
            OfflineLearning result = apiInstance.getOfflineLearning(tenant, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OfflineLearningApi#getOfflineLearning");
            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
OfflineLearningApi *apiInstance = [[OfflineLearningApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // userId for offline learning to get (default to null)

// Get offline learning components by user id
[apiInstance getOfflineLearningWith:tenant
    userId:userId
              completionHandler: ^(OfflineLearning 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.OfflineLearningApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} userId for offline learning to get

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

namespace Example
{
    public class getOfflineLearningExample
    {
        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 OfflineLearningApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | userId for offline learning to get (default to null)

            try {
                // Get offline learning components by user id
                OfflineLearning result = apiInstance.getOfflineLearning(tenant, userId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling OfflineLearningApi.getOfflineLearning: " + 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\OfflineLearningApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | userId for offline learning to get

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

# 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::OfflineLearningApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | userId for offline learning to get

eval {
    my $result = $api_instance->getOfflineLearning(tenant => $tenant, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OfflineLearningApi->getOfflineLearning: $@\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.OfflineLearningApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | userId for offline learning to get (default to null)

try:
    # Get offline learning components by user id
    api_response = api_instance.get_offline_learning(tenant, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OfflineLearningApi->getOfflineLearning: %s\n" % e)
extern crate OfflineLearningApi;

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

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

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
userId for offline learning to get
Required

Responses


updateOfflineLearning

Update offline learning in Aptem


/tennants/{tenant}/users/{userId}/offlinelearning/{aptemRef}

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/tennants/{tenant}/users/{userId}/offlinelearning/{aptemRef}" \
 -d '{
  "address" : {
    "id" : 45,
    "countyState" : "countyState",
    "address2" : "address2",
    "address1" : "address1",
    "townCity" : "townCity",
    "postCode" : "postCode",
    "isPrimary" : false
  },
  "tutorName" : "tutor name",
  "tutorEmail" : "tutor@mail.com",
  "title" : "offline learning",
  "description" : "offline learning description",
  "instructions" : "offline learning instructions",
  "dates" : [ "2019-05-05", "2019-05-06" ],
  "startTime" : "09:00",
  "endTime" : "18:00",
  "plannedHours" : 9,
  "requireEvidence" : true
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.OfflineLearningApi;

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

public class OfflineLearningApiExample {
    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
        OfflineLearningApi apiInstance = new OfflineLearningApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId for offline learning to update
        Integer aptemRef = 56; // Integer | aptemRef of offline learning component to update
        RequestOfflineLearning requestOfflineLearning = ; // RequestOfflineLearning | 

        try {
            OfflineLearning result = apiInstance.updateOfflineLearning(tenant, userId, aptemRef, requestOfflineLearning);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OfflineLearningApi#updateOfflineLearning");
            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 | userId for offline learning to update
final Integer aptemRef = new Integer(); // Integer | aptemRef of offline learning component to update
final RequestOfflineLearning requestOfflineLearning = new RequestOfflineLearning(); // RequestOfflineLearning | 

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

import org.openapitools.client.api.OfflineLearningApi;

public class OfflineLearningApiExample {
    public static void main(String[] args) {
        OfflineLearningApi apiInstance = new OfflineLearningApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId for offline learning to update
        Integer aptemRef = 56; // Integer | aptemRef of offline learning component to update
        RequestOfflineLearning requestOfflineLearning = ; // RequestOfflineLearning | 

        try {
            OfflineLearning result = apiInstance.updateOfflineLearning(tenant, userId, aptemRef, requestOfflineLearning);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OfflineLearningApi#updateOfflineLearning");
            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
OfflineLearningApi *apiInstance = [[OfflineLearningApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // userId for offline learning to update (default to null)
Integer *aptemRef = 56; // aptemRef of offline learning component to update (default to null)
RequestOfflineLearning *requestOfflineLearning = ; // 

// Update offline learning in Aptem
[apiInstance updateOfflineLearningWith:tenant
    userId:userId
    aptemRef:aptemRef
    requestOfflineLearning:requestOfflineLearning
              completionHandler: ^(OfflineLearning 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.OfflineLearningApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} userId for offline learning to update
var aptemRef = 56; // {Integer} aptemRef of offline learning component to update
var requestOfflineLearning = ; // {RequestOfflineLearning} 

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

namespace Example
{
    public class updateOfflineLearningExample
    {
        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 OfflineLearningApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | userId for offline learning to update (default to null)
            var aptemRef = 56;  // Integer | aptemRef of offline learning component to update (default to null)
            var requestOfflineLearning = new RequestOfflineLearning(); // RequestOfflineLearning | 

            try {
                // Update offline learning in Aptem
                OfflineLearning result = apiInstance.updateOfflineLearning(tenant, userId, aptemRef, requestOfflineLearning);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling OfflineLearningApi.updateOfflineLearning: " + 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\OfflineLearningApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | userId for offline learning to update
$aptemRef = 56; // Integer | aptemRef of offline learning component to update
$requestOfflineLearning = ; // RequestOfflineLearning | 

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

# 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::OfflineLearningApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | userId for offline learning to update
my $aptemRef = 56; # Integer | aptemRef of offline learning component to update
my $requestOfflineLearning = WWW::OPenAPIClient::Object::RequestOfflineLearning->new(); # RequestOfflineLearning | 

eval {
    my $result = $api_instance->updateOfflineLearning(tenant => $tenant, userId => $userId, aptemRef => $aptemRef, requestOfflineLearning => $requestOfflineLearning);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OfflineLearningApi->updateOfflineLearning: $@\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.OfflineLearningApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | userId for offline learning to update (default to null)
aptemRef = 56 # Integer | aptemRef of offline learning component to update (default to null)
requestOfflineLearning =  # RequestOfflineLearning | 

try:
    # Update offline learning in Aptem
    api_response = api_instance.update_offline_learning(tenant, userId, aptemRef, requestOfflineLearning)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OfflineLearningApi->updateOfflineLearning: %s\n" % e)
extern crate OfflineLearningApi;

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

    let mut context = OfflineLearningApi::Context::default();
    let result = client.updateOfflineLearning(tenant, userId, aptemRef, requestOfflineLearning, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
userId for offline learning to update
Required
aptemRef*
Integer (int32)
aptemRef of offline learning component to update
Required
Body parameters
Name Description
requestOfflineLearning *

Offline learning object that needs to be updated in Aptem

Responses


Onboarding

getOnboardingInformationByUserId

Get user onboarding information

Returns user onboarding information


/tenants/{tenant}/users/{userId}/onboarding

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/{userId}/onboarding"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.OnboardingApi;

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

public class OnboardingApiExample {
    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
        OnboardingApi apiInstance = new OnboardingApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId to fetch the usage for

        try {
            UserOnboarding result = apiInstance.getOnboardingInformationByUserId(tenant, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnboardingApi#getOnboardingInformationByUserId");
            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 | userId to fetch the usage for

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

import org.openapitools.client.api.OnboardingApi;

public class OnboardingApiExample {
    public static void main(String[] args) {
        OnboardingApi apiInstance = new OnboardingApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId to fetch the usage for

        try {
            UserOnboarding result = apiInstance.getOnboardingInformationByUserId(tenant, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OnboardingApi#getOnboardingInformationByUserId");
            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
OnboardingApi *apiInstance = [[OnboardingApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // userId to fetch the usage for (default to null)

// Get user onboarding information
[apiInstance getOnboardingInformationByUserIdWith:tenant
    userId:userId
              completionHandler: ^(UserOnboarding 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.OnboardingApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} userId to fetch the usage for

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

namespace Example
{
    public class getOnboardingInformationByUserIdExample
    {
        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 OnboardingApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | userId to fetch the usage for (default to null)

            try {
                // Get user onboarding information
                UserOnboarding result = apiInstance.getOnboardingInformationByUserId(tenant, userId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling OnboardingApi.getOnboardingInformationByUserId: " + 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\OnboardingApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | userId to fetch the usage for

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

# 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::OnboardingApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | userId to fetch the usage for

eval {
    my $result = $api_instance->getOnboardingInformationByUserId(tenant => $tenant, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OnboardingApi->getOnboardingInformationByUserId: $@\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.OnboardingApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | userId to fetch the usage for (default to null)

try:
    # Get user onboarding information
    api_response = api_instance.get_onboarding_information_by_user_id(tenant, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OnboardingApi->getOnboardingInformationByUserId: %s\n" % e)
extern crate OnboardingApi;

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

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

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
userId to fetch the usage for
Required

Responses


Organisations

addOrg

Add a new organisation to Aptem


/tenants/{tenant}/organizations

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}/organizations" \
 -d '{
  "type" : "Employer",
  "companyName" : "companyName",
  "noOfEmployees" : 5,
  "EDRS" : "EDRS",
  "status" : "Confirmed",
  "apprenticeshipAgreementId" : 123456789,
  "levyPayer" : true,
  "website" : "https://aptem.co.uk",
  "referenceNumber" : "F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.OrganisationsApi;

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

public class OrganisationsApiExample {
    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
        OrganisationsApi apiInstance = new OrganisationsApi();
        String tenant = tenant_example; // String | The tenant name
        RequestOrganisation requestOrganisation = ; // RequestOrganisation | 

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

final api_instance = DefaultApi();

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

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

import org.openapitools.client.api.OrganisationsApi;

public class OrganisationsApiExample {
    public static void main(String[] args) {
        OrganisationsApi apiInstance = new OrganisationsApi();
        String tenant = tenant_example; // String | The tenant name
        RequestOrganisation requestOrganisation = ; // RequestOrganisation | 

        try {
            Organisation result = apiInstance.addOrg(tenant, requestOrganisation);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganisationsApi#addOrg");
            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
OrganisationsApi *apiInstance = [[OrganisationsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
RequestOrganisation *requestOrganisation = ; // 

// Add a new organisation to Aptem
[apiInstance addOrgWith:tenant
    requestOrganisation:requestOrganisation
              completionHandler: ^(Organisation 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.OrganisationsApi()
var tenant = tenant_example; // {String} The tenant name
var requestOrganisation = ; // {RequestOrganisation} 

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

namespace Example
{
    public class addOrgExample
    {
        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 OrganisationsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var requestOrganisation = new RequestOrganisation(); // RequestOrganisation | 

            try {
                // Add a new organisation to Aptem
                Organisation result = apiInstance.addOrg(tenant, requestOrganisation);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling OrganisationsApi.addOrg: " + 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\OrganisationsApi();
$tenant = tenant_example; // String | The tenant name
$requestOrganisation = ; // RequestOrganisation | 

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

# 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::OrganisationsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $requestOrganisation = WWW::OPenAPIClient::Object::RequestOrganisation->new(); # RequestOrganisation | 

eval {
    my $result = $api_instance->addOrg(tenant => $tenant, requestOrganisation => $requestOrganisation);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganisationsApi->addOrg: $@\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.OrganisationsApi()
tenant = tenant_example # String | The tenant name (default to null)
requestOrganisation =  # RequestOrganisation | 

try:
    # Add a new organisation to Aptem
    api_response = api_instance.add_org(tenant, requestOrganisation)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganisationsApi->addOrg: %s\n" % e)
extern crate OrganisationsApi;

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

    let mut context = OrganisationsApi::Context::default();
    let result = client.addOrg(tenant, requestOrganisation, &context).wait();

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

Scopes

Parameters

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

Organisation object that needs to be added to Aptem

Responses


addOrgAddress

Add a new organisation address to Aptem


/tenants/{tenant}/organizations/{orgId}/addresses

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}/organizations/{orgId}/addresses" \
 -d '{
  "id" : 45,
  "countyState" : "countyState",
  "address2" : "address2",
  "address1" : "address1",
  "townCity" : "townCity",
  "postCode" : "postCode",
  "isPrimary" : false
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.OrganisationsApi;

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

public class OrganisationsApiExample {
    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
        OrganisationsApi apiInstance = new OrganisationsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer orgId = 56; // Integer | orgId to create the contact
        RequestAddress requestAddress = ; // RequestAddress | 

        try {
            Address result = apiInstance.addOrgAddress(tenant, orgId, requestAddress);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganisationsApi#addOrgAddress");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final Integer orgId = new Integer(); // Integer | orgId to create the contact
final RequestAddress requestAddress = new RequestAddress(); // RequestAddress | 

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

import org.openapitools.client.api.OrganisationsApi;

public class OrganisationsApiExample {
    public static void main(String[] args) {
        OrganisationsApi apiInstance = new OrganisationsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer orgId = 56; // Integer | orgId to create the contact
        RequestAddress requestAddress = ; // RequestAddress | 

        try {
            Address result = apiInstance.addOrgAddress(tenant, orgId, requestAddress);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganisationsApi#addOrgAddress");
            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
OrganisationsApi *apiInstance = [[OrganisationsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *orgId = 56; // orgId to create the contact (default to null)
RequestAddress *requestAddress = ; // 

// Add a new organisation address to Aptem
[apiInstance addOrgAddressWith:tenant
    orgId:orgId
    requestAddress:requestAddress
              completionHandler: ^(Address 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.OrganisationsApi()
var tenant = tenant_example; // {String} The tenant name
var orgId = 56; // {Integer} orgId to create the contact
var requestAddress = ; // {RequestAddress} 

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

namespace Example
{
    public class addOrgAddressExample
    {
        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 OrganisationsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var orgId = 56;  // Integer | orgId to create the contact (default to null)
            var requestAddress = new RequestAddress(); // RequestAddress | 

            try {
                // Add a new organisation address to Aptem
                Address result = apiInstance.addOrgAddress(tenant, orgId, requestAddress);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling OrganisationsApi.addOrgAddress: " + 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\OrganisationsApi();
$tenant = tenant_example; // String | The tenant name
$orgId = 56; // Integer | orgId to create the contact
$requestAddress = ; // RequestAddress | 

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

# 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::OrganisationsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $orgId = 56; # Integer | orgId to create the contact
my $requestAddress = WWW::OPenAPIClient::Object::RequestAddress->new(); # RequestAddress | 

eval {
    my $result = $api_instance->addOrgAddress(tenant => $tenant, orgId => $orgId, requestAddress => $requestAddress);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganisationsApi->addOrgAddress: $@\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.OrganisationsApi()
tenant = tenant_example # String | The tenant name (default to null)
orgId = 56 # Integer | orgId to create the contact (default to null)
requestAddress =  # RequestAddress | 

try:
    # Add a new organisation address to Aptem
    api_response = api_instance.add_org_address(tenant, orgId, requestAddress)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganisationsApi->addOrgAddress: %s\n" % e)
extern crate OrganisationsApi;

pub fn main() {
    let tenant = tenant_example; // String
    let orgId = 56; // Integer
    let requestAddress = ; // RequestAddress

    let mut context = OrganisationsApi::Context::default();
    let result = client.addOrgAddress(tenant, orgId, requestAddress, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
orgId*
Integer (int32)
orgId to create the contact
Required
Body parameters
Name Description
requestAddress *

Address object that needs to be added to organisation

Responses


addOrgContact

Add a new organisation contact to Aptem


/tenants/{tenant}/organizations/{orgId}/contacts

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}/organizations/{orgId}/contacts" \
 -d '{
  "id" : 88,
  "contactName" : "contactName",
  "contactEmail" : "contactEmail",
  "contactPhone" : "contactPhone",
  "isPrimary" : true,
  "ownerId" : 6
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.OrganisationsApi;

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

public class OrganisationsApiExample {
    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
        OrganisationsApi apiInstance = new OrganisationsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer orgId = 56; // Integer | orgId to create the contact
        RequestContactAdd requestContactAdd = ; // RequestContactAdd | 

        try {
            Contact result = apiInstance.addOrgContact(tenant, orgId, requestContactAdd);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganisationsApi#addOrgContact");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final Integer orgId = new Integer(); // Integer | orgId to create the contact
final RequestContactAdd requestContactAdd = new RequestContactAdd(); // RequestContactAdd | 

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

import org.openapitools.client.api.OrganisationsApi;

public class OrganisationsApiExample {
    public static void main(String[] args) {
        OrganisationsApi apiInstance = new OrganisationsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer orgId = 56; // Integer | orgId to create the contact
        RequestContactAdd requestContactAdd = ; // RequestContactAdd | 

        try {
            Contact result = apiInstance.addOrgContact(tenant, orgId, requestContactAdd);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganisationsApi#addOrgContact");
            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
OrganisationsApi *apiInstance = [[OrganisationsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *orgId = 56; // orgId to create the contact (default to null)
RequestContactAdd *requestContactAdd = ; // 

// Add a new organisation contact to Aptem
[apiInstance addOrgContactWith:tenant
    orgId:orgId
    requestContactAdd:requestContactAdd
              completionHandler: ^(Contact 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.OrganisationsApi()
var tenant = tenant_example; // {String} The tenant name
var orgId = 56; // {Integer} orgId to create the contact
var requestContactAdd = ; // {RequestContactAdd} 

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

namespace Example
{
    public class addOrgContactExample
    {
        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 OrganisationsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var orgId = 56;  // Integer | orgId to create the contact (default to null)
            var requestContactAdd = new RequestContactAdd(); // RequestContactAdd | 

            try {
                // Add a new organisation contact to Aptem
                Contact result = apiInstance.addOrgContact(tenant, orgId, requestContactAdd);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling OrganisationsApi.addOrgContact: " + 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\OrganisationsApi();
$tenant = tenant_example; // String | The tenant name
$orgId = 56; // Integer | orgId to create the contact
$requestContactAdd = ; // RequestContactAdd | 

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

# 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::OrganisationsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $orgId = 56; # Integer | orgId to create the contact
my $requestContactAdd = WWW::OPenAPIClient::Object::RequestContactAdd->new(); # RequestContactAdd | 

eval {
    my $result = $api_instance->addOrgContact(tenant => $tenant, orgId => $orgId, requestContactAdd => $requestContactAdd);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganisationsApi->addOrgContact: $@\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.OrganisationsApi()
tenant = tenant_example # String | The tenant name (default to null)
orgId = 56 # Integer | orgId to create the contact (default to null)
requestContactAdd =  # RequestContactAdd | 

try:
    # Add a new organisation contact to Aptem
    api_response = api_instance.add_org_contact(tenant, orgId, requestContactAdd)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganisationsApi->addOrgContact: %s\n" % e)
extern crate OrganisationsApi;

pub fn main() {
    let tenant = tenant_example; // String
    let orgId = 56; // Integer
    let requestContactAdd = ; // RequestContactAdd

    let mut context = OrganisationsApi::Context::default();
    let result = client.addOrgContact(tenant, orgId, requestContactAdd, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
orgId*
Integer (int32)
orgId to create the contact
Required
Body parameters
Name Description
requestContactAdd *

Contact object that needs to be added to organisation

Responses


deleteOrg

Deletes an organisation


/tenants/{tenant}/organizations/{orgId}

Usage and SDK Samples

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

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

public class OrganisationsApiExample {
    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
        OrganisationsApi apiInstance = new OrganisationsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer orgId = 56; // Integer | Organisation id to delete

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

final api_instance = DefaultApi();

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

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

import org.openapitools.client.api.OrganisationsApi;

public class OrganisationsApiExample {
    public static void main(String[] args) {
        OrganisationsApi apiInstance = new OrganisationsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer orgId = 56; // Integer | Organisation id to delete

        try {
            apiInstance.deleteOrg(tenant, orgId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganisationsApi#deleteOrg");
            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
OrganisationsApi *apiInstance = [[OrganisationsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *orgId = 56; // Organisation id to delete (default to null)

// Deletes an organisation
[apiInstance deleteOrgWith:tenant
    orgId:orgId
              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.OrganisationsApi()
var tenant = tenant_example; // {String} The tenant name
var orgId = 56; // {Integer} Organisation id to delete

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

namespace Example
{
    public class deleteOrgExample
    {
        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 OrganisationsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var orgId = 56;  // Integer | Organisation id to delete (default to null)

            try {
                // Deletes an organisation
                apiInstance.deleteOrg(tenant, orgId);
            } catch (Exception e) {
                Debug.Print("Exception when calling OrganisationsApi.deleteOrg: " + 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\OrganisationsApi();
$tenant = tenant_example; // String | The tenant name
$orgId = 56; // Integer | Organisation id to delete

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

# 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::OrganisationsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $orgId = 56; # Integer | Organisation id to delete

eval {
    $api_instance->deleteOrg(tenant => $tenant, orgId => $orgId);
};
if ($@) {
    warn "Exception when calling OrganisationsApi->deleteOrg: $@\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.OrganisationsApi()
tenant = tenant_example # String | The tenant name (default to null)
orgId = 56 # Integer | Organisation id to delete (default to null)

try:
    # Deletes an organisation
    api_instance.delete_org(tenant, orgId)
except ApiException as e:
    print("Exception when calling OrganisationsApi->deleteOrg: %s\n" % e)
extern crate OrganisationsApi;

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

    let mut context = OrganisationsApi::Context::default();
    let result = client.deleteOrg(tenant, orgId, &context).wait();

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

Scopes

Parameters

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

Responses


deleteOrgAddress

Deletes an organisation address


/tenants/{tenant}/organizations/{orgId}/addresses/{addressId}

Usage and SDK Samples

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

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

public class OrganisationsApiExample {
    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
        OrganisationsApi apiInstance = new OrganisationsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer orgId = 56; // Integer | orgId the address belongs to
        Integer addressId = 56; // Integer | Address id to delete

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

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final Integer orgId = new Integer(); // Integer | orgId the address belongs to
final Integer addressId = new Integer(); // Integer | Address id to delete

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

import org.openapitools.client.api.OrganisationsApi;

public class OrganisationsApiExample {
    public static void main(String[] args) {
        OrganisationsApi apiInstance = new OrganisationsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer orgId = 56; // Integer | orgId the address belongs to
        Integer addressId = 56; // Integer | Address id to delete

        try {
            apiInstance.deleteOrgAddress(tenant, orgId, addressId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganisationsApi#deleteOrgAddress");
            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
OrganisationsApi *apiInstance = [[OrganisationsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *orgId = 56; // orgId the address belongs to (default to null)
Integer *addressId = 56; // Address id to delete (default to null)

// Deletes an organisation address
[apiInstance deleteOrgAddressWith:tenant
    orgId:orgId
    addressId:addressId
              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.OrganisationsApi()
var tenant = tenant_example; // {String} The tenant name
var orgId = 56; // {Integer} orgId the address belongs to
var addressId = 56; // {Integer} Address id to delete

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

namespace Example
{
    public class deleteOrgAddressExample
    {
        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 OrganisationsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var orgId = 56;  // Integer | orgId the address belongs to (default to null)
            var addressId = 56;  // Integer | Address id to delete (default to null)

            try {
                // Deletes an organisation address
                apiInstance.deleteOrgAddress(tenant, orgId, addressId);
            } catch (Exception e) {
                Debug.Print("Exception when calling OrganisationsApi.deleteOrgAddress: " + 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\OrganisationsApi();
$tenant = tenant_example; // String | The tenant name
$orgId = 56; // Integer | orgId the address belongs to
$addressId = 56; // Integer | Address id to delete

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

# 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::OrganisationsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $orgId = 56; # Integer | orgId the address belongs to
my $addressId = 56; # Integer | Address id to delete

eval {
    $api_instance->deleteOrgAddress(tenant => $tenant, orgId => $orgId, addressId => $addressId);
};
if ($@) {
    warn "Exception when calling OrganisationsApi->deleteOrgAddress: $@\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.OrganisationsApi()
tenant = tenant_example # String | The tenant name (default to null)
orgId = 56 # Integer | orgId the address belongs to (default to null)
addressId = 56 # Integer | Address id to delete (default to null)

try:
    # Deletes an organisation address
    api_instance.delete_org_address(tenant, orgId, addressId)
except ApiException as e:
    print("Exception when calling OrganisationsApi->deleteOrgAddress: %s\n" % e)
extern crate OrganisationsApi;

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

    let mut context = OrganisationsApi::Context::default();
    let result = client.deleteOrgAddress(tenant, orgId, addressId, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
orgId*
Integer (int32)
orgId the address belongs to
Required
addressId*
Integer (int32)
Address id to delete
Required

Responses


deleteOrgContact

Deletes an organisation contact


/tenants/{tenant}/organizations/{orgId}/contacts/{contactId}

Usage and SDK Samples

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

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

public class OrganisationsApiExample {
    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
        OrganisationsApi apiInstance = new OrganisationsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer orgId = 56; // Integer | orgId the contact belongs to
        Integer contactId = 56; // Integer | Contact id to delete

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

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final Integer orgId = new Integer(); // Integer | orgId the contact belongs to
final Integer contactId = new Integer(); // Integer | Contact id to delete

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

import org.openapitools.client.api.OrganisationsApi;

public class OrganisationsApiExample {
    public static void main(String[] args) {
        OrganisationsApi apiInstance = new OrganisationsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer orgId = 56; // Integer | orgId the contact belongs to
        Integer contactId = 56; // Integer | Contact id to delete

        try {
            apiInstance.deleteOrgContact(tenant, orgId, contactId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganisationsApi#deleteOrgContact");
            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
OrganisationsApi *apiInstance = [[OrganisationsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *orgId = 56; // orgId the contact belongs to (default to null)
Integer *contactId = 56; // Contact id to delete (default to null)

// Deletes an organisation contact
[apiInstance deleteOrgContactWith:tenant
    orgId:orgId
    contactId:contactId
              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.OrganisationsApi()
var tenant = tenant_example; // {String} The tenant name
var orgId = 56; // {Integer} orgId the contact belongs to
var contactId = 56; // {Integer} Contact id to delete

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

namespace Example
{
    public class deleteOrgContactExample
    {
        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 OrganisationsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var orgId = 56;  // Integer | orgId the contact belongs to (default to null)
            var contactId = 56;  // Integer | Contact id to delete (default to null)

            try {
                // Deletes an organisation contact
                apiInstance.deleteOrgContact(tenant, orgId, contactId);
            } catch (Exception e) {
                Debug.Print("Exception when calling OrganisationsApi.deleteOrgContact: " + 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\OrganisationsApi();
$tenant = tenant_example; // String | The tenant name
$orgId = 56; // Integer | orgId the contact belongs to
$contactId = 56; // Integer | Contact id to delete

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

# 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::OrganisationsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $orgId = 56; # Integer | orgId the contact belongs to
my $contactId = 56; # Integer | Contact id to delete

eval {
    $api_instance->deleteOrgContact(tenant => $tenant, orgId => $orgId, contactId => $contactId);
};
if ($@) {
    warn "Exception when calling OrganisationsApi->deleteOrgContact: $@\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.OrganisationsApi()
tenant = tenant_example # String | The tenant name (default to null)
orgId = 56 # Integer | orgId the contact belongs to (default to null)
contactId = 56 # Integer | Contact id to delete (default to null)

try:
    # Deletes an organisation contact
    api_instance.delete_org_contact(tenant, orgId, contactId)
except ApiException as e:
    print("Exception when calling OrganisationsApi->deleteOrgContact: %s\n" % e)
extern crate OrganisationsApi;

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

    let mut context = OrganisationsApi::Context::default();
    let result = client.deleteOrgContact(tenant, orgId, contactId, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
orgId*
Integer (int32)
orgId the contact belongs to
Required
contactId*
Integer (int32)
Contact id to delete
Required

Responses


getOrgAddressById

Get organisation address by ID

Returns an organisation address


/tenants/{tenant}/organizations/{orgId}/addresses/{addressId}

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}/organizations/{orgId}/addresses/{addressId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.OrganisationsApi;

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

public class OrganisationsApiExample {
    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
        OrganisationsApi apiInstance = new OrganisationsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer orgId = 56; // Integer | orgId the organisation belongs to
        Integer addressId = 56; // Integer | ID of organisation address to return

        try {
            Address result = apiInstance.getOrgAddressById(tenant, orgId, addressId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganisationsApi#getOrgAddressById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final Integer orgId = new Integer(); // Integer | orgId the organisation belongs to
final Integer addressId = new Integer(); // Integer | ID of organisation address to return

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

import org.openapitools.client.api.OrganisationsApi;

public class OrganisationsApiExample {
    public static void main(String[] args) {
        OrganisationsApi apiInstance = new OrganisationsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer orgId = 56; // Integer | orgId the organisation belongs to
        Integer addressId = 56; // Integer | ID of organisation address to return

        try {
            Address result = apiInstance.getOrgAddressById(tenant, orgId, addressId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganisationsApi#getOrgAddressById");
            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
OrganisationsApi *apiInstance = [[OrganisationsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *orgId = 56; // orgId the organisation belongs to (default to null)
Integer *addressId = 56; // ID of organisation address to return (default to null)

// Get organisation address by ID
[apiInstance getOrgAddressByIdWith:tenant
    orgId:orgId
    addressId:addressId
              completionHandler: ^(Address 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.OrganisationsApi()
var tenant = tenant_example; // {String} The tenant name
var orgId = 56; // {Integer} orgId the organisation belongs to
var addressId = 56; // {Integer} ID of organisation address to return

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

namespace Example
{
    public class getOrgAddressByIdExample
    {
        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 OrganisationsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var orgId = 56;  // Integer | orgId the organisation belongs to (default to null)
            var addressId = 56;  // Integer | ID of organisation address to return (default to null)

            try {
                // Get organisation address by ID
                Address result = apiInstance.getOrgAddressById(tenant, orgId, addressId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling OrganisationsApi.getOrgAddressById: " + 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\OrganisationsApi();
$tenant = tenant_example; // String | The tenant name
$orgId = 56; // Integer | orgId the organisation belongs to
$addressId = 56; // Integer | ID of organisation address to return

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

# 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::OrganisationsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $orgId = 56; # Integer | orgId the organisation belongs to
my $addressId = 56; # Integer | ID of organisation address to return

eval {
    my $result = $api_instance->getOrgAddressById(tenant => $tenant, orgId => $orgId, addressId => $addressId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganisationsApi->getOrgAddressById: $@\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.OrganisationsApi()
tenant = tenant_example # String | The tenant name (default to null)
orgId = 56 # Integer | orgId the organisation belongs to (default to null)
addressId = 56 # Integer | ID of organisation address to return (default to null)

try:
    # Get organisation address by ID
    api_response = api_instance.get_org_address_by_id(tenant, orgId, addressId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganisationsApi->getOrgAddressById: %s\n" % e)
extern crate OrganisationsApi;

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

    let mut context = OrganisationsApi::Context::default();
    let result = client.getOrgAddressById(tenant, orgId, addressId, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
orgId*
Integer (int32)
orgId the organisation belongs to
Required
addressId*
Integer (int32)
ID of organisation address to return
Required

Responses


getOrgById

Get organisation by ID

Returns an organisation


/tenants/{tenant}/organizations/{orgId}

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}/organizations/{orgId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.OrganisationsApi;

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

public class OrganisationsApiExample {
    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
        OrganisationsApi apiInstance = new OrganisationsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer orgId = 56; // Integer | ID of organisation to return

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

final api_instance = DefaultApi();

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

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

import org.openapitools.client.api.OrganisationsApi;

public class OrganisationsApiExample {
    public static void main(String[] args) {
        OrganisationsApi apiInstance = new OrganisationsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer orgId = 56; // Integer | ID of organisation to return

        try {
            Organisation result = apiInstance.getOrgById(tenant, orgId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganisationsApi#getOrgById");
            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
OrganisationsApi *apiInstance = [[OrganisationsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *orgId = 56; // ID of organisation to return (default to null)

// Get organisation by ID
[apiInstance getOrgByIdWith:tenant
    orgId:orgId
              completionHandler: ^(Organisation 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.OrganisationsApi()
var tenant = tenant_example; // {String} The tenant name
var orgId = 56; // {Integer} ID of organisation to return

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

namespace Example
{
    public class getOrgByIdExample
    {
        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 OrganisationsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var orgId = 56;  // Integer | ID of organisation to return (default to null)

            try {
                // Get organisation by ID
                Organisation result = apiInstance.getOrgById(tenant, orgId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling OrganisationsApi.getOrgById: " + 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\OrganisationsApi();
$tenant = tenant_example; // String | The tenant name
$orgId = 56; // Integer | ID of organisation to return

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

# 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::OrganisationsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $orgId = 56; # Integer | ID of organisation to return

eval {
    my $result = $api_instance->getOrgById(tenant => $tenant, orgId => $orgId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganisationsApi->getOrgById: $@\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.OrganisationsApi()
tenant = tenant_example # String | The tenant name (default to null)
orgId = 56 # Integer | ID of organisation to return (default to null)

try:
    # Get organisation by ID
    api_response = api_instance.get_org_by_id(tenant, orgId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganisationsApi->getOrgById: %s\n" % e)
extern crate OrganisationsApi;

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

    let mut context = OrganisationsApi::Context::default();
    let result = client.getOrgById(tenant, orgId, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
orgId*
Integer (int32)
ID of organisation to return
Required

Responses


getOrgContactById

Get organisation contact by ID

Returns an organisation contact


/tenants/{tenant}/organizations/{orgId}/contacts/{contactId}

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}/organizations/{orgId}/contacts/{contactId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.OrganisationsApi;

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

public class OrganisationsApiExample {
    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
        OrganisationsApi apiInstance = new OrganisationsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer orgId = 56; // Integer | orgId the organisation belongs to
        Integer contactId = 56; // Integer | ID of organisation contact to return

        try {
            Contact result = apiInstance.getOrgContactById(tenant, orgId, contactId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganisationsApi#getOrgContactById");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final Integer orgId = new Integer(); // Integer | orgId the organisation belongs to
final Integer contactId = new Integer(); // Integer | ID of organisation contact to return

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

import org.openapitools.client.api.OrganisationsApi;

public class OrganisationsApiExample {
    public static void main(String[] args) {
        OrganisationsApi apiInstance = new OrganisationsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer orgId = 56; // Integer | orgId the organisation belongs to
        Integer contactId = 56; // Integer | ID of organisation contact to return

        try {
            Contact result = apiInstance.getOrgContactById(tenant, orgId, contactId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganisationsApi#getOrgContactById");
            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
OrganisationsApi *apiInstance = [[OrganisationsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *orgId = 56; // orgId the organisation belongs to (default to null)
Integer *contactId = 56; // ID of organisation contact to return (default to null)

// Get organisation contact by ID
[apiInstance getOrgContactByIdWith:tenant
    orgId:orgId
    contactId:contactId
              completionHandler: ^(Contact 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.OrganisationsApi()
var tenant = tenant_example; // {String} The tenant name
var orgId = 56; // {Integer} orgId the organisation belongs to
var contactId = 56; // {Integer} ID of organisation contact to return

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

namespace Example
{
    public class getOrgContactByIdExample
    {
        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 OrganisationsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var orgId = 56;  // Integer | orgId the organisation belongs to (default to null)
            var contactId = 56;  // Integer | ID of organisation contact to return (default to null)

            try {
                // Get organisation contact by ID
                Contact result = apiInstance.getOrgContactById(tenant, orgId, contactId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling OrganisationsApi.getOrgContactById: " + 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\OrganisationsApi();
$tenant = tenant_example; // String | The tenant name
$orgId = 56; // Integer | orgId the organisation belongs to
$contactId = 56; // Integer | ID of organisation contact to return

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

# 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::OrganisationsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $orgId = 56; # Integer | orgId the organisation belongs to
my $contactId = 56; # Integer | ID of organisation contact to return

eval {
    my $result = $api_instance->getOrgContactById(tenant => $tenant, orgId => $orgId, contactId => $contactId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganisationsApi->getOrgContactById: $@\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.OrganisationsApi()
tenant = tenant_example # String | The tenant name (default to null)
orgId = 56 # Integer | orgId the organisation belongs to (default to null)
contactId = 56 # Integer | ID of organisation contact to return (default to null)

try:
    # Get organisation contact by ID
    api_response = api_instance.get_org_contact_by_id(tenant, orgId, contactId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganisationsApi->getOrgContactById: %s\n" % e)
extern crate OrganisationsApi;

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

    let mut context = OrganisationsApi::Context::default();
    let result = client.getOrgContactById(tenant, orgId, contactId, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
orgId*
Integer (int32)
orgId the organisation belongs to
Required
contactId*
Integer (int32)
ID of organisation contact to return
Required

Responses


searchOrganizations

Get organisation by reference number and/or id

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


/tenants/{tenant}/organizations/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}/organizations/search?id=56&referenceNumber=referenceNumber_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.OrganisationsApi;

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

public class OrganisationsApiExample {
    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
        OrganisationsApi apiInstance = new OrganisationsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer id = 56; // Integer | id to return
        String referenceNumber = referenceNumber_example; // String | reference number to return

        try {
            Organisation result = apiInstance.searchOrganizations(tenant, id, referenceNumber);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganisationsApi#searchOrganizations");
            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 return
final String referenceNumber = new String(); // String | reference number to return

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

import org.openapitools.client.api.OrganisationsApi;

public class OrganisationsApiExample {
    public static void main(String[] args) {
        OrganisationsApi apiInstance = new OrganisationsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer id = 56; // Integer | id to return
        String referenceNumber = referenceNumber_example; // String | reference number to return

        try {
            Organisation result = apiInstance.searchOrganizations(tenant, id, referenceNumber);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganisationsApi#searchOrganizations");
            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
OrganisationsApi *apiInstance = [[OrganisationsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *id = 56; // id to return (optional) (default to null)
String *referenceNumber = referenceNumber_example; // reference number to return (optional) (default to null)

// Get organisation by reference number and/or id
[apiInstance searchOrganizationsWith:tenant
    id:id
    referenceNumber:referenceNumber
              completionHandler: ^(Organisation 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.OrganisationsApi()
var tenant = tenant_example; // {String} The tenant name
var opts = {
  'id': 56, // {Integer} id to return
  'referenceNumber': referenceNumber_example // {String} reference number to return
};

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

namespace Example
{
    public class searchOrganizationsExample
    {
        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 OrganisationsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var id = 56;  // Integer | id to return (optional)  (default to null)
            var referenceNumber = referenceNumber_example;  // String | reference number to return (optional)  (default to null)

            try {
                // Get organisation by reference number and/or id
                Organisation result = apiInstance.searchOrganizations(tenant, id, referenceNumber);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling OrganisationsApi.searchOrganizations: " + 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\OrganisationsApi();
$tenant = tenant_example; // String | The tenant name
$id = 56; // Integer | id to return
$referenceNumber = referenceNumber_example; // String | reference number to return

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

# 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::OrganisationsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $id = 56; # Integer | id to return
my $referenceNumber = referenceNumber_example; # String | reference number to return

eval {
    my $result = $api_instance->searchOrganizations(tenant => $tenant, id => $id, referenceNumber => $referenceNumber);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganisationsApi->searchOrganizations: $@\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.OrganisationsApi()
tenant = tenant_example # String | The tenant name (default to null)
id = 56 # Integer | id to return (optional) (default to null)
referenceNumber = referenceNumber_example # String | reference number to return (optional) (default to null)

try:
    # Get organisation by reference number and/or id
    api_response = api_instance.search_organizations(tenant, id=id, referenceNumber=referenceNumber)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganisationsApi->searchOrganizations: %s\n" % e)
extern crate OrganisationsApi;

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

    let mut context = OrganisationsApi::Context::default();
    let result = client.searchOrganizations(tenant, id, referenceNumber, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
Query parameters
Name Description
id
Integer
id to return
referenceNumber
String
reference number to return

Responses


updateOrg

Updates an organisation in Aptem


/tenants/{tenant}/organizations/{orgId}

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}/organizations/{orgId}" \
 -d '{
  "type" : "Employer",
  "companyName" : "companyName",
  "noOfEmployees" : 5,
  "EDRS" : "EDRS",
  "status" : "Confirmed",
  "apprenticeshipAgreementId" : 123456789,
  "levyPayer" : true,
  "website" : "https://aptem.co.uk",
  "referenceNumber" : "F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.OrganisationsApi;

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

public class OrganisationsApiExample {
    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
        OrganisationsApi apiInstance = new OrganisationsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer orgId = 56; // Integer | ID of organisation to be updated
        RequestOrganisation requestOrganisation = ; // RequestOrganisation | 

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

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final Integer orgId = new Integer(); // Integer | ID of organisation to be updated
final RequestOrganisation requestOrganisation = new RequestOrganisation(); // RequestOrganisation | 

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

import org.openapitools.client.api.OrganisationsApi;

public class OrganisationsApiExample {
    public static void main(String[] args) {
        OrganisationsApi apiInstance = new OrganisationsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer orgId = 56; // Integer | ID of organisation to be updated
        RequestOrganisation requestOrganisation = ; // RequestOrganisation | 

        try {
            apiInstance.updateOrg(tenant, orgId, requestOrganisation);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganisationsApi#updateOrg");
            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
OrganisationsApi *apiInstance = [[OrganisationsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *orgId = 56; // ID of organisation to be updated (default to null)
RequestOrganisation *requestOrganisation = ; // 

// Updates an organisation in Aptem
[apiInstance updateOrgWith:tenant
    orgId:orgId
    requestOrganisation:requestOrganisation
              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.OrganisationsApi()
var tenant = tenant_example; // {String} The tenant name
var orgId = 56; // {Integer} ID of organisation to be updated
var requestOrganisation = ; // {RequestOrganisation} 

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

namespace Example
{
    public class updateOrgExample
    {
        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 OrganisationsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var orgId = 56;  // Integer | ID of organisation to be updated (default to null)
            var requestOrganisation = new RequestOrganisation(); // RequestOrganisation | 

            try {
                // Updates an organisation in Aptem
                apiInstance.updateOrg(tenant, orgId, requestOrganisation);
            } catch (Exception e) {
                Debug.Print("Exception when calling OrganisationsApi.updateOrg: " + 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\OrganisationsApi();
$tenant = tenant_example; // String | The tenant name
$orgId = 56; // Integer | ID of organisation to be updated
$requestOrganisation = ; // RequestOrganisation | 

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

# 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::OrganisationsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $orgId = 56; # Integer | ID of organisation to be updated
my $requestOrganisation = WWW::OPenAPIClient::Object::RequestOrganisation->new(); # RequestOrganisation | 

eval {
    $api_instance->updateOrg(tenant => $tenant, orgId => $orgId, requestOrganisation => $requestOrganisation);
};
if ($@) {
    warn "Exception when calling OrganisationsApi->updateOrg: $@\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.OrganisationsApi()
tenant = tenant_example # String | The tenant name (default to null)
orgId = 56 # Integer | ID of organisation to be updated (default to null)
requestOrganisation =  # RequestOrganisation | 

try:
    # Updates an organisation in Aptem
    api_instance.update_org(tenant, orgId, requestOrganisation)
except ApiException as e:
    print("Exception when calling OrganisationsApi->updateOrg: %s\n" % e)
extern crate OrganisationsApi;

pub fn main() {
    let tenant = tenant_example; // String
    let orgId = 56; // Integer
    let requestOrganisation = ; // RequestOrganisation

    let mut context = OrganisationsApi::Context::default();
    let result = client.updateOrg(tenant, orgId, requestOrganisation, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
orgId*
Integer (int32)
ID of organisation to be updated
Required
Body parameters
Name Description
requestOrganisation *

Organisation object that needs to be updated in Aptem

Responses


updateOrgAddress

Updates an organisation address in Aptem


/tenants/{tenant}/organizations/{orgId}/addresses/{addressId}

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}/organizations/{orgId}/addresses/{addressId}" \
 -d '{
  "id" : 45,
  "countyState" : "countyState",
  "address2" : "address2",
  "address1" : "address1",
  "townCity" : "townCity",
  "postCode" : "postCode",
  "isPrimary" : false
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.OrganisationsApi;

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

public class OrganisationsApiExample {
    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
        OrganisationsApi apiInstance = new OrganisationsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer orgId = 56; // Integer | orgId the address belongs to
        Integer addressId = 56; // Integer | ID of organisation address to be updated
        RequestAddress requestAddress = ; // RequestAddress | 

        try {
            Address result = apiInstance.updateOrgAddress(tenant, orgId, addressId, requestAddress);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganisationsApi#updateOrgAddress");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final Integer orgId = new Integer(); // Integer | orgId the address belongs to
final Integer addressId = new Integer(); // Integer | ID of organisation address to be updated
final RequestAddress requestAddress = new RequestAddress(); // RequestAddress | 

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

import org.openapitools.client.api.OrganisationsApi;

public class OrganisationsApiExample {
    public static void main(String[] args) {
        OrganisationsApi apiInstance = new OrganisationsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer orgId = 56; // Integer | orgId the address belongs to
        Integer addressId = 56; // Integer | ID of organisation address to be updated
        RequestAddress requestAddress = ; // RequestAddress | 

        try {
            Address result = apiInstance.updateOrgAddress(tenant, orgId, addressId, requestAddress);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganisationsApi#updateOrgAddress");
            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
OrganisationsApi *apiInstance = [[OrganisationsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *orgId = 56; // orgId the address belongs to (default to null)
Integer *addressId = 56; // ID of organisation address to be updated (default to null)
RequestAddress *requestAddress = ; // 

// Updates an organisation address in Aptem
[apiInstance updateOrgAddressWith:tenant
    orgId:orgId
    addressId:addressId
    requestAddress:requestAddress
              completionHandler: ^(Address 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.OrganisationsApi()
var tenant = tenant_example; // {String} The tenant name
var orgId = 56; // {Integer} orgId the address belongs to
var addressId = 56; // {Integer} ID of organisation address to be updated
var requestAddress = ; // {RequestAddress} 

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

namespace Example
{
    public class updateOrgAddressExample
    {
        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 OrganisationsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var orgId = 56;  // Integer | orgId the address belongs to (default to null)
            var addressId = 56;  // Integer | ID of organisation address to be updated (default to null)
            var requestAddress = new RequestAddress(); // RequestAddress | 

            try {
                // Updates an organisation address in Aptem
                Address result = apiInstance.updateOrgAddress(tenant, orgId, addressId, requestAddress);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling OrganisationsApi.updateOrgAddress: " + 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\OrganisationsApi();
$tenant = tenant_example; // String | The tenant name
$orgId = 56; // Integer | orgId the address belongs to
$addressId = 56; // Integer | ID of organisation address to be updated
$requestAddress = ; // RequestAddress | 

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

# 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::OrganisationsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $orgId = 56; # Integer | orgId the address belongs to
my $addressId = 56; # Integer | ID of organisation address to be updated
my $requestAddress = WWW::OPenAPIClient::Object::RequestAddress->new(); # RequestAddress | 

eval {
    my $result = $api_instance->updateOrgAddress(tenant => $tenant, orgId => $orgId, addressId => $addressId, requestAddress => $requestAddress);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganisationsApi->updateOrgAddress: $@\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.OrganisationsApi()
tenant = tenant_example # String | The tenant name (default to null)
orgId = 56 # Integer | orgId the address belongs to (default to null)
addressId = 56 # Integer | ID of organisation address to be updated (default to null)
requestAddress =  # RequestAddress | 

try:
    # Updates an organisation address in Aptem
    api_response = api_instance.update_org_address(tenant, orgId, addressId, requestAddress)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganisationsApi->updateOrgAddress: %s\n" % e)
extern crate OrganisationsApi;

pub fn main() {
    let tenant = tenant_example; // String
    let orgId = 56; // Integer
    let addressId = 56; // Integer
    let requestAddress = ; // RequestAddress

    let mut context = OrganisationsApi::Context::default();
    let result = client.updateOrgAddress(tenant, orgId, addressId, requestAddress, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
orgId*
Integer (int32)
orgId the address belongs to
Required
addressId*
Integer (int32)
ID of organisation address to be updated
Required
Body parameters
Name Description
requestAddress *

Organisation address object that needs to be updated in Aptem

Responses


updateOrgContact

Updates an organisation contact in Aptem


/tenants/{tenant}/organizations/{orgId}/contacts/{contactId}

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}/organizations/{orgId}/contacts/{contactId}" \
 -d '{
  "id" : 88,
  "contactName" : "contactName",
  "contactEmail" : "contactEmail",
  "contactPhone" : "contactPhone",
  "isPrimary" : true,
  "ownerId" : 6
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.OrganisationsApi;

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

public class OrganisationsApiExample {
    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
        OrganisationsApi apiInstance = new OrganisationsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer orgId = 56; // Integer | orgId the contact belongs to
        Integer contactId = 56; // Integer | ID of organisation contact to be updated
        RequestContactUpdate requestContactUpdate = ; // RequestContactUpdate | 

        try {
            Contact result = apiInstance.updateOrgContact(tenant, orgId, contactId, requestContactUpdate);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganisationsApi#updateOrgContact");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final Integer orgId = new Integer(); // Integer | orgId the contact belongs to
final Integer contactId = new Integer(); // Integer | ID of organisation contact to be updated
final RequestContactUpdate requestContactUpdate = new RequestContactUpdate(); // RequestContactUpdate | 

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

import org.openapitools.client.api.OrganisationsApi;

public class OrganisationsApiExample {
    public static void main(String[] args) {
        OrganisationsApi apiInstance = new OrganisationsApi();
        String tenant = tenant_example; // String | The tenant name
        Integer orgId = 56; // Integer | orgId the contact belongs to
        Integer contactId = 56; // Integer | ID of organisation contact to be updated
        RequestContactUpdate requestContactUpdate = ; // RequestContactUpdate | 

        try {
            Contact result = apiInstance.updateOrgContact(tenant, orgId, contactId, requestContactUpdate);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganisationsApi#updateOrgContact");
            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
OrganisationsApi *apiInstance = [[OrganisationsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *orgId = 56; // orgId the contact belongs to (default to null)
Integer *contactId = 56; // ID of organisation contact to be updated (default to null)
RequestContactUpdate *requestContactUpdate = ; // 

// Updates an organisation contact in Aptem
[apiInstance updateOrgContactWith:tenant
    orgId:orgId
    contactId:contactId
    requestContactUpdate:requestContactUpdate
              completionHandler: ^(Contact 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.OrganisationsApi()
var tenant = tenant_example; // {String} The tenant name
var orgId = 56; // {Integer} orgId the contact belongs to
var contactId = 56; // {Integer} ID of organisation contact to be updated
var requestContactUpdate = ; // {RequestContactUpdate} 

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

namespace Example
{
    public class updateOrgContactExample
    {
        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 OrganisationsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var orgId = 56;  // Integer | orgId the contact belongs to (default to null)
            var contactId = 56;  // Integer | ID of organisation contact to be updated (default to null)
            var requestContactUpdate = new RequestContactUpdate(); // RequestContactUpdate | 

            try {
                // Updates an organisation contact in Aptem
                Contact result = apiInstance.updateOrgContact(tenant, orgId, contactId, requestContactUpdate);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling OrganisationsApi.updateOrgContact: " + 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\OrganisationsApi();
$tenant = tenant_example; // String | The tenant name
$orgId = 56; // Integer | orgId the contact belongs to
$contactId = 56; // Integer | ID of organisation contact to be updated
$requestContactUpdate = ; // RequestContactUpdate | 

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

# 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::OrganisationsApi->new();
my $tenant = tenant_example; # String | The tenant name
my $orgId = 56; # Integer | orgId the contact belongs to
my $contactId = 56; # Integer | ID of organisation contact to be updated
my $requestContactUpdate = WWW::OPenAPIClient::Object::RequestContactUpdate->new(); # RequestContactUpdate | 

eval {
    my $result = $api_instance->updateOrgContact(tenant => $tenant, orgId => $orgId, contactId => $contactId, requestContactUpdate => $requestContactUpdate);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrganisationsApi->updateOrgContact: $@\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.OrganisationsApi()
tenant = tenant_example # String | The tenant name (default to null)
orgId = 56 # Integer | orgId the contact belongs to (default to null)
contactId = 56 # Integer | ID of organisation contact to be updated (default to null)
requestContactUpdate =  # RequestContactUpdate | 

try:
    # Updates an organisation contact in Aptem
    api_response = api_instance.update_org_contact(tenant, orgId, contactId, requestContactUpdate)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganisationsApi->updateOrgContact: %s\n" % e)
extern crate OrganisationsApi;

pub fn main() {
    let tenant = tenant_example; // String
    let orgId = 56; // Integer
    let contactId = 56; // Integer
    let requestContactUpdate = ; // RequestContactUpdate

    let mut context = OrganisationsApi::Context::default();
    let result = client.updateOrgContact(tenant, orgId, contactId, requestContactUpdate, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
orgId*
Integer (int32)
orgId the contact belongs to
Required
contactId*
Integer (int32)
ID of organisation contact to be updated
Required
Body parameters
Name Description
requestContactUpdate *

Organisation contact object that needs to be updated in Aptem

Responses


Programs

getPrograms

Get programmes information

Returns list of programmes


/tenants/{tenant}/programs

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}/programs"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ProgramsApi;

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

public class ProgramsApiExample {
    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
        ProgramsApi apiInstance = new ProgramsApi();
        String tenant = tenant_example; // String | The tenant name

        try {
            array[Programme] result = apiInstance.getPrograms(tenant);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProgramsApi#getPrograms");
            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.getPrograms(tenant);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getPrograms: $e\n');
}

import org.openapitools.client.api.ProgramsApi;

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

        try {
            array[Programme] result = apiInstance.getPrograms(tenant);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProgramsApi#getPrograms");
            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
ProgramsApi *apiInstance = [[ProgramsApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)

// Get programmes information
[apiInstance getProgramsWith:tenant
              completionHandler: ^(array[Programme] 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.ProgramsApi()
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.getPrograms(tenant, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getProgramsExample
    {
        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 ProgramsApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)

            try {
                // Get programmes information
                array[Programme] result = apiInstance.getPrograms(tenant);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ProgramsApi.getPrograms: " + 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\ProgramsApi();
$tenant = tenant_example; // String | The tenant name

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

# 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::ProgramsApi->new();
my $tenant = tenant_example; # String | The tenant name

eval {
    my $result = $api_instance->getPrograms(tenant => $tenant);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProgramsApi->getPrograms: $@\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.ProgramsApi()
tenant = tenant_example # String | The tenant name (default to null)

try:
    # Get programmes information
    api_response = api_instance.get_programs(tenant)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProgramsApi->getPrograms: %s\n" % e)
extern crate ProgramsApi;

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

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

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required

Responses


Tasks

addTask

Add a new task to Aptem


/tenants/{tenant}/users/{userId}/tasks

Usage and SDK Samples

curl -X POST \
-H "X-API-Token: [[apiKey]]" \
 -H "Content-Type: application/json" \
 "https://{tenant}.aptem.co.uk/api/1.0/tenants/{tenant}/users/{userId}/tasks" \
 -d '{
  "date" : "2000-01-23",
  "creator" : 0,
  "details" : "details",
  "startTime" : "startTime",
  "endTime" : "endTime",
  "type" : "Networking",
  "url" : "url"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TasksApi;

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

public class TasksApiExample {
    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
        TasksApi apiInstance = new TasksApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId to assign the task to
        RequestTask requestTask = ; // RequestTask | 

        try {
            apiInstance.addTask(tenant, userId, requestTask);
        } catch (ApiException e) {
            System.err.println("Exception when calling TasksApi#addTask");
            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 | userId to assign the task to
final RequestTask requestTask = new RequestTask(); // RequestTask | 

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

import org.openapitools.client.api.TasksApi;

public class TasksApiExample {
    public static void main(String[] args) {
        TasksApi apiInstance = new TasksApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId to assign the task to
        RequestTask requestTask = ; // RequestTask | 

        try {
            apiInstance.addTask(tenant, userId, requestTask);
        } catch (ApiException e) {
            System.err.println("Exception when calling TasksApi#addTask");
            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
TasksApi *apiInstance = [[TasksApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // userId to assign the task to (default to null)
RequestTask *requestTask = ; // 

// Add a new task to Aptem
[apiInstance addTaskWith:tenant
    userId:userId
    requestTask:requestTask
              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.TasksApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} userId to assign the task to
var requestTask = ; // {RequestTask} 

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

namespace Example
{
    public class addTaskExample
    {
        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 TasksApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | userId to assign the task to (default to null)
            var requestTask = new RequestTask(); // RequestTask | 

            try {
                // Add a new task to Aptem
                apiInstance.addTask(tenant, userId, requestTask);
            } catch (Exception e) {
                Debug.Print("Exception when calling TasksApi.addTask: " + 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\TasksApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | userId to assign the task to
$requestTask = ; // RequestTask | 

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

# 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::TasksApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | userId to assign the task to
my $requestTask = WWW::OPenAPIClient::Object::RequestTask->new(); # RequestTask | 

eval {
    $api_instance->addTask(tenant => $tenant, userId => $userId, requestTask => $requestTask);
};
if ($@) {
    warn "Exception when calling TasksApi->addTask: $@\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.TasksApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | userId to assign the task to (default to null)
requestTask =  # RequestTask | 

try:
    # Add a new task to Aptem
    api_instance.add_task(tenant, userId, requestTask)
except ApiException as e:
    print("Exception when calling TasksApi->addTask: %s\n" % e)
extern crate TasksApi;

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

    let mut context = TasksApi::Context::default();
    let result = client.addTask(tenant, userId, requestTask, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
userId to assign the task to
Required
Body parameters
Name Description
requestTask *

Task object that needs to be added to Aptem

Responses


deleteTask

Deletes a task


/tenants/{tenant}/users/{userId}/tasks/{taskId}

Usage and SDK Samples

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

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

public class TasksApiExample {
    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
        TasksApi apiInstance = new TasksApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId the task belongs to
        Integer taskId = 56; // Integer | Task id to delete

        try {
            apiInstance.deleteTask(tenant, userId, taskId);
        } catch (ApiException e) {
            System.err.println("Exception when calling TasksApi#deleteTask");
            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 | userId the task belongs to
final Integer taskId = new Integer(); // Integer | Task id to delete

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

import org.openapitools.client.api.TasksApi;

public class TasksApiExample {
    public static void main(String[] args) {
        TasksApi apiInstance = new TasksApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId the task belongs to
        Integer taskId = 56; // Integer | Task id to delete

        try {
            apiInstance.deleteTask(tenant, userId, taskId);
        } catch (ApiException e) {
            System.err.println("Exception when calling TasksApi#deleteTask");
            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
TasksApi *apiInstance = [[TasksApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // userId the task belongs to (default to null)
Integer *taskId = 56; // Task id to delete (default to null)

// Deletes a task
[apiInstance deleteTaskWith:tenant
    userId:userId
    taskId:taskId
              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.TasksApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} userId the task belongs to
var taskId = 56; // {Integer} Task id to delete

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

namespace Example
{
    public class deleteTaskExample
    {
        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 TasksApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | userId the task belongs to (default to null)
            var taskId = 56;  // Integer | Task id to delete (default to null)

            try {
                // Deletes a task
                apiInstance.deleteTask(tenant, userId, taskId);
            } catch (Exception e) {
                Debug.Print("Exception when calling TasksApi.deleteTask: " + 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\TasksApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | userId the task belongs to
$taskId = 56; // Integer | Task id to delete

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

# 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::TasksApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | userId the task belongs to
my $taskId = 56; # Integer | Task id to delete

eval {
    $api_instance->deleteTask(tenant => $tenant, userId => $userId, taskId => $taskId);
};
if ($@) {
    warn "Exception when calling TasksApi->deleteTask: $@\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.TasksApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | userId the task belongs to (default to null)
taskId = 56 # Integer | Task id to delete (default to null)

try:
    # Deletes a task
    api_instance.delete_task(tenant, userId, taskId)
except ApiException as e:
    print("Exception when calling TasksApi->deleteTask: %s\n" % e)
extern crate TasksApi;

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

    let mut context = TasksApi::Context::default();
    let result = client.deleteTask(tenant, userId, taskId, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
userId the task belongs to
Required
taskId*
Integer (int32)
Task id to delete
Required

Responses


getTaskById

Get task by ID

Returns a task


/tenants/{tenant}/users/{userId}/tasks/{taskId}

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/{userId}/tasks/{taskId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TasksApi;

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

public class TasksApiExample {
    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
        TasksApi apiInstance = new TasksApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId the task belongs to
        Integer taskId = 56; // Integer | ID of task to return

        try {
            Task result = apiInstance.getTaskById(tenant, userId, taskId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TasksApi#getTaskById");
            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 | userId the task belongs to
final Integer taskId = new Integer(); // Integer | ID of task to return

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

import org.openapitools.client.api.TasksApi;

public class TasksApiExample {
    public static void main(String[] args) {
        TasksApi apiInstance = new TasksApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId the task belongs to
        Integer taskId = 56; // Integer | ID of task to return

        try {
            Task result = apiInstance.getTaskById(tenant, userId, taskId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TasksApi#getTaskById");
            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
TasksApi *apiInstance = [[TasksApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // userId the task belongs to (default to null)
Integer *taskId = 56; // ID of task to return (default to null)

// Get task by ID
[apiInstance getTaskByIdWith:tenant
    userId:userId
    taskId:taskId
              completionHandler: ^(Task 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.TasksApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} userId the task belongs to
var taskId = 56; // {Integer} ID of task to return

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

namespace Example
{
    public class getTaskByIdExample
    {
        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 TasksApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | userId the task belongs to (default to null)
            var taskId = 56;  // Integer | ID of task to return (default to null)

            try {
                // Get task by ID
                Task result = apiInstance.getTaskById(tenant, userId, taskId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TasksApi.getTaskById: " + 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\TasksApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | userId the task belongs to
$taskId = 56; // Integer | ID of task to return

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

# 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::TasksApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | userId the task belongs to
my $taskId = 56; # Integer | ID of task to return

eval {
    my $result = $api_instance->getTaskById(tenant => $tenant, userId => $userId, taskId => $taskId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TasksApi->getTaskById: $@\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.TasksApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | userId the task belongs to (default to null)
taskId = 56 # Integer | ID of task to return (default to null)

try:
    # Get task by ID
    api_response = api_instance.get_task_by_id(tenant, userId, taskId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TasksApi->getTaskById: %s\n" % e)
extern crate TasksApi;

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

    let mut context = TasksApi::Context::default();
    let result = client.getTaskById(tenant, userId, taskId, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
userId the task belongs to
Required
taskId*
Integer (int32)
ID of task to return
Required

Responses


getTasksByUserId

Get tasks by userId

Returns user tasks


/tenants/{tenant}/users/{userId}/tasks

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/{userId}/tasks"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TasksApi;

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

public class TasksApiExample {
    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
        TasksApi apiInstance = new TasksApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId the tasks belongs to

        try {
            array[Task] result = apiInstance.getTasksByUserId(tenant, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TasksApi#getTasksByUserId");
            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 | userId the tasks belongs to

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

import org.openapitools.client.api.TasksApi;

public class TasksApiExample {
    public static void main(String[] args) {
        TasksApi apiInstance = new TasksApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId the tasks belongs to

        try {
            array[Task] result = apiInstance.getTasksByUserId(tenant, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TasksApi#getTasksByUserId");
            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
TasksApi *apiInstance = [[TasksApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // userId the tasks belongs to (default to null)

// Get tasks by userId
[apiInstance getTasksByUserIdWith:tenant
    userId:userId
              completionHandler: ^(array[Task] 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.TasksApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} userId the tasks belongs to

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

namespace Example
{
    public class getTasksByUserIdExample
    {
        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 TasksApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | userId the tasks belongs to (default to null)

            try {
                // Get tasks by userId
                array[Task] result = apiInstance.getTasksByUserId(tenant, userId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TasksApi.getTasksByUserId: " + 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\TasksApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | userId the tasks belongs to

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

# 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::TasksApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | userId the tasks belongs to

eval {
    my $result = $api_instance->getTasksByUserId(tenant => $tenant, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TasksApi->getTasksByUserId: $@\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.TasksApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | userId the tasks belongs to (default to null)

try:
    # Get tasks by userId
    api_response = api_instance.get_tasks_by_user_id(tenant, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TasksApi->getTasksByUserId: %s\n" % e)
extern crate TasksApi;

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

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

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
userId the tasks belongs to
Required

Responses


updateTask

Updates a task in Aptem


/tenants/{tenant}/users/{userId}/tasks/{taskId}

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}/users/{userId}/tasks/{taskId}" \
 -d '{
  "date" : "2000-01-23",
  "creator" : 0,
  "details" : "details",
  "startTime" : "startTime",
  "endTime" : "endTime",
  "type" : "Networking",
  "url" : "url"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TasksApi;

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

public class TasksApiExample {
    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
        TasksApi apiInstance = new TasksApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId the task belongs to
        Integer taskId = 56; // Integer | ID of task to be updated
        RequestTask requestTask = ; // RequestTask | 

        try {
            apiInstance.updateTask(tenant, userId, taskId, requestTask);
        } catch (ApiException e) {
            System.err.println("Exception when calling TasksApi#updateTask");
            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 | userId the task belongs to
final Integer taskId = new Integer(); // Integer | ID of task to be updated
final RequestTask requestTask = new RequestTask(); // RequestTask | 

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

import org.openapitools.client.api.TasksApi;

public class TasksApiExample {
    public static void main(String[] args) {
        TasksApi apiInstance = new TasksApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId the task belongs to
        Integer taskId = 56; // Integer | ID of task to be updated
        RequestTask requestTask = ; // RequestTask | 

        try {
            apiInstance.updateTask(tenant, userId, taskId, requestTask);
        } catch (ApiException e) {
            System.err.println("Exception when calling TasksApi#updateTask");
            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
TasksApi *apiInstance = [[TasksApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // userId the task belongs to (default to null)
Integer *taskId = 56; // ID of task to be updated (default to null)
RequestTask *requestTask = ; // 

// Updates a task in Aptem
[apiInstance updateTaskWith:tenant
    userId:userId
    taskId:taskId
    requestTask:requestTask
              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.TasksApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} userId the task belongs to
var taskId = 56; // {Integer} ID of task to be updated
var requestTask = ; // {RequestTask} 

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

namespace Example
{
    public class updateTaskExample
    {
        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 TasksApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | userId the task belongs to (default to null)
            var taskId = 56;  // Integer | ID of task to be updated (default to null)
            var requestTask = new RequestTask(); // RequestTask | 

            try {
                // Updates a task in Aptem
                apiInstance.updateTask(tenant, userId, taskId, requestTask);
            } catch (Exception e) {
                Debug.Print("Exception when calling TasksApi.updateTask: " + 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\TasksApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | userId the task belongs to
$taskId = 56; // Integer | ID of task to be updated
$requestTask = ; // RequestTask | 

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

# 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::TasksApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | userId the task belongs to
my $taskId = 56; # Integer | ID of task to be updated
my $requestTask = WWW::OPenAPIClient::Object::RequestTask->new(); # RequestTask | 

eval {
    $api_instance->updateTask(tenant => $tenant, userId => $userId, taskId => $taskId, requestTask => $requestTask);
};
if ($@) {
    warn "Exception when calling TasksApi->updateTask: $@\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.TasksApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | userId the task belongs to (default to null)
taskId = 56 # Integer | ID of task to be updated (default to null)
requestTask =  # RequestTask | 

try:
    # Updates a task in Aptem
    api_instance.update_task(tenant, userId, taskId, requestTask)
except ApiException as e:
    print("Exception when calling TasksApi->updateTask: %s\n" % e)
extern crate TasksApi;

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

    let mut context = TasksApi::Context::default();
    let result = client.updateTask(tenant, userId, taskId, requestTask, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
userId the task belongs to
Required
taskId*
Integer (int32)
ID of task to be updated
Required
Body parameters
Name Description
requestTask *

Task object that needs to be updated in Aptem

Responses


Trackers

addTracker

Create new Aptem tracker


/tenants/{tenant}/users/{userId}/tracker

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/{userId}/tracker" \
 -d '{
  "description" : "API created tracker",
  "type" : "Job",
  "status" : "Closed",
  "notes" : "Tracker of Job type example for API"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TrackersApi;

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

public class TrackersApiExample {
    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
        TrackersApi apiInstance = new TrackersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId for tracker to be created
        RequestTracker requestTracker = ; // RequestTracker | 

        try {
            Tracker result = apiInstance.addTracker(tenant, userId, requestTracker);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TrackersApi#addTracker");
            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 | userId for tracker to be created
final RequestTracker requestTracker = new RequestTracker(); // RequestTracker | 

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

import org.openapitools.client.api.TrackersApi;

public class TrackersApiExample {
    public static void main(String[] args) {
        TrackersApi apiInstance = new TrackersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId for tracker to be created
        RequestTracker requestTracker = ; // RequestTracker | 

        try {
            Tracker result = apiInstance.addTracker(tenant, userId, requestTracker);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TrackersApi#addTracker");
            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
TrackersApi *apiInstance = [[TrackersApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // userId for tracker to be created (default to null)
RequestTracker *requestTracker = ; // 

// Create new Aptem tracker
[apiInstance addTrackerWith:tenant
    userId:userId
    requestTracker:requestTracker
              completionHandler: ^(Tracker 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.TrackersApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} userId for tracker to be created
var requestTracker = ; // {RequestTracker} 

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

namespace Example
{
    public class addTrackerExample
    {
        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 TrackersApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | userId for tracker to be created (default to null)
            var requestTracker = new RequestTracker(); // RequestTracker | 

            try {
                // Create new Aptem tracker
                Tracker result = apiInstance.addTracker(tenant, userId, requestTracker);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TrackersApi.addTracker: " + 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\TrackersApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | userId for tracker to be created
$requestTracker = ; // RequestTracker | 

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

# 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::TrackersApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | userId for tracker to be created
my $requestTracker = WWW::OPenAPIClient::Object::RequestTracker->new(); # RequestTracker | 

eval {
    my $result = $api_instance->addTracker(tenant => $tenant, userId => $userId, requestTracker => $requestTracker);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TrackersApi->addTracker: $@\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.TrackersApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | userId for tracker to be created (default to null)
requestTracker =  # RequestTracker | 

try:
    # Create new Aptem tracker
    api_response = api_instance.add_tracker(tenant, userId, requestTracker)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TrackersApi->addTracker: %s\n" % e)
extern crate TrackersApi;

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

    let mut context = TrackersApi::Context::default();
    let result = client.addTracker(tenant, userId, requestTracker, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
userId for tracker to be created
Required
Body parameters
Name Description
requestTracker *

Tracker object that needs to be created for user

Responses


deleteTracker

Delete a tracker


/tenants/{tenant}/users/{userId}/tracker/{trackerId}

Usage and SDK Samples

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

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

public class TrackersApiExample {
    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
        TrackersApi apiInstance = new TrackersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId for tracker to delete
        Integer trackerId = 56; // Integer | Identifier of tracker to be deleted

        try {
            apiInstance.deleteTracker(tenant, userId, trackerId);
        } catch (ApiException e) {
            System.err.println("Exception when calling TrackersApi#deleteTracker");
            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 | userId for tracker to delete
final Integer trackerId = new Integer(); // Integer | Identifier of tracker to be deleted

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

import org.openapitools.client.api.TrackersApi;

public class TrackersApiExample {
    public static void main(String[] args) {
        TrackersApi apiInstance = new TrackersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId for tracker to delete
        Integer trackerId = 56; // Integer | Identifier of tracker to be deleted

        try {
            apiInstance.deleteTracker(tenant, userId, trackerId);
        } catch (ApiException e) {
            System.err.println("Exception when calling TrackersApi#deleteTracker");
            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
TrackersApi *apiInstance = [[TrackersApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // userId for tracker to delete (default to null)
Integer *trackerId = 56; // Identifier of tracker to be deleted (default to null)

// Delete a tracker
[apiInstance deleteTrackerWith:tenant
    userId:userId
    trackerId:trackerId
              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.TrackersApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} userId for tracker to delete
var trackerId = 56; // {Integer} Identifier of tracker to be deleted

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

namespace Example
{
    public class deleteTrackerExample
    {
        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 TrackersApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | userId for tracker to delete (default to null)
            var trackerId = 56;  // Integer | Identifier of tracker to be deleted (default to null)

            try {
                // Delete a tracker
                apiInstance.deleteTracker(tenant, userId, trackerId);
            } catch (Exception e) {
                Debug.Print("Exception when calling TrackersApi.deleteTracker: " + 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\TrackersApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | userId for tracker to delete
$trackerId = 56; // Integer | Identifier of tracker to be deleted

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

# 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::TrackersApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | userId for tracker to delete
my $trackerId = 56; # Integer | Identifier of tracker to be deleted

eval {
    $api_instance->deleteTracker(tenant => $tenant, userId => $userId, trackerId => $trackerId);
};
if ($@) {
    warn "Exception when calling TrackersApi->deleteTracker: $@\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.TrackersApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | userId for tracker to delete (default to null)
trackerId = 56 # Integer | Identifier of tracker to be deleted (default to null)

try:
    # Delete a tracker
    api_instance.delete_tracker(tenant, userId, trackerId)
except ApiException as e:
    print("Exception when calling TrackersApi->deleteTracker: %s\n" % e)
extern crate TrackersApi;

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

    let mut context = TrackersApi::Context::default();
    let result = client.deleteTracker(tenant, userId, trackerId, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
userId for tracker to delete
Required
trackerId*
Integer (int32)
Identifier of tracker to be deleted
Required

Responses


getTracker

Get tracker by id

Returns a tracker


/tenants/{tenant}/users/{userId}/tracker/{trackerId}

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/{userId}/tracker/{trackerId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TrackersApi;

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

public class TrackersApiExample {
    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
        TrackersApi apiInstance = new TrackersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId for tracker to get
        Integer trackerId = 56; // Integer | Identifier of tracker to be returned

        try {
            Tracker result = apiInstance.getTracker(tenant, userId, trackerId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TrackersApi#getTracker");
            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 | userId for tracker to get
final Integer trackerId = new Integer(); // Integer | Identifier of tracker to be returned

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

import org.openapitools.client.api.TrackersApi;

public class TrackersApiExample {
    public static void main(String[] args) {
        TrackersApi apiInstance = new TrackersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId for tracker to get
        Integer trackerId = 56; // Integer | Identifier of tracker to be returned

        try {
            Tracker result = apiInstance.getTracker(tenant, userId, trackerId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TrackersApi#getTracker");
            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
TrackersApi *apiInstance = [[TrackersApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // userId for tracker to get (default to null)
Integer *trackerId = 56; // Identifier of tracker to be returned (default to null)

// Get tracker by id
[apiInstance getTrackerWith:tenant
    userId:userId
    trackerId:trackerId
              completionHandler: ^(Tracker 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.TrackersApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} userId for tracker to get
var trackerId = 56; // {Integer} Identifier of tracker to be returned

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

namespace Example
{
    public class getTrackerExample
    {
        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 TrackersApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | userId for tracker to get (default to null)
            var trackerId = 56;  // Integer | Identifier of tracker to be returned (default to null)

            try {
                // Get tracker by id
                Tracker result = apiInstance.getTracker(tenant, userId, trackerId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TrackersApi.getTracker: " + 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\TrackersApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | userId for tracker to get
$trackerId = 56; // Integer | Identifier of tracker to be returned

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

# 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::TrackersApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | userId for tracker to get
my $trackerId = 56; # Integer | Identifier of tracker to be returned

eval {
    my $result = $api_instance->getTracker(tenant => $tenant, userId => $userId, trackerId => $trackerId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TrackersApi->getTracker: $@\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.TrackersApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | userId for tracker to get (default to null)
trackerId = 56 # Integer | Identifier of tracker to be returned (default to null)

try:
    # Get tracker by id
    api_response = api_instance.get_tracker(tenant, userId, trackerId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TrackersApi->getTracker: %s\n" % e)
extern crate TrackersApi;

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

    let mut context = TrackersApi::Context::default();
    let result = client.getTracker(tenant, userId, trackerId, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
userId for tracker to get
Required
trackerId*
Integer (int32)
Identifier of tracker to be returned
Required

Responses


updateTracker

Update a tracker in Aptem


/tenants/{tenant}/users/{userId}/tracker/{trackerId}

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/{userId}/tracker/{trackerId}" \
 -d '{
  "description" : "API created tracker",
  "type" : "Job",
  "status" : "Closed",
  "notes" : "Tracker of Job type example for API"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TrackersApi;

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

public class TrackersApiExample {
    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
        TrackersApi apiInstance = new TrackersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId for tracker to update
        Integer trackerId = 56; // Integer | Identifier of tracker to be updated
        RequestTracker requestTracker = ; // RequestTracker | 

        try {
            Tracker result = apiInstance.updateTracker(tenant, userId, trackerId, requestTracker);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TrackersApi#updateTracker");
            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 | userId for tracker to update
final Integer trackerId = new Integer(); // Integer | Identifier of tracker to be updated
final RequestTracker requestTracker = new RequestTracker(); // RequestTracker | 

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

import org.openapitools.client.api.TrackersApi;

public class TrackersApiExample {
    public static void main(String[] args) {
        TrackersApi apiInstance = new TrackersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId for tracker to update
        Integer trackerId = 56; // Integer | Identifier of tracker to be updated
        RequestTracker requestTracker = ; // RequestTracker | 

        try {
            Tracker result = apiInstance.updateTracker(tenant, userId, trackerId, requestTracker);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TrackersApi#updateTracker");
            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
TrackersApi *apiInstance = [[TrackersApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // userId for tracker to update (default to null)
Integer *trackerId = 56; // Identifier of tracker to be updated (default to null)
RequestTracker *requestTracker = ; // 

// Update a tracker in Aptem
[apiInstance updateTrackerWith:tenant
    userId:userId
    trackerId:trackerId
    requestTracker:requestTracker
              completionHandler: ^(Tracker 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.TrackersApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} userId for tracker to update
var trackerId = 56; // {Integer} Identifier of tracker to be updated
var requestTracker = ; // {RequestTracker} 

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

namespace Example
{
    public class updateTrackerExample
    {
        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 TrackersApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | userId for tracker to update (default to null)
            var trackerId = 56;  // Integer | Identifier of tracker to be updated (default to null)
            var requestTracker = new RequestTracker(); // RequestTracker | 

            try {
                // Update a tracker in Aptem
                Tracker result = apiInstance.updateTracker(tenant, userId, trackerId, requestTracker);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TrackersApi.updateTracker: " + 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\TrackersApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | userId for tracker to update
$trackerId = 56; // Integer | Identifier of tracker to be updated
$requestTracker = ; // RequestTracker | 

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

# 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::TrackersApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | userId for tracker to update
my $trackerId = 56; # Integer | Identifier of tracker to be updated
my $requestTracker = WWW::OPenAPIClient::Object::RequestTracker->new(); # RequestTracker | 

eval {
    my $result = $api_instance->updateTracker(tenant => $tenant, userId => $userId, trackerId => $trackerId, requestTracker => $requestTracker);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TrackersApi->updateTracker: $@\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.TrackersApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | userId for tracker to update (default to null)
trackerId = 56 # Integer | Identifier of tracker to be updated (default to null)
requestTracker =  # RequestTracker | 

try:
    # Update a tracker in Aptem
    api_response = api_instance.update_tracker(tenant, userId, trackerId, requestTracker)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TrackersApi->updateTracker: %s\n" % e)
extern crate TrackersApi;

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

    let mut context = TrackersApi::Context::default();
    let result = client.updateTracker(tenant, userId, trackerId, requestTracker, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
userId for tracker to update
Required
trackerId*
Integer (int32)
Identifier of tracker to be updated
Required
Body parameters
Name Description
requestTracker *

Tracker object that needs to be updated in Aptem

Responses


Users

activateUser

Reactivate user


/tenants/{tenant}/users/{userId}/activate

Usage and SDK Samples

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

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

public class UsersApiExample {
    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
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | user to invite

        try {
            apiInstance.activateUser(tenant, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#activateUser");
            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 to invite

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

import org.openapitools.client.api.UsersApi;

public class UsersApiExample {
    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | user to invite

        try {
            apiInstance.activateUser(tenant, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#activateUser");
            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
UsersApi *apiInstance = [[UsersApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // user to invite (default to null)

// Reactivate user
[apiInstance activateUserWith: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.UsersApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} user to invite

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

namespace Example
{
    public class activateUserExample
    {
        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 UsersApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | user to invite (default to null)

            try {
                // Reactivate user
                apiInstance.activateUser(tenant, userId);
            } catch (Exception e) {
                Debug.Print("Exception when calling UsersApi.activateUser: " + 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\UsersApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | user to invite

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

# 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::UsersApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | user to invite

eval {
    $api_instance->activateUser(tenant => $tenant, userId => $userId);
};
if ($@) {
    warn "Exception when calling UsersApi->activateUser: $@\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.UsersApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | user to invite (default to null)

try:
    # Reactivate user
    api_instance.activate_user(tenant, userId)
except ApiException as e:
    print("Exception when calling UsersApi->activateUser: %s\n" % e)
extern crate UsersApi;

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

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

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
user to invite
Required

Responses


addUser

Add a new user in Aptem


/tenants/{tenant}/users

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" \
 -d '{
  "firstName" : "firstName",
  "lastName" : "lastName",
  "caseOwnerId" : 5,
  "mentorId" : 6,
  "phone" : "phone",
  "referenceNumber" : "referenceNumber",
  "groupId" : 5,
  "email" : "email",
  "username" : "username",
  "dateOfBirth" : "2000-03-03",
  "caseOwnerFirstName" : "caseOwnerFirstName",
  "caseOwnerLastName" : "caseOwnerLastName",
  "postCode" : "postCode",
  "address1" : "address1",
  "address2" : "address2",
  "townCity" : "townCity",
  "countyState" : "countyState",
  "programmeId" : 12,
  "programmeStartDate" : "2018-04-03",
  "employerId" : 48,
  "employerAddressId" : 97,
  "managerFirstName" : "managerFirstName",
  "managerLastName" : "managerLastName",
  "managerEmail" : "managerEmail",
  "managerPhone" : "managerPhone",
  "IAEnglish" : "Level1",
  "IAMath" : "Level2",
  "IAICT" : "Level1",
  "diagEnglish" : "diagEnglish",
  "diagMath" : "diagMath",
  "diagIct" : "diagIct",
  "title" : "title",
  "preferredName" : "preferredName",
  "personalEmail" : "personalEmail",
  "gender" : "gender",
  "programmeEndDate" : "2019-05-05",
  "authenticationType" : "Aptem",
  "authType" : "SAML",
  "idP" : "IdP",
  "samlUserId" : "samlUserId",
  "plannedHours" : 140,
  "weeklyHours" : 40,
  "country" : "country",
  "landline" : "landline",
  "managerId" : 15,
  "learningProviderId" : 20
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UsersApi;

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

public class UsersApiExample {
    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
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        RequestUser requestUser = ; // RequestUser | 

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

final api_instance = DefaultApi();

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

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

import org.openapitools.client.api.UsersApi;

public class UsersApiExample {
    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        RequestUser requestUser = ; // RequestUser | 

        try {
            User result = apiInstance.addUser(tenant, requestUser);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#addUser");
            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
UsersApi *apiInstance = [[UsersApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
RequestUser *requestUser = ; // 

// Add a new user in Aptem
[apiInstance addUserWith:tenant
    requestUser:requestUser
              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.UsersApi()
var tenant = tenant_example; // {String} The tenant name
var requestUser = ; // {RequestUser} 

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

namespace Example
{
    public class addUserExample
    {
        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 UsersApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var requestUser = new RequestUser(); // RequestUser | 

            try {
                // Add a new user in Aptem
                User result = apiInstance.addUser(tenant, requestUser);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UsersApi.addUser: " + 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\UsersApi();
$tenant = tenant_example; // String | The tenant name
$requestUser = ; // RequestUser | 

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

# 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::UsersApi->new();
my $tenant = tenant_example; # String | The tenant name
my $requestUser = WWW::OPenAPIClient::Object::RequestUser->new(); # RequestUser | 

eval {
    my $result = $api_instance->addUser(tenant => $tenant, requestUser => $requestUser);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->addUser: $@\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.UsersApi()
tenant = tenant_example # String | The tenant name (default to null)
requestUser =  # RequestUser | 

try:
    # Add a new user in Aptem
    api_response = api_instance.add_user(tenant, requestUser)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->addUser: %s\n" % e)
extern crate UsersApi;

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

    let mut context = UsersApi::Context::default();
    let result = client.addUser(tenant, requestUser, &context).wait();

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

Scopes

Parameters

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

User object that needs to be created in Aptem

Responses


addUserGroups

Add a user to groups in Aptem


/tenants/{tenant}/users/{userId}/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}/users/{userId}/groups" \
 -d '{
  "groups" : [ 1, 2, 3 ]
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UsersApi;

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

public class UsersApiExample {
    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
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | User ID for group to return
        GroupMembership groupMembership = ; // GroupMembership | 

        try {
            UserGroupMembership result = apiInstance.addUserGroups(tenant, userId, groupMembership);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#addUserGroups");
            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 for group to return
final GroupMembership groupMembership = new GroupMembership(); // GroupMembership | 

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

import org.openapitools.client.api.UsersApi;

public class UsersApiExample {
    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | User ID for group to return
        GroupMembership groupMembership = ; // GroupMembership | 

        try {
            UserGroupMembership result = apiInstance.addUserGroups(tenant, userId, groupMembership);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#addUserGroups");
            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
UsersApi *apiInstance = [[UsersApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // User ID for group to return (default to null)
GroupMembership *groupMembership = ; // 

// Add a user to groups in Aptem
[apiInstance addUserGroupsWith:tenant
    userId:userId
    groupMembership:groupMembership
              completionHandler: ^(UserGroupMembership 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.UsersApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} User ID for group to return
var groupMembership = ; // {GroupMembership} 

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

namespace Example
{
    public class addUserGroupsExample
    {
        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 UsersApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | User ID for group to return (default to null)
            var groupMembership = new GroupMembership(); // GroupMembership | 

            try {
                // Add a user to groups in Aptem
                UserGroupMembership result = apiInstance.addUserGroups(tenant, userId, groupMembership);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UsersApi.addUserGroups: " + 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\UsersApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | User ID for group to return
$groupMembership = ; // GroupMembership | 

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

# 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::UsersApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | User ID for group to return
my $groupMembership = WWW::OPenAPIClient::Object::GroupMembership->new(); # GroupMembership | 

eval {
    my $result = $api_instance->addUserGroups(tenant => $tenant, userId => $userId, groupMembership => $groupMembership);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->addUserGroups: $@\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.UsersApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | User ID for group to return (default to null)
groupMembership =  # GroupMembership | 

try:
    # Add a user to groups in Aptem
    api_response = api_instance.add_user_groups(tenant, userId, groupMembership)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->addUserGroups: %s\n" % e)
extern crate UsersApi;

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

    let mut context = UsersApi::Context::default();
    let result = client.addUserGroups(tenant, userId, groupMembership, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
User ID for group to return
Required
Body parameters
Name Description
groupMembership *

Groups that needs to be added to user

Responses


createAccessCode

Generate new Aptem access code

Returns new access code


/tenants/{tenant}/users/accesscodes

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/accesscodes" \
 -d '{
  "caseOwner" : 0,
  "referenceNumber" : "referenceNumber",
  "groupId" : 6
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UsersApi;

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

public class UsersApiExample {
    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
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        RequestAccessCode requestAccessCode = ; // RequestAccessCode | 

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

final api_instance = DefaultApi();

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

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

import org.openapitools.client.api.UsersApi;

public class UsersApiExample {
    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        RequestAccessCode requestAccessCode = ; // RequestAccessCode | 

        try {
            AccessCode result = apiInstance.createAccessCode(tenant, requestAccessCode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#createAccessCode");
            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
UsersApi *apiInstance = [[UsersApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
RequestAccessCode *requestAccessCode = ; // 

// Generate new Aptem access code
[apiInstance createAccessCodeWith:tenant
    requestAccessCode:requestAccessCode
              completionHandler: ^(AccessCode 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.UsersApi()
var tenant = tenant_example; // {String} The tenant name
var requestAccessCode = ; // {RequestAccessCode} 

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

namespace Example
{
    public class createAccessCodeExample
    {
        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 UsersApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var requestAccessCode = new RequestAccessCode(); // RequestAccessCode | 

            try {
                // Generate new Aptem access code
                AccessCode result = apiInstance.createAccessCode(tenant, requestAccessCode);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UsersApi.createAccessCode: " + 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\UsersApi();
$tenant = tenant_example; // String | The tenant name
$requestAccessCode = ; // RequestAccessCode | 

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

# 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::UsersApi->new();
my $tenant = tenant_example; # String | The tenant name
my $requestAccessCode = WWW::OPenAPIClient::Object::RequestAccessCode->new(); # RequestAccessCode | 

eval {
    my $result = $api_instance->createAccessCode(tenant => $tenant, requestAccessCode => $requestAccessCode);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->createAccessCode: $@\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.UsersApi()
tenant = tenant_example # String | The tenant name (default to null)
requestAccessCode =  # RequestAccessCode | 

try:
    # Generate new Aptem access code
    api_response = api_instance.create_access_code(tenant, requestAccessCode)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->createAccessCode: %s\n" % e)
extern crate UsersApi;

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

    let mut context = UsersApi::Context::default();
    let result = client.createAccessCode(tenant, requestAccessCode, &context).wait();

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

Scopes

Parameters

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

Access code properties to embed in new Access Code

Responses


deleteAccessCode

Deactivates an access code (user loses access to Aptem)


/tenants/{tenant}/users/accesscodes/{accessCode}

Usage and SDK Samples

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

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

public class UsersApiExample {
    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
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        String accessCode = accessCode_example; // String | access code to deactivate

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

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final String accessCode = new String(); // String | access code to deactivate

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

import org.openapitools.client.api.UsersApi;

public class UsersApiExample {
    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        String accessCode = accessCode_example; // String | access code to deactivate

        try {
            apiInstance.deleteAccessCode(tenant, accessCode);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#deleteAccessCode");
            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
UsersApi *apiInstance = [[UsersApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
String *accessCode = accessCode_example; // access code to deactivate (default to null)

// Deactivates an access code (user loses access to Aptem)
[apiInstance deleteAccessCodeWith:tenant
    accessCode:accessCode
              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.UsersApi()
var tenant = tenant_example; // {String} The tenant name
var accessCode = accessCode_example; // {String} access code to deactivate

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

namespace Example
{
    public class deleteAccessCodeExample
    {
        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 UsersApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var accessCode = accessCode_example;  // String | access code to deactivate (default to null)

            try {
                // Deactivates an access code (user loses access to Aptem)
                apiInstance.deleteAccessCode(tenant, accessCode);
            } catch (Exception e) {
                Debug.Print("Exception when calling UsersApi.deleteAccessCode: " + 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\UsersApi();
$tenant = tenant_example; // String | The tenant name
$accessCode = accessCode_example; // String | access code to deactivate

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

# 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::UsersApi->new();
my $tenant = tenant_example; # String | The tenant name
my $accessCode = accessCode_example; # String | access code to deactivate

eval {
    $api_instance->deleteAccessCode(tenant => $tenant, accessCode => $accessCode);
};
if ($@) {
    warn "Exception when calling UsersApi->deleteAccessCode: $@\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.UsersApi()
tenant = tenant_example # String | The tenant name (default to null)
accessCode = accessCode_example # String | access code to deactivate (default to null)

try:
    # Deactivates an access code (user loses access to Aptem)
    api_instance.delete_access_code(tenant, accessCode)
except ApiException as e:
    print("Exception when calling UsersApi->deleteAccessCode: %s\n" % e)
extern crate UsersApi;

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

    let mut context = UsersApi::Context::default();
    let result = client.deleteAccessCode(tenant, accessCode, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
accessCode*
String
access code to deactivate
Required

Responses


deleteUserGroups

Delete user group memberships


/tenants/{tenant}/users/{userId}/groups

Usage and SDK Samples

curl -X DELETE \
-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/{userId}/groups" \
 -d '{
  "groups" : [ 1, 2, 3 ]
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UsersApi;

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

public class UsersApiExample {
    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
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | User id to delete group memberships
        GroupMembership groupMembership = ; // GroupMembership | 

        try {
            UserGroupMembership result = apiInstance.deleteUserGroups(tenant, userId, groupMembership);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#deleteUserGroups");
            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 delete group memberships
final GroupMembership groupMembership = new GroupMembership(); // GroupMembership | 

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

import org.openapitools.client.api.UsersApi;

public class UsersApiExample {
    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | User id to delete group memberships
        GroupMembership groupMembership = ; // GroupMembership | 

        try {
            UserGroupMembership result = apiInstance.deleteUserGroups(tenant, userId, groupMembership);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#deleteUserGroups");
            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
UsersApi *apiInstance = [[UsersApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // User id to delete group memberships (default to null)
GroupMembership *groupMembership = ; // 

// Delete user group memberships
[apiInstance deleteUserGroupsWith:tenant
    userId:userId
    groupMembership:groupMembership
              completionHandler: ^(UserGroupMembership 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.UsersApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} User id to delete group memberships
var groupMembership = ; // {GroupMembership} 

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

namespace Example
{
    public class deleteUserGroupsExample
    {
        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 UsersApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | User id to delete group memberships (default to null)
            var groupMembership = new GroupMembership(); // GroupMembership | 

            try {
                // Delete user group memberships
                UserGroupMembership result = apiInstance.deleteUserGroups(tenant, userId, groupMembership);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UsersApi.deleteUserGroups: " + 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\UsersApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | User id to delete group memberships
$groupMembership = ; // GroupMembership | 

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

# 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::UsersApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | User id to delete group memberships
my $groupMembership = WWW::OPenAPIClient::Object::GroupMembership->new(); # GroupMembership | 

eval {
    my $result = $api_instance->deleteUserGroups(tenant => $tenant, userId => $userId, groupMembership => $groupMembership);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->deleteUserGroups: $@\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.UsersApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | User id to delete group memberships (default to null)
groupMembership =  # GroupMembership | 

try:
    # Delete user group memberships
    api_response = api_instance.delete_user_groups(tenant, userId, groupMembership)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->deleteUserGroups: %s\n" % e)
extern crate UsersApi;

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

    let mut context = UsersApi::Context::default();
    let result = client.deleteUserGroups(tenant, userId, groupMembership, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
User id to delete group memberships
Required
Body parameters
Name Description
groupMembership *

Groups that needs to be deleted from user

Responses


getAccessCode

Get access code

Returns an access code


/tenants/{tenant}/users/accesscodes/{accessCode}

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/accesscodes/{accessCode}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UsersApi;

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

public class UsersApiExample {
    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
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        String accessCode = accessCode_example; // String | access code to return

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

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final String accessCode = new String(); // String | access code to return

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

import org.openapitools.client.api.UsersApi;

public class UsersApiExample {
    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        String accessCode = accessCode_example; // String | access code to return

        try {
            AccessCode result = apiInstance.getAccessCode(tenant, accessCode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getAccessCode");
            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
UsersApi *apiInstance = [[UsersApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
String *accessCode = accessCode_example; // access code to return (default to null)

// Get access code
[apiInstance getAccessCodeWith:tenant
    accessCode:accessCode
              completionHandler: ^(AccessCode 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.UsersApi()
var tenant = tenant_example; // {String} The tenant name
var accessCode = accessCode_example; // {String} access code to return

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

namespace Example
{
    public class getAccessCodeExample
    {
        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 UsersApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var accessCode = accessCode_example;  // String | access code to return (default to null)

            try {
                // Get access code
                AccessCode result = apiInstance.getAccessCode(tenant, accessCode);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UsersApi.getAccessCode: " + 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\UsersApi();
$tenant = tenant_example; // String | The tenant name
$accessCode = accessCode_example; // String | access code to return

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

# 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::UsersApi->new();
my $tenant = tenant_example; # String | The tenant name
my $accessCode = accessCode_example; # String | access code to return

eval {
    my $result = $api_instance->getAccessCode(tenant => $tenant, accessCode => $accessCode);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->getAccessCode: $@\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.UsersApi()
tenant = tenant_example # String | The tenant name (default to null)
accessCode = accessCode_example # String | access code to return (default to null)

try:
    # Get access code
    api_response = api_instance.get_access_code(tenant, accessCode)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->getAccessCode: %s\n" % e)
extern crate UsersApi;

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

    let mut context = UsersApi::Context::default();
    let result = client.getAccessCode(tenant, accessCode, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
accessCode*
String
access code to return
Required

Responses


getApplications

Get user's applications by userId

Returns user's applications


/tenants/{tenant}/users/{userId}/applications

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/{userId}/applications?startDate=2013-10-20&endDate=2013-10-20"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UsersApi;

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

public class UsersApiExample {
    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
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId to fetch the usage for
        date startDate = 2013-10-20; // date | reporting period start date
        date endDate = 2013-10-20; // date | reporting period end date

        try {
            array[Application] result = apiInstance.getApplications(tenant, userId, startDate, endDate);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getApplications");
            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 | userId to fetch the usage for
final date startDate = new date(); // date | reporting period start date
final date endDate = new date(); // date | reporting period end date

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

import org.openapitools.client.api.UsersApi;

public class UsersApiExample {
    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId to fetch the usage for
        date startDate = 2013-10-20; // date | reporting period start date
        date endDate = 2013-10-20; // date | reporting period end date

        try {
            array[Application] result = apiInstance.getApplications(tenant, userId, startDate, endDate);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getApplications");
            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
UsersApi *apiInstance = [[UsersApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // userId to fetch the usage for (default to null)
date *startDate = 2013-10-20; // reporting period start date (optional) (default to null)
date *endDate = 2013-10-20; // reporting period end date (optional) (default to null)

// Get user's applications by userId
[apiInstance getApplicationsWith:tenant
    userId:userId
    startDate:startDate
    endDate:endDate
              completionHandler: ^(array[Application] 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.UsersApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} userId to fetch the usage for
var opts = {
  'startDate': 2013-10-20, // {date} reporting period start date
  'endDate': 2013-10-20 // {date} reporting period end date
};

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

namespace Example
{
    public class getApplicationsExample
    {
        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 UsersApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | userId to fetch the usage for (default to null)
            var startDate = 2013-10-20;  // date | reporting period start date (optional)  (default to null)
            var endDate = 2013-10-20;  // date | reporting period end date (optional)  (default to null)

            try {
                // Get user's applications by userId
                array[Application] result = apiInstance.getApplications(tenant, userId, startDate, endDate);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UsersApi.getApplications: " + 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\UsersApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | userId to fetch the usage for
$startDate = 2013-10-20; // date | reporting period start date
$endDate = 2013-10-20; // date | reporting period end date

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

# 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::UsersApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | userId to fetch the usage for
my $startDate = 2013-10-20; # date | reporting period start date
my $endDate = 2013-10-20; # date | reporting period end date

eval {
    my $result = $api_instance->getApplications(tenant => $tenant, userId => $userId, startDate => $startDate, endDate => $endDate);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->getApplications: $@\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.UsersApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | userId to fetch the usage for (default to null)
startDate = 2013-10-20 # date | reporting period start date (optional) (default to null)
endDate = 2013-10-20 # date | reporting period end date (optional) (default to null)

try:
    # Get user's applications by userId
    api_response = api_instance.get_applications(tenant, userId, startDate=startDate, endDate=endDate)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->getApplications: %s\n" % e)
extern crate UsersApi;

pub fn main() {
    let tenant = tenant_example; // String
    let userId = 56; // Integer
    let startDate = 2013-10-20; // date
    let endDate = 2013-10-20; // date

    let mut context = UsersApi::Context::default();
    let result = client.getApplications(tenant, userId, startDate, endDate, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
userId to fetch the usage for
Required
Query parameters
Name Description
startDate
date (date)
reporting period start date
endDate
date (date)
reporting period end date

Responses


getILR

Get user's ILR by userId

Returns user's ILR properties


/tenants/{tenant}/users/{userId}/ilr

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/{userId}/ilr"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UsersApi;

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

public class UsersApiExample {
    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
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId to fetch the usage for

        try {
            ILR result = apiInstance.getILR(tenant, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getILR");
            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 | userId to fetch the usage for

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

import org.openapitools.client.api.UsersApi;

public class UsersApiExample {
    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId to fetch the usage for

        try {
            ILR result = apiInstance.getILR(tenant, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getILR");
            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
UsersApi *apiInstance = [[UsersApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // userId to fetch the usage for (default to null)

// Get user's ILR by userId
[apiInstance getILRWith:tenant
    userId:userId
              completionHandler: ^(ILR 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.UsersApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} userId to fetch the usage for

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

namespace Example
{
    public class getILRExample
    {
        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 UsersApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | userId to fetch the usage for (default to null)

            try {
                // Get user's ILR by userId
                ILR result = apiInstance.getILR(tenant, userId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UsersApi.getILR: " + 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\UsersApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | userId to fetch the usage for

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

# 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::UsersApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | userId to fetch the usage for

eval {
    my $result = $api_instance->getILR(tenant => $tenant, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->getILR: $@\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.UsersApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | userId to fetch the usage for (default to null)

try:
    # Get user's ILR by userId
    api_response = api_instance.get_ilr(tenant, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->getILR: %s\n" % e)
extern crate UsersApi;

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

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

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
userId to fetch the usage for
Required

Responses


getPLRByUserId

Get users plr information

Returns users plr information


/tenants/{tenant}/users/{userId}/plr

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/{userId}/plr"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UsersApi;

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

public class UsersApiExample {
    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
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId to fetch the usage for

        try {
            array[PLR] result = apiInstance.getPLRByUserId(tenant, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getPLRByUserId");
            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 | userId to fetch the usage for

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

import org.openapitools.client.api.UsersApi;

public class UsersApiExample {
    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId to fetch the usage for

        try {
            array[PLR] result = apiInstance.getPLRByUserId(tenant, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getPLRByUserId");
            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
UsersApi *apiInstance = [[UsersApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // userId to fetch the usage for (default to null)

// Get users plr information
[apiInstance getPLRByUserIdWith:tenant
    userId:userId
              completionHandler: ^(array[PLR] 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.UsersApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} userId to fetch the usage for

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

namespace Example
{
    public class getPLRByUserIdExample
    {
        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 UsersApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | userId to fetch the usage for (default to null)

            try {
                // Get users plr information
                array[PLR] result = apiInstance.getPLRByUserId(tenant, userId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UsersApi.getPLRByUserId: " + 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\UsersApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | userId to fetch the usage for

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

# 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::UsersApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | userId to fetch the usage for

eval {
    my $result = $api_instance->getPLRByUserId(tenant => $tenant, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->getPLRByUserId: $@\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.UsersApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | userId to fetch the usage for (default to null)

try:
    # Get users plr information
    api_response = api_instance.get_plrby_user_id(tenant, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->getPLRByUserId: %s\n" % e)
extern crate UsersApi;

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

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

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
userId to fetch the usage for
Required

Responses


getUsage

Get user's usage by userId

Returns user's usage


/tenants/{tenant}/users/{userId}/usage

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/{userId}/usage?startDate=2013-10-20&endDate=2013-10-20"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UsersApi;

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

public class UsersApiExample {
    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
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId to fetch the usage for
        date startDate = 2013-10-20; // date | reporting period start date
        date endDate = 2013-10-20; // date | reporting period end date

        try {
            Usage result = apiInstance.getUsage(tenant, userId, startDate, endDate);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getUsage");
            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 | userId to fetch the usage for
final date startDate = new date(); // date | reporting period start date
final date endDate = new date(); // date | reporting period end date

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

import org.openapitools.client.api.UsersApi;

public class UsersApiExample {
    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId to fetch the usage for
        date startDate = 2013-10-20; // date | reporting period start date
        date endDate = 2013-10-20; // date | reporting period end date

        try {
            Usage result = apiInstance.getUsage(tenant, userId, startDate, endDate);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getUsage");
            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
UsersApi *apiInstance = [[UsersApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // userId to fetch the usage for (default to null)
date *startDate = 2013-10-20; // reporting period start date (optional) (default to null)
date *endDate = 2013-10-20; // reporting period end date (optional) (default to null)

// Get user's usage by userId
[apiInstance getUsageWith:tenant
    userId:userId
    startDate:startDate
    endDate:endDate
              completionHandler: ^(Usage 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.UsersApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} userId to fetch the usage for
var opts = {
  'startDate': 2013-10-20, // {date} reporting period start date
  'endDate': 2013-10-20 // {date} reporting period end date
};

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

namespace Example
{
    public class getUsageExample
    {
        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 UsersApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | userId to fetch the usage for (default to null)
            var startDate = 2013-10-20;  // date | reporting period start date (optional)  (default to null)
            var endDate = 2013-10-20;  // date | reporting period end date (optional)  (default to null)

            try {
                // Get user's usage by userId
                Usage result = apiInstance.getUsage(tenant, userId, startDate, endDate);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UsersApi.getUsage: " + 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\UsersApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | userId to fetch the usage for
$startDate = 2013-10-20; // date | reporting period start date
$endDate = 2013-10-20; // date | reporting period end date

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

# 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::UsersApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | userId to fetch the usage for
my $startDate = 2013-10-20; # date | reporting period start date
my $endDate = 2013-10-20; # date | reporting period end date

eval {
    my $result = $api_instance->getUsage(tenant => $tenant, userId => $userId, startDate => $startDate, endDate => $endDate);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->getUsage: $@\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.UsersApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | userId to fetch the usage for (default to null)
startDate = 2013-10-20 # date | reporting period start date (optional) (default to null)
endDate = 2013-10-20 # date | reporting period end date (optional) (default to null)

try:
    # Get user's usage by userId
    api_response = api_instance.get_usage(tenant, userId, startDate=startDate, endDate=endDate)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->getUsage: %s\n" % e)
extern crate UsersApi;

pub fn main() {
    let tenant = tenant_example; // String
    let userId = 56; // Integer
    let startDate = 2013-10-20; // date
    let endDate = 2013-10-20; // date

    let mut context = UsersApi::Context::default();
    let result = client.getUsage(tenant, userId, startDate, endDate, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
userId to fetch the usage for
Required
Query parameters
Name Description
startDate
date (date)
reporting period start date
endDate
date (date)
reporting period end date

Responses


getUserById

Get user by user id

Returns a user


/tenants/{tenant}/users/{userId}

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/{userId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UsersApi;

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

public class UsersApiExample {
    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
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId to return

        try {
            User result = apiInstance.getUserById(tenant, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getUserById");
            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 | userId to return

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

import org.openapitools.client.api.UsersApi;

public class UsersApiExample {
    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId to return

        try {
            User result = apiInstance.getUserById(tenant, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getUserById");
            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
UsersApi *apiInstance = [[UsersApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // userId to return (default to null)

// Get user by user id
[apiInstance getUserByIdWith:tenant
    userId:userId
              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.UsersApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} userId to return

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

namespace Example
{
    public class getUserByIdExample
    {
        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 UsersApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | userId to return (default to null)

            try {
                // Get user by user id
                User result = apiInstance.getUserById(tenant, userId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UsersApi.getUserById: " + 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\UsersApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | userId to return

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

# 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::UsersApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | userId to return

eval {
    my $result = $api_instance->getUserById(tenant => $tenant, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->getUserById: $@\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.UsersApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | userId to return (default to null)

try:
    # Get user by user id
    api_response = api_instance.get_user_by_id(tenant, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->getUserById: %s\n" % e)
extern crate UsersApi;

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

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

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
userId to return
Required

Responses


getUserByRefNum

Get user by reference number

Returns a user.


/tenants/{tenant}/users/byReferenceNumber

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/byReferenceNumber?refNum=refNum_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UsersApi;

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

public class UsersApiExample {
    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
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        String refNum = refNum_example; // String | refNum to return

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

final api_instance = DefaultApi();

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

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

import org.openapitools.client.api.UsersApi;

public class UsersApiExample {
    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        String refNum = refNum_example; // String | refNum to return

        try {
            User result = apiInstance.getUserByRefNum(tenant, refNum);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getUserByRefNum");
            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
UsersApi *apiInstance = [[UsersApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
String *refNum = refNum_example; // refNum to return (default to null)

// Get user by reference number
[apiInstance getUserByRefNumWith:tenant
    refNum:refNum
              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.UsersApi()
var tenant = tenant_example; // {String} The tenant name
var refNum = refNum_example; // {String} refNum to return

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

namespace Example
{
    public class getUserByRefNumExample
    {
        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 UsersApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var refNum = refNum_example;  // String | refNum to return (default to null)

            try {
                // Get user by reference number
                User result = apiInstance.getUserByRefNum(tenant, refNum);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UsersApi.getUserByRefNum: " + 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\UsersApi();
$tenant = tenant_example; // String | The tenant name
$refNum = refNum_example; // String | refNum to return

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

# 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::UsersApi->new();
my $tenant = tenant_example; # String | The tenant name
my $refNum = refNum_example; # String | refNum to return

eval {
    my $result = $api_instance->getUserByRefNum(tenant => $tenant, refNum => $refNum);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->getUserByRefNum: $@\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.UsersApi()
tenant = tenant_example # String | The tenant name (default to null)
refNum = refNum_example # String | refNum to return (default to null)

try:
    # Get user by reference number
    api_response = api_instance.get_user_by_ref_num(tenant, refNum)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->getUserByRefNum: %s\n" % e)
extern crate UsersApi;

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

    let mut context = UsersApi::Context::default();
    let result = client.getUserByRefNum(tenant, refNum, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
Query parameters
Name Description
refNum*
String
refNum to return
Required

Responses


getUserGroupsByUserId

Get user group memberships

Returns group memberships


/tenants/{tenant}/users/{userId}/groups

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/{userId}/groups"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UsersApi;

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

public class UsersApiExample {
    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
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | User ID for group to return

        try {
            UserGroupMembership result = apiInstance.getUserGroupsByUserId(tenant, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getUserGroupsByUserId");
            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 for group to return

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

import org.openapitools.client.api.UsersApi;

public class UsersApiExample {
    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | User ID for group to return

        try {
            UserGroupMembership result = apiInstance.getUserGroupsByUserId(tenant, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getUserGroupsByUserId");
            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
UsersApi *apiInstance = [[UsersApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // User ID for group to return (default to null)

// Get user group memberships
[apiInstance getUserGroupsByUserIdWith:tenant
    userId:userId
              completionHandler: ^(UserGroupMembership 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.UsersApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} User ID for group to return

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

namespace Example
{
    public class getUserGroupsByUserIdExample
    {
        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 UsersApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | User ID for group to return (default to null)

            try {
                // Get user group memberships
                UserGroupMembership result = apiInstance.getUserGroupsByUserId(tenant, userId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UsersApi.getUserGroupsByUserId: " + 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\UsersApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | User ID for group to return

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

# 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::UsersApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | User ID for group to return

eval {
    my $result = $api_instance->getUserGroupsByUserId(tenant => $tenant, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->getUserGroupsByUserId: $@\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.UsersApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | User ID for group to return (default to null)

try:
    # Get user group memberships
    api_response = api_instance.get_user_groups_by_user_id(tenant, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->getUserGroupsByUserId: %s\n" % e)
extern crate UsersApi;

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

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

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
User ID for group to return
Required

Responses



sendInvitation

Send invitation email to user


/tenants/{tenant}/users/{userId}/invitation

Usage and SDK Samples

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

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

public class UsersApiExample {
    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
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | user to invite

        try {
            apiInstance.sendInvitation(tenant, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#sendInvitation");
            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 to invite

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

import org.openapitools.client.api.UsersApi;

public class UsersApiExample {
    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | user to invite

        try {
            apiInstance.sendInvitation(tenant, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#sendInvitation");
            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
UsersApi *apiInstance = [[UsersApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // user to invite (default to null)

// Send invitation email to user
[apiInstance sendInvitationWith: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.UsersApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} user to invite

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

namespace Example
{
    public class sendInvitationExample
    {
        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 UsersApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | user to invite (default to null)

            try {
                // Send invitation email to user
                apiInstance.sendInvitation(tenant, userId);
            } catch (Exception e) {
                Debug.Print("Exception when calling UsersApi.sendInvitation: " + 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\UsersApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | user to invite

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

# 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::UsersApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | user to invite

eval {
    $api_instance->sendInvitation(tenant => $tenant, userId => $userId);
};
if ($@) {
    warn "Exception when calling UsersApi->sendInvitation: $@\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.UsersApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | user to invite (default to null)

try:
    # Send invitation email to user
    api_instance.send_invitation(tenant, userId)
except ApiException as e:
    print("Exception when calling UsersApi->sendInvitation: %s\n" % e)
extern crate UsersApi;

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

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

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
user to invite
Required

Responses


unsubscribeUser

Deactivates a user account


/tenants/{tenant}/users/{userId}

Usage and SDK Samples

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

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

public class UsersApiExample {
    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
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId to deactivate

        try {
            apiInstance.unsubscribeUser(tenant, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#unsubscribeUser");
            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 | userId to deactivate

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

import org.openapitools.client.api.UsersApi;

public class UsersApiExample {
    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId to deactivate

        try {
            apiInstance.unsubscribeUser(tenant, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#unsubscribeUser");
            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
UsersApi *apiInstance = [[UsersApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // userId to deactivate (default to null)

// Deactivates a user account
[apiInstance unsubscribeUserWith: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.UsersApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} userId to deactivate

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

namespace Example
{
    public class unsubscribeUserExample
    {
        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 UsersApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | userId to deactivate (default to null)

            try {
                // Deactivates a user account
                apiInstance.unsubscribeUser(tenant, userId);
            } catch (Exception e) {
                Debug.Print("Exception when calling UsersApi.unsubscribeUser: " + 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\UsersApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | userId to deactivate

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

# 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::UsersApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | userId to deactivate

eval {
    $api_instance->unsubscribeUser(tenant => $tenant, userId => $userId);
};
if ($@) {
    warn "Exception when calling UsersApi->unsubscribeUser: $@\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.UsersApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | userId to deactivate (default to null)

try:
    # Deactivates a user account
    api_instance.unsubscribe_user(tenant, userId)
except ApiException as e:
    print("Exception when calling UsersApi->unsubscribeUser: %s\n" % e)
extern crate UsersApi;

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

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

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
userId to deactivate
Required

Responses


updateAccessCode

Update an access code in Aptem


/tenants/{tenant}/users/accesscodes/{accessCode}

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}/users/accesscodes/{accessCode}" \
 -d '{
  "caseOwner" : 0,
  "referenceNumber" : "referenceNumber",
  "groupId" : 6
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UsersApi;

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

public class UsersApiExample {
    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
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        String accessCode = accessCode_example; // String | access code to update
        RequestAccessCode requestAccessCode = ; // RequestAccessCode | 

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

final api_instance = DefaultApi();

final String tenant = new String(); // String | The tenant name
final String accessCode = new String(); // String | access code to update
final RequestAccessCode requestAccessCode = new RequestAccessCode(); // RequestAccessCode | 

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

import org.openapitools.client.api.UsersApi;

public class UsersApiExample {
    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        String accessCode = accessCode_example; // String | access code to update
        RequestAccessCode requestAccessCode = ; // RequestAccessCode | 

        try {
            apiInstance.updateAccessCode(tenant, accessCode, requestAccessCode);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#updateAccessCode");
            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
UsersApi *apiInstance = [[UsersApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
String *accessCode = accessCode_example; // access code to update (default to null)
RequestAccessCode *requestAccessCode = ; // 

// Update an access code in Aptem
[apiInstance updateAccessCodeWith:tenant
    accessCode:accessCode
    requestAccessCode:requestAccessCode
              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.UsersApi()
var tenant = tenant_example; // {String} The tenant name
var accessCode = accessCode_example; // {String} access code to update
var requestAccessCode = ; // {RequestAccessCode} 

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

namespace Example
{
    public class updateAccessCodeExample
    {
        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 UsersApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var accessCode = accessCode_example;  // String | access code to update (default to null)
            var requestAccessCode = new RequestAccessCode(); // RequestAccessCode | 

            try {
                // Update an access code in Aptem
                apiInstance.updateAccessCode(tenant, accessCode, requestAccessCode);
            } catch (Exception e) {
                Debug.Print("Exception when calling UsersApi.updateAccessCode: " + 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\UsersApi();
$tenant = tenant_example; // String | The tenant name
$accessCode = accessCode_example; // String | access code to update
$requestAccessCode = ; // RequestAccessCode | 

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

# 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::UsersApi->new();
my $tenant = tenant_example; # String | The tenant name
my $accessCode = accessCode_example; # String | access code to update
my $requestAccessCode = WWW::OPenAPIClient::Object::RequestAccessCode->new(); # RequestAccessCode | 

eval {
    $api_instance->updateAccessCode(tenant => $tenant, accessCode => $accessCode, requestAccessCode => $requestAccessCode);
};
if ($@) {
    warn "Exception when calling UsersApi->updateAccessCode: $@\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.UsersApi()
tenant = tenant_example # String | The tenant name (default to null)
accessCode = accessCode_example # String | access code to update (default to null)
requestAccessCode =  # RequestAccessCode | 

try:
    # Update an access code in Aptem
    api_instance.update_access_code(tenant, accessCode, requestAccessCode)
except ApiException as e:
    print("Exception when calling UsersApi->updateAccessCode: %s\n" % e)
extern crate UsersApi;

pub fn main() {
    let tenant = tenant_example; // String
    let accessCode = accessCode_example; // String
    let requestAccessCode = ; // RequestAccessCode

    let mut context = UsersApi::Context::default();
    let result = client.updateAccessCode(tenant, accessCode, requestAccessCode, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
accessCode*
String
access code to update
Required
Body parameters
Name Description
requestAccessCode *

Access code object that needs to be updated in Aptem

Responses


updateILR

Update user's ILR

Updates user's ILR properties


/tenants/{tenant}/users/{userId}/ilr

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}/users/{userId}/ilr" \
 -d '{
  "planEEPHours" : 1,
  "employerId" : 5,
  "learnRefNumber" : "LearnRefNumber",
  "niNumber" : "NINumber",
  "priorAttain" : "PriorAttain",
  "engGrade" : "EngGrade",
  "employmentStatus" : "EmploymentStatus",
  "ethnicity" : "Ethnicity",
  "uln" : "ULN",
  "planLearnHours" : 6,
  "mathGrade" : "MathGrade",
  "employmentStartDate" : "2018-02-02",
  "jobTitle" : "JobTitle",
  "contractedHours" : 8,
  "postConsent" : 1,
  "emailConsent" : 1,
  "phoneConsent" : 1,
  "llddAndHealthProblems" : "new List<int> { 4, 5, 12 }",
  "primaryLLDD" : 12,
  "emergencyContactName" : "EmergencyContactName",
  "emergencyContactRelationship" : "EmergencyContactRelationship",
  "emergencyContactPhone" : "EmergencyContactPhone",
  "emergencyContactEmail" : "EmergencyContactEmail",
  "ukEeaCitizen" : true,
  "ukEeaResident3Yrs" : true,
  "ukResidentYrs" : 4,
  "ukWorkPermitRequired" : false,
  "idEvidence" : "IDEvidence",
  "countryOfBirth" : "countryOfBirth",
  "residence" : "Residence",
  "nationality" : "Nationality",
  "postcodePrior" : "PostcodePrior",
  "totalTrainingPrice" : 5,
  "totalAssessmentPrice" : 8
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UsersApi;

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

public class UsersApiExample {
    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
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId to fetch the usage for
        RequestILR requestILR = ; // RequestILR | 

        try {
            apiInstance.updateILR(tenant, userId, requestILR);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#updateILR");
            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 | userId to fetch the usage for
final RequestILR requestILR = new RequestILR(); // RequestILR | 

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

import org.openapitools.client.api.UsersApi;

public class UsersApiExample {
    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId to fetch the usage for
        RequestILR requestILR = ; // RequestILR | 

        try {
            apiInstance.updateILR(tenant, userId, requestILR);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#updateILR");
            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
UsersApi *apiInstance = [[UsersApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // userId to fetch the usage for (default to null)
RequestILR *requestILR = ; // 

// Update user's ILR
[apiInstance updateILRWith:tenant
    userId:userId
    requestILR:requestILR
              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.UsersApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} userId to fetch the usage for
var requestILR = ; // {RequestILR} 

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

namespace Example
{
    public class updateILRExample
    {
        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 UsersApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | userId to fetch the usage for (default to null)
            var requestILR = new RequestILR(); // RequestILR | 

            try {
                // Update user's ILR
                apiInstance.updateILR(tenant, userId, requestILR);
            } catch (Exception e) {
                Debug.Print("Exception when calling UsersApi.updateILR: " + 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\UsersApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | userId to fetch the usage for
$requestILR = ; // RequestILR | 

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

# 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::UsersApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | userId to fetch the usage for
my $requestILR = WWW::OPenAPIClient::Object::RequestILR->new(); # RequestILR | 

eval {
    $api_instance->updateILR(tenant => $tenant, userId => $userId, requestILR => $requestILR);
};
if ($@) {
    warn "Exception when calling UsersApi->updateILR: $@\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.UsersApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | userId to fetch the usage for (default to null)
requestILR =  # RequestILR | 

try:
    # Update user's ILR
    api_instance.update_ilr(tenant, userId, requestILR)
except ApiException as e:
    print("Exception when calling UsersApi->updateILR: %s\n" % e)
extern crate UsersApi;

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

    let mut context = UsersApi::Context::default();
    let result = client.updateILR(tenant, userId, requestILR, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
userId to fetch the usage for
Required
Body parameters
Name Description
requestILR *

User object that needs to be updated in Aptem

Responses


updateUser

Update a user in Aptem


/tenants/{tenant}/users/{userId}

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/{userId}" \
 -d '{
  "firstName" : "firstName",
  "lastName" : "lastName",
  "caseOwnerId" : 5,
  "mentorId" : 6,
  "phone" : "phone",
  "referenceNumber" : "referenceNumber",
  "groupId" : 5,
  "email" : "email",
  "username" : "username",
  "dateOfBirth" : "2000-03-03",
  "caseOwnerFirstName" : "caseOwnerFirstName",
  "caseOwnerLastName" : "caseOwnerLastName",
  "postCode" : "postCode",
  "address1" : "address1",
  "address2" : "address2",
  "townCity" : "townCity",
  "countyState" : "countyState",
  "programmeId" : 12,
  "programmeStartDate" : "2018-04-03",
  "employerId" : 48,
  "employerAddressId" : 97,
  "managerFirstName" : "managerFirstName",
  "managerLastName" : "managerLastName",
  "managerEmail" : "managerEmail",
  "managerPhone" : "managerPhone",
  "IAEnglish" : "Level1",
  "IAMath" : "Level2",
  "IAICT" : "Level1",
  "diagEnglish" : "diagEnglish",
  "diagMath" : "diagMath",
  "diagIct" : "diagIct",
  "title" : "title",
  "preferredName" : "preferredName",
  "personalEmail" : "personalEmail",
  "gender" : "gender",
  "programmeEndDate" : "2019-05-05",
  "authenticationType" : "Aptem",
  "authType" : "SAML",
  "idP" : "IdP",
  "samlUserId" : "samlUserId",
  "plannedHours" : 140,
  "weeklyHours" : 40,
  "country" : "country",
  "landline" : "landline",
  "managerId" : 15,
  "learningProviderId" : 10
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UsersApi;

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

public class UsersApiExample {
    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
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId to update
        UpdateUser updateUser = ; // UpdateUser | 

        try {
            User result = apiInstance.updateUser(tenant, userId, updateUser);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#updateUser");
            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 | userId to update
final UpdateUser updateUser = new UpdateUser(); // UpdateUser | 

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

import org.openapitools.client.api.UsersApi;

public class UsersApiExample {
    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String tenant = tenant_example; // String | The tenant name
        Integer userId = 56; // Integer | userId to update
        UpdateUser updateUser = ; // UpdateUser | 

        try {
            User result = apiInstance.updateUser(tenant, userId, updateUser);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#updateUser");
            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
UsersApi *apiInstance = [[UsersApi alloc] init];
String *tenant = tenant_example; // The tenant name (default to null)
Integer *userId = 56; // userId to update (default to null)
UpdateUser *updateUser = ; // 

// Update a user in Aptem
[apiInstance updateUserWith:tenant
    userId:userId
    updateUser:updateUser
              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.UsersApi()
var tenant = tenant_example; // {String} The tenant name
var userId = 56; // {Integer} userId to update
var updateUser = ; // {UpdateUser} 

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

namespace Example
{
    public class updateUserExample
    {
        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 UsersApi();
            var tenant = tenant_example;  // String | The tenant name (default to null)
            var userId = 56;  // Integer | userId to update (default to null)
            var updateUser = new UpdateUser(); // UpdateUser | 

            try {
                // Update a user in Aptem
                User result = apiInstance.updateUser(tenant, userId, updateUser);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UsersApi.updateUser: " + 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\UsersApi();
$tenant = tenant_example; // String | The tenant name
$userId = 56; // Integer | userId to update
$updateUser = ; // UpdateUser | 

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

# 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::UsersApi->new();
my $tenant = tenant_example; # String | The tenant name
my $userId = 56; # Integer | userId to update
my $updateUser = WWW::OPenAPIClient::Object::UpdateUser->new(); # UpdateUser | 

eval {
    my $result = $api_instance->updateUser(tenant => $tenant, userId => $userId, updateUser => $updateUser);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->updateUser: $@\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.UsersApi()
tenant = tenant_example # String | The tenant name (default to null)
userId = 56 # Integer | userId to update (default to null)
updateUser =  # UpdateUser | 

try:
    # Update a user in Aptem
    api_response = api_instance.update_user(tenant, userId, updateUser)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->updateUser: %s\n" % e)
extern crate UsersApi;

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

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

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

Scopes

Parameters

Path parameters
Name Description
tenant*
String
The tenant name
Required
userId*
Integer (int32)
userId to update
Required
Body parameters
Name Description
updateUser *

User object that needs to be updated in Aptem

Responses