Skip to content

Latest commit

 

History

History
542 lines (368 loc) · 14.4 KB

TasksApi.md

File metadata and controls

542 lines (368 loc) · 14.4 KB

FastreportCloudSdk.TasksApi

All URIs are relative to http://localhost

Method HTTP request Description
tasksCreateTask POST /api/tasks/v1/Tasks Create a new task
tasksDeleteTask DELETE /api/tasks/v1/Tasks/{taskId} Delete a task from a storage
tasksGet GET /api/tasks/v1/Tasks/{taskId} Get a task by a specified id
tasksGetList GET /api/tasks/v1/Tasks Get tasks list
tasksGetPermissions GET /api/tasks/v1/Tasks/{id}/permissions Get all Task permissions
tasksRenameTask PUT /api/tasks/v1/Tasks/{taskId}/rename Rename a task
tasksRunTask POST /api/tasks/v1/Tasks/run Run a task from request body
tasksRunTaskById POST /api/tasks/v1/Tasks/{taskId}/run Run a task by id
tasksUpdatePermissions POST /api/tasks/v1/Tasks/{id}/permissions Update permissions
tasksUpdateTask PUT /api/tasks/v1/Tasks/{taskId} Update a task

tasksCreateTask

TaskBaseVM tasksCreateTask(opts)

Create a new task

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.TasksApi();
let opts = {
  'createTaskBaseVM': new FastreportCloudSdk.CreateTaskBaseVM() // CreateTaskBaseVM | task's view model. You have to specify task type (type: \"ExportTemplate\")
};
apiInstance.tasksCreateTask(opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
createTaskBaseVM CreateTaskBaseVM task's view model. You have to specify task type (type: "ExportTemplate") [optional]

Return type

TaskBaseVM

Authorization

ApiKey, JWT

HTTP request headers

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

tasksDeleteTask

tasksDeleteTask(taskId)

Delete a task from a storage

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.TasksApi();
let taskId = "taskId_example"; // String | deleting task id
apiInstance.tasksDeleteTask(taskId).then(() => {
  console.log('API called successfully.');
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
taskId String deleting task id

Return type

null (empty response body)

Authorization

ApiKey, JWT

HTTP request headers

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

tasksGet

TaskBaseVM tasksGet(taskId)

Get a task by a specified 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.TasksApi();
let taskId = "taskId_example"; // String | a task id
apiInstance.tasksGet(taskId).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
taskId String a task id

Return type

TaskBaseVM

Authorization

ApiKey, JWT

HTTP request headers

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

tasksGetList

TasksVM tasksGetList(opts)

Get tasks list

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.TasksApi();
let opts = {
  'skip': 0, // Number | number of tasks, that have to be skipped
  'take': 10, // Number | number of tasks, that have to be returned
  'subscriptionId': "subscriptionId_example", // String | subscription id
  'searchPattern': "''" // String | 
};
apiInstance.tasksGetList(opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
skip Number number of tasks, that have to be skipped [optional] [default to 0]
take Number number of tasks, that have to be returned [optional] [default to 10]
subscriptionId String subscription id [optional]
searchPattern String [optional] [default to '']

Return type

TasksVM

Authorization

ApiKey, JWT

HTTP request headers

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

tasksGetPermissions

TaskPermissionsVM tasksGetPermissions(id)

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

Parameters

Name Type Description Notes
id String task id

Return type

TaskPermissionsVM

Authorization

ApiKey, JWT

HTTP request headers

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

tasksRenameTask

TaskBaseVM tasksRenameTask(taskId, opts)

Rename a task

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.TasksApi();
let taskId = "taskId_example"; // String | renaming task id
let opts = {
  'newName': "newName_example" // String | task's new Name
};
apiInstance.tasksRenameTask(taskId, opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
taskId String renaming task id
newName String task's new Name [optional]

Return type

TaskBaseVM

Authorization

ApiKey, JWT

HTTP request headers

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

tasksRunTask

tasksRunTask(opts)

Run a task from request body

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.TasksApi();
let opts = {
  'runTaskBaseVM': new FastreportCloudSdk.RunTaskBaseVM() // RunTaskBaseVM | task's view model
};
apiInstance.tasksRunTask(opts).then(() => {
  console.log('API called successfully.');
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
runTaskBaseVM RunTaskBaseVM task's view model [optional]

Return type

null (empty response body)

Authorization

ApiKey, JWT

HTTP request headers

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

tasksRunTaskById

tasksRunTaskById(taskId)

Run a task 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.TasksApi();
let taskId = "taskId_example"; // String | task id
apiInstance.tasksRunTaskById(taskId).then(() => {
  console.log('API called successfully.');
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
taskId String task id

Return type

null (empty response body)

Authorization

ApiKey, JWT

HTTP request headers

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

tasksUpdatePermissions

tasksUpdatePermissions(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.TasksApi();
let id = "id_example"; // String | task id
let opts = {
  'updateTaskPermissionsVM': new FastreportCloudSdk.UpdateTaskPermissionsVM() // UpdateTaskPermissionsVM | new permissions
};
apiInstance.tasksUpdatePermissions(id, opts).then(() => {
  console.log('API called successfully.');
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id String task id
updateTaskPermissionsVM UpdateTaskPermissionsVM new permissions [optional]

Return type

null (empty response body)

Authorization

ApiKey, JWT

HTTP request headers

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

tasksUpdateTask

TaskBaseVM tasksUpdateTask(taskId, opts)

Update a task

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.TasksApi();
let taskId = "taskId_example"; // String | updating task id
let opts = {
  'updateTaskBaseVM': new FastreportCloudSdk.UpdateTaskBaseVM() // UpdateTaskBaseVM | task's view model. You have to specify task type (type: \"ExportTemplate\")
};
apiInstance.tasksUpdateTask(taskId, opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
taskId String updating task id
updateTaskBaseVM UpdateTaskBaseVM task's view model. You have to specify task type (type: "ExportTemplate") [optional]

Return type

TaskBaseVM

Authorization

ApiKey, JWT

HTTP request headers

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