Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [rest]

The tag has no usage guidance.

1
vote
1answer
287 views

REST API call & endpoint

Our organisation has an ios/android app and would like to receive donation thru the app. Developer requires details of REST webserver endpoint of our civicrm to receive & post contact/contribution ...
1
vote
1answer
41 views

CiviCRM 5.12.0 - Case API returning an Analyzer object containing XML and JSON. Only want JSON

I had a working script set up to create cases in CiviCRM using REST.https://domain.com/administrator/components/com_civicrm/civicrm/extern/rest.php?entity=Case&action=create&json=1&version=...
2
votes
2answers
40 views

POST format for a chained create

when I try to chain commands in the content body of a POST, the contact is created fine, but the chained address is not created. I am not OK with passing sensitive donor information as parameters in ...
1
vote
1answer
60 views

Is there a problem with the REST interface on CiviCRM API?

I have the CiviCRM API REST interface working fine for retrieving Case information for individual cases. But I'd like to use the options features options.limit and options.offset so I can retrieve ...
1
vote
0answers
43 views

Chaining Participants creation using REST API

I'm trying to create an event and chain the participants creation using the REST API from python. My attempt goes like this: import requests params = { "key": "key", "api_key": "apikey", "json": ...
0
votes
1answer
31 views

Api doesn't update record vu creates new

I have a civicrm-application that gets updates trough an external rest-api call. But there's something odd happening. Request: ``` api_key=76d9f1d3h4c87c2465a8a305b6fe&key=...
2
votes
2answers
42 views

Python Civicrm API Keeps Giving 404 Error

I'm trying to use the Python Civicrm API located here: https://github.com/tallus/python-civicrm . I can connect to the site just fine, but anytime I try to query any of the content I get a 404 Error ...
0
votes
1answer
38 views

Subscribe to mailing list through the API

I am trying to subscribe a user to a mailing list through the REST API. I understand that I need to create a Contact first, then subscribe it to a given mailing list. While I can create the contact, I ...
0
votes
1answer
108 views

“API permission check failed” for admin user

(I'm using version 4.7 based on Wordpress) When making a REST api call to retrieve a ContributionPage instance, the response tells me that I "require administer CiviCRM". However, the API key is ...
3
votes
1answer
60 views

REST API 'between' parameters

I'm trying to make an external REST API call to rest.php. I was getting "Unable to decode supplied JSON", but then I figured out I could take the values I was stuffing into json (from the API ...
1
vote
1answer
400 views

Rest api's Give a 302 found and redirects to Login Page

http://crmqa.org/sites/crmqa.org/modules/civicrm/extern/rest.php?json=1&entity=pax&action=fetchAddressDetails&api_key=apikeyofcontact&key=sitekey When I call this through ajax and ...
3
votes
3answers
305 views

How to connect to REST API from remote host?

I'm trying to connect to the rest api from a remote server, and the only response I ever get back is: var jsondata = {"currencySymbol":"$","is_error":true}; I'm able to make api calls from the site'...
0
votes
2answers
164 views

CiviCRM REST API Call

I'm new to CiviCRM and REST API Calls. I'm attempting to create a new contact using POST via Postman. I'm submitting the following: http://www.mysite.com/wp-content/plugins/civicrm/civicrm/extern/...
3
votes
1answer
133 views

Trying REST but get PHP Fatal error: Class 'JObject' not found in

I need make a query on civicrm project in joomla from REST. However, when I try: http://localhost/joomla/administrator/components/com_civicrm/civicrm/extern/rest.php?entity=Contact&action=get&...
0
votes
2answers
45 views

Help needed in setting up rest api in CIVI CRM

I tried below steps but I am getting an error in calling rest API via the browser. I checked which user is an administrator and added api key via phpmyadmin interface. Get the site key from CiviCRM ...
1
vote
1answer
108 views

REST API - json and chaining issues

I am having two issues w/ the REST api via curl. 1) API is ignoring json attribute. If I do not urlencode, I get a "Unable to decode supplied JSON" return msg. When I do encode, as shown below, I ...
1
vote
2answers
139 views

Sparkpost Cividesk integration - processing of bounces

I have installed the Cividesk Sparkpost extension and am able to send mass mailings with CiviMail via my Sparkpost account (REST API). However, CiviCRM apparently doesn't process bounces. Would I ...
2
votes
1answer
166 views

AJAX API permissions

We are using REST urls to pull data direct from Civi reports into Excel for analysis purposes. Within Civi the users are restricted via granular ACLs to specific groups of contacts. WP role ...
1
vote
1answer
117 views

Bulk Update Participant Status via REST API

I am trying to find a way to bulk update participants' status via the REST api. I could only think of using the API chaining method. I tried to do a for loop to update individually but I got random ...
1
vote
1answer
147 views

API - Create a contact from an external site

I have the need to create/update a contact from an external site. If I understand correctly, the only way to do this is to use Rest API. In my test I had no problem to read the database, but when ...
1
vote
1answer
34 views

Suspected external REST API not updating Drupal entities

We're trying to push a Civi contact's data into an LDAP data store using the Civi Drupal entity module and the Drupal ldap module. That part works fine. If a user updates their contact card using a ...
3
votes
2answers
136 views

CiviCRM REST API query doesn't return all fields of a 'Report'

I have been trying to retrieve reports based on default report templates through REST API calls. But the fields returned for each report instance is not same as what it is supposed to according to a ...
1
vote
1answer
105 views

Get the “Smart” group of a user id via REST

We've created so called 'smart' groups in civicrm, and we need to know if a certrain user belongs to this group. I can get the groups of a user with the following code: http://url.com/sites/all/...
6
votes
2answers
2k views

How do I set up an API key for a user?

The current documentation for creating an API key for user is on the wiki at https://wiki.civicrm.org/confluence/display/CRMDOC/REST+interface#RESTinterface-CreatingAPIkeysforusers. Unfortunately ...
5
votes
2answers
1k views

Get CSV via REST?

Is there a way to get CSV-formatted output via a REST call? We have a 3rd-party app that can import data periodically from a URL pointing to a CSV file, so the aim is to provide it with a Civi URL (...
1
vote
0answers
53 views

Looking for the best way to re-create the contribution page form using the REST API

I'm pretty new with CiviCRM but not with integrating API's in general. I'm looking to re-create a contribution form using only the REST API. Is this even possible? I had started looking around the ...
1
vote
0answers
100 views

REST API issue with chained call

Having a horrible time trying to get api.Contact.get into the URL. The api explorer always puts into a &json{} array. api.Contact.get is an empty array and that defeats most other ways of ...
7
votes
2answers
636 views

REST API: Unable to decode supplied JSON

REST API works, but I cannot pass json parameter to it, getting "Unable to decode supplied JSON". I am running CiviCRM 4.6.8 on Wordpress. I have properly identified SITE KEY and API KEY, and I can ...
2
votes
1answer
233 views

Security of REST API keys

This OWASP document suggests that API keys for REST APIs should be passed as a POST parameter or a cookie. Not a GET parameter, because they can appear in the server logs. Elsewhere they suggest that ...
0
votes
1answer
94 views

REST error message saying request modifies the database, but it doesn't

We're having our custom dashboard that our members log into rewritten by an outsourced agency. It is being done with Angular and will use REST to call the API. We have a particular custom API call ...
0
votes
2answers
37 views

Placing RESTful calls to the CiViCRM demo

I do not wish to go down the road of installing the CiViCrm CRM but I do have a requirement to place REST calls to the API. Ideally I would like to do this (for simplicity) against the public ...
11
votes
3answers
438 views

Get or generate a contact checksum via API?

Is there a way to view or generate a Contact's checksum via the REST API? I'm looking to use the checksum to provide relevant form links, etc., but need to get it programmatically on a Contact ...
4
votes
2answers
138 views

REST API and ACLs - should the API return contacts made accessible via an ACL?

My REST API call returns data fine as long as the user has 'view all contacts' permission. But if I turn that off and instead grant the user access to a particular group via an ACL, I get nothing. I'...
2
votes
1answer
271 views

Update contact via REST and JSON request body

We are trying to update a contact via REST API. But instead of submitting the changed values as seperate post parameters (e.g. "nick_name") http://d46.demo.civicrm.org/sites/all/modules/civicrm/...
3
votes
2answers
203 views

How to fetch CiViCRM events externally [ Drupal 7]

I'm new to CiViCRM. I want to fetch events which are created in CiViCRM which is hosted on another server. So basically I want to fetch CiViCRM data from one individual site to my site. I don't know ...
1
vote
1answer
143 views

How to fetch CiViCRM events externally [ Drupal 7] [duplicate]

I'm new to CiViCRM. I want to fetch events which are created in CiViCRM which is hosted on another server. So basically I want to fetch CiViCRM data from one individual site to my site. I don't know ...
4
votes
1answer
151 views

REST API - setting an activity's custom fields

How do I set a custom field value for an Activity via the REST API? I can create an activity on a contact. I am looking to set a value for a custom field within that activity as well. For ...
5
votes
2answers
360 views

How do I get a chained restful API call to return xml?

This query string will return a contact record and related phone records for Contact ID 1234 in json format: entity=Contact&action=get&json={"contact_id":"1234","api.Phone.get":{}} How do I ...
7
votes
2answers
124 views

How is the restful API secured?

In order to access the API securely what do I need to do? Is it as simple as using https and letting my CMS manage session authentication?