Skip to content

Latest commit

 

History

History
188 lines (128 loc) · 5.45 KB

File metadata and controls

188 lines (128 loc) · 5.45 KB

QuantClient\TokensApi

All URIs are relative to https://dashboard.quantcdn.io, except if the operation defines another base path.

Method HTTP request Description
tokensCreate() POST /api/v2/organizations/{organization}/tokens Create a new API token scoped to this organization
tokensDelete() DELETE /api/v2/organizations/{organization}/tokens/{token_id} Revoke an API token
tokensList() GET /api/v2/organizations/{organization}/tokens List API tokens scoped to this organization

tokensCreate()

tokensCreate($organization, $tokens_create_request): \QuantClient\Model\TokensCreate201Response

Create a new API token scoped to this organization

Example

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


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


$apiInstance = new QuantClient\Api\TokensApi(
    // 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
);
$organization = test-org; // string | Organization identifier
$tokens_create_request = new \QuantClient\Model\TokensCreateRequest(); // \QuantClient\Model\TokensCreateRequest

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

Parameters

Name Type Description Notes
organization string Organization identifier
tokens_create_request \QuantClient\Model\TokensCreateRequest

Return type

\QuantClient\Model\TokensCreate201Response

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]

tokensDelete()

tokensDelete($organization, $token_id): \QuantClient\Model\TokensDelete200Response

Revoke an API token

Example

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


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


$apiInstance = new QuantClient\Api\TokensApi(
    // 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
);
$organization = test-org; // string | Organization identifier
$token_id = 42; // int | Token ID to revoke

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

Parameters

Name Type Description Notes
organization string Organization identifier
token_id int Token ID to revoke

Return type

\QuantClient\Model\TokensDelete200Response

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]

tokensList()

tokensList($organization): \QuantClient\Model\TokensList200ResponseInner[]

List API tokens scoped to this organization

Example

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


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


$apiInstance = new QuantClient\Api\TokensApi(
    // 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
);
$organization = test-org; // string | Organization identifier

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

Parameters

Name Type Description Notes
organization string Organization identifier

Return type

\QuantClient\Model\TokensList200ResponseInner[]

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]