Skip to main content
All CollectionsAPI Documentation
Launches - Wrk API Reference
Launches - Wrk API Reference

Interfacing with the Wrk Platform via APIs - Wrkflow Launches

David Li avatar
Written by David Li
Updated this week

Launches

This object represents a Wrkflow Launch aka a Wrkflow automation process that has been started. You can use the Launch object to track the progress, pause or resume it.

ENDPOINTS

GET

/v1/get-launches

POST

/v1/launch/<launch_id>/pause

POST

/v1/launch/<launch_id>/resume

The Launch object

Attributes

Attributes

The Launch object

  • launch_id int
    The unique identifier of the Launch

  • wrkflow_uuid UUID
    The associated Wrkflow identifier

  • name string
    The given name of the Launch

  • start_date unix date
    The start date of the Launch.

  • status dictionary

    • status_code enum
      1: Running
      2: Paused
      3: Completed

    • status_label string
      The status can be either "running", "paused" or "completed"

    • time_elapsed int
      The time in seconds that the Launch has been running or has run to completion.

    • task_completed int
      The number of tasks completed during the launch

    • errors int
      The number of errors that the Launch has encountered

{
"launch_id": 1223321,
"wrkflow_uuid": "d3cb5c8d-de4b-4a72-84b3-e529c444d842",
"name": "My launch",
"start_date": 1728673181,
"status": {
"status_code": 1,
"status_label": "running",
"time_elapsed": 12,
"task_completed": 34,
"errors": 0
}
}


Retrieve Launches

Retrieves one or more Wrkflow Launches objects. The Wrkflow Launches are sorted by start_date in descending order.

Parameters

  • launch_id int (optional)
    The unique identifier of the Launch to retrieve

  • status_code int (optional)
    The Launches matching the status_code

  • wrkflow_uuid UUID (optional)
    Retrieve Launches matching the Wrkflow UUID

  • lower_start_date unix date (optional)
    The Launches that have a start date bigger or equal to

  • upper_start_date unix date (optional)
    The Launches that have a start date smaller or equal to
    โ€‹

GET /v1/get-launches

cURL

x

Python

...

# Get the launches for the Wrkflow
running_launches = wrkflow.get_launches(status_code=1)

# Get all launches
all_launches = wrkflow.launches

Returns

A dictionary with a launches property that contains an array of Launches. The totalCount property will give the number of Launches returned. If there are no Launches matching the request, the resulting array will be empty

{
"totalCount": 1,
"launches": [
{
"launch_id": 1223321,
"wrkflow_uuid": "d3cb5c8d-de4b-4a72-84b3-e529c444d842",
"name": "My launch",
"start_date": 1728673181,
"status": {
"status_code": 1,
"status_label": "running",
"time_elapsed": 12,
"task_completed": 34,
"errors": 0
}
}
]
}


Pause Launch

Pause a Wrkflow Launch that has started. Pausing a Wrkflow Launch indefinitely is the same as stopping it.

Parameters

  • launch_id int
    The unique identifier of the Launch.

POST /v1/launch/<launch_id>/pause

cURL

curl -P /v1/launch/<launch_id>/pause

x

Python

...

launch = wrkflow.get_launches(launch_id=1234)

launch.pause()

Returns

If successful, a dictionary with Boolean property status where true denotes a successful pause.

{ "status": true }


Resume Launch

Resume a Wrkflow Launch that was paused. Resume an already running Wrkflow will effectively do nothing and still counts as a successful request.

Parameters

  • launch_id int
    The unique identifier of the Launch.

POST /v1/launch/<launch_id>/resume

cURL

curl -P /v1/launch/<launch_id>/resume

Python

...

launch = wrkflow.get_launches(launch_id=1234)

launch.resume()

Returns

If successful, a dictionary with Boolean property status where true denotes a successful resume.

{ "status": true }

Did this answer your question?