Skip to content

Latest commit

 

History

History
214 lines (142 loc) · 5.71 KB

File metadata and controls

214 lines (142 loc) · 5.71 KB

PDFGeneratorAPI.WorkspacesApi

All URIs are relative to https://us1.pdfgeneratorapi.com/api/v4

Method HTTP request Description
createWorkspace POST /workspaces Create workspace
deleteWorkspace DELETE /workspaces/{workspaceIdentifier} Delete workspace
getWorkspace GET /workspaces/{workspaceIdentifier} Get workspace
getWorkspaces GET /workspaces Get workspaces

createWorkspace

CreateWorkspace201Response createWorkspace(opts)

Create workspace

Creates a regular workspace with identifier specified in the request.

Example

import PDFGeneratorAPI from 'pdf-generator-api-client';
let defaultClient = PDFGeneratorAPI.ApiClient.instance;
// Configure Bearer (JWT) access token for authorization: JSONWebTokenAuth
let JSONWebTokenAuth = defaultClient.authentications['JSONWebTokenAuth'];
JSONWebTokenAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new PDFGeneratorAPI.WorkspacesApi();
let opts = {
  'create_workspace_request': new PDFGeneratorAPI.CreateWorkspaceRequest() // CreateWorkspaceRequest | 
};
apiInstance.createWorkspace(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
create_workspace_request CreateWorkspaceRequest [optional]

Return type

CreateWorkspace201Response

Authorization

JSONWebTokenAuth

HTTP request headers

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

deleteWorkspace

deleteWorkspace(workspace_identifier)

Delete workspace

Delete workspace. Only regular workspaces can be deleted.

Example

import PDFGeneratorAPI from 'pdf-generator-api-client';
let defaultClient = PDFGeneratorAPI.ApiClient.instance;
// Configure Bearer (JWT) access token for authorization: JSONWebTokenAuth
let JSONWebTokenAuth = defaultClient.authentications['JSONWebTokenAuth'];
JSONWebTokenAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new PDFGeneratorAPI.WorkspacesApi();
let workspace_identifier = "demo.example@actualreports.com"; // String | Workspace identifier
apiInstance.deleteWorkspace(workspace_identifier, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
workspace_identifier String Workspace identifier

Return type

null (empty response body)

Authorization

JSONWebTokenAuth

HTTP request headers

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

getWorkspace

CreateWorkspace201Response getWorkspace(workspace_identifier)

Get workspace

Returns workspace information for the workspace identifier specified in the request.

Example

import PDFGeneratorAPI from 'pdf-generator-api-client';
let defaultClient = PDFGeneratorAPI.ApiClient.instance;
// Configure Bearer (JWT) access token for authorization: JSONWebTokenAuth
let JSONWebTokenAuth = defaultClient.authentications['JSONWebTokenAuth'];
JSONWebTokenAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new PDFGeneratorAPI.WorkspacesApi();
let workspace_identifier = "demo.example@actualreports.com"; // String | Workspace identifier
apiInstance.getWorkspace(workspace_identifier, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
workspace_identifier String Workspace identifier

Return type

CreateWorkspace201Response

Authorization

JSONWebTokenAuth

HTTP request headers

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

getWorkspaces

GetWorkspaces200Response getWorkspaces(opts)

Get workspaces

Returns all workspaces in the organization

Example

import PDFGeneratorAPI from 'pdf-generator-api-client';
let defaultClient = PDFGeneratorAPI.ApiClient.instance;
// Configure Bearer (JWT) access token for authorization: JSONWebTokenAuth
let JSONWebTokenAuth = defaultClient.authentications['JSONWebTokenAuth'];
JSONWebTokenAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new PDFGeneratorAPI.WorkspacesApi();
let opts = {
  'page': 1, // Number | Pagination: page to return
  'per_page': 20 // Number | Pagination: How many records to return per page
};
apiInstance.getWorkspaces(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
page Number Pagination: page to return [optional] [default to 1]
per_page Number Pagination: How many records to return per page [optional] [default to 15]

Return type

GetWorkspaces200Response

Authorization

JSONWebTokenAuth

HTTP request headers

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