Delete a user: Migration guide
This guide outlines the changes introduced in the Delete a user v2 endpoint (previously known as deleteUser
in v1).
Documentation links
Here are the links to the API reference for:
Endpoint mapping
Here's the direct correlation between the v1 and v2 endpoint URLs:
- API v1:
/api/v1/users/{user_email}
- API v2:
/api/v2/users/{userId}
Input changes
This section details the specific alterations to the input requirements between API versions.
API v1 input example
curl --location -g --request DELETE 'https://app.360learning.com/api/v1/users/[email protected]' \
--data-urlencode 'company={{company}}' \
--data-urlencode 'apiKey={{apiKey}}'
API v2 input example
curl --request DELETE \
--url https://app.360learning.com/api/v2/users/userId \
--header '360-api-version: v2.0' \
--header 'accept: application/json' \
--header 'authorization: Bearer access_token'
Main input differences
Change type | API v1 | API v2 |
---|---|---|
Modified Path parameter | user_email User's email. | userId : User's internal identifier. |
Added Header parameter | - | 360-api-version (Required): API version identifier. Example: v2.0 . |
Output changes
This section details the specific alterations to the output returned between API versions.
Main output differences
Change type | API v1 | API v2 |
---|---|---|
Added Error code | - | 400 - userIsCompanyOwner : The given userId corresponds to the company owner and cannot be deleted. |
Added Error code | - | 404 - userNotFound : The given userId does not correspond to any existing user. |
Updated 5 days ago