Skip to content

Latest commit

 

History

History
1387 lines (957 loc) · 16.9 KB

File metadata and controls

1387 lines (957 loc) · 16.9 KB

Reference

Events

client.events.agent_action(...) -> EventResponse

🔌 Usage

from pumpup import PumpUp
from pumpup.environment import PumpUpEnvironment

client = PumpUp(
    api_key="<token>",
    version="<X-API-Version>",
    environment=PumpUpEnvironment.DEFAULT,
)

client.events.agent_action(
    idempotency_key="Idempotency-Key",
    description="Auto-classified claim as low-risk",
    project_name="projectName",
    task_id="taskId",
)

⚙️ Parameters

idempotency_key: str — Idempotency key; duplicate submissions return the original event.

description: str — What the agent did

project_name: str

task_id: str — Target task — create one via POST /tasks first

add_attachments: typing.Optional[typing.List[Attachment]] — Files to attach to the task — upload id + display name (each id from POST /uploads)

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

external_trace_id: typing.Optional[str]

metadata_patch: typing.Optional[MetadataPatchDto]

transitions_to: typing.Optional[str] — State to transition the task into; must be a declared transition

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

client.events.exception(...) -> EventResponse

🔌 Usage

from pumpup import PumpUp
from pumpup.environment import PumpUpEnvironment

client = PumpUp(
    api_key="<token>",
    version="<X-API-Version>",
    environment=PumpUpEnvironment.DEFAULT,
)

client.events.exception(
    idempotency_key="Idempotency-Key",
    message="OCR failed on uploaded document",
    project_name="projectName",
    task_id="taskId",
)

⚙️ Parameters

idempotency_key: str — Idempotency key; duplicate submissions return the original event.

message: str — What went wrong

project_name: str

task_id: str — Target task — create one via POST /tasks first

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

external_trace_id: typing.Optional[str]

transitions_to: typing.Optional[str]

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

client.events.note(...) -> EventResponse

🔌 Usage

from pumpup import PumpUp
from pumpup.environment import PumpUpEnvironment

client = PumpUp(
    api_key="<token>",
    version="<X-API-Version>",
    environment=PumpUpEnvironment.DEFAULT,
)

client.events.note(
    idempotency_key="Idempotency-Key",
    message="Customer called to confirm bank details",
    project_name="projectName",
    task_id="taskId",
)

⚙️ Parameters

idempotency_key: str — Idempotency key; duplicate submissions return the original event.

message: str — The annotation text

project_name: str

task_id: str — Target task — create one via POST /tasks first

external_trace_id: typing.Optional[str]

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

Approvals

client.approvals.create(...) -> EventResponse

📝 Description

Returns immediately with an event_id; poll the result endpoint by it for the decision.

🔌 Usage

from pumpup import PumpUp
from pumpup.environment import PumpUpEnvironment

client = PumpUp(
    api_key="<token>",
    version="<X-API-Version>",
    environment=PumpUpEnvironment.DEFAULT,
)

client.approvals.create(
    idempotency_key="Idempotency-Key",
    project_name="claims_refund_v1",
    summary="Refund $240 on claim C-1029",
    task_id="taskId",
)

⚙️ Parameters

idempotency_key: str — Idempotency key; duplicate submissions return the original event.

project_name: str — Slug of an existing project (create it ahead of time)

summary: str — Human-readable summary of the action needing approval

task_id: str — Target task — create one via POST /tasks first

attachments: typing.Optional[typing.List[str]] — Upload ids of attached files to render for this request (must already be attached to the task)

external_trace_id: typing.Optional[str] — Optional link to the agent author's observability trace

key_value_context: typing.Optional[typing.Dict[str, str]] — Display context as a plain key→value object (order/dup-keys are the client's concern)

recommendation: typing.Optional[ApprovalRecommendation]

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

client.approvals.get_result(...) -> typing.Optional[ApprovalResult]

📝 Description

200 with the outcome once a human has decided; 204 while still pending.

🔌 Usage

from pumpup import PumpUp
from pumpup.environment import PumpUpEnvironment

client = PumpUp(
    api_key="<token>",
    version="<X-API-Version>",
    environment=PumpUpEnvironment.DEFAULT,
)

client.approvals.get_result(
    id="id",
)

⚙️ Parameters

id: str

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

Elicitations

client.elicitations.create(...) -> EventResponse

📝 Description

Returns immediately with an event_id; poll the result endpoint by it for the answers.

🔌 Usage

from pumpup import PumpUp, Field_DateField
from pumpup.environment import PumpUpEnvironment

client = PumpUp(
    api_key="<token>",
    version="<X-API-Version>",
    environment=PumpUpEnvironment.DEFAULT,
)

client.elicitations.create(
    idempotency_key="Idempotency-Key",
    fields=[
        Field_DateField(
            id="id",
            label="label",
            required=True,
        )
    ],
    project_name="projectName",
    summary="Need additional details on the incident",
    task_id="taskId",
)

⚙️ Parameters

idempotency_key: str — Idempotency key; duplicate submissions return the original event.

fields: typing.List[Field]

project_name: str

summary: str — Human-readable summary of what's needed

task_id: str — Target task — create one via POST /tasks first

attachments: typing.Optional[typing.List[str]] — Upload ids of attached files to render for this request (must already be attached to the task)

external_trace_id: typing.Optional[str]

key_value_context: typing.Optional[typing.Dict[str, str]]

recommendation: typing.Optional[typing.List[FieldBid]]

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

client.elicitations.get_result(...) -> typing.Optional[ElicitationResult]

📝 Description

200 with the provided fields once a human has answered; 204 while still pending.

🔌 Usage

from pumpup import PumpUp
from pumpup.environment import PumpUpEnvironment

client = PumpUp(
    api_key="<token>",
    version="<X-API-Version>",
    environment=PumpUpEnvironment.DEFAULT,
)

client.elicitations.get_result(
    id="id",
)

⚙️ Parameters

id: str

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

Projects

client.projects.list(...) -> ProjectListResponse

📝 Description

Optionally filter by a case-insensitive substring of the display name or slug; the response carries the slug to reference on ingest.

🔌 Usage

from pumpup import PumpUp
from pumpup.environment import PumpUpEnvironment

client = PumpUp(
    api_key="<token>",
    version="<X-API-Version>",
    environment=PumpUpEnvironment.DEFAULT,
)

client.projects.list()

⚙️ Parameters

name: typing.Optional[str]

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

client.projects.get(...) -> ProjectResponse

📝 Description

Includes the declared step graph.

🔌 Usage

from pumpup import PumpUp
from pumpup.environment import PumpUpEnvironment

client = PumpUp(
    api_key="<token>",
    version="<X-API-Version>",
    environment=PumpUpEnvironment.DEFAULT,
)

client.projects.get(
    id="id",
)

⚙️ Parameters

id: str

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

Tasks

client.tasks.list(...) -> TaskListResponse

📝 Description

Optionally filter by projectId and/or a case-insensitive substring of the task name.

🔌 Usage

from pumpup import PumpUp
from pumpup.environment import PumpUpEnvironment

client = PumpUp(
    api_key="<token>",
    version="<X-API-Version>",
    environment=PumpUpEnvironment.DEFAULT,
)

client.tasks.list()

⚙️ Parameters

project_id: typing.Optional[str]

name: typing.Optional[str]

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

client.tasks.create(...) -> TaskResponse

📝 Description

The task opens in the project's initial state; use the returned id as taskId on subsequent events. The name is immutable.

🔌 Usage

from pumpup import PumpUp
from pumpup.environment import PumpUpEnvironment

client = PumpUp(
    api_key="<token>",
    version="<X-API-Version>",
    environment=PumpUpEnvironment.DEFAULT,
)

client.tasks.create(
    idempotency_key="Idempotency-Key",
    name="Claim C-1029",
    project_name="claims_refund_v1",
)

⚙️ Parameters

idempotency_key: str — Idempotency key; duplicate submissions return the original event.

name: str — Human-readable case name

project_name: str — Slug of an existing project

external_id: typing.Optional[str] — Optional client correlation id (e.g. agent session/run); bookkeeping only — not unique

metadata_patch: typing.Optional[MetadataPatchDto]

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

client.tasks.get(...) -> TaskDetailResponse

📝 Description

Materialized state — name, current state, metadata, attachments — plus open requests awaiting a human.

🔌 Usage

from pumpup import PumpUp
from pumpup.environment import PumpUpEnvironment

client = PumpUp(
    api_key="<token>",
    version="<X-API-Version>",
    environment=PumpUpEnvironment.DEFAULT,
)

client.tasks.get(
    id="id",
)

⚙️ Parameters

id: str

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

client.tasks.events(...) -> TaskEventsResponse

📝 Description

Ascending cursor tail over the task's event log; pass nextCursor back as ?cursor= to resume. An absent cursor starts at the first event.

🔌 Usage

from pumpup import PumpUp
from pumpup.environment import PumpUpEnvironment

client = PumpUp(
    api_key="<token>",
    version="<X-API-Version>",
    environment=PumpUpEnvironment.DEFAULT,
)

client.tasks.events(
    id="id",
)

⚙️ Parameters

id: str

cursor: typing.Optional[str]

limit: typing.Optional[int]

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

Uploads

client.uploads.upload(...) -> UploadRef

🔌 Usage

from pumpup import PumpUp
from pumpup.environment import PumpUpEnvironment

client = PumpUp(
    api_key="<token>",
    version="<X-API-Version>",
    environment=PumpUpEnvironment.DEFAULT,
)

client.uploads.upload(
    file="example_file",
)

⚙️ Parameters

file: core.File

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

client.uploads.get(...) -> ResolvedUpload

🔌 Usage

from pumpup import PumpUp
from pumpup.environment import PumpUpEnvironment

client = PumpUp(
    api_key="<token>",
    version="<X-API-Version>",
    environment=PumpUpEnvironment.DEFAULT,
)

client.uploads.get(
    id="id",
)

⚙️ Parameters

id: str

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