Etlworks provides a REST API for generating flow documentation in Markdown format and rendering interactive flow diagrams in HTML. This API can be used to integrate with external systems, automate documentation, or embed flow diagrams in internal portals.
Overview
The Flow Documentation API includes endpoints that return:
- Markdown documentation describing a flow and its structure.
- A rendered diagram of the flow in HTML format.
- A JSON response that includes both.
Authentication
The API requires a valid JWT token for authentication. You can provide the token in one of the following ways:
-
Authorization Header
Format: Authorization: Bearer {JWT_token}
-
Authorization URL Parameter
Format: ?Authorization=Bearer%20{JWT_token}
Read about Authentication API.
Return Markdown + Diagram (JSON)
-
PATH:
/rest/v1/flows/{flowId}/documentation
-
METHOD:
GET
-
HEADERS:
Authorization: Bearer {jwt_auth_token}
Response
Returns both the Markdown documentation and the HTML diagram as a JSON object.
{
"documentation": "...Markdown content...",
"diagram": "...HTML diagram..."
}
-
Content-Type: application/json
Response Codes
- 200 for success
- 401 and 403 for not authorized
- 500 for an internal error
Return Markdown (HTML)
-
PATH:
/rest/v1/flows/documentation/md?flowId={flow_id}&Authorization=Bearer%20{jwt_auth_token}
-
METHOD:
GET
-
QUERY PARAMETERS:
-
Authorization: in Bearer%20{jwt_auth_token} format.
Where {jwt_auth_token} is the JWT token issued by the Authentication API.
-
flowId: numeric ID of the flow.
-
Response
Pre-rendered HTML version of the Markdown documentation.
-
Content-Type: text/html
Response Codes
- 200 for success
- 401 and 403 for not authorized
- 500 for an internal error
Return Diagram (HTML)
-
PATH:
/rest/v1/flows/documentation/diagram?flowId={flow_id}&Authorization=Bearer%20{jwt_auth_token}
-
METHOD:
GET
-
QUERY PARAMETERS:
-
Authorization: in Bearer%20{jwt_auth_token} format.
-
flowId: numeric ID of the flow.
-
Response
Interactive HTML diagram for the flow.
-
Content-Type: text/html
Response Codes
- 200 for success
- 401 and 403 for not authorized
- 500 for an internal error