List Of Students - KarolDawidG/MEGAK_HH_SPEC_G1_backend GitHub Wiki

Getting list of students

This Enpoint allows you download selected part of users from database. You are able to apply diferent filters, search by city name and limit data per page.

Method and URL

GET /student/list?page=1

[!warning] The page attribute in search query is required and cannot be lower than 1

[!warning] Users without profile data will not be displayed in list

Filters

You can filter requested data, by adding additional attributes to search query. Bellow is list of all avalaible filter options.

  1. cc - Course completion degree, takes an array of numbers, for example cc=1 allows you to choose all users with course completion degree higher than 1.
  2. ce - Course Engagement degree, takes an array of numbers, works like cc
  3. pd - Project Degree, takes an array of numbers, works like cc
  4. tpd - Team Project Degree, takes an array of number, works like cc
  5. ewt - Work type, takes array of the following values:
  • 0 = No Preferences
  • 1 = On Site
  • 2 = Relocation
  • 3 = Hybrid
  1. ect - Contract type, takes array of the following values:
  • 0 = No Preferences
  • 1 = UoP
  • 2 = B2B
  • 3 = UZorUoD
  1. es - Expected salary, takes an array of two values, first is a lower border and second is upper
  2. cta - Can Take Apprenticeship, if set to any value works as true, using this option you will see only users who agree to take apprenticeship.
  3. moce - Moths of minimal commercial experience, takes number of months
  4. srch - Search string, used to serach by city name
  5. page - Select Page, takes number
  6. pitems - Students Per page, takes number, by default it's set to 15 and takes max value of 90

[!important] Following arguments are not implemented yet.

  1. ord - List order by column number, takes one of the following:
  • 0 = userId
  • 1 = firstName
  • 2 = lastName
  • 3 = expectedWorkType
  • 4 = targetWorkCity
  • 5 = expectedContractType
  • 6 = expectedSalary
  • 7 = canTakeApprenticeship
  • 8 = monthsOfCommercialExperience
  • 9 = projectDegree
  • 10 = teamProjectDegree
  • 11 = courseCompletion
  • 12 = courseEngagement
  1. asc - Enable ascending sort order, by default set to descending

Request Response

Returns array of two elements. The first one is array of students and the second one is number of records in database.

[
  studentsList[]: {
    userId: string,  // User ID
    firstName: string,  // User first name
    lastName: string,  // User last name
    expectedWorkType: number,  // Expected work type
    targetWorkCity: string,  // Target work city
    expectedContractType: number,  // Expected contract type
    expectedSalary: number,  // Expected salary
    canTakeApprenticeship: 0 | 1 (boolean/number), // Can take apprenticeship
    monthsOfCommercialExperience: number, // Months of user commercial experience
    projectDegree: number, // Project degree
    teamProjectDegree: number, // Team project degree
    courseCompletion: number, // Course completion degree
    courseEngagemnet: number // Course engagement degree
  },
  number // Total DB records count
]

Usage exmaple

  • URL: /student/list?page=1

  • Method: GET

  • Response:

[
  "studentsList": [
    {
      "userId": "U1234-1234-1234-1234",
      "firstName": "John",
      "lastName": "Example",
      "expectedWorkType": 0,
      "targetWorkCity": "Warsaw",
      "expectedContractType": 0,
      "expectedSalary": 1000,
      "canTakeApprenticeship": 1,
      "monthsOfCommercialExperience": 20,
      "projectDegree": 5,
      "teamProjectDegree": 5,
      "courseCompletion": 5,
      "courseEngagemnet": 5
    },
  ],
  250
]

Getting list of students added to conversation

This Enpoint allows you download users added to conversation by current logged user.

Method and URL

GET /student/conversation-list

Filters

You can filter requested data, by adding additional attributes to search query. Bellow is list of all avalaible filter options.

  1. cc - Course completion degree, takes an array of numbers, for example cc=1 allows you to choose all users with course completion degree higher than 1.
  2. ce - Course Engagement degree, takes an array of numbers, works like cc
  3. pd - Project Degree, takes an array of numbers, works like cc
  4. tpd - Team Project Degree, takes an array of number, works like cc
  5. ewt - Work type, takes array of the following values:
  • 0 = No Preferences
  • 1 = On Site
  • 2 = Relocation
  • 3 = Hybrid
  1. ect - Contract type, takes array of the following values:
  • 0 = No Preferences
  • 1 = UoP
  • 2 = B2B
  • 3 = UZorUoD
  1. es - Expected salary, takes an array of two values, first is a lower border and second is upper
  2. cta - Can Take Apprenticeship, if set to any value works as true, using this option you will see only users who agree to take apprenticeship.
  3. moce - Moths of minimal commercial experience, takes number of months
  4. srch - Search string, used to serach by city name
  5. page - Select Page, takes number
  6. pitems - Students Per page, takes number, by default it's set to 15 and takes max value of 90

[!important] Following arguments are not implemented yet.

  1. ord - List order by column number, takes one of the following:
  • 0 = userId
  • 1 = firstName
  • 2 = lastName
  • 3 = expectedWorkType
  • 4 = targetWorkCity
  • 5 = expectedContractType
  • 6 = expectedSalary
  • 7 = canTakeApprenticeship
  • 8 = monthsOfCommercialExperience
  • 9 = projectDegree
  • 10 = teamProjectDegree
  • 11 = courseCompletion
  • 12 = courseEngagement
  1. asc - Enable ascending sort order, by default set to descending

Request Response

Returns array of two elements. The first one is array of students and the second one is number of records in database.

[
  studentsConversationList[]: {
    userId: string,  // User ID
    fullName: string,  // User first + last name
    expectedWorkType: number,  // Expected work type
    targetWorkCity: string,  // Target work city
    expectedContractType: number,  // Expected contract type
    expectedSalary: number,  // Expected salary
    canTakeApprenticeship: 0 | 1 (boolean/number), // Can take apprenticeship
    monthsOfCommercialExperience: number, // Months of user commercial experience
    projectDegree: number, // Project degree
    teamProjectDegree: number, // Team project degree
    courseCompletion: number, // Course completion degree
    courseEngagemnet: number, // Course engagement degree
    reservedTo: date, // User reserved to date in zulu time
    githubUserName: string, // User github username
  },
  number // Total DB records count
]

Usage exmaple

  • URL: /student/conversation-list?page=1

  • Method: GET

  • Response:

[
  "studentsList": [
    {
      "userId": "U1234-1234-1234-1234",
      "firstName": "John",
      "lastName": "Example",
      "expectedWorkType": 0,
      "targetWorkCity": "Warsaw",
      "expectedContractType": 0,
      "expectedSalary": 1000,
      "canTakeApprenticeship": 1,
      "monthsOfCommercialExperience": 20,
      "projectDegree": 5,
      "teamProjectDegree": 5,
      "courseCompletion": 5,
      "courseEngagemnet": 5,
      "reservedTo": "2023-12-02T19:00:00.000Z",
      "githubUserName": "ExampleUser"
    },
  ],
  250
]