Glossary endpoints

List and Create Glossary endpoint

api/v1/glossary/

Method

Request

Response

GET

POST

Glossary Exercise endpoint

api/v1/glossary/exercise/

Method

Request

Response

POST

  • lookup_conditions:

    • period_start_date

    • period_end_date

    • category

    • progres

HTTP_200_OK
  • id

  • question_text

  • answer_text

HTTP_400_BAD_REQUEST
  • {fild}

Glossary Exercise Parameters endpoint

Add or update user Glossary Exercise Parameters.

api/v1/glossary/exercise/parameters/

Method

Request

Response

GET

HTTP_200_OK
  • lookup_conditions:

    • period_start_date

    • period_end_date

    • category

    • source

    • progres

    • count_first

    • count_last

  • exercise_choices:

    • edge_period_items:

      • alias

      • humanly

    • categories:

      • id

      • name

      • url

      • created_at

      • user

    • progres:

      • alias

      • humanly

POST

  • period_start_date (optional)

  • period_end_date (optional)

  • category (optional)

  • progres (optional)

HTTP_200_OK
  • period_start_date

  • period_end_date

  • category

  • progres

HTTP_201_CREATED
  • period_start_date

  • period_end_date

  • category

  • progres

HTTP_400_BAD_REQUEST
  • {fild}

Example, GET method:

{
    "lookup_conditions": {
        "period_start_date": "NC",
        "period_end_date": "DT",
        "progress": "S",
        "category": null,
        "source": null,
        "count_first": 0,
        "count_last": 0
    },
    "exercise_choices": {
        "edge_period_items": [
            {
                "alias": "DT",
                "humanly": "Сегодня"
            },
            {
                "alias": "D3",
                "humanly": "Три дня назад"
            },
            {
                "alias": "W1",
                "humanly": "Неделя назад"
            },
            {
                "alias": "W2",
                "humanly": "Две недели назад"
            },
            {
                "alias": "W3",
                "humanly": "Три недели назад"
            },
            {
                "alias": "W4",
                "humanly": "Четыре недели назад"
            },
            {
                "alias": "W7",
                "humanly": "Семь недель назад"
            },
            {
                "alias": "M3",
                "humanly": "Три месяца назад"
            },
            {
                "alias": "M6",
                "humanly": "Шесть месяцев назад"
            },
            {
                "alias": "M9",
                "humanly": "Девять месяцев назад"
            },
            {
                "alias": "NC",
                "humanly": "Добавлено"
            }
        ],
        "categories": [
            {
                "alias": 2,
                "humanly": "GitHub Actions"
            },
            {
                "alias": 1,
                "humanly": "PostgreSQL"
            },
            {
                "alias": null,
                "humanly": "Не выбрано"
            }
        ],
        "progress": [
            {
                "alias": "S",
                "humanly": "Изучаю"
            },
            {
                "alias": "R",
                "humanly": "Повторяю"
            },
            {
                "alias": "E",
                "humanly": "Проверяю"
            },
            {
                "alias": "K",
                "humanly": "Знаю"
            }
        ]
    }
}

Glossary progress endpoint

api/v1/glossary/progress/

Method

Request

Response

POST

  • action

  • id

HTTP_204_OK

Where:
  • 'action''know' or 'not_know', user assessment of knowledge of the term;

  • 'id' – term ID.

Category

Where:
  • 'count' – count of categories;

  • 'next' – pagination next url;

  • 'previous' – pagination previous url;

  • 'results' – list of categories;

  • 'alias' – category ID;

  • 'humanly' – category name.

api/v1/glossary/category/

View: GlossaryListCreateAPIView

Method

Request

Response

GET

HTTP_200_OK
  • count

  • next

  • previous

  • results:
    • alias

    • humanly

POST

  • humanly

HTTP_201_CREATED
  • alias

  • humanly

api/v1/glossary/category/{id}/

View: GlossaryDetailAPIView

Method

Request

Response

GET

HTTP_200_OK
  • alias

  • humanly

PUT

  • humanly

HTTP_200_OK
  • alias

  • humanly

DELETE

HTTP_204_NO_CONTENT