How to $filter attachments list endpoint by isInline? - outlook-addin

I'm developing OWA add-in using OWA REST API
I'm not able to get the filtered result when fetch the attachment list with $filter=inlinImage eq true for example:
https://outlook.office.com/api/v2.0/me/messages/{id}/attachments?$filter=IsInline%20eq%20true
or
https://graph.microsoft.com/v1.0/me/messages/{id}/attachments?$filter=IsInline%20eq%20true
knowing that is says in the resource reference that isInline is Filterable, and I got the response 200 when doing the requests above but the without filtering the data by that query params
Is this an expected behaviour? how can I get this data otherwise?

this may be of help to someone looking for help filtering attachments from ms graph endpoint.
https://learn.microsoft.com/en-us/graph/known-issues
$filter:
/attachments endpoint does not support filters. If present, the $filter parameter is ignored.

Related

Acumatica - Filter Generic Inquiry via REST

Trying to use this Generic Inquiry's REST API, I am able to retrieve all records though would like to filter them.
Can retrieve all data with PUT {{baseUrl}}/RawDataForReport?$expand=Result with an empty body request.
When I added a field Period to filter it's only showing the first row.
An empty request body also shows the first row when I added Period.
I am not at all familiar Acumatica any useful resources would be greatly appreciated.
To filter the Generic Inquiry result with REST API you need to add the filtering parameter to the GI itself. For instancce, you have your period filter defined in the Generic Inquiry. You can define more filters the same way.
You can learn about designing GIs here: https://openuni.acumatica.com/courses/reporting/s130-inquiries-reports-and-dashboards/
Another option would be to use OData instead of REST API. in that case you would be able to use $filter parameter to filter data.
You can read more about it here:
https://help-2020r2.acumatica.com/Help?ScreenId=ShowWiki&pageid=36beb9aa-f04d-4f63-a93b-a00b1c315be0
https://help-2020r2.acumatica.com/Help?ScreenId=ShowWiki&pageid=5d97a93d-45e0-466e-ba5e-77e1ccf96643
I've been struggling to find a solution to the same problem.
I just figured it out with the help of this stack overflow post.
Acumatica run Generic Inquiry via REST API
Take a look at the last response (not the accepted answer).
Basically when you define your object in the Web Service Endpoint screen, you can define the filters (Use Populate -> Filters). these are the Parameters for the GI.
You define the results the same as you have it.
Then in your PUT request body pass the parameters.
Example:
{
"Param1": {
"Value": "Value1"
},
"Param2": {
"Value": "Value2"
}
I just tested this with Postman, and it works well.

What is the proper way to format a GET request to retrieve all media items of the Instagram user "self"?

Looking at https://www.instagram.com/developer/endpoints/users/ I have gathered that calling https://api.instagram.com/v1/users/self/media/recent/?access_token=ACCESS-TOKEN will return "the most recent media published by the owner of the access_token."
In sandbox mode I understand that I will receive a maximum of 20 media items from this call. I also realize that the response code has a pagination object that I can use to retrieve up to 20 more media items (see below)
"pagination": {
"next_max_tag_id": "1387272337517",
"deprecation_warning": "next_max_id and min_id are deprecated for this endpoint; use min_tag_id and max_tag_id instead",
"next_max_id": "1387272337517",
"next_min_id": "1387272345517",
"min_tag_id": "1387272345517",
"next_url": "https://api.instagram.com/v1/tags/cats/media/recent?access_token=xxx&max_tag_id=1387272337517"
}
These are the listed parameters of this Request.
PARAMETERS
ACCESS_TOKEN A valid access token.
MAX_ID Return media earlier than this max_id.
MIN_ID Return media later than this min_id.
COUNT Count of media to return.
My question is: Is there a way to structure my GET request in a way that returns all media items from a single call? I understand that this is not possible in sandbox mode, given a user with more than 20 media items. If possible please provide a detailed explanation of the COUNT parameter.
I imagine a possible GET request would look like https://api.instagram.com/v1/users/self/media/recent/?access_token=ACCESS-TOKEN?COUNT=X
Thank you. <3
When you go live mode you can use the count= param to get more than 20 in one API call, however I have noticed that count=33 is the maximum you can get for this API call, even if you anything more than 33, it only returns 33.
You still have to use the pagination in JSON response to get the next set of media items, easiest way is to use the pagination.next_url to make API call and get next set of media items

What input is the API expecting?

I need to use this API : https://adresse.data.gouv.fr/api/
and i want to know how can i know the input is this API expecting.
The api you need to request to is
http://api-adresse.data.gouv.fr/search/
If you want to do a full text search you have to pass in a q request param in the url like
http://api-adresse.data.gouv.fr/search/?q=YOUR_TEXT
If you want to limit the response from the api call to 10 records, you can use limit param
http://api-adresse.data.gouv.fr/search/?q=YOUR_TEXT&limit=10
Go through the documents to see a complete list of input params that can be passed in the api call.
You can use Postman in order to run or test api.

scraping results not limited according to the passed parameters - kimonolabs

i've tried to add the parameters "kimoffset" and "kimlimit" to the source url of my api, but this doesn't limit and/or shift the scraped results
my api's source url:
http://www.tripadvisor.com/Hotels-g187791-Rome_Lazio-Hotels.html?kimlimit=10&kimoffset=100
are these parameter used for this?
why doesn't work?
the results in data preview area are always the same
For some reason the server is ignoring your query string kimlimit=10&kimoffset=100.

Is there a limit to start option in google custom api CSE list?

using google custom API, I have a problem when I try to get results of more than 100.
I got an error as shown below. The code I am using is below:
res = service.cse().list(
q='lectures',
cx='my custom search engine id',
num=10,
start=100,
).execute()
I want to extract several pages every day.I got this error.
HttpError 400 when requesting .. "Invalid Value">
if I make the start=90 or less it works!
From the documentation for the Google Custom Search API:
https://developers.google.com/custom-search/v1/using_rest
This role is not present if the current results are the last page.
Note: This API returns up to the first 100 results only.