Vai al contenuto principale
PUT
/
workflows
/
{workflowId}
Aggiorna un workflow
curl --request PUT \
  --url https://api.altostrat.io/workflows/{workflowId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Flusso Onboarding Cliente Aggiornato",
  "is_active": false
}'
{
  "id": "fl_01h3j4k5l6m7n8p9q0r1s2t3u4",
  "name": "Onboarding Cliente",
  "description": "Invia un'email di benvenuto e imposta un account.",
  "nodes": [
    {
      "id": "n1",
      "type": "manual_trigger",
      "position": {
        "x": 150,
        "y": 250
      },
      "data": {
        "componentId": "manual_trigger"
      }
    }
  ],
  "edges": [
    {
      "id": "e1-2",
      "source": "n1",
      "target": "n2",
      "sourceHandle": "true"
    }
  ],
  "schedule_type": "manual",
  "schedule_value": "0 9 * * *",
  "next_run_at": "2025-11-01T09:00:00.000000Z",
  "is_active": true,
  "webhook_url": "https://api.altostrat.io/workflows/webhooks/whsec_abc123...",
  "created_at": "2025-10-31T12:00:00.000000Z",
  "updated_at": "2025-10-31T12:30:00.000000Z"
}

Authorizations

Authorization
string
header
required

JWT standard per le sessioni utente ottenuto tramite l'autenticazione Altostrat.

Path Parameters

workflowId
string
required

L'ID prefissato del workflow (es. fl_...).

Body

application/json

Tutti i campi sono opzionali. Saranno aggiornati solo i campi forniti.

name
string
Example:

"Controllo Quotidiano Integrità Rete (Aggiornato)"

description
string | null
is_active
boolean
authorization_id
string
Example:

"auth_01H..."

schedule_type
enum<string>
Opzioni disponibili:
manual,
interval,
cron,
daily,
weekly,
monthly
schedule_value
string | null
nodes
object[]
Minimum length: 1
edges
object[]

Response

Il workflow è stato aggiornato con successo.

id
string

L'identificatore univoco prefissato per il workflow.

Example:

"fl_01h3j4k5l6m7n8p9q0r1s2t3u4"

name
string

Il nome leggibile del workflow.

Example:

"Onboarding Cliente"

description
string | null

Una descrizione dettagliata di ciò che fa il workflow.

Example:

"Invia un'email di benvenuto e imposta un account."

nodes
object[]

Un array di oggetti nodo che compongono il grafo del workflow. Restituito solo quando si recupera un singolo workflow.

edges
object[]

Un array di oggetti arco che collegano i nodi nel grafo del workflow. Restituito solo quando si recupera un singolo workflow.

schedule_type
enum<string> | null

Il tipo di pianificazione che attiva il workflow.

Opzioni disponibili:
manual,
interval,
cron,
daily,
weekly,
monthly
Example:

"manual"

schedule_value
string | null

Il valore per la pianificazione (es. un'espressione cron o una stringa di intervallo come '5 minutes').

Example:

"0 9 * * *"

next_run_at
string<date-time> | null

La prossima data/ora pianificata per l'esecuzione del workflow.

Example:

"2025-11-01T09:00:00.000000Z"

is_active
boolean

Indica se il workflow è attivo e può essere attivato.

Example:

true

webhook_url
string<uri> | null

L'URL univoco e sicuro per attivare questo workflow se utilizza un trigger webhook.

Example:

"https://api.altostrat.io/workflows/webhooks/whsec_abc123..."

created_at
string<date-time>

La data e ora di creazione del workflow.

Example:

"2025-10-31T12:00:00.000000Z"

updated_at
string<date-time>

La data e ora dell'ultimo aggiornamento del workflow.

Example:

"2025-10-31T12:30:00.000000Z"