Skip to content

Latest commit

 

History

History
159 lines (104 loc) · 4.25 KB

ApiKeysApi.md

File metadata and controls

159 lines (104 loc) · 4.25 KB

FastreportCloudSdk.ApiKeysApi

All URIs are relative to http://localhost

Method HTTP request Description
apiKeysCreateApiKey POST /api/manage/v1/ApiKeys Create a new apikey, 5 apikeys for user. Hardcoded for ddos.
apiKeysDeleteApiKey DELETE /api/manage/v1/ApiKeys Delete an apikey
apiKeysGetApiKeys GET /api/manage/v1/ApiKeys Returns list with all apikeys of current user

apiKeysCreateApiKey

ApiKeyVM apiKeysCreateApiKey(createApiKeyVM)

Create a new apikey, 5 apikeys for user. Hardcoded for ddos.

Example

import FastreportCloudSdk from 'fastreport-cloud-sdk';
let defaultClient = FastreportCloudSdk.ApiClient.instance;
// Configure HTTP basic authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.username = 'YOUR USERNAME';
ApiKey.password = 'YOUR PASSWORD';
// Configure Bearer (JWT) access token for authorization: JWT
let JWT = defaultClient.authentications['JWT'];
JWT.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new FastreportCloudSdk.ApiKeysApi();
let createApiKeyVM = new FastreportCloudSdk.CreateApiKeyVM(); // CreateApiKeyVM | 
apiInstance.apiKeysCreateApiKey(createApiKeyVM).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
createApiKeyVM CreateApiKeyVM

Return type

ApiKeyVM

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: application/json

apiKeysDeleteApiKey

ApiKeyVM apiKeysDeleteApiKey(deleteApiKeyVM)

Delete an apikey

Example

import FastreportCloudSdk from 'fastreport-cloud-sdk';
let defaultClient = FastreportCloudSdk.ApiClient.instance;
// Configure HTTP basic authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.username = 'YOUR USERNAME';
ApiKey.password = 'YOUR PASSWORD';
// Configure Bearer (JWT) access token for authorization: JWT
let JWT = defaultClient.authentications['JWT'];
JWT.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new FastreportCloudSdk.ApiKeysApi();
let deleteApiKeyVM = new FastreportCloudSdk.DeleteApiKeyVM(); // DeleteApiKeyVM | 
apiInstance.apiKeysDeleteApiKey(deleteApiKeyVM).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
deleteApiKeyVM DeleteApiKeyVM

Return type

ApiKeyVM

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: application/json

apiKeysGetApiKeys

ApiKeysVM apiKeysGetApiKeys()

Returns list with all apikeys of current user

Always work, it should make only 200 response (except if user is not authorized).

Example

import FastreportCloudSdk from 'fastreport-cloud-sdk';
let defaultClient = FastreportCloudSdk.ApiClient.instance;
// Configure HTTP basic authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.username = 'YOUR USERNAME';
ApiKey.password = 'YOUR PASSWORD';
// Configure Bearer (JWT) access token for authorization: JWT
let JWT = defaultClient.authentications['JWT'];
JWT.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new FastreportCloudSdk.ApiKeysApi();
apiInstance.apiKeysGetApiKeys().then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

This endpoint does not need any parameter.

Return type

ApiKeysVM

Authorization

ApiKey, JWT

HTTP request headers

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