sailpoint-oss / developer.sailpoint.com

The codebase that makes up developer.sailpoint.com, including developer documentation. This codebase is open source and welcomes contributions.
https://developer.sailpoint.com
MIT License
32 stars 85 forks source link

[Bug] Requesting changes to 'Create Account' (create-account) #566

Closed rob-buskens-sp closed 2 months ago

rob-buskens-sp commented 6 months ago

Describe the bug A clear and concise description of what the bug is

The Account Create API is an 'upsert' operation. If the ID doesn't exist, the account is created. If the ID does exist it is updated. This is usually discovered in unit testing. There is a separate update operation so it isn't clear if this is intended behaviour.

To Reproduce Steps to reproduce the behavior:

  1. Create an account using the create account API
  2. Validate that the account was created
  3. Call create account again with the same ID, and change some attributes

Expected behavior A clear and concise description of what you expected to happen. Based on documentation and overall API design (separate update operation), expect this to fail. More specifically... this call will work (async), but the task should fail (duplicate account).

Actual behavior A clear and concise description of what actually happens. The task succeeds and the account is updated.

Screenshots If applicable, add screenshots to help explain your problem. Source before 1st create: image

first create call:

image

new account (correlated): image

second create call:

image

Note: same id

Account updated, not created. image

Operating System (please complete the following information):

N/A

Browser (please complete the following information): N/A

Additional context

If the expected behaviour is upsert rather than create only. all good. then please update the documentation to reflect actual behaviour.

if the expected behaviour is create only... then the task should fail if the id already exists.

christina-gagnon-sp commented 2 months ago

Thanks for submitting this issue! It was confirmed that the expected behavior is upsert, and the documentation has been updated:

"By providing the account ID of an existing account in the request body, this API will function as a PATCH operation and update the account."