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

Create dataview - not setting owner properly #328

Open
lukkyluke opened this issue Jan 18, 2024 · 3 comments
Open

Create dataview - not setting owner properly #328

lukkyluke opened this issue Jan 18, 2024 · 3 comments

Comments

@lukkyluke
Copy link

URL of documentation issue

https://developer.adobe.com/cja-apis/docs/api/#tag/Dataviews-API/operation/createDataView

Description

When creating a dataview through CJA API the owner property is not set to the specified one in the request body.
Instead the owner seems to be set to the account that is used for authorization against the API.
However, PUT /data/dataviews/:dataViewId?expansion=name,owner with a specified owner in the request body works fine.

Steps for reproducing:
POST /data/dataviews?expansion=name,owner
with a defined owner (other than the account used for auth against the api) in the request body.
The owner is set to the account used for auth against the API

@johnwight
Copy link
Contributor

Thank you for submitting this issue. I will tag a developer to see if this is intended behavior. If so, I will update the documentation.

@johnwight
Copy link
Contributor

Hi @lukkyluke, Response from developer: "The owner used in the body is overridden by the user making the request. We don't allow a user to create a dataview for someone else. (We have other unexposed endpoints for that.)" I hope that helps. Thanks for using the API services.

@lukkyluke
Copy link
Author

lukkyluke commented Aug 5, 2024

Thanks for coming back to me @johnwight
Okay, I understand. However I don't get the logic why updating with a different owner should be allowed but not when creating.

In the case you want to stick to the current behavior, the documentation maybe should be updated so that the owner is not a part of the request object on POST (create)?

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