application/json

Body Required

  • name string Required

    Maximum length is 20.

  • release_type string Required
  • changes array[object] Required
    Hide changes attribute Show changes attribute object
    • Additional properties: array[string]
  • update_url string Required

    Maximum length is 2048.

Responses

  • 200 application/json

    Successful Response

    Hide response attributes Show response attributes object
    • version_id integer Required
    • name string Required
    • release_type string Required
    • changes array[object] Required
      Hide changes attribute Show changes attribute object
      • Additional properties: array[string]
    • update_url string Required
    • created_at integer Required
  • 503 application/json

    Database connection error

    Hide response attribute Show response attribute object
    • detail string

      Default value is Can't connect to MySQL server on '[SERVER]'.

  • 400 application/json

    Database update error

    Hide response attribute Show response attribute object
    • detail string

      Default value is Duplicate entry '...' for key '...'.

  • 422 application/json

    Validation Error

    Hide response attribute Show response attribute object
    • detail array[object]
      Hide detail attributes Show detail attributes object
      • loc array[string | integer] Required
      • msg string Required
      • type string Required
POST /api/versions
curl \
 -X POST https://lztup.toil.cc/api/versions \
 -H "Content-Type: application/json" \
 -d '{"name":"string","release_type":"string","changes":[{}],"update_url":"string"}'
Request example
{
  "name": "string",
  "release_type": "string",
  "changes": [
    {}
  ],
  "update_url": "string"
}
Request examples
{
  "name": "string",
  "release_type": "string",
  "changes": [
    {
      "Additional properties:": [
        "string"
      ]
    }
  ],
  "update_url": "string"
}
Response examples (200)
{
  "version_id": 42,
  "name": "string",
  "release_type": "string",
  "changes": [
    {}
  ],
  "update_url": "string",
  "created_at": 42
}
Response examples (503)
{
  "detail": "Can't connect to MySQL server on '[SERVER]'"
}
Response examples (400)
{
  "detail": "Duplicate entry '...' for key '...'"
}
Response examples (422)
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}