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

API Configuration #666

Closed
kumar-harshvardhan opened this issue Jul 27, 2020 · 1 comment
Closed

API Configuration #666

kumar-harshvardhan opened this issue Jul 27, 2020 · 1 comment
Labels
invalid Not enough info in issue.

Comments

@kumar-harshvardhan
Copy link

Description
I want to use the REST API to get the data, but the example you have provided is not working.

Example

I have included the code which is mentioned on the portal inside /owa/api/index.php

$params = array('request_method' => "GET",
'module' => "base",
'version' => "v1",
'do' => "reports",
'metrics' => "visitDuration,bounces,repeatVisitors,newVisitors,visits,pageViews",
'dimensions' => "date,browserType",
'constraints' => "browserType=Firefox 3.5",
'startDate' => "20100312",
'endDate' => "20100331",
'sort' => "date-,browserType",
'limit' => 10,
'siteId' => "site id");
$result_set = owa_coreAPI::executeApiCommand($params);

But not getting any result. can anybody help me to solve the issue and steps to use the REST API using PHP script. The example which is given by you is not sufficient.

@kumar-harshvardhan kumar-harshvardhan added the enhancement New feature or enhancement label Jul 27, 2020
@padams padams added invalid Not enough info in issue. and removed enhancement New feature or enhancement labels Sep 16, 2020
@padams
Copy link
Collaborator

padams commented Sep 16, 2020

This is not an enhancement, If you are having problems wit the API, you need to turn on development logging (see the troubleshooting guide) and pinpoint the query that is not returning expected results or any errors you find. It is impossible to help without that as no one can see what's in your database.

Thats said 'siteId' => "site id" is an obvious error. You need a proper siteId for any query to work.

@padams padams closed this as completed Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid Not enough info in issue.
Projects
None yet
Development

No branches or pull requests

2 participants