POST api/users

POST /api/users
application/json

Body Required

  • userId integer(int64)
  • username string
  • password string
  • todoLists array[object]
    Hide todoLists attributes Show todoLists attributes object
    • listId integer(int64)
    • user object
    • title string
    • description string
    • tasks array[object]
      Hide tasks attributes Show tasks attributes object
      • taskId integer(int64)
      • todoList object
      • title string
      • description string
      • dueDate string
      • author string
      • isCompleted integer(int32)

Responses

  • 200 */*

    OK

    Hide response attributes Show response attributes object
    • userId integer(int64)
    • username string
    • password string
    • todoLists array[object]
      Hide todoLists attributes Show todoLists attributes object
      • listId integer(int64)
      • user object
      • title string
      • description string
      • tasks array[object]
        Hide tasks attributes Show tasks attributes object
        • taskId integer(int64)
        • todoList object
        • title string
        • description string
        • dueDate string
        • author string
        • isCompleted integer(int32)
POST /api/users
curl \
 -X POST https://TodoListRestApi/api/users \
 -H "Content-Type: application/json" \
 -d '{"userId":42,"username":"string","password":"string","todoLists":[{"listId":42,"user":{},"title":"string","description":"string","tasks":[{"taskId":42,"todoList":{},"title":"string","description":"string","dueDate":"string","author":"string","isCompleted":42}]}]}'
Request example
{
  "userId": 42,
  "username": "string",
  "password": "string",
  "todoLists": [
    {
      "listId": 42,
      "user": {},
      "title": "string",
      "description": "string",
      "tasks": [
        {
          "taskId": 42,
          "todoList": {},
          "title": "string",
          "description": "string",
          "dueDate": "string",
          "author": "string",
          "isCompleted": 42
        }
      ]
    }
  ]
}
Response examples (200)
{
  "userId": 42,
  "username": "string",
  "password": "string",
  "todoLists": [
    {
      "listId": 42,
      "user": {},
      "title": "string",
      "description": "string",
      "tasks": [
        {
          "taskId": 42,
          "todoList": {},
          "title": "string",
          "description": "string",
          "dueDate": "string",
          "author": "string",
          "isCompleted": 42
        }
      ]
    }
  ]
}