List all accounts visible to the user.
curl -X GET\
\
-H "Accept: application/json"\
"https://rest.enablehr.com/accounts?filter=&sort=&first=&after=&last=&before="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AccountsApi;
import java.io.File;
import java.util.*;
public class AccountsApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
// Create an instance of the API class
AccountsApi apiInstance = new AccountsApi();
String filter = name:Scottie*; // String | A search string that contains `field:values` together with boolean operators, which can be used to filter the result.
An asterix (`*`) can also be used as a wildcard for partial matches on words.
Logical operators (`AND` and `OR`) can be used between terms.
Terms can be grouped via parenthesis to build complex search queries (see examples below).
The fields used in the field must be fields returned from the REST API endpoint.
Some example filters:
* `firstName:John` which would return employees whose firstName was John.
* `surname:Smith OR surname:Klein` which would return employees whose surname was either Smith or Klein.
* `surname:Smi*` which would return employees whose surname is Smith, Smits, Smithe, etc.
* `type:LegalEntity AND postcode:2000` which would return all branches that are Legal Entities and in postcode 2000.
* `postcode:2000 OR postcode:3000` which would return all branches in either postcode of 2000 or in postcode 3000.
* `type:LegalEntity AND (postcode:2000 OR postcode:3000)` which would return all branches that are Legal Entities and in postcode 2000 or 3000.
array[String] sort = sort=name:asc&sort=type:desc; // array[String] | To sort the results by either ascending or descending order
Integer first = 100; // Integer | Pagination: Indicates the number of items per page (when After cursor is used)
String after = 342dfs09ds329320; // String | Pagination: Return objects after this cursor
Integer last = 100; // Integer | Pagination: Indicates the number of items per page (when Before cursor is used)
String before = 531dfs09ds332932; // String | Pagination: Return objects before this cursor
try {
AccountsPage result = apiInstance.listAccounts(filter, sort, first, after, last, before);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountsApi#listAccounts");
e.printStackTrace();
}
}
}
import org.openapitools.client.api.AccountsApi;
public class AccountsApiExample {
public static void main(String[] args) {
AccountsApi apiInstance = new AccountsApi();
String filter = name:Scottie*; // String | A search string that contains `field:values` together with boolean operators, which can be used to filter the result.
An asterix (`*`) can also be used as a wildcard for partial matches on words.
Logical operators (`AND` and `OR`) can be used between terms.
Terms can be grouped via parenthesis to build complex search queries (see examples below).
The fields used in the field must be fields returned from the REST API endpoint.
Some example filters:
* `firstName:John` which would return employees whose firstName was John.
* `surname:Smith OR surname:Klein` which would return employees whose surname was either Smith or Klein.
* `surname:Smi*` which would return employees whose surname is Smith, Smits, Smithe, etc.
* `type:LegalEntity AND postcode:2000` which would return all branches that are Legal Entities and in postcode 2000.
* `postcode:2000 OR postcode:3000` which would return all branches in either postcode of 2000 or in postcode 3000.
* `type:LegalEntity AND (postcode:2000 OR postcode:3000)` which would return all branches that are Legal Entities and in postcode 2000 or 3000.
array[String] sort = sort=name:asc&sort=type:desc; // array[String] | To sort the results by either ascending or descending order
Integer first = 100; // Integer | Pagination: Indicates the number of items per page (when After cursor is used)
String after = 342dfs09ds329320; // String | Pagination: Return objects after this cursor
Integer last = 100; // Integer | Pagination: Indicates the number of items per page (when Before cursor is used)
String before = 531dfs09ds332932; // String | Pagination: Return objects before this cursor
try {
AccountsPage result = apiInstance.listAccounts(filter, sort, first, after, last, before);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountsApi#listAccounts");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Create an instance of the API class
AccountsApi *apiInstance = [[AccountsApi alloc] init];
String *filter = name:Scottie*; // A search string that contains `field:values` together with boolean operators, which can be used to filter the result.
An asterix (`*`) can also be used as a wildcard for partial matches on words.
Logical operators (`AND` and `OR`) can be used between terms.
Terms can be grouped via parenthesis to build complex search queries (see examples below).
The fields used in the field must be fields returned from the REST API endpoint.
Some example filters:
* `firstName:John` which would return employees whose firstName was John.
* `surname:Smith OR surname:Klein` which would return employees whose surname was either Smith or Klein.
* `surname:Smi*` which would return employees whose surname is Smith, Smits, Smithe, etc.
* `type:LegalEntity AND postcode:2000` which would return all branches that are Legal Entities and in postcode 2000.
* `postcode:2000 OR postcode:3000` which would return all branches in either postcode of 2000 or in postcode 3000.
* `type:LegalEntity AND (postcode:2000 OR postcode:3000)` which would return all branches that are Legal Entities and in postcode 2000 or 3000.
(default to null)
array[String] *sort = sort=name:asc&sort=type:desc; // To sort the results by either ascending or descending order
(optional) (default to null)
Integer *first = 100; // Pagination: Indicates the number of items per page (when After cursor is used)
(optional) (default to null)
String *after = 342dfs09ds329320; // Pagination: Return objects after this cursor
(optional) (default to null)
Integer *last = 100; // Pagination: Indicates the number of items per page (when Before cursor is used)
(optional) (default to null)
String *before = 531dfs09ds332932; // Pagination: Return objects before this cursor
(optional) (default to null)
// List Accounts
[apiInstance listAccountsWith:filter
sort:sort
first:first
after:after
last:last
before:before
completionHandler: ^(AccountsPage output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var EnableHrCitationHrApi = require('enable_hr__citation_hr_api');
var defaultClient = EnableHrCitationHrApi.ApiClient.instance;
// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = "YOUR ACCESS TOKEN";
// Create an instance of the API class
var api = new EnableHrCitationHrApi.AccountsApi()
var filter = name:Scottie*; // {String} A search string that contains `field:values` together with boolean operators, which can be used to filter the result.
An asterix (`*`) can also be used as a wildcard for partial matches on words.
Logical operators (`AND` and `OR`) can be used between terms.
Terms can be grouped via parenthesis to build complex search queries (see examples below).
The fields used in the field must be fields returned from the REST API endpoint.
Some example filters:
* `firstName:John` which would return employees whose firstName was John.
* `surname:Smith OR surname:Klein` which would return employees whose surname was either Smith or Klein.
* `surname:Smi*` which would return employees whose surname is Smith, Smits, Smithe, etc.
* `type:LegalEntity AND postcode:2000` which would return all branches that are Legal Entities and in postcode 2000.
* `postcode:2000 OR postcode:3000` which would return all branches in either postcode of 2000 or in postcode 3000.
* `type:LegalEntity AND (postcode:2000 OR postcode:3000)` which would return all branches that are Legal Entities and in postcode 2000 or 3000.
var opts = {
'sort': sort=name:asc&sort=type:desc, // {array[String]} To sort the results by either ascending or descending order
'first': 100, // {Integer} Pagination: Indicates the number of items per page (when After cursor is used)
'after': 342dfs09ds329320, // {String} Pagination: Return objects after this cursor
'last': 100, // {Integer} Pagination: Indicates the number of items per page (when Before cursor is used)
'before': 531dfs09ds332932 // {String} Pagination: Return objects before this cursor
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.listAccounts(filter, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class listAccountsExample
{
public void main()
{
// Configure OAuth2 access token for authorization: OAuth2
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
// Create an instance of the API class
var apiInstance = new AccountsApi();
var filter = name:Scottie*; // String | A search string that contains `field:values` together with boolean operators, which can be used to filter the result.
An asterix (`*`) can also be used as a wildcard for partial matches on words.
Logical operators (`AND` and `OR`) can be used between terms.
Terms can be grouped via parenthesis to build complex search queries (see examples below).
The fields used in the field must be fields returned from the REST API endpoint.
Some example filters:
* `firstName:John` which would return employees whose firstName was John.
* `surname:Smith OR surname:Klein` which would return employees whose surname was either Smith or Klein.
* `surname:Smi*` which would return employees whose surname is Smith, Smits, Smithe, etc.
* `type:LegalEntity AND postcode:2000` which would return all branches that are Legal Entities and in postcode 2000.
* `postcode:2000 OR postcode:3000` which would return all branches in either postcode of 2000 or in postcode 3000.
* `type:LegalEntity AND (postcode:2000 OR postcode:3000)` which would return all branches that are Legal Entities and in postcode 2000 or 3000.
(default to null)
var sort = new array[String](); // array[String] | To sort the results by either ascending or descending order
(optional) (default to null)
var first = 100; // Integer | Pagination: Indicates the number of items per page (when After cursor is used)
(optional) (default to null)
var after = 342dfs09ds329320; // String | Pagination: Return objects after this cursor
(optional) (default to null)
var last = 100; // Integer | Pagination: Indicates the number of items per page (when Before cursor is used)
(optional) (default to null)
var before = 531dfs09ds332932; // String | Pagination: Return objects before this cursor
(optional) (default to null)
try {
// List Accounts
AccountsPage result = apiInstance.listAccounts(filter, sort, first, after, last, before);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling AccountsApi.listAccounts: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AccountsApi();
$filter = name:Scottie*; // String | A search string that contains `field:values` together with boolean operators, which can be used to filter the result.
An asterix (`*`) can also be used as a wildcard for partial matches on words.
Logical operators (`AND` and `OR`) can be used between terms.
Terms can be grouped via parenthesis to build complex search queries (see examples below).
The fields used in the field must be fields returned from the REST API endpoint.
Some example filters:
* `firstName:John` which would return employees whose firstName was John.
* `surname:Smith OR surname:Klein` which would return employees whose surname was either Smith or Klein.
* `surname:Smi*` which would return employees whose surname is Smith, Smits, Smithe, etc.
* `type:LegalEntity AND postcode:2000` which would return all branches that are Legal Entities and in postcode 2000.
* `postcode:2000 OR postcode:3000` which would return all branches in either postcode of 2000 or in postcode 3000.
* `type:LegalEntity AND (postcode:2000 OR postcode:3000)` which would return all branches that are Legal Entities and in postcode 2000 or 3000.
$sort = sort=name:asc&sort=type:desc; // array[String] | To sort the results by either ascending or descending order
$first = 100; // Integer | Pagination: Indicates the number of items per page (when After cursor is used)
$after = 342dfs09ds329320; // String | Pagination: Return objects after this cursor
$last = 100; // Integer | Pagination: Indicates the number of items per page (when Before cursor is used)
$before = 531dfs09ds332932; // String | Pagination: Return objects before this cursor
try {
$result = $api_instance->listAccounts($filter, $sort, $first, $after, $last, $before);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AccountsApi->listAccounts: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AccountsApi;
# Configure OAuth2 access token for authorization: OAuth2
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AccountsApi->new();
my $filter = name:Scottie*; # String | A search string that contains `field:values` together with boolean operators, which can be used to filter the result.
An asterix (`*`) can also be used as a wildcard for partial matches on words.
Logical operators (`AND` and `OR`) can be used between terms.
Terms can be grouped via parenthesis to build complex search queries (see examples below).
The fields used in the field must be fields returned from the REST API endpoint.
Some example filters:
* `firstName:John` which would return employees whose firstName was John.
* `surname:Smith OR surname:Klein` which would return employees whose surname was either Smith or Klein.
* `surname:Smi*` which would return employees whose surname is Smith, Smits, Smithe, etc.
* `type:LegalEntity AND postcode:2000` which would return all branches that are Legal Entities and in postcode 2000.
* `postcode:2000 OR postcode:3000` which would return all branches in either postcode of 2000 or in postcode 3000.
* `type:LegalEntity AND (postcode:2000 OR postcode:3000)` which would return all branches that are Legal Entities and in postcode 2000 or 3000.
my $sort = [sort=name:asc&sort=type:desc]; # array[String] | To sort the results by either ascending or descending order
my $first = 100; # Integer | Pagination: Indicates the number of items per page (when After cursor is used)
my $after = 342dfs09ds329320; # String | Pagination: Return objects after this cursor
my $last = 100; # Integer | Pagination: Indicates the number of items per page (when Before cursor is used)
my $before = 531dfs09ds332932; # String | Pagination: Return objects before this cursor
eval {
my $result = $api_instance->listAccounts(filter => $filter, sort => $sort, first => $first, after => $after, last => $last, before => $before);
print Dumper($result);
};
if ($@) {
warn "Exception when calling AccountsApi->listAccounts: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: OAuth2
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Create an instance of the API class
api_instance = openapi_client.AccountsApi()
filter = name:Scottie* # String | A search string that contains `field:values` together with boolean operators, which can be used to filter the result.
An asterix (`*`) can also be used as a wildcard for partial matches on words.
Logical operators (`AND` and `OR`) can be used between terms.
Terms can be grouped via parenthesis to build complex search queries (see examples below).
The fields used in the field must be fields returned from the REST API endpoint.
Some example filters:
* `firstName:John` which would return employees whose firstName was John.
* `surname:Smith OR surname:Klein` which would return employees whose surname was either Smith or Klein.
* `surname:Smi*` which would return employees whose surname is Smith, Smits, Smithe, etc.
* `type:LegalEntity AND postcode:2000` which would return all branches that are Legal Entities and in postcode 2000.
* `postcode:2000 OR postcode:3000` which would return all branches in either postcode of 2000 or in postcode 3000.
* `type:LegalEntity AND (postcode:2000 OR postcode:3000)` which would return all branches that are Legal Entities and in postcode 2000 or 3000.
(default to null)
sort = sort=name:asc&sort=type:desc # array[String] | To sort the results by either ascending or descending order
(optional) (default to null)
first = 100 # Integer | Pagination: Indicates the number of items per page (when After cursor is used)
(optional) (default to null)
after = 342dfs09ds329320 # String | Pagination: Return objects after this cursor
(optional) (default to null)
last = 100 # Integer | Pagination: Indicates the number of items per page (when Before cursor is used)
(optional) (default to null)
before = 531dfs09ds332932 # String | Pagination: Return objects before this cursor
(optional) (default to null)
try:
# List Accounts
api_response = api_instance.list_accounts(filter, sort=sort, first=first, after=after, last=last, before=before)
pprint(api_response)
except ApiException as e:
print("Exception when calling AccountsApi->listAccounts: %s\n" % e)
extern crate AccountsApi;
pub fn main() {
let filter = name:Scottie*; // String
let sort = sort=name:asc&sort=type:desc; // array[String]
let first = 100; // Integer
let after = 342dfs09ds329320; // String
let last = 100; // Integer
let before = 531dfs09ds332932; // String
let mut context = AccountsApi::Context::default();
let result = client.listAccounts(filter, sort, first, after, last, before, &context).wait();
println!("{:?}", result);
}