analytics-1.4-apis icon indicating copy to clipboard operation
analytics-1.4-apis copied to clipboard

Unable to upsert and event with "visibility": "2"

Open stewartschillingsdi opened this issue 4 years ago • 5 comments

https://api.omniture.com/admin/1.4/rest/?method=ReportSuite.GetEvents will return "visibility": "2" for events that have been set to the visibility of "Builders" in the RS Admin UI. For example: [ { "rsid": "ageo1xxpnw.orbital.dev", "site_title": "Orbital Provisions Dev", "ecommerce_level": "enabled", "events": [ { "id": "event1", "name": "Registrations", "description": "", "type": "counter_no_subrelations", "default_metric": false, "participation": "disabled", "serialization": "always_record", "polarity": "positive", "visibility": "2" }, { "id": "event2", "name": "Custom 2", "description": "", "type": "counter_no_subrelations", "default_metric": false, "participation": "disabled", "serialization": "always_record", "polarity": "positive", "visibility": "hidden" }, { "id": "event3", "name": "Product Views Custom (e3)", "description": "Instance of the Product View being set. Occurs when the product detail page is viewed.", "type": "counter", "default_metric": false, "participation": "disabled", "serialization": "always_record", "polarity": "positive", "visibility": "everywhere" }, ...

HOWEVER, posting to https://api.omniture.com/admin/1.4/rest/?method=ReportSuite.SaveEvents with "visibility" set to "2" gives a 400 error with { "error": "Bad Request", "error_description": "invalid visibility option for event", "error_uri": null }

stewartschillingsdi avatar Jul 20 '20 22:07 stewartschillingsdi

Having the exact same issue here @stewartschillingsdi ... Would be great to know what value can be passed to set up a Builder event.

lluis-sdi avatar Jul 21 '20 14:07 lluis-sdi

I haven't had time to look really closely at this or test it out, but that field may be expecting the string id. 'hidden' 'builder_only' 'everywhere' I hope that helps.

nateprice7 avatar Jul 21 '20 15:07 nateprice7

Thanks @nateprice7, that made the trick!

lluis-sdi avatar Jul 21 '20 15:07 lluis-sdi

@nateprice7 https://github.com/nateprice7, Do you expect that a fix will go in that will cause the list and fetch API operations to return 'builder_only' instead of '2'?

We're just trying to figure out how we need to handle the situation in our code.

Thanks, -Stew

On Tue, Jul 21, 2020 at 10:43 AM lluis-sdi [email protected] wrote:

Thanks @nateprice7 https://github.com/nateprice7, that made the trick!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AdobeDocs/analytics-1.4-apis/issues/87#issuecomment-661939158, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFPAYSUUTWRQYWJY6QAIS4TR4WZTDANCNFSM4PC3DL3A .

stewartschillingsdi avatar Jul 21 '20 16:07 stewartschillingsdi

I don't think that we will be updating this area in the 1.4 APIs since we don't want to break existing implementations. The team has been making progress on the 2.0 endpoints for managing variables and that will be the area where we should be able to fix these types of issues and make things more consistent..

nateprice7 avatar Jul 21 '20 16:07 nateprice7

Better late than never:

As @nateprice7 indicated, do not expect updates to the 1.4 API's. However, I added verbatim to the docs to explain that GetEvents incorrectly return 2 instead of builder_only.

ridmaur avatar Oct 21 '23 08:10 ridmaur