braze-inc / braze-docs

The Braze Docs repository.
https://www.braze.com/docs
Other
4 stars 1 forks source link

Canvas Data Series Analytics Endpoint #1985

Closed jayfunk closed 3 years ago

jayfunk commented 3 years ago

@Timothy-Kim

Submit an Issue

Describe the Problem: Documentation for https://www.braze.com/docs/api/endpoints/export/canvas/get_canvas_analytics specifies that a canvas_id is to be supplied. The example request uses a campaign_id:

curl --location --request GET 'https://rest.iad-01.braze.com/sends/data_series?campaign_id=3bbc4555-8fa0-4c9b-a5c0-4505edf3e064&send_id=3456789&length=30&ending_at=2014-12-10T23:59:59-05:00' \
--header 'Authorization: Bearer YOUR_REST_API_KEY'

and when calling the endpoint with a canvas_id as specified results in this error:

{
    "message": "campaign_id must be a string of the campaign api identifier"
}

Related Links, Resources, Code Samples, and Images:

Is this change associated with a Braze feature/product/SDK release?

If yes, please note the date of the feature release.



Before Your Submit Checklist - [x] Fill out the relevant items under __Submit an Issue__ above. - [x] [Label](https://github.com/Appboy/braze-docs/issues/labels) this issue. - [x] Assign this issue to either yourself, the Braze Technical Writers ( #@Timothy-Kim and @KellieHawks), or to another appropriate person. _If you do not assign anyone to an issue, your issue may be closed or left uncompleted._


jayfunk commented 3 years ago

Issue turned out to only be a documentation issue. Submitting a PR to fix the documentation.

Samalmohanna1 commented 2 years ago

@jayfunk Could you share what was wrong in the documentation please. Currently having a similar issue that results in the same error message.

ivandjuricic commented 2 years ago

Hi, I've encountered similar issue with campaign details.

When I make request like by following the official documentation:

curl --location -g --request GET 'https://{{ base_url}}/campaigns/details?campaign_id=6545486b-63e5-461c-bbfa-08bddf396c2e \
--header 'Authorization: Bearer YOUR-REST-API-KEY'

I get back the message:

{
    "message": "campaign_id must be a string of the object api identifier"
}

I've also used a Postman collection with changed parameters and still got the same response.

Am I missing something and how to make a proper API request for campaign details?

KellieHawks commented 2 years ago

Hey @ivandjuricic, I just tested the endpoint in Postman, and it works for me. My best guess is your campaign identifier is input incorrectly. Ensure you are using Campaign API Identifier and not the individual variant API identifiers. If this is still not working, feel free to reach out to support. They would be more than happy to look into this for you!

-The Braze docs team

Screen Shot 2022-06-27 at 11 10 35 AM