Answers.Body: <p>How about
  <a href="http://192.168.100.168:8166/?civiwp=CiviCRM&amp;q=civicrm/ajax/api4/Relationship/get" rel="nofollow noreferrer">http://192.168.100.168:8166/?civiwp=CiviCRM&amp;q=civicrm/ajax/api4/Relationship/get</a></p>
  <p>You can check the REST tab in API4 explorer for correct url</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-10-14T22:47:51.570Z
Answers.Text: Your URL didn't work. Please see my updated question, with an image of the REST tab,
Answers.UserDisplayName: Rafa Gomez
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-10-15T17:00:19.540Z
Answers.Text: Updated the url
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-10-14T22:43:56.913Z
Answers.LastActivityDate: 2022-10-15T16:59:48.173Z
Answers.LastEditDate: 2022-10-15T16:59:48.173Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>I am trying to write an external app with python, that should make a call to the CiviCRM's APIv4 to get a list of contacts &amp; relationships.</p>
  <p>I am using CiviCRM's with Wordpress and debian 11.</p>
  <p>Wordpress is installed under /var/www/wordpress</p>
  <p>I am having problems to find the correct base URL to make calls to the APIv4.</p>
  <p>I got it working with v3 using <code>http://192.168.100.168:8166/wp-content/plugins/civicrm/civicrm/extern/rest.php?entity=Relationship&amp;key={site_key}&amp;json=1&amp;debug=1&amp;version=3&amp;api_key={myApiKey}&amp;action=get</code></p>
  <p>If I try, like is said in the docs, to call <code>http://192.168.100.168:8166/civicrm/ajax/api4/Relationship/get</code> I get a <code>404 NotFound</code> error.</p>
  <p>Thats what I see in the REST tab in API Explorer 4</p>
  <p><a href="https://i.sstatic.net/IxsJd.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/IxsJd.png" alt="enter image description here" /></a></p>
  <p>How should I call the APIv4?</p>
  
Tags: <wordpress><api><apiv4>
Title: APIv4 Base URL for external applications
ThreadText: # APIv4 Base URL for external applications
  
  (Asked by: username_0 on 2022-10-14)
  
  I am trying to write an external app with python, that should make a call to the CiviCRM's APIv4 to get a list of contacts & relationships.
  
  I am using CiviCRM's with Wordpress and debian 11.
  
  Wordpress is installed under /var/www/wordpress
  
  I am having problems to find the correct base URL to make calls to the APIv4.
  
  I got it working with v3 using `http://192.168.100.168:8166/wp-content/plugins/civicrm/civicrm/extern/rest.php?entity=Relationship&key={site_key}&json=1&debug=1&version=3&api_key={myApiKey}&action=get`
  
  If I try, like is said in the docs, to call `http://192.168.100.168:8166/civicrm/ajax/api4/Relationship/get` I get a `404 NotFound` error.
  
  Thats what I see in the REST tab in API Explorer 4
  
  [![enter image description here](https://i.sstatic.net/IxsJd.png)](https://i.sstatic.net/IxsJd.png)
  
  How should I call the APIv4?
  
  **Tags:** wordpress, api, apiv4
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-10-14. Score: 1
  
  How about
  <http://192.168.100.168:8166/?civiwp=CiviCRM&q=civicrm/ajax/api4/Relationship/get>
  
  You can check the REST tab in API4 explorer for correct url
  
  > **Comments:**
  > **username_0**: Your URL didn't work. Please see my updated question, with an image of the REST tab,  
  > **username_1**: Updated the url  
  
  ---
  
  