Start typing to search.

API Reference

Update a task

View Markdown

Updates task metadata and/or creates a new version if yaml content is provided.

PUT /api/tasks/{id}

Updates task metadata and/or creates a new version if yaml_content is provided.

Operation ID: updateTask

Authentication

Option 1

  • BearerAuth (http bearer) API key token. Create via POST /api/api-keys. Format: envoy_<hex>

Option 2

  • CookieAuth (apiKey) Session cookie set after login + TOTP verification

Path parameters

  • idinteger, required Resource ID

Request body

The request body is required.

application/json

  • Type: object
  • Properties:
    • name (string)
    • description (string)
    • yaml_content (string)
    • connector_refs (array<string>)
      • Items:
        • Type: string
    • change_summary (string)

Success responses

200

Task updated with current YAML content

Content type: application/json

  • Type: Task & object
  • All of:
    • Variant 1:
      • Reference: Task
        • Type: object
        • Properties:
          • id (integer)
          • name (string)
          • description (string | null)
            • Nullable: yes
          • current_version (integer)
          • status (string)
            • Allowed values: active, archived
          • created_at (string)
            • Format: date-time
          • updated_at (string)
            • Format: date-time
    • Variant 2:
      • Type: object
      • Properties:
        • current_yaml (string | null)
          • Nullable: yes

Error responses

400

Validation error

Content type: application/json

  • Reference: Error
    • Type: object
    • Properties:
      • error (string)
        • Example: NOT_FOUND
      • message (string)
        • Example: Resource not found

Example:

{
  "error": "VALIDATION_ERROR",
  "message": "Invalid input"
}

404

Resource not found

Content type: application/json

  • Reference: Error
    • Type: object
    • Properties:
      • error (string)
        • Example: NOT_FOUND
      • message (string)
        • Example: Resource not found

Example:

{
  "error": "NOT_FOUND",
  "message": "Resource not found"
}

Examples

cURL

curl --request PUT \
  --url 'https://your-envoy.example.com/api/tasks/YOUR_ID' \
  --header 'Authorization: Bearer $API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "string",
  "description": "string",
  "yaml_content": "string",
  "connector_refs": [
    "string"
  ],
  "change_summary": "string"
}'

JavaScript (fetch)

const response = await fetch('https://your-envoy.example.com/api/tasks/YOUR_ID', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "name": "string",
    "description": "string",
    "yaml_content": "string",
    "connector_refs": [
      "string"
    ],
    "change_summary": "string"
  }),
});
 
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = response.status === 204 ? null : await response.json();
console.log(data);