A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/aelassas/wexflow/wiki/RESTful-API below:

RESTful API · aelassas/wexflow Wiki · GitHub

  1. Introduction
  2. JWT Authentication
  3. Sample Clients
  4. Security Considerations
  5. Swagger
  6. Workflow Notifications via SSE
  7. Endpoints

Wexflow Server is a standalone workflow engine that helps automate tasks such as file handling, data processing, report generation, and more. It is language-independent, which means you can use it with any technology—whether your app is built in PHP, Node.js, .NET, Python, Ruby, or something else. Wexflow provides a RESTful API so your application can communicate with it over HTTP.

Beyond standard request-response operations, you can receive real-time workflow job status updates through Server-Sent Events (SSE). For detailed instructions on how to subscribe to workflow status notifications via SSE, see the Workflow Notifications via SSE page.

This API lets you control workflows from your own software. You can start, stop, and monitor workflows, view logs, manage users, and access system information. Wexflow handles all the execution, so you can focus on your application logic while automating background processes with ease.

All Wexflow API endpoints are secured with JWT authentication. Every API request must include an Authorization header containing a valid Bearer token.

To get a JWT token, call the following endpoint:

POST http://localhost:8000/api/v1/login

With this JSON payload:

{
  'username': 'username',
  'password': 'password',
  'stayConnected': false,
}

If the credentials are valid, you'll receive a response like:

{
    "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Include the token in your Authorization header for all subsequent requests:

Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

The default password of the user admin is wexflow2018. For security reasons, change it after your first login.

Wexflow provides a RESTful API that can be consumed from any programming language. Below are sample clients demonstrating how to authenticate, use access tokens, trigger workflows, and interact with the API:

You can find the source code for all these clients in the samples/clients directory of the main Wexflow repository.

These examples serve as practical starting points to integrate Wexflow into your own applications regardless of the tech stack you're using.

Wexflow uses a secure authentication mechanism based on JWT (JSON Web Tokens), PBKDF2-hashed passwords, HttpOnly secure cookies and HTTPS/SSL.

For production environments, it is strongly recommended to use HTTPS/SSL to encrypt all communication between clients and the Wexflow server.

Securing Wexflow behind HTTPS and using strong credentials is essential for reducing potential vulnerabilities.

These measures help protect against XSS, XST, CSRF, MITM, token theft, and insecure password storage.

Wexflow provides a built-in Swagger interface for exploring and testing the API: http://localhost:8000/swagger/

Some api routes may not be listed here, check Swagger UI for full list.

Workflow Notifications via SSE

You can subscribe to a Server-Sent Events (SSE) endpoint that notifies your client when a workflow job finishes or stops.

For detailed instructions on how to subscribe to workflow status notifications via SSE, see the Workflow Notifications via SSE page.

GET http://localhost:8000/api/v1/status-count
Returns status count.

GET http://localhost:8000/api/v1/entries-count-by-date?s={keyword}&from={date}&to={date}
Returns entries count by keyword and date filter.

GET http://localhost:8000/api/v1/search-entries-by-page-order-by?s={keyword}&from={date}&to={date}&page={page}&entriesCount={entriesCount}&heo={orderBy}
Searches for entries.

GET http://localhost:8000/api/v1/entry-status-date-min
Returns entry min date.

GET http://localhost:8000/api/v1/entry-status-date-max
Returns entry max date.

GET http://localhost:8000/api/v1/entry?w={workflowId}&i={jobId}
Returns workflow job entry. If jobId is not specified, it returns the latest job entry of the workflow.

Here is a sample response:

{
  "Id": "2",
  "WorkflowId": 43,
  "Name": "Workflow_ExecutionGraph",
  "LaunchType": 1,
  "Description": "Workflow_ExecutionGraph",
  "Status": 1,
  "StatusDate": "19-06-2025 18:23:54"
}

Here are job statuses:

Status Integer Value Pending 0 Running 1 Done(success) 2 Failed 3 Warning 4 Disabled 5 Stopped 6 Rejected 7

GET http://localhost:8000/api/v1/search?s={keyword}
Search for workflows.

GET http://localhost:8000/api/v1/search-approval-workflows?s={keyword}
Search for approval workflows.

GET http://localhost:8000/api/v1/workflow?w={id}
Returns a workflow from its id.

POST http://localhost:8000/api/v1/start?w={id}
Starts a workflow.

POST http://localhost:8000/api/v1/start-with-variables
Starts a workflow with variables.

Here is a sample payload:

{
	"WorkflowId":131,
	"Variables":[
	  {
		 "Name":"restVar1",
		 "Value":"C:\\WexflowTesting\\file1.txt"
	  },
	  {
		 "Name":"restVar2",
		 "Value":"C:\\WexflowTesting\\file2.txt"
	  }
	]
}

Here is a sample workflow:

<Workflow xmlns="urn:wexflow-schema" id="138" name="Workflow_RestVariables" description="Workflow_RestVariables">
  <Settings>
    <Setting name="launchType" value="trigger" />
    <Setting name="enabled" value="true" />
  </Settings>
  <LocalVariables></LocalVariables>
  <Tasks>
    <Task id="1" name="FilesLoader" description="Loading files" enabled="true">
      <Setting name="file" value="$restVar1" />
      <Setting name="file" value="$restVar2" />
    </Task>
    <Task id="2" name="ListFiles" description="Listing files" enabled="true"></Task>
  </Tasks>
</Workflow>

POST http://localhost:8000/api/v1/stop?w={id}&i={jobId}
Stops a workflow.

POST http://localhost:8000/api/v1/suspend?w={id}&i={jobId}
Suspends a workflow.

POST http://localhost:8000/api/v1/resume?w={id}&i={jobId}
Resumes a workflow.

POST http://localhost:8000/api/v1/approve?w={id}&i={jobId}
Approves a workflow.

POST http://localhost:8000/api/v1/disapprove?w={id}&i={jobId}
Disapproves a workflow.

GET http://localhost:8000/api/v1/job?w={workflowId}&i={jobId}
Returns currently running workflow job. When job finishes, it gets removed from jobs queue which will result in an empty response but if it is the latest job it will always return the latest job status even if the job ended.

Here is a sample response:

{
  "DbId": "16",
  "Id": 43,
  "InstanceId": "7d3e39df-2023-445f-9206-dfd8a4ab0a78",
  "Name": "Workflow_ExecutionGraph",
  "FilePath": null,
  "LaunchType": 1,
  "IsEnabled": true,
  "IsApproval": false,
  "EnableParallelJobs": true,
  "IsWaitingForApproval": false,
  "Description": "Workflow_ExecutionGraph",
  "IsRunning": true,
  "IsPaused": false,
  "Period": "00.00:00:00",
  "CronExpression": null,
  "IsExecutionGraphEmpty": false,
  "LocalVariables": [],
  "StartedOn": "19-06-2025 18:23:54",
  "RetryCount": 0,
  "RetryTimeout": 1500,
  "Status": "Running"
}

GET http://localhost:8000/api/v1/jobs?w={workflowId}
Returns currently running workflow jobs.

GET http://localhost:8000/api/v1/tasks/{id}
Returns workflow's tasks.

GET http://localhost:8000/api/v1/xml/{id}
Returns a workflow as XML.

GET http://localhost:8000/api/v1/json/{id}
Returns a workflow as JSON.

GET http://localhost:8000/api/v1/task-names
Returns task names.

GET http://localhost:8000/api/v1/settings/{taskName}
Returns task settings.

POST http://localhost:8000/api/v1/task-to-xml
Returns a task as XML.

GET http://localhost:8000/api/v1/is-workflow-id-valid/{id}
Checks if a workflow id is valid.

GET http://localhost:8000/api/v1/is-cron-expression-valid?e={cronExpression}
Checks if a cron expression is valid.

GET http://localhost:8000/api/v1/is-period-valid/{period}
Checks if a period is valid.

POST http://localhost:8000/api/v1/is-xml-workflow-valid
Checks if the XML of a workflow is valid.

POST http://localhost:8000/api/v1/save-xml
Saves a workflow from XML.

POST http://localhost:8000/api/v1/save
Saves a workflow from JSON.

POST http://localhost:8000/api/v1/delete?w={id}
Deletes a workflow.

POST http://localhost:8000/api/v1/delete-workflows
Deletes workflows.

GET http://localhost:8000/api/v1/graph/{id}
Returns the execution graph of the workflow.

GET http://localhost:8000/api/v1/history-entries-count-by-date?s={keyword}&from={date}&to={date}
Returns history entries count by keyword and date filter.

GET http://localhost:8000/api/v1/search-history-entries-by-page-order-by?s={keyword}&from={date}&to={date}&page={page}&entriesCount={entriesCount}&heo={orderBy}
Searches for history entries.

GET http://localhost:8000/api/v1/history-entry-status-date-min
Returns history entry min date.

GET http://localhost:8000/api/v1/history-entry-status-date-max
Returns history entry max date.

GET http://localhost:8000/api/v1/user?username={username}
Returns a user from his username.

GET http://localhost:8000/api/v1/search-users?keyword={keyword}&uo={orderBy}
Searches for users.

POST http://localhost:8000/api/v1/insert-user?username={username}&password={password}&up={userProfile}&email={email}
Inserts a user.

POST http://localhost:8000/api/v1/update-user?userId={userId}&username={username}&password={password}&up={userProfile}&email={email}
Updates a user.

POST http://localhost:8000/api/v1/update-username-email-user-profile?userId={userId}&username={username}&password={password}&up={userProfile}&email={email}
Updates the username, the email and the user profile of a user.

POST http://localhost:8000/api/v1/delete-user?username={username}&password={password}
Deletes a user.

POST http://localhost:8000/api/v1/reset-password?username={username}
Resets a password.

GET http://localhost:8000/api/v1/search-admins?keyword={keyword}&uo={orderBy}
Searches for administrators.

GET http://localhost:8000/api/v1/user-workflows?u={userId}
Returns user workflows.

POST http://localhost:8000/api/v1/save-user-workflows
Saves user workflow relations.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4