{"id":13542749,"url":"https://github.com/northpowered/temporal-rest-executor","last_synced_at":"2025-04-02T11:30:52.494Z","repository":{"id":160857478,"uuid":"623501950","full_name":"northpowered/temporal-rest-executor","owner":"northpowered","description":"Small REST with Swagger UI server to work with Temporal objects","archived":false,"fork":false,"pushed_at":"2023-09-28T18:26:58.000Z","size":674,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-03T09:32:12.210Z","etag":null,"topics":["fastapi","python","temporal","workflow"],"latest_commit_sha":null,"homepage":"https://northpowered.github.io/temporal-rest-executor/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/northpowered.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-04T13:53:36.000Z","updated_at":"2024-07-17T17:34:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"93e70724-84df-435f-97b1-d92e1d463f2d","html_url":"https://github.com/northpowered/temporal-rest-executor","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/northpowered%2Ftemporal-rest-executor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/northpowered%2Ftemporal-rest-executor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/northpowered%2Ftemporal-rest-executor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/northpowered%2Ftemporal-rest-executor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/northpowered","download_url":"https://codeload.github.com/northpowered/temporal-rest-executor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246806479,"owners_count":20837108,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastapi","python","temporal","workflow"],"created_at":"2024-08-01T11:00:16.874Z","updated_at":"2025-04-02T11:30:52.196Z","avatar_url":"https://github.com/northpowered.png","language":"Python","funding_links":[],"categories":["Tools"],"sub_categories":[],"readme":"# Temporal-REST-executor\n\n[![codecov](https://codecov.io/github/northpowered/temporal-rest-executor/branch/main/graph/badge.svg?token=0Ei4nXXFfL)](https://codecov.io/github/northpowered/temporal-rest-executor)\n[![CI](https://github.com/northpowered/temporal-rest-executor/actions/workflows/ci.yml/badge.svg)](https://github.com/northpowered/temporal-rest-executor/actions/workflows/ci.yml)\n[![Docker Image CD](https://github.com/northpowered/temporal-rest-executor/actions/workflows/docker-image.yml/badge.svg)](https://github.com/northpowered/temporal-rest-executor/actions/workflows/docker-image.yml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=northpowered_temporal-rest-executor\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=northpowered_temporal-rest-executor)\n\nThis is a simple tool to execute [Temporal](https://temporal.io/) workflows/activities through the REST endpoints\n\nAll documentation are available [here](https://northpowered.github.io/temporal-rest-executor/)\n\nBased on [FastAPI](https://github.com/tiangolo/fastapi) and may be useful for development and QA\n\n## Quick start\n\nJust run docker image\n```bash\ndocker run -p 8000:8000 ghcr.io/northpowered/temporal-rest-executor:latest\n```\n\nYou can add Temporal endpoint as an env var\n```bash\ndocker run -e TEMPORAL_ENDPOINT=temporal:7233 -p 8000:8000 ghcr.io/northpowered/temporal-rest-executor:latest\n```\n\nAnd specify docker network (this is the example for default Temporal compose manifest)\n```bash\ndocker run -e TEMPORAL_ENDPOINT=temporal:7233 -p 8000:8000 --network temporal-network ghcr.io/northpowered/temporal-rest-executor:latest\n```\n\n### Args for endpoints:\n\n**Activity execution**\n\n```\nactivity_name - [string] - REQUIRED\nactivity_task_queue - [string] - REQUIRED\nargs - [ANY] - may be null\nstart_to_close_timeout - [int] - Default is 10\nschedule_to_start_timeout - [int] - may be null\nheartbeat_timeout - [int] - may be null\nschedule_to_close_timeout - [int] - may be null\nretry_policy - [Object] - may be null\nparent_workflow_id - [string] - If null, UUID4 will be used\nparent_workflow_execution_timeout - [int] - Default is 10\nparent_workflow_run_timeout - [int] - may be null\nparent_workflow_task_timeout - [int] - may be null\n\n# RetryPolicy object\n\ninitial_interval - [int] - Default is 1\nbackoff_coefficient - [float] - Default is 2\nmaximum_interval - [int] - may be null\nmaximum_attempts - [int] - Default is 0\n```\n\n\n**Workflow execution**\n```\nworkflow_name - [string] - REQUIRED\nworkflow_task_queue - [string] - REQUIRED\nargs - [ANY] - may be null\nexecution_timeout - [int] - Default is 10\nworkflow_id- [string] - If null, UUID4 will be used\n```\n\n## Config\n\nSome env vars:\n\n**TEMPORAL_ENDPOINT = localhost:7233**\n\n**TEMPORAL_NAMESPACE = default**\n\n**TEMPORAL_INTERNAL_FLOW_NAME = InternalExecutionWorkflow**\n\n**TEMPORAL_INTERNAL_TASK_QUEUE = internal-execution-queue**\n\n**UVICORN_BIND_ADDR = 0.0.0.0**\n\n**UVICORN_BIND_PORT = 8000**\n\n**TELEMETRY_ENABLED = True**\n\n**TELEMETRY_AGENT_HOST = localhost**\n\n**TELEMETRY_AGENT_PORT = 6831**\n\n**PROMETHEUS_ENDPOINT_ENABLED = True**\n\n**PROMETHEUS_ENDPOINT_PORT = 9000**\n\n## Usage\n\nDefault FastAPI Swagger is available\n\nor You can use curl:\n\n\u003e Activity execution\n```bash\ncurl -X 'POST' \\\n  'http://localhost:8000/v1/activity/execute' \\\n  -H 'accept: application/json' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"activity_name\": \"your_remote_activity\",\n  \"activity_task_queue\": \"your_queue\",\n  \"args\": \"some args: string, object or null\",\n  \"start_to_close_timeout\": 10,\n  \"parent_workflow_id\": \"MyId\",\n  \"schedule_to_start_timeout\": 0,\n  \"heartbeat_timeout\": 0,\n  \"schedule_to_close_timeout\": 0,\n  \"retry_policy\": {\n    \"initial_interval\": 1,\n    \"backoff_coefficient\": 2,\n    \"maximum_interval\": 0,\n    \"maximum_attempts\": 0\n  },\n  \"parent_workflow_execution_timeout\": 10,\n  \"parent_workflow_run_timeout\": 0,\n  \"parent_workflow_task_timeout\": 0\n}'\n```\n\n\u003e Workflow execution\n```bash\ncurl -X 'POST' \\\n  'http://localhost:8000/v1/workflow/execute' \\\n  -H 'accept: application/json' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"workflow_name\": \"string\",\n  \"workflow_task_queue\": \"string\",\n  \"args\": \"string\",\n  \"workflow_id\": \"string\",\n  \"execution_timeout\": 1\n}'\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnorthpowered%2Ftemporal-rest-executor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnorthpowered%2Ftemporal-rest-executor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnorthpowered%2Ftemporal-rest-executor/lists"}