Skip to content

Latest commit

History

History
214 lines (142 loc) · 5.6 KB

File metadata and controls

214 lines (142 loc) · 5.6 KB

PDFGeneratorAPI.WorkspacesApi

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

MethodHTTP requestDescription
createWorkspacePOST /workspacesCreate workspace
deleteWorkspaceDELETE /workspaces/{workspaceIdentifier}Delete workspace
getWorkspaceGET /workspaces/{workspaceIdentifier}Get workspace
getWorkspacesGET /workspacesGet workspaces

createWorkspace

InlineObject8 createWorkspace(opts)

Create workspace

Creates a regular workspace with identifier specified in the request.

Example

importPDFGeneratorAPIfrom'pdf-generator-api-client';letdefaultClient=PDFGeneratorAPI.ApiClient.instance;// Configure Bearer (JWT) access token for authorization: JSONWebTokenAuthletJSONWebTokenAuth=defaultClient.authentications['JSONWebTokenAuth'];JSONWebTokenAuth.accessToken="YOUR ACCESS TOKEN"letapiInstance=newPDFGeneratorAPI.WorkspacesApi();letopts={'create_workspace_request': newPDFGeneratorAPI.CreateWorkspaceRequest()// CreateWorkspaceRequest | };apiInstance.createWorkspace(opts,(error,data,response)=>{if(error){console.error(error);}else{console.log('API called successfully. Returned data: '+data);}});

Parameters

NameTypeDescriptionNotes
create_workspace_requestCreateWorkspaceRequest[optional]

Return type

InlineObject8

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

importPDFGeneratorAPIfrom'pdf-generator-api-client';letdefaultClient=PDFGeneratorAPI.ApiClient.instance;// Configure Bearer (JWT) access token for authorization: JSONWebTokenAuthletJSONWebTokenAuth=defaultClient.authentications['JSONWebTokenAuth'];JSONWebTokenAuth.accessToken="YOUR ACCESS TOKEN"letapiInstance=newPDFGeneratorAPI.WorkspacesApi();letworkspace_identifier="demo.example@actualreports.com";// String | Workspace identifierapiInstance.deleteWorkspace(workspace_identifier,(error,data,response)=>{if(error){console.error(error);}else{console.log('API called successfully.');}});

Parameters

NameTypeDescriptionNotes
workspace_identifierStringWorkspace identifier

Return type

null (empty response body)

Authorization

JSONWebTokenAuth

HTTP request headers

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

getWorkspace

InlineObject8 getWorkspace(workspace_identifier)

Get workspace

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

Example

importPDFGeneratorAPIfrom'pdf-generator-api-client';letdefaultClient=PDFGeneratorAPI.ApiClient.instance;// Configure Bearer (JWT) access token for authorization: JSONWebTokenAuthletJSONWebTokenAuth=defaultClient.authentications['JSONWebTokenAuth'];JSONWebTokenAuth.accessToken="YOUR ACCESS TOKEN"letapiInstance=newPDFGeneratorAPI.WorkspacesApi();letworkspace_identifier="demo.example@actualreports.com";// String | Workspace identifierapiInstance.getWorkspace(workspace_identifier,(error,data,response)=>{if(error){console.error(error);}else{console.log('API called successfully. Returned data: '+data);}});

Parameters

NameTypeDescriptionNotes
workspace_identifierStringWorkspace identifier

Return type

InlineObject8

Authorization

JSONWebTokenAuth

HTTP request headers

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

getWorkspaces

InlineObject5 getWorkspaces(opts)

Get workspaces

Returns all workspaces in the organization

Example

importPDFGeneratorAPIfrom'pdf-generator-api-client';letdefaultClient=PDFGeneratorAPI.ApiClient.instance;// Configure Bearer (JWT) access token for authorization: JSONWebTokenAuthletJSONWebTokenAuth=defaultClient.authentications['JSONWebTokenAuth'];JSONWebTokenAuth.accessToken="YOUR ACCESS TOKEN"letapiInstance=newPDFGeneratorAPI.WorkspacesApi();letopts={'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

NameTypeDescriptionNotes
pageNumberPagination: page to return[optional] [default to 1]
per_pageNumberPagination: How many records to return per page[optional] [default to 15]

Return type

InlineObject5

Authorization

JSONWebTokenAuth

HTTP request headers

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