Skip to content

Latest commit

History

History
352 lines (248 loc) · 11.5 KB

File metadata and controls

352 lines (248 loc) · 11.5 KB

pdf_generator_api_client.WorkspacesApi

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

MethodHTTP requestDescription
create_workspacePOST /workspacesCreate workspace
delete_workspaceDELETE /workspaces/{workspaceIdentifier}Delete workspace
get_workspaceGET /workspaces/{workspaceIdentifier}Get workspace
get_workspacesGET /workspacesGet workspaces

create_workspace

InlineObject8 create_workspace(create_workspace_request=create_workspace_request)

Create workspace

Creates a regular workspace with identifier specified in the request.

Example

  • Bearer (JWT) Authentication (JSONWebTokenAuth):
importpdf_generator_api_clientfrompdf_generator_api_client.models.create_workspace_requestimportCreateWorkspaceRequestfrompdf_generator_api_client.models.inline_object8importInlineObject8frompdf_generator_api_client.restimportApiExceptionfrompprintimportpprint# Defining the host is optional and defaults to https://us1.pdfgeneratorapi.com/api/v4# See configuration.py for a list of all supported configuration parameters.configuration=pdf_generator_api_client.Configuration(
host="https://us1.pdfgeneratorapi.com/api/v4"
)
# The client must configure the authentication and authorization parameters# in accordance with the API server security policy.# Examples for each auth method are provided below, use the example that# satisfies your auth use case.# Configure Bearer authorization (JWT): JSONWebTokenAuthconfiguration=pdf_generator_api_client.Configuration(
access_token=os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API clientwithpdf_generator_api_client.ApiClient(configuration) asapi_client:
# Create an instance of the API classapi_instance=pdf_generator_api_client.WorkspacesApi(api_client)
create_workspace_request=pdf_generator_api_client.CreateWorkspaceRequest() # CreateWorkspaceRequest | (optional)try:
# Create workspaceapi_response=api_instance.create_workspace(create_workspace_request=create_workspace_request)
print("The response of WorkspacesApi->create_workspace:\n")
pprint(api_response)
exceptExceptionase:
print("Exception when calling WorkspacesApi->create_workspace: %s\n"%e)

Parameters

NameTypeDescriptionNotes
create_workspace_requestCreateWorkspaceRequest[optional]

Return type

InlineObject8

Authorization

JSONWebTokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
201Workspace information-
401Unauthorized-
402Account Suspended-
403Forbidden-
404Not Found-
422Unprocessable Entity-
429Too Many Requests-
500Internal Server Error-

[Back to top][Back to API list][Back to Model list][Back to README]

delete_workspace

delete_workspace(workspace_identifier)

Delete workspace

Delete workspace. Only regular workspaces can be deleted.

Example

  • Bearer (JWT) Authentication (JSONWebTokenAuth):
importpdf_generator_api_clientfrompdf_generator_api_client.restimportApiExceptionfrompprintimportpprint# Defining the host is optional and defaults to https://us1.pdfgeneratorapi.com/api/v4# See configuration.py for a list of all supported configuration parameters.configuration=pdf_generator_api_client.Configuration(
host="https://us1.pdfgeneratorapi.com/api/v4"
)
# The client must configure the authentication and authorization parameters# in accordance with the API server security policy.# Examples for each auth method are provided below, use the example that# satisfies your auth use case.# Configure Bearer authorization (JWT): JSONWebTokenAuthconfiguration=pdf_generator_api_client.Configuration(
access_token=os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API clientwithpdf_generator_api_client.ApiClient(configuration) asapi_client:
# Create an instance of the API classapi_instance=pdf_generator_api_client.WorkspacesApi(api_client)
workspace_identifier='demo.example@actualreports.com'# str | Workspace identifiertry:
# Delete workspaceapi_instance.delete_workspace(workspace_identifier)
exceptExceptionase:
print("Exception when calling WorkspacesApi->delete_workspace: %s\n"%e)

Parameters

NameTypeDescriptionNotes
workspace_identifierstrWorkspace identifier

Return type

void (empty response body)

Authorization

JSONWebTokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
204The resource was deleted successfully.-
401Unauthorized-
402Account Suspended-
403Forbidden-
404Not Found-
422Unprocessable Entity-
429Too Many Requests-
500Internal Server Error-

[Back to top][Back to API list][Back to Model list][Back to README]

get_workspace

InlineObject8 get_workspace(workspace_identifier)

Get workspace

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

Example

  • Bearer (JWT) Authentication (JSONWebTokenAuth):
importpdf_generator_api_clientfrompdf_generator_api_client.models.inline_object8importInlineObject8frompdf_generator_api_client.restimportApiExceptionfrompprintimportpprint# Defining the host is optional and defaults to https://us1.pdfgeneratorapi.com/api/v4# See configuration.py for a list of all supported configuration parameters.configuration=pdf_generator_api_client.Configuration(
host="https://us1.pdfgeneratorapi.com/api/v4"
)
# The client must configure the authentication and authorization parameters# in accordance with the API server security policy.# Examples for each auth method are provided below, use the example that# satisfies your auth use case.# Configure Bearer authorization (JWT): JSONWebTokenAuthconfiguration=pdf_generator_api_client.Configuration(
access_token=os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API clientwithpdf_generator_api_client.ApiClient(configuration) asapi_client:
# Create an instance of the API classapi_instance=pdf_generator_api_client.WorkspacesApi(api_client)
workspace_identifier='demo.example@actualreports.com'# str | Workspace identifiertry:
# Get workspaceapi_response=api_instance.get_workspace(workspace_identifier)
print("The response of WorkspacesApi->get_workspace:\n")
pprint(api_response)
exceptExceptionase:
print("Exception when calling WorkspacesApi->get_workspace: %s\n"%e)

Parameters

NameTypeDescriptionNotes
workspace_identifierstrWorkspace identifier

Return type

InlineObject8

Authorization

JSONWebTokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200Workspace information-
401Unauthorized-
402Account Suspended-
403Forbidden-
404Not Found-
422Unprocessable Entity-
429Too Many Requests-
500Internal Server Error-

[Back to top][Back to API list][Back to Model list][Back to README]

get_workspaces

InlineObject5 get_workspaces(page=page, per_page=per_page)

Get workspaces

Returns all workspaces in the organization

Example

  • Bearer (JWT) Authentication (JSONWebTokenAuth):
importpdf_generator_api_clientfrompdf_generator_api_client.models.inline_object5importInlineObject5frompdf_generator_api_client.restimportApiExceptionfrompprintimportpprint# Defining the host is optional and defaults to https://us1.pdfgeneratorapi.com/api/v4# See configuration.py for a list of all supported configuration parameters.configuration=pdf_generator_api_client.Configuration(
host="https://us1.pdfgeneratorapi.com/api/v4"
)
# The client must configure the authentication and authorization parameters# in accordance with the API server security policy.# Examples for each auth method are provided below, use the example that# satisfies your auth use case.# Configure Bearer authorization (JWT): JSONWebTokenAuthconfiguration=pdf_generator_api_client.Configuration(
access_token=os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API clientwithpdf_generator_api_client.ApiClient(configuration) asapi_client:
# Create an instance of the API classapi_instance=pdf_generator_api_client.WorkspacesApi(api_client)
page=1# int | Pagination: page to return (optional) (default to 1)per_page=15# int | Pagination: How many records to return per page (optional) (default to 15)try:
# Get workspacesapi_response=api_instance.get_workspaces(page=page, per_page=per_page)
print("The response of WorkspacesApi->get_workspaces:\n")
pprint(api_response)
exceptExceptionase:
print("Exception when calling WorkspacesApi->get_workspaces: %s\n"%e)

Parameters

NameTypeDescriptionNotes
pageintPagination: page to return[optional] [default to 1]
per_pageintPagination: 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

HTTP response details

Status codeDescriptionResponse headers
200An array of workspace objects-
401Unauthorized-
402Account Suspended-
403Forbidden-
404Not Found-
422Unprocessable Entity-
429Too Many Requests-
500Internal Server Error-

[Back to top][Back to API list][Back to Model list][Back to README]