Frissítési ügynök
PUT
/api/v1/workflow/{workflow_id}Update an existing workflow. Args: workflow_id: The ID of the workflow to update request: The update request containing the new name and workflow definition Returns: The updated workflow Raises: HTTPException: If the workflow is not found or if there's a database error
cURL példa
curl -X PUT \
'https://app.intracord.hu/api/v1/workflow/{workflow_id}' \
-H "X-API-Key: $INTRACORD_API_KEY" \
-H 'Content-Type: application/json' \
--data-binary @request.jsonParaméterek
| Név | Hely | Típus | Leírás |
|---|---|---|---|
workflow_idkötelező | path | integer | — |
authorization | header | object | — |
X-API-Key | header | object | — |
Kérés törzse
application/jsonSéma megtekintése
{
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Name"
},
"workflow_definition": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Workflow Definition"
},
"template_context_variables": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Template Context Variables"
},
"workflow_configurations": {
"anyOf": [
{
"$ref": "#/components/schemas/WorkflowConfigurationDefaults"
},
{
"type": "null"
}
]
}
},
"type": "object",
"title": "UpdateWorkflowRequest"
}Válaszok
200Successful Responseapplication/jsonSéma megtekintése
{
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"name": {
"type": "string",
"title": "Name"
},
"status": {
"type": "string",
"title": "Status"
},
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At"
},
"workflow_definition": {
"additionalProperties": true,
"type": "object",
"title": "Workflow Definition"
},
"current_definition_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Current Definition Id"
},
"template_context_variables": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Template Context Variables"
},
"call_disposition_codes": {
"anyOf": [
{
"$ref": "#/components/schemas/CallDispositionCodes"
},
{
"type": "null"
}
]
},
"total_runs": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Total Runs"
},
"workflow_configurations": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Workflow Configurations"
},
"version_number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Version Number"
},
"version_status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Version Status"
},
"workflow_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Workflow Uuid"
}
},
"type": "object",
"required": [
"id",
"name",
"status",
"created_at",
"workflow_definition",
"current_definition_id"
],
"title": "WorkflowResponse"
}404Not found422Validation Errorapplication/jsonSéma megtekintése
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}