import requests
url = "https://api.diga.io/v1/workflow/templates/{template_id}/copy"
payload = {
"flow_name": "<string>",
"variables": {},
"connections": [
{
"key": "<string>",
"value": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"flow_id": "<string>",
"flow_name": "<string>",
"edit_url": "<string>"
}Copy a workflow template to the user’s project.
This creates a new flow in the user’s project with the template content. The flow will be created in a disabled state for the user to configure.
Args: template_id: ID of the template to copy request: Optional request body with custom flow name auth_context: Authentication context session: Database session
Returns: CopyTemplateResponse with flow_id, flow_name, and edit_url
import requests
url = "https://api.diga.io/v1/workflow/templates/{template_id}/copy"
payload = {
"flow_name": "<string>",
"variables": {},
"connections": [
{
"key": "<string>",
"value": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"flow_id": "<string>",
"flow_name": "<string>",
"edit_url": "<string>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Request to copy a template to the user's project.
Custom name for the created flow. Defaults to template name.
Values to replace <
Credentials for connections required by the template.
Show child attributes