Update a question by ID

PUT /questions/{id}

Path parameters

  • id string Required

    ID of the question

application/json

Body Required

  • description string
  • exam object
    Hide exam attributes Show exam attributes object
    • label string
    • id string
    • identifier string
  • figures array[string(uri)]
  • level string
  • number integer
  • year integer
  • subject string
  • topic object
    Hide topic attributes Show topic attributes object
    • id string
    • label string
  • options array[object]
    Hide options attributes Show options attributes object
    • letter string
    • text string
    • figure_url string(uri)
  • university object
    Hide university attributes Show university attributes object
    • id string
    • label string
    • short_name string
  • solution object
    Hide solution attributes Show solution attributes object
    • option string
    • steps array[string]
    • video_url string(uri)
    • figures array[string(uri)]
  • tip string

Responses

  • 200

    Question updated successfully

PUT /questions/{id}
curl \
 -X PUT localhost:8080/questions/{id} \
 -H "Content-Type: application/json" \
 -d '{"description":"string","exam":{"label":"string","id":"string","identifier":"string"},"figures":["https://example.com"],"level":"string","number":42,"year":42,"subject":"string","topic":{"id":"string","label":"string"},"options":[{"letter":"string","text":"string","figure_url":"https://example.com"}],"university":{"id":"string","label":"string","short_name":"string"},"solution":{"option":"string","steps":["string"],"video_url":"https://example.com","figures":["https://example.com"]},"tip":"string"}'
Request example
{
  "description": "string",
  "exam": {
    "label": "string",
    "id": "string",
    "identifier": "string"
  },
  "figures": [
    "https://example.com"
  ],
  "level": "string",
  "number": 42,
  "year": 42,
  "subject": "string",
  "topic": {
    "id": "string",
    "label": "string"
  },
  "options": [
    {
      "letter": "string",
      "text": "string",
      "figure_url": "https://example.com"
    }
  ],
  "university": {
    "id": "string",
    "label": "string",
    "short_name": "string"
  },
  "solution": {
    "option": "string",
    "steps": [
      "string"
    ],
    "video_url": "https://example.com",
    "figures": [
      "https://example.com"
    ]
  },
  "tip": "string"
}
Request examples
{
  "description": "string",
  "exam": {
    "label": "string",
    "id": "string",
    "identifier": "string"
  },
  "figures": [
    "https://example.com"
  ],
  "level": "string",
  "number": 42,
  "year": 42,
  "subject": "string",
  "topic": {
    "id": "string",
    "label": "string"
  },
  "options": [
    {
      "letter": "string",
      "text": "string",
      "figure_url": "https://example.com"
    }
  ],
  "university": {
    "id": "string",
    "label": "string",
    "short_name": "string"
  },
  "solution": {
    "option": "string",
    "steps": [
      "string"
    ],
    "video_url": "https://example.com",
    "figures": [
      "https://example.com"
    ]
  },
  "tip": "string"
}