Skip to content

Latest commit

 

History

History
481 lines (324 loc) · 14.6 KB

SubscriptionsApi.md

File metadata and controls

481 lines (324 loc) · 14.6 KB

FastreportCloudSdk.SubscriptionsApi

All URIs are relative to http://localhost

Method HTTP request Description
subscriptionsGetDefaultPermissions GET /api/manage/v1/Subscriptions/{subscriptionId}/defaultPermissions Get subscription's default permissions for new entities
subscriptionsGetMyPermissions GET /api/manage/v1/Subscriptions/{subId}/mypermissions Get user's permissions for a subscription by id
subscriptionsGetPermissions GET /api/manage/v1/Subscriptions/{id}/permissions Get permissions for a subscription by id
subscriptionsGetSubscription GET /api/manage/v1/Subscriptions/{id} Returns the subscription by id
subscriptionsGetSubscriptions GET /api/manage/v1/Subscriptions Returns a list of all subscriptions of current user
subscriptionsRenameSubscription PUT /api/manage/v1/Subscriptions/{subscriptionId}/rename Rename subscription
subscriptionsUpdateDefaultPermissions PUT /api/manage/v1/Subscriptions/{subscriptionId}/defaultPermissions Change subscription's default permissions for new entities
subscriptionsUpdateLocale PUT /api/manage/v1/Subscriptions/{subscriptionId}/Locale Update subscription's default locale
subscriptionsUpdatePermissions POST /api/manage/v1/Subscriptions/{id}/permissions Update permissions

subscriptionsGetDefaultPermissions

DefaultPermissionsVM subscriptionsGetDefaultPermissions(subscriptionId)

Get subscription's default permissions for new entities

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.SubscriptionsApi();
let subscriptionId = "subscriptionId_example"; // String | id
apiInstance.subscriptionsGetDefaultPermissions(subscriptionId).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
subscriptionId String id

Return type

DefaultPermissionsVM

Authorization

ApiKey, JWT

HTTP request headers

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

subscriptionsGetMyPermissions

MyPermissionsVM subscriptionsGetMyPermissions(subId)

Get user's permissions for a subscription by id

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.SubscriptionsApi();
let subId = "subId_example"; // String | subscription id
apiInstance.subscriptionsGetMyPermissions(subId).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
subId String subscription id

Return type

MyPermissionsVM

Authorization

ApiKey, JWT

HTTP request headers

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

subscriptionsGetPermissions

SubscriptionPermissionsVM subscriptionsGetPermissions(id)

Get permissions for a subscription by id

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.SubscriptionsApi();
let id = "id_example"; // String | 
apiInstance.subscriptionsGetPermissions(id).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id String

Return type

SubscriptionPermissionsVM

Authorization

ApiKey, JWT

HTTP request headers

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

subscriptionsGetSubscription

SubscriptionVM subscriptionsGetSubscription(id)

Returns the subscription by id

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.SubscriptionsApi();
let id = "id_example"; // String | Identifier of subscription
apiInstance.subscriptionsGetSubscription(id).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id String Identifier of subscription

Return type

SubscriptionVM

Authorization

ApiKey, JWT

HTTP request headers

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

subscriptionsGetSubscriptions

SubscriptionsVM subscriptionsGetSubscriptions(opts)

Returns a list of all subscriptions of current user

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.SubscriptionsApi();
let opts = {
  'skip': 0, // Number | Variable for pagination, defautl value is 0
  'take': 10 // Number | Variable for pagination, default value is 10
};
apiInstance.subscriptionsGetSubscriptions(opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
skip Number Variable for pagination, defautl value is 0 [optional] [default to 0]
take Number Variable for pagination, default value is 10 [optional] [default to 10]

Return type

SubscriptionsVM

Authorization

ApiKey, JWT

HTTP request headers

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

subscriptionsRenameSubscription

SubscriptionVM subscriptionsRenameSubscription(subscriptionId, renameSubscriptionVM)

Rename subscription

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.SubscriptionsApi();
let subscriptionId = "subscriptionId_example"; // String | id
let renameSubscriptionVM = new FastreportCloudSdk.RenameSubscriptionVM(); // RenameSubscriptionVM | rename VM
apiInstance.subscriptionsRenameSubscription(subscriptionId, renameSubscriptionVM).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
subscriptionId String id
renameSubscriptionVM RenameSubscriptionVM rename VM

Return type

SubscriptionVM

Authorization

ApiKey, JWT

HTTP request headers

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

subscriptionsUpdateDefaultPermissions

DefaultPermissionsVM subscriptionsUpdateDefaultPermissions(subscriptionId, updateDefaultPermissionsVM)

Change subscription's default permissions for new entities

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.SubscriptionsApi();
let subscriptionId = "subscriptionId_example"; // String | id
let updateDefaultPermissionsVM = new FastreportCloudSdk.UpdateDefaultPermissionsVM(); // UpdateDefaultPermissionsVM | update default permissions VM
apiInstance.subscriptionsUpdateDefaultPermissions(subscriptionId, updateDefaultPermissionsVM).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
subscriptionId String id
updateDefaultPermissionsVM UpdateDefaultPermissionsVM update default permissions VM

Return type

DefaultPermissionsVM

Authorization

ApiKey, JWT

HTTP request headers

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

subscriptionsUpdateLocale

SubscriptionVM subscriptionsUpdateLocale(subscriptionId, updateSubscriptionLocaleVM)

Update subscription's default locale

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.SubscriptionsApi();
let subscriptionId = "subscriptionId_example"; // String | id
let updateSubscriptionLocaleVM = new FastreportCloudSdk.UpdateSubscriptionLocaleVM(); // UpdateSubscriptionLocaleVM | update VM
apiInstance.subscriptionsUpdateLocale(subscriptionId, updateSubscriptionLocaleVM).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
subscriptionId String id
updateSubscriptionLocaleVM UpdateSubscriptionLocaleVM update VM

Return type

SubscriptionVM

Authorization

ApiKey, JWT

HTTP request headers

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

subscriptionsUpdatePermissions

subscriptionsUpdatePermissions(id, opts)

Update permissions

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.SubscriptionsApi();
let id = "id_example"; // String | 
let opts = {
  'updateSubscriptionPermissionsVM': new FastreportCloudSdk.UpdateSubscriptionPermissionsVM() // UpdateSubscriptionPermissionsVM | 
};
apiInstance.subscriptionsUpdatePermissions(id, opts).then(() => {
  console.log('API called successfully.');
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id String
updateSubscriptionPermissionsVM UpdateSubscriptionPermissionsVM [optional]

Return type

null (empty response body)

Authorization

ApiKey, JWT

HTTP request headers

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