Skip to content

Latest commit

 

History

History
2826 lines (1933 loc) · 34.7 KB

File metadata and controls

2826 lines (1933 loc) · 34.7 KB

Reference

Deployment

client.deployment.license_status() -> DeploymentLicenseStatusResponse

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.deployment.license_status()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Doc

client.doc.head(...) -> DocHead200Response

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.doc.head(
    doc_id="docId",
)

⚙️ Parameters

doc_id: str

document_password: typing.Optional[str] — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.doc.download(...) -> typing.Iterator[bytes]

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.doc.download(
    doc_id="docId",
    layer_name="layerName",
)

⚙️ Parameters

doc_id: str

layer_name: str

document_password: typing.Optional[str] — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.doc.manifest(...) -> DocManifest200Response

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.doc.manifest(
    doc_id="docId",
    layer_name="layerName",
)

⚙️ Parameters

doc_id: str

layer_name: str

document_password: typing.Optional[str] — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.doc.render(...) -> typing.Iterator[bytes]

📝 Description

Render parameters (viewport, format) pass as flat dotted query keys, e.g. ?viewport.kind=width&viewport.width=800; the full grammar is documented with the viewer.

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.doc.render(
    doc_id="docId",
    layer_name="layerName",
    pon=1,
)

⚙️ Parameters

doc_id: str

layer_name: str

pon: int

document_password: typing.Optional[str] — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.doc.text(...) -> DocText200Response

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.doc.text(
    doc_id="docId",
    layer_name="layerName",
    pon=1,
)

⚙️ Parameters

doc_id: str

layer_name: str

pon: int

document_password: typing.Optional[str] — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Tenants

client.tenants.list(...) -> TenantsList200Response

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.tenants.list()

⚙️ Parameters

limit: typing.Optional[int]

cursor: typing.Optional[str]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tenants.create(...) -> TenantsCreate200Response

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.tenants.create(
    id="id",
)

⚙️ Parameters

id: str

name: typing.Optional[str]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tenants.get(...) -> TenantsGet200Response

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.tenants.get(
    tenant_id="tenantId",
)

⚙️ Parameters

tenant_id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tenants.delete(...)

📝 Description

Destroys the tenant and everything in its namespace — documents, layers, stored bytes, audit history. Irreversible.

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.tenants.delete(
    tenant_id="tenantId",
)

⚙️ Parameters

tenant_id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Documents

client.documents.list(...) -> DocumentsList200Response

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.documents.list(
    tenant_id="tenantId",
)

⚙️ Parameters

tenant_id: str

limit: typing.Optional[int]

cursor: typing.Optional[str]

state: typing.Optional[ListDocumentsRequestState]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.documents.get(...) -> DocumentsGet200Response

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.documents.get(
    tenant_id="tenantId",
    id="id",
)

⚙️ Parameters

tenant_id: str

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.documents.delete(...)

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.documents.delete(
    tenant_id="tenantId",
    id="id",
)

⚙️ Parameters

tenant_id: str

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.documents.commit(...) -> DocumentsCommit200Response

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.documents.commit(
    tenant_id="tenantId",
    id="id",
    sha256="sha256",
)

⚙️ Parameters

tenant_id: str

id: str

sha256: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.documents.download(...) -> typing.Iterator[bytes]

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.documents.download(
    tenant_id="tenantId",
    id="id",
)

⚙️ Parameters

tenant_id: str

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.documents.thumbnail(...) -> typing.Iterator[bytes]

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.documents.thumbnail(
    tenant_id="tenantId",
    id="id",
)

⚙️ Parameters

tenant_id: str

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.documents.upload_direct(...) -> DocumentsUploadDirect200Response

🔌 Usage

client.documents.upload_direct(...)

⚙️ Parameters

tenant_id: str

id: str

request: typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.documents.init(...) -> DocumentsInit200Response

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.documents.init(
    tenant_id="tenantId",
    content_length=1.1,
    content_sha256="contentSha256",
)

⚙️ Parameters

tenant_id: str

content_length: float

content_sha256: str

metadata: typing.Optional[typing.Dict[str, typing.Any]]

idempotency_key: typing.Optional[str]

dedup_mode: typing.Optional[DocumentsInitRequestDedupMode]

doc_id: typing.Optional[str]

upload_ttl_sec: typing.Optional[float]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Tokens

client.tokens.issue(...) -> TokensIssue200Response

📝 Description

kind "tenant" requires the API token — authority mints only downward. Mounted only when the deployment can sign (HS256 mode); asymmetric deployments mint with their own private key.

🔌 Usage

from cloudpdf import CloudPDFClient, TokensIssueRequest_Doc

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.tokens.issue(
    tenant_id="tenantId",
    request=TokensIssueRequest_Doc(
        sub="sub",
        doc_id="docId",
        scope=[
            "scope"
        ],
        expires_in=1,
    ),
)

⚙️ Parameters

tenant_id: str

request: TokensIssueRequest

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tokens.revoke(...)

📝 Description

Mounted only when the deployment enables token revocation.

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.tokens.revoke(
    tenant_id="tenantId",
    jti="jti",
)

⚙️ Parameters

tenant_id: str

jti: str

reason: typing.Optional[str]

expires_at_seconds: typing.Optional[int]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Doc Annotations

client.doc.annotations.list(...) -> DocAnnotationsList200Response

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.doc.annotations.list(
    doc_id="docId",
    layer_name="layerName",
    pon=1,
)

⚙️ Parameters

doc_id: str

layer_name: str

pon: int

document_password: typing.Optional[str] — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.doc.annotations.create(...) -> DocAnnotationsCreate200Response

📝 Description

Doc JWTs may instead carry collab scopes (annotations:create:self, …) that refine per-annotation authorship rules; the API token is exempt from both.

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.doc.annotations.create(
    doc_id="docId",
    layer_name="layerName",
    pon=1,
    request={
        "key": "value"
    },
)

⚙️ Parameters

doc_id: str

layer_name: str

pon: int

request: DocAnnotationsCreateRequest

document_password: typing.Optional[str] — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.doc.annotations.delete(...) -> DocAnnotationsDelete200Response

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.doc.annotations.delete(
    doc_id="docId",
    layer_name="layerName",
    pon=1,
    annot_key="annotKey",
)

⚙️ Parameters

doc_id: str

layer_name: str

pon: int

annot_key: str

document_password: typing.Optional[str] — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.doc.annotations.update(...) -> DocAnnotationsUpdate200Response

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.doc.annotations.update(
    doc_id="docId",
    layer_name="layerName",
    pon=1,
    annot_key="annotKey",
    request={
        "key": "value"
    },
)

⚙️ Parameters

doc_id: str

layer_name: str

pon: int

annot_key: str

request: DocAnnotationsUpdateRequest

document_password: typing.Optional[str] — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Doc Forms

client.doc.forms.get(...) -> DocFormsGet200Response

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.doc.forms.get(
    doc_id="docId",
    layer_name="layerName",
)

⚙️ Parameters

doc_id: str

layer_name: str

document_password: typing.Optional[str] — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.doc.forms.export_data(...) -> typing.Iterator[bytes]

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.doc.forms.export_data(
    doc_id="docId",
    layer_name="layerName",
)

⚙️ Parameters

doc_id: str

layer_name: str

format: typing.Optional[ExportDataFormsRequestFormat]

document_password: typing.Optional[str] — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.doc.forms.import_data(...) -> DocFormsImportData200Response

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.doc.forms.import_data(
    doc_id="docId",
    layer_name="layerName",
    request={
        "key": "value"
    },
)

⚙️ Parameters

doc_id: str

layer_name: str

request: DocFormsImportDataRequest

document_password: typing.Optional[str] — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.doc.forms.reset(...) -> DocFormsReset200Response

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.doc.forms.reset(
    doc_id="docId",
    layer_name="layerName",
    field_key="fieldKey",
)

⚙️ Parameters

doc_id: str

layer_name: str

field_key: str

document_password: typing.Optional[str] — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.doc.forms.set_value(...) -> DocFormsSetValue200Response

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.doc.forms.set_value(
    doc_id="docId",
    layer_name="layerName",
    field_key="fieldKey",
    request={
        "key": "value"
    },
)

⚙️ Parameters

doc_id: str

layer_name: str

field_key: str

request: DocFormsSetValueRequest

document_password: typing.Optional[str] — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Doc Metadata

client.doc.metadata.get(...) -> DocMetadataGet200Response

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.doc.metadata.get(
    doc_id="docId",
    layer_name="layerName",
)

⚙️ Parameters

doc_id: str

layer_name: str

document_password: typing.Optional[str] — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Doc Pages

client.doc.pages.delete(...) -> DocPagesDelete200Response

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.doc.pages.delete(
    doc_id="docId",
    layer_name="layerName",
    request={
        "key": "value"
    },
)

⚙️ Parameters

doc_id: str

layer_name: str

request: DocPagesDeleteRequest

document_password: typing.Optional[str] — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.doc.pages.flatten(...) -> DocPagesFlatten200Response

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.doc.pages.flatten(
    doc_id="docId",
    layer_name="layerName",
    request={
        "key": "value"
    },
)

⚙️ Parameters

doc_id: str

layer_name: str

request: DocPagesFlattenRequest

document_password: typing.Optional[str] — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.doc.pages.move(...) -> DocPagesMove200Response

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.doc.pages.move(
    doc_id="docId",
    layer_name="layerName",
    request={
        "key": "value"
    },
)

⚙️ Parameters

doc_id: str

layer_name: str

request: DocPagesMoveRequest

document_password: typing.Optional[str] — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.doc.pages.rotate(...) -> DocPagesRotate200Response

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.doc.pages.rotate(
    doc_id="docId",
    layer_name="layerName",
    request={
        "key": "value"
    },
)

⚙️ Parameters

doc_id: str

layer_name: str

request: DocPagesRotateRequest

document_password: typing.Optional[str] — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Doc Redactions

client.doc.redactions.apply(...) -> DocRedactionsApply200Response

🔌 Usage

from cloudpdf import CloudPDFClient

client = CloudPDFClient(
    token="<token>",
    base_url="https://yourhost.com/path/to/api",
)

client.doc.redactions.apply(
    doc_id="docId",
    layer_name="layerName",
    request={
        "key": "value"
    },
)

⚙️ Parameters

doc_id: str

layer_name: str

request: DocRedactionsApplyRequest

document_password: typing.Optional[str] — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.