2

I've been looking at the API explorer for a while. It's a great idea: the API is poorly documented, but this would be a perfect sort of live documentation. but I never got it to work.

I can choose an entity and an action. But add parameter, add option and chain api call dont do anything. The labels 'name','operator' and 'value' are hanging there with question marks and helptext. 'operator' says 'Choose an operator from the list', but there is no list.

I can execute, but I get a very generic call without parameters. I get no javascript errors. I have this on multiple Drupal 7 installations - looking at CiviCRM 4.5.3 now.

Everyone seems to be happily using it...

  • Interesting that there are no errors, as it sounds like a JavaScript problem. Can you edit your question to include CMS type and version as well? – Nicholai May 18 '15 at 12:55
  • As said, various installations, but always Drupal. Now Drupal 7.33 – commonpike May 18 '15 at 13:41
  • Is the CiviCRM Admin theme set to Seven or a different theme? Do your different installations have the same modules? Or have you already eliminated themes and modules as the cause? – Nicholai May 18 '15 at 14:01
  • Good point .. I've always used Seven in Civi, and using Adminimal on top of it now. No I havent eliminated modules and themes. – commonpike May 18 '15 at 14:20
  • For the record: it has been working for me, the OP, since Civi 4.6. – commonpike Aug 3 '17 at 21:37
1

This sounds like a javascript problem to me. Try the steps for troubleshooting javascript in CiviCRM.

You can also compare the explorer on your site to the one on the drupal demo and see if you can glean any clues from those differences (ignoring the one unrelated difference that the demo is running 4.6 and you are using 4.5)

  • Did that. Stacktrace, debugging, console, no errors, nothing. Resource urls are ok. Tried without and with www, no difference. Its not doing any ajax requests at all, so none are failing. – commonpike May 20 '15 at 10:57
0

We all are happily using it :-) You do not always need a name, value or operator. I guess it will help if you read the API introduction here: http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API I assume it will answer your questions....if not shout again?

  • I know the api .. I use it. In order to explore it, I usually test with php, because there is little documentation. You do not always need a name, value or operator .. no but i often want to find out what names, values and operators there are .. like, explore them :-) There are three things clearly buttons on that page, I can click but nothing happens. – commonpike May 18 '15 at 11:04
0

You can add the parameters to the API explorer, and the 'name', 'operator', 'value' are the column headings? See screen print attached (I reckon you get the picture even if it is in Dutch) enter image description here

  • I'm dutch :-) Yes, the screenshot is what I would expect. I see exactly this, but without the 'uitvoervelden' and the parameter dropdowns. I would epxect to click on 'Add parameter' to get such a dropdown, but that link has never done a thing. – commonpike May 18 '15 at 13:39
  • To be exact, in the api-params-table table, the tbody is empty and stays empty. – commonpike May 18 '15 at 14:23
  • If I click on the 'Add Parameter' I get the possibility to enter stuff. The same happens on the demo site d46.demo.civicrm.org/civicrm/api/explorer#explorer. I sincerely have no idea why it would not do anything for you? Have you tried it in a different theme? – ErikH - CiviCooP May 18 '15 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.