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 |
CreateWorkspace201Response createWorkspace(opts)
Create workspace
Creates a regular workspace with identifier specified in the request.
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);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| create_workspace_request | CreateWorkspaceRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
deleteWorkspace(workspace_identifier)
Delete workspace
Delete workspace. Only regular workspaces can be deleted.
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.');
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| workspace_identifier | String | Workspace identifier |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
CreateWorkspace201Response getWorkspace(workspace_identifier)
Get workspace
Returns workspace information for the workspace identifier specified in the request.
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);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| workspace_identifier | String | Workspace identifier |
- Content-Type: Not defined
- Accept: application/json
GetWorkspaces200Response getWorkspaces(opts)
Get workspaces
Returns all workspaces in the organization
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);
}
});| 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] |
- Content-Type: Not defined
- Accept: application/json