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

DeactivateUsersByIdsAsync should default to using a POST body #67

Open
jobannon opened this issue Sep 1, 2023 · 1 comment
Open

DeactivateUsersByIdsAsync should default to using a POST body #67

jobannon opened this issue Sep 1, 2023 · 1 comment

Comments

@jobannon
Copy link

jobannon commented Sep 1, 2023

When calling client.DeactivateUsersByIdsAsync, FusionAuth will default to sending this request using queryParams as in

DELETE /api/user/bulk?userId={userId}&userId={userId}&userId={userId}&userId={userId}&userId={userId}&userId={userId}&userId={userId}&userId={userId}

It should default to sending this request using a POST body as in:

DELETE /api/user/bulk

with the following example POST body:

{
  "dryRun": true,
  "hardDelete": false,
  "userIds": [
    "5c1dc1a8-2fc8-4ae0-9372-e994be0f4341",
    "dbf59ee1-2d24-4ea0-b977-2b6e2a5350bf",
    "3e74294d-7de7-45a4-9592-4a198ddbdc73",
    "cfaf34a0-aa66-4d3a-af14-6dbc5f9fb577",
    "a2eb9268-e6f1-45f4-8eaa-50c0154983fe",
    "b1b42d6b-3b44-47fb-bb32-26e0c71c62d3",
    "8c91cb08-27df-4725-b3a8-98631bc8d9af",
    "54df878b-c0a1-4951-a63a-3cf2f97edd17",
    "946b3deb-25a5-4155-b137-bb5202d2ac98"
  ]
}

This change will allow for larger requests.

Related documentation and API:

Internal: original reporting issue

@mooreds
Copy link
Contributor

mooreds commented Sep 5, 2023

Will need to change or augment the source JSON for this API call:

https://github.com/FusionAuth/fusionauth-client-builder/blob/master/src/main/api/deactivateUsersByIds.json

For backwards compatibility, probably best to create a new API.json document. Maybe deactivateUsersByIdsWithBody.json or similar?

Here's an example where params are sent in the body rather than the parameter: https://github.com/FusionAuth/fusionauth-client-builder/blob/master/src/main/api/searchUsersByQuery.json

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

No branches or pull requests

2 participants