Skip to content

Latest commit

 

History

History
450 lines (300 loc) · 12.9 KB

UsersApi.md

File metadata and controls

450 lines (300 loc) · 12.9 KB

Jalismrs\Stalactite\Client\Data\UsersApi

All URIs are relative to https://stalactite.jalis.pro/data, except if the operation defines another base path.

Method HTTP request Description
createUser() POST /users
deleteUser() DELETE /users/{uid}
getUser() GET /users/{uid}
getUserBy() GET /users/by
getUserSubordinates() GET /users/{uid}/subordinates
getUsers() GET /users
updateUser() PUT /users/{uid}

createUser()

createUser($create_user_request): \Jalismrs\Stalactite\Client\Data\Model\User

Create and get an user

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: StalactiteToken
$config = Jalismrs\Stalactite\Client\Data\Configuration::getDefaultConfiguration()->setApiKey('X-API-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Jalismrs\Stalactite\Client\Data\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-TOKEN', 'Bearer');


$apiInstance = new Jalismrs\Stalactite\Client\Data\Api\UsersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$create_user_request = new \Jalismrs\Stalactite\Client\Data\Model\CreateUserRequest(); // \Jalismrs\Stalactite\Client\Data\Model\CreateUserRequest

try {
    $result = $apiInstance->createUser($create_user_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->createUser: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
create_user_request \Jalismrs\Stalactite\Client\Data\Model\CreateUserRequest

Return type

\Jalismrs\Stalactite\Client\Data\Model\User

Authorization

StalactiteToken

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteUser()

deleteUser($uid)

Delete an user based on its uid

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: StalactiteToken
$config = Jalismrs\Stalactite\Client\Data\Configuration::getDefaultConfiguration()->setApiKey('X-API-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Jalismrs\Stalactite\Client\Data\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-TOKEN', 'Bearer');


$apiInstance = new Jalismrs\Stalactite\Client\Data\Api\UsersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$uid = 'uid_example'; // string | The uid of the user to delete

try {
    $apiInstance->deleteUser($uid);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->deleteUser: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
uid string The uid of the user to delete

Return type

void (empty response body)

Authorization

StalactiteToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUser()

getUser($uid): \Jalismrs\Stalactite\Client\Data\Model\User2

Get an user based on its uid

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: StalactiteToken
$config = Jalismrs\Stalactite\Client\Data\Configuration::getDefaultConfiguration()->setApiKey('X-API-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Jalismrs\Stalactite\Client\Data\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-TOKEN', 'Bearer');


$apiInstance = new Jalismrs\Stalactite\Client\Data\Api\UsersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$uid = 'uid_example'; // string | The uid of the user to get

try {
    $result = $apiInstance->getUser($uid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->getUser: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
uid string The uid of the user to get

Return type

\Jalismrs\Stalactite\Client\Data\Model\User2

Authorization

StalactiteToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUserBy()

getUserBy($email): \Jalismrs\Stalactite\Client\Data\Model\User2

Get an user based on filter parameters

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: StalactiteToken
$config = Jalismrs\Stalactite\Client\Data\Configuration::getDefaultConfiguration()->setApiKey('X-API-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Jalismrs\Stalactite\Client\Data\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-TOKEN', 'Bearer');


$apiInstance = new Jalismrs\Stalactite\Client\Data\Api\UsersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$email = 'email_example'; // string | Filters users by email

try {
    $result = $apiInstance->getUserBy($email);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->getUserBy: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
email string Filters users by email [optional]

Return type

\Jalismrs\Stalactite\Client\Data\Model\User2

Authorization

StalactiteToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUserSubordinates()

getUserSubordinates($uid): \Jalismrs\Stalactite\Client\Data\Model\User2[]

Get the subordinates of an user

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: StalactiteToken
$config = Jalismrs\Stalactite\Client\Data\Configuration::getDefaultConfiguration()->setApiKey('X-API-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Jalismrs\Stalactite\Client\Data\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-TOKEN', 'Bearer');


$apiInstance = new Jalismrs\Stalactite\Client\Data\Api\UsersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$uid = 'uid_example'; // string

try {
    $result = $apiInstance->getUserSubordinates($uid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->getUserSubordinates: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
uid string

Return type

\Jalismrs\Stalactite\Client\Data\Model\User2[]

Authorization

StalactiteToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsers()

getUsers($page, $search): \Jalismrs\Stalactite\Client\Data\Model\GetUsersResponse

Get all users (supports pagination). Can be filtered by first name or last name or email

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: StalactiteToken
$config = Jalismrs\Stalactite\Client\Data\Configuration::getDefaultConfiguration()->setApiKey('X-API-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Jalismrs\Stalactite\Client\Data\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-TOKEN', 'Bearer');


$apiInstance = new Jalismrs\Stalactite\Client\Data\Api\UsersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$page = 56; // int | Specify the page to get. Default: 1
$search = 'search_example'; // string | Filters users by first name or last name or email

try {
    $result = $apiInstance->getUsers($page, $search);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->getUsers: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
page int Specify the page to get. Default: 1 [optional]
search string Filters users by first name or last name or email [optional]

Return type

\Jalismrs\Stalactite\Client\Data\Model\GetUsersResponse

Authorization

StalactiteToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateUser()

updateUser($uid, $update_user_request)

Update an user based on its uid

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: StalactiteToken
$config = Jalismrs\Stalactite\Client\Data\Configuration::getDefaultConfiguration()->setApiKey('X-API-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Jalismrs\Stalactite\Client\Data\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-TOKEN', 'Bearer');


$apiInstance = new Jalismrs\Stalactite\Client\Data\Api\UsersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$uid = 'uid_example'; // string | The uid of the user to update
$update_user_request = new \Jalismrs\Stalactite\Client\Data\Model\UpdateUserRequest(); // \Jalismrs\Stalactite\Client\Data\Model\UpdateUserRequest

try {
    $apiInstance->updateUser($uid, $update_user_request);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->updateUser: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
uid string The uid of the user to update
update_user_request \Jalismrs\Stalactite\Client\Data\Model\UpdateUserRequest

Return type

void (empty response body)

Authorization

StalactiteToken

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]