Skip to content

Latest commit

 

History

History
428 lines (288 loc) · 11.7 KB

GroupsApi.md

File metadata and controls

428 lines (288 loc) · 11.7 KB

FastreportCloudSdk.GroupsApi

All URIs are relative to http://localhost

Method HTTP request Description
groupsCreateGroup POST /api/manage/v1/Groups Create a new user group
groupsDeleteGroup DELETE /api/manage/v1/Groups/{id} Delete group by identifier
groupsGetGroup GET /api/manage/v1/Groups/{id} Gets group by identifier
groupsGetGroupList GET /api/manage/v1/Groups Returns a list of current user's groups<br /> This method will return following data about groups : <br /> Id, Name, Created time (UTC), Edited time (UTC), creator id, <br /> editor id, subscription id
groupsGetMyPermissions GET /api/manage/v1/Groups/{id}/mypermissions Get current user's permissions to group
groupsGetPermissions GET /api/manage/v1/Groups/{id}/permissions Gets group permissions by identifier
groupsRenameGroup PUT /api/manage/v1/Groups/{id}/rename Rename group by identifier
groupsUpdatePermissions POST /api/manage/v1/Groups/{id}/permissions Update permissions

groupsCreateGroup

GroupVM groupsCreateGroup(opts)

Create a new user group

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.GroupsApi();
let opts = {
  'createGroupVM': new FastreportCloudSdk.CreateGroupVM() // CreateGroupVM | Model for creating
};
apiInstance.groupsCreateGroup(opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
createGroupVM CreateGroupVM Model for creating [optional]

Return type

GroupVM

Authorization

ApiKey, JWT

HTTP request headers

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

groupsDeleteGroup

groupsDeleteGroup(id)

Delete group by identifier

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.GroupsApi();
let id = "id_example"; // String | Identifier of group
apiInstance.groupsDeleteGroup(id).then(() => {
  console.log('API called successfully.');
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id String Identifier of group

Return type

null (empty response body)

Authorization

ApiKey, JWT

HTTP request headers

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

groupsGetGroup

GroupVM groupsGetGroup(id)

Gets group by identifier

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

Parameters

Name Type Description Notes
id String Identifier of group

Return type

GroupVM

Authorization

ApiKey, JWT

HTTP request headers

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

groupsGetGroupList

GroupsVM groupsGetGroupList(opts)

Returns a list of current user's groups<br /> This method will return following data about groups : <br /> Id, Name, Created time (UTC), Edited time (UTC), creator id, <br /> editor id, subscription 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.GroupsApi();
let opts = {
  'skip': 0, // Number | How many groups need to skip
  'take': 10 // Number | How many groups need to take
};
apiInstance.groupsGetGroupList(opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
skip Number How many groups need to skip [optional] [default to 0]
take Number How many groups need to take [optional] [default to 10]

Return type

GroupsVM

Authorization

ApiKey, JWT

HTTP request headers

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

groupsGetMyPermissions

GroupPermissionCRUDVM groupsGetMyPermissions(id)

Get current user's permissions to group

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

Parameters

Name Type Description Notes
id String Identifier of group

Return type

GroupPermissionCRUDVM

Authorization

ApiKey, JWT

HTTP request headers

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

groupsGetPermissions

GroupPermissionsVM groupsGetPermissions(id)

Gets group permissions by identifier

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

Parameters

Name Type Description Notes
id String Identifier of group

Return type

GroupPermissionsVM

Authorization

ApiKey, JWT

HTTP request headers

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

groupsRenameGroup

GroupVM groupsRenameGroup(id, renameGroupVM)

Rename group by identifier

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.GroupsApi();
let id = "id_example"; // String | Identifier of group
let renameGroupVM = new FastreportCloudSdk.RenameGroupVM(); // RenameGroupVM | Model for renaming
apiInstance.groupsRenameGroup(id, renameGroupVM).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id String Identifier of group
renameGroupVM RenameGroupVM Model for renaming

Return type

GroupVM

Authorization

ApiKey, JWT

HTTP request headers

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

groupsUpdatePermissions

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

Parameters

Name Type Description Notes
id String
updateGroupPermissionsVM UpdateGroupPermissionsVM [optional]

Return type

null (empty response body)

Authorization

ApiKey, JWT

HTTP request headers

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