Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] API - List Code lists #158

Open
janbur opened this issue Nov 29, 2023 · 1 comment
Open

[Feature Request] API - List Code lists #158

janbur opened this issue Nov 29, 2023 · 1 comment
Labels
Back-end 🕓 3 - 4 hours It will take me between 2 hours to half a day.

Comments

@janbur
Copy link
Collaborator

janbur commented Nov 29, 2023

This is the child of: #151

Current API docs: https://geosight.unicef.org/api/v1/docs/

Objective

Create a new API endpoint for listing code lists available in GeoSight. Code lists are used for category-based indicators and define allowed values (categories) as indicator values. E.g. the type of indicator A is Category, it is associated with a code list Low-Medium-High. The code list consists of the following codes: Low, Medium, High. These will be the only allowed observation values for indicator A.

Implementation

GET /api/v1/code-list/

  • 📒 Description:
    • A paginated list of code list.
  • ⬇️ Parameters:
    • name_contains={string}
  • ⬆️ Returns:
    • results {array}:
      • id
      • name
      • description
      • codes {Array}:
        • id
        • name
        • value
    • count - number of records
    • page - current page
    • page_count - count of pages
    • next - number of next page
    • previous - number of previous page

GET /api/v1/code-list/{id}

  • 📒 Description:
    • A detailed code list.
  • ⬇️ Parameters:
    • none
  • ⬆️ Returns:
    • id
    • name
    • description
    • codes {Array}:
      • id
      • name
      • value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Back-end 🕓 3 - 4 hours It will take me between 2 hours to half a day.
Projects
None yet
Development

No branches or pull requests

2 participants