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

feat(c8y api): support common query parameters for GET requests #223

Merged
merged 3 commits into from
Mar 5, 2023

Conversation

reubenmiller
Copy link
Owner

c8y api: Add support for common query parameters to align with other inbuilt commands.

The following flags are respected when the GET request method is used:

  • --pageSize <int>
  • --currentPage <int>
  • --withTotalPages
  • --withTotalElements

Examples

c8y api GET "/alarm/alarms&status=ACTIVE" --pageSize 10
# Get a list of alarms with custom query parameters

c8y api GET "inventory/managedObjects" --pageSize 1 --withTotalPages
# Get a total ACTIVE alarms

@reubenmiller reubenmiller merged commit f4fe9fc into v2 Mar 5, 2023
@reubenmiller reubenmiller deleted the feat/c8y-api-pagesize-support branch March 5, 2023 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant