Adobe APi with python | Community
Skip to main content
vincei52755720
New Participant
November 1, 2017
Solved

Adobe APi with python

  • November 1, 2017
  • 4 replies
  • 10810 views

Hi,

I am running the following python code to get a list of Evars using the Adobe API but i receive an error:

{"error":"Bad Request","error_description":"No report suites defined.","error_uri":null}

payload={"X-WSSE: UsernameToken Username":"myusername", "PasswordDigest":"UhMNI+kV2N1llpgm7xPmtvMtu90", "Nonce":"a8c1005f41f646d196a6a8785061729b", "Created":"2017-11-01T09:39:30.071848Z"}


data= { "rsid_list":[

        "myreportsuiteid"

         ]}
r = requests.post('https://api.omniture.com/admin/1.4/rest/?method=ReportSuite.GetEvars',headers=payload, data=data)

status= r.status_code

print(r.text)

How do you pass the rsid to the post request?

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by jhammons-1

Make sure you are escaping your data variable correctly:

data = """{ \"rsid_list\":[

        \"myreportsuiteid\"

         ]}"""

Also, you should take a look at this wrapper library: GitHub - dancingcactus/python-omniture: A high-level Python wrapper for the Adobe Omniture API.

This library should save you some effort, there are several good examples in that repo.

cathyw49544988,

The Analytics REST API reference is available at Developer Connection | Adobe Developer Connection

4 replies

jhammons-1Accepted solution
Employee
November 7, 2017

Make sure you are escaping your data variable correctly:

data = """{ \"rsid_list\":[

        \"myreportsuiteid\"

         ]}"""

Also, you should take a look at this wrapper library: GitHub - dancingcactus/python-omniture: A high-level Python wrapper for the Adobe Omniture API.

This library should save you some effort, there are several good examples in that repo.

cathyw49544988,

The Analytics REST API reference is available at Developer Connection | Adobe Developer Connection

cathyw49544988
New Participant
November 2, 2017

I know in general how to use API with python, I am wondering do you know any document for Adobe API?

Thanks

vincei52755720
New Participant
November 2, 2017

not really but the requests library can get you started. Using the Requests Library in Python

Hope that helps

cathyw49544988
New Participant
November 2, 2017

I have interest in using API with python. Do you know any good training video or document can jumpstart me?

Thanks