Skip to content

Support "fields" query params for all endpoints with nested data #235

Open
@maxceem

Description

@maxceem

Some models apart from data inside the model itself could return data from some nested models for example Work Periods inside Resource Bookings.

Especially endpoints for teams return a lot of nested/joint data.

  • /taas-teams
  • /taas-teams/:id
  • /taas-teams/:id/jobs/:jobId

For consistency purposes and for speed optimization I suggest adding support to of fields query param to all GET endpoints in TaaS API similar like we do for Resource Bookings here.

Also, we can remove endpoint /taas-teams/:id/jobs/:jobId and move it's functionality to /jobs/:jobId endpoint:

  • adding candidates to the fields query param should return jobs with nested Job Candidates
  • adding enrichSkills=true should populate skills with skill titles
  • adding enrichCandidates=true should populate candidates with user 'handle', 'firstName', 'lastName', 'skills'

Endpoints Structure

  • /taas-teams and /taas-teams/:id

    • fields:
      • resources (non sortable, not filterable)
      • jobs (non sortable, not filterable)
      • members (? sortable, ? filterable)
      • invites (? sortable, ? filterable)
    • enrich
      • enrichJobsSkills
  • /jobs/ and /jobs/:jobId

    • fields:
      • candidates (non sortable, not filterable)
    • enrich
      • enrichSkills
      • enrichCandidates
  • /jobCandidates/ and /jobCandidates/:jcId

    • fields:
      • interviews (sortable, filterable)
  • /resourceBookings/ and /resourceBookings/:jrbId

    • fields:
      • workPeriods (sortable, filterable)
      • Do we need support double nesting in fields? Like workPeriods.payments (sortable, filterable)
  • /work-periods/ and /work-periods/:wpId

    • fields:
      • payments (sortable, filterable)
  • /work-period-payments/ and /work-period-payments/:wppId

    • fields:
      • no nested

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions