Console Access

Retrieve Console Access

GET /v1/{access-token}/consoleaccess
                            

use \FormSynergy\Init as FS;

$api = FS::Api()->Load($profileid);

$api->Get('consoleaccess')
    ->Where([
        'accessid' => $accessid,
    ])
    ->As('GetConsoleAccess');

 
 
                            
                            
{
    "username": "user_access_1",
    "confirmed": "no",
    "profileid": "profile-3be1fa342a520cbdf28aa43ab8edefee"
}
                            

Update Console Access

POST /v1/{access-token}/consoleaccess
                            
 
use \FormSynergy\Init as FS;

$api = FS::Api()->Load($profileid);

$api->Get('consoleaccess')
    ->Where([
        'accessid' => $accessid,
    ])
    ->Update([
        'password' => '(*&^^%$#'
    ])
    ->As('UpdateConsoleAccess');
 
                            
                            
{
    "accessid": "access-be06d10eb3fe50c751704decf340b7c8"
}
                            

Create Console Access

PUT /v1/{access-token}/consoleaccess
                            
 
use \FormSynergy\Init as FS;

$api = FS::Api()->Load($profileid);

$api->Create('consoleaccess')
    ->Attributes([
        'username' => 'user_access_1',
        'password' => 'xxx....xxx'
    ])
    ->As('CreateConsoleAccess');
 
                            
                            
// Successful response
{
    "accessid":"access-be06d10eb3fe50c751704decf340b7c8"
} 

// Unsuccessful response
{
    "messages": ["This username already exists!"],
    "code": 204,
    "AccessPoint": "754a3683204940fd0f6ac39b25d127e3",
    "profileid": "profile-3be1fa342a520cbdf28aa43ab8edefee",
    "uri": "\/v1\/754a3683204940fd0f6ac39b25d127e3\/consoleaccess"
}
                            

Revoke Access to the Console

DELETE /v1/{access-token}/consoleaccess
                            
 
use \FormSynergy\Init as FS;

$api = FS::Api()->Load($profileid);

$api->Get('consoleaccess')
    ->Where([
        'username' => 'user_access_1',
    ])
    ->Delete()
    ->As('DeleteConsoleAccess');
 
                            
                            
{
    "code": 200,
    "messages": ["Item removed"],
    "AccessPoint": "754a3683204940fd0f6ac39b25d127e3",
    "profileid": "profile-3be1fa342a520cbdf28aa43ab8edefee",
    "uri": "\/v1\/754a3683204940fd0f6ac39b25d127e3\/consoleaccess"
}