Get Workflow version graph
workflows.versions.graph(strversion_id, VersionGraphParams**kwargs) -> VersionGraphResponse
GET/accounts/{account_id}/workflows/{workflow_name}/versions/{version_id}/graph
Retrieves the graph visualization of a workflow version.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Get Workflow version graph
import os
from cloudflare import Cloudflare
client = Cloudflare(
api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted
)
response = client.workflows.versions.graph(
version_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
account_id="account_id",
workflow_name="x",
)
print(response.id){
"errors": [
{
"code": 0,
"message": "message"
}
],
"messages": [
{
"code": 0,
"message": "message"
}
],
"result": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"class_name": "class_name",
"created_on": "2019-12-27T18:11:19.117Z",
"graph": {
"version": 0,
"workflow": {
"class_name": "class_name",
"functions": {
"foo": {
"name": "name",
"nodes": [
{}
],
"type": "function_def"
}
},
"nodes": [
{
"duration": 0,
"name": "name",
"type": "step_sleep",
"resolves": 0,
"starts": 0
}
],
"payload": {
"type": "unknown"
}
}
},
"modified_on": "2019-12-27T18:11:19.117Z",
"workflow_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
},
"success": true,
"result_info": {
"count": 0,
"per_page": 0,
"total_count": 0,
"cursor": "cursor",
"page": 0,
"total_pages": 0
}
}Returns Examples
{
"errors": [
{
"code": 0,
"message": "message"
}
],
"messages": [
{
"code": 0,
"message": "message"
}
],
"result": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"class_name": "class_name",
"created_on": "2019-12-27T18:11:19.117Z",
"graph": {
"version": 0,
"workflow": {
"class_name": "class_name",
"functions": {
"foo": {
"name": "name",
"nodes": [
{}
],
"type": "function_def"
}
},
"nodes": [
{
"duration": 0,
"name": "name",
"type": "step_sleep",
"resolves": 0,
"starts": 0
}
],
"payload": {
"type": "unknown"
}
}
},
"modified_on": "2019-12-27T18:11:19.117Z",
"workflow_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
},
"success": true,
"result_info": {
"count": 0,
"per_page": 0,
"total_count": 0,
"cursor": "cursor",
"page": 0,
"total_pages": 0
}
}