Skip to content

Latest commit

 

History

History
367 lines (245 loc) · 9.76 KB

ManagementApi.md

File metadata and controls

367 lines (245 loc) · 9.76 KB

OpenAPI\Client\ManagementApi

All URIs are relative to https://api.affixapi.com.

Method HTTP request Description
client() GET /2023-03-01/management/client Client
disconnect() POST /2023-03-01/management/disconnect Disconnect token
introspect() GET /2023-03-01/management/introspect Inspect token
token() POST /2023-03-01/management/token Create token
tokens() GET /2023-03-01/management/tokens Tokens
updateClient() POST /2023-03-01/management/client Update client

client()

client(): \OpenAPI\Client\Model\ClientResponse

Client

View client attributes

Example

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


// Configure API key authorization: basic
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new OpenAPI\Client\Api\ManagementApi(
    // 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
);

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

Parameters

This endpoint does not need any parameter.

Return type

\OpenAPI\Client\Model\ClientResponse

Authorization

basic

HTTP request headers

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

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

disconnect()

disconnect(): \OpenAPI\Client\Model\DisconnectResponse

Disconnect token

Disconnect the token. A disconnected token will no longer return data. Data requests with a disconnected token will return a 403 Forbidden

Example

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


// Configure API key authorization: access-token
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new OpenAPI\Client\Api\ManagementApi(
    // 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
);

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

Parameters

This endpoint does not need any parameter.

Return type

\OpenAPI\Client\Model\DisconnectResponse

Authorization

access-token

HTTP request headers

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

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

introspect()

introspect(): \OpenAPI\Client\Model\IntrospectResponse

Inspect token

Retrieve data about the token, such as scopes, mode, provider, and if it is active

Example

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


// Configure API key authorization: access-token
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new OpenAPI\Client\Api\ManagementApi(
    // 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
);

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

Parameters

This endpoint does not need any parameter.

Return type

\OpenAPI\Client\Model\IntrospectResponse

Authorization

access-token

HTTP request headers

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

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

token()

token($token_request): \OpenAPI\Client\Model\TokenResponse

Create token

Exchange an authorization_code for an access_token after receiving on from the redirect_uri you specifiy after a successful user connection

Example

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



$apiInstance = new OpenAPI\Client\Api\ManagementApi(
    // 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()
);
$token_request = new \OpenAPI\Client\Model\TokenRequest(); // \OpenAPI\Client\Model\TokenRequest

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

Parameters

Name Type Description Notes
token_request \OpenAPI\Client\Model\TokenRequest

Return type

\OpenAPI\Client\Model\TokenResponse

Authorization

No authorization required

HTTP request headers

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

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

tokens()

tokens(): object[]

Tokens

View tokens and token status for respective client

Example

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


// Configure API key authorization: basic
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new OpenAPI\Client\Api\ManagementApi(
    // 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
);

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

Parameters

This endpoint does not need any parameter.

Return type

object[]

Authorization

basic

HTTP request headers

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

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

updateClient()

updateClient($client_request): \OpenAPI\Client\Model\ClientResponse

Update client

Update attributes of the client. Update the name, client_secret, or webhook_uri of the client

Example

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


// Configure API key authorization: basic
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new OpenAPI\Client\Api\ManagementApi(
    // 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
);
$client_request = new \OpenAPI\Client\Model\ClientRequest(); // \OpenAPI\Client\Model\ClientRequest

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

Parameters

Name Type Description Notes
client_request \OpenAPI\Client\Model\ClientRequest

Return type

\OpenAPI\Client\Model\ClientResponse

Authorization

basic

HTTP request headers

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

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