Is it possible to list contacts filtered by owner's ID using Mautic REST API? - mautic

Looking at the Mautic Developer Documentation:
https://developer.mautic.org/#list-contacts
It appears there's a search query parameter to filter the result set. Is it possible to specify which attribute and value to filter against?
I'm certain there are contacts own by a user with ID=3 and tried a few ways to pass the name value pair into the search parameter without success:
http:///api/contacts?search=owner.id:3
http:///api/contacts?search=owner_id:3
http:///api/contacts?search=owner.id%3D3
Both scenario return empty dataset. I also try just putting in the owner's username in the search parameter. That also yields no results. Are there a list of attributes the search parameter work against?

To do the owner filter, use
[mauticURL]/api/contacts?search=owner:[ownername]

Related

Getting Groups with Guests via Graph

I'm trying to retrieve a list of Microsoft 365 Groups that have guest members via Graph.
I can get a full list of groups and then filter client-side, but the documentation says that the "members" property is queryable in the $filter clause, so I thought I'd be able to do something like this:
/beta/groups?$filter=members/any(x:x/userType eq 'Guest')
However, this is returning the following error:
Property 'members' does not exist as a declared property or extension property
Has anyone managed to pull this off? Or can someone confirm that it's not possible to filter a list of groups based on its members? Is there any way to do this without filtering client side?
Thanks!
Answering my own question, as I've heard from the PM in charge of this part of Graph.
https://twitter.com/merill/status/1550312453111955456?s=20&t=i9RNt7-E2fXNCSoDxESO4w
Unfortunately member is not available as a filter option for the group object so you will need to manually query each group.
Hopefully this gets added at some point, but for now I'm going to have to get the full list of groups and filter client-side.

How to filter with any field values in Object in Firebase console?

I have tried to filter the field from the object from the Firestore console but there is no option to filter that with the object.
If we have a list then we have the option with array-contains in Add Condition.
For Ex: I need to filter with name field from object,
You can put the fully qualified field name in the filter field. So in this case, you'd use TempObj.name to get the filtering you want.

How do we use select inside an expanded collection on Microsoft Graph?

Following query in MS Graph Explorer displays signed-in user's profile and its manager Diego Siciliani
https://graph.microsoft.com/v1.0/me?$expand=manager
But you may notice in the response it is returning tons of attributes of manager object, as well. Some of these attributes are objects (such as assignedPlans) themselves and have their own attributes, as well.
Question: How can we filter the above query so it returns user profile (that it is already doing) along with ONLY the following attirbute value the user's manager: "displayName": "Diego Siciliani"
Remark: Following query returns the error shown below: https://graph.microsoft.com/v1.0/me?$expand=manager($select=displayName)
Invalid $select properties
Please use the below query to get user and his manager details
https://graph.microsoft.com/v1.0/users/userid?$expand=manager($levels=max;$select=id,displayName)&$select=id,displayName&$count=true
ConsistencyLevel eventual
Update https://graph.microsoft.com/v1.0/me?$expand=manager($levels=max;$select=displayName)&$count=true
It is known issue from Microsoft that nested $select combined with $expand doesn't work (i.e. $expand=some_path($select=some_field) does not work with Microsoft Graph API).
See: https://learn.microsoft.com/en-us/graph/known-issues#query-parameter-limitations
$expand:
No support for nextLink
No support for more than 1 level of expand
No support with extra parameters ($filter, $select)
I wish they would implement it because right now we either have to pull a lot of extra data (e.g. for managers), or we have to make a lot of requests per user to retrieve just the field we want.
There's a solution that deal with batch requesting but it requires a json solution: https://learn.microsoft.com/en-us/graph/json-batching?view=graph-rest-1.0

ADF - Odata - How to perform an optional select

I've created an ADF flow that loops over URL's to fetch OData using the OData connection.
However, not all fields are available in all URL's, there are certain ones that are available in one URL, but not in the other. A $Select is used to select the fields that we need.
Is it possible to have an optional selection (as in, if the path is not available, do not fetch this field and return null instead for instance)? Would help us a great deal.
I've tried adding ? after the field, but that does not work. $select=Field1,Field2,FieldOptional?
Thanks
As I understand you are trying to loop through a bunch of a URL and the query on the ODATA URL will change and so will be the fields . I think you can use a lookup where you pass the unique url and its gives the fields and then concatenate the url with the fields and make a odata call .

APIs not returning custom field

for our scopes we need to use unique ID generated by us for the answers submitted by users. This is possible by adding "?c=" at the end of the survey link followed by the ID number.
Example Format: http://www.surveymonkey.com/s/XXXXX?c=00001
The terrific problem is that the custom value is not returned anyway via API. It is not added as a property of the Answer object neither its value replaces somehow the respondant_id property.
We see that you are able to expose that data from your internal endpoints that you use for your proprietary web interface but how to get this data from he outside via API?
Thanks
When you call 'get_respondent_list', ensure you pass through 'custom_id' in the list of strings in the 'fields' parameter. This will then be returned in the output with the custom value you entered.

Resources