Skip to content

API v2 get paginated customers #963

@c8y3

Description

@c8y3

Implement endpoint GET /api/v2/manage/customers to get a paginated list of customers

  • successful GET should return 200
  • field data should be present
  • fields data should be [] when there are no customers
  • field total should return 0 when there are no customers
  • field total should return 1 when there is a customer
  • it should accept page, per_page parameters
  • it should accept order_by and sort_dir parameters
  • it should return 400 when the field specified on order_by does not exist on customers
  • fields last_page, current_page and next_page should be present in result
  • introduce a method at the business level
  • use object PaginationParameter
  • check returned object is uniform with other endpoints, use the correct schema object
  • deprecate GET /manage/customers/list
  • openapi: document endpoint
  • openapi: deprecate GET /manage/customers/list

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions