Skip to content

Latest commit

 

History

History
316 lines (211 loc) · 8.68 KB

File metadata and controls

316 lines (211 loc) · 8.68 KB

Zernio\ProfilesApi

All URIs are relative to https://zernio.com/api, except if the operation defines another base path.

Method HTTP request Description
createProfile() POST /v1/profiles Create profile
deleteProfile() DELETE /v1/profiles/{profileId} Delete profile
getProfile() GET /v1/profiles/{profileId} Get profile
listProfiles() GET /v1/profiles List profiles
updateProfile() PUT /v1/profiles/{profileId} Update profile

createProfile()

createProfile($create_profile_request): \Zernio\Model\ProfileCreateResponse

Create profile

Creates a new profile with a name, optional description, and color.

Example

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


// Configure Bearer (JWT) authorization: bearerAuth
$config = Zernio\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Zernio\Api\ProfilesApi(
    // 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_profile_request = {"name":"Marketing Team","description":"Profile for marketing campaigns","color":"#4CAF50"}; // \Zernio\Model\CreateProfileRequest

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

Parameters

Name Type Description Notes
create_profile_request \Zernio\Model\CreateProfileRequest

Return type

\Zernio\Model\ProfileCreateResponse

Authorization

bearerAuth

HTTP request headers

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

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

deleteProfile()

deleteProfile($profile_id): \Zernio\Model\DeleteAccountGroup200Response

Delete profile

Permanently deletes a profile by ID.

Example

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


// Configure Bearer (JWT) authorization: bearerAuth
$config = Zernio\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Zernio\Api\ProfilesApi(
    // 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
);
$profile_id = 'profile_id_example'; // string

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

Parameters

Name Type Description Notes
profile_id string

Return type

\Zernio\Model\DeleteAccountGroup200Response

Authorization

bearerAuth

HTTP request headers

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

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

getProfile()

getProfile($profile_id): \Zernio\Model\GetProfile200Response

Get profile

Returns a single profile by ID, including its name, color, and default status.

Example

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


// Configure Bearer (JWT) authorization: bearerAuth
$config = Zernio\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Zernio\Api\ProfilesApi(
    // 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
);
$profile_id = 'profile_id_example'; // string

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

Parameters

Name Type Description Notes
profile_id string

Return type

\Zernio\Model\GetProfile200Response

Authorization

bearerAuth

HTTP request headers

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

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

listProfiles()

listProfiles($include_over_limit): \Zernio\Model\ProfilesListResponse

List profiles

Returns profiles sorted by creation date. Use includeOverLimit=true to include profiles that exceed the plan limit.

Example

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


// Configure Bearer (JWT) authorization: bearerAuth
$config = Zernio\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Zernio\Api\ProfilesApi(
    // 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
);
$include_over_limit = false; // bool | When true, includes over-limit profiles (marked with isOverLimit: true).

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

Parameters

Name Type Description Notes
include_over_limit bool When true, includes over-limit profiles (marked with isOverLimit: true). [optional] [default to false]

Return type

\Zernio\Model\ProfilesListResponse

Authorization

bearerAuth

HTTP request headers

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

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

updateProfile()

updateProfile($profile_id, $update_profile_request): \Zernio\Model\UpdateProfile200Response

Update profile

Updates a profile's name, description, color, or default status.

Example

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


// Configure Bearer (JWT) authorization: bearerAuth
$config = Zernio\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Zernio\Api\ProfilesApi(
    // 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
);
$profile_id = 'profile_id_example'; // string
$update_profile_request = {"name":"Marketing Team (Updated)","color":"#2196F3","isDefault":true}; // \Zernio\Model\UpdateProfileRequest

try {
    $result = $apiInstance->updateProfile($profile_id, $update_profile_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProfilesApi->updateProfile: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
profile_id string
update_profile_request \Zernio\Model\UpdateProfileRequest

Return type

\Zernio\Model\UpdateProfile200Response

Authorization

bearerAuth

HTTP request headers

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

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