Solarware API-Dokumentation
YAML herunterladen

Aufgabe teilweise aktualisieren

patch /api/v1/tasks/{id}

Sicherheit

ApiKeyAuth

Parameter

Name In Typ Details
id path integer Pflicht Ressourcen-ID

Request-Body Pflicht

application/json

Schema

{
    "type": "object",
    "required": [
        "title"
    ],
    "properties": {
        "title": {
            "type": "string"
        },
        "description": {
            "type": "string"
        },
        "deals_id": {
            "type": "integer"
        },
        "type": {
            "type": "string",
            "enum": [
                "other",
                "call",
                "email"
            ]
        },
        "status": {
            "type": "string",
            "enum": [
                "to-do",
                "done"
            ]
        },
        "priority": {
            "type": "string",
            "enum": [
                "high",
                "low",
                "medium"
            ]
        },
        "due_date": {
            "type": "string"
        },
        "start_time": {
            "type": "string"
        }
    }
}

Antworten

200 Aufgabe aktualisiert

application/json

{
    "allOf": [
        {
            "title": "API envelope",
            "type": "object",
            "properties": {
                "success": {
                    "type": "boolean"
                },
                "message": {
                    "type": "string",
                    "nullable": true
                },
                "errors": {
                    "nullable": true
                },
                "meta": {
                    "type": "object",
                    "nullable": true,
                    "additionalProperties": true
                }
            }
        },
        {
            "type": "object",
            "properties": {
                "data": {
                    "title": "Task",
                    "type": "object",
                    "required": [
                        "id",
                        "title"
                    ],
                    "properties": {
                        "id": {
                            "type": "integer"
                        },
                        "title": {
                            "type": "string"
                        },
                        "description": {
                            "type": "string",
                            "nullable": true
                        },
                        "deals_id": {
                            "type": "integer",
                            "nullable": true
                        },
                        "type": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                                "other",
                                "call",
                                "email"
                            ]
                        },
                        "status": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                                "to-do",
                                "done"
                            ]
                        },
                        "priority": {
                            "type": "string",
                            "nullable": true,
                            "enum": [
                                "high",
                                "low",
                                "medium"
                            ]
                        },
                        "due_date": {
                            "type": "string",
                            "nullable": true
                        },
                        "start_time": {
                            "type": "string",
                            "nullable": true
                        },
                        "created_by": {
                            "type": "integer",
                            "nullable": true
                        },
                        "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "nullable": true
                        },
                        "updated_at": {
                            "type": "string",
                            "format": "date-time",
                            "nullable": true
                        }
                    }
                }
            }
        }
    ]
}
401 Missing or invalid API key

application/json

{
    "type": "object",
    "properties": {
        "success": {
            "type": "boolean",
            "example": false
        },
        "message": {
            "type": "string",
            "example": "Missing API key (X-Api-Key)"
        }
    }
}
404 Resource not found

application/json

{
    "title": "API envelope",
    "type": "object",
    "properties": {
        "success": {
            "type": "boolean"
        },
        "message": {
            "type": "string",
            "nullable": true
        },
        "errors": {
            "nullable": true
        },
        "meta": {
            "type": "object",
            "nullable": true,
            "additionalProperties": true
        }
    }
}
422 Validation failed

application/json

{
    "title": "API envelope",
    "type": "object",
    "properties": {
        "success": {
            "type": "boolean"
        },
        "message": {
            "type": "string",
            "nullable": true
        },
        "errors": {
            "nullable": true
        },
        "meta": {
            "type": "object",
            "nullable": true,
            "additionalProperties": true
        }
    }
}