Limit sharepoint search API results to some geo locations - sharepoint

In a multi geo environment I would like to execute a SharePoint REST API search and limit it to some geo locations only as described in the microsoft multi geo documentation. I have tried the GET as well as POST requests, but all settings in my MultiGeoSearchConfiguration are ignored, I am always getting the full result list from all geo locations.
What am I doing wrong here? Is it maybe the missing sourceId that I have now idea of where to find?
curl --location -g --request GET 'https://<mydev>.sharepoint.com/_api/search/query?querytext=%27test%27&ClientType=%27cb991e32-6ce4-4e98-a91b-4eea9a874962%27&Properties=%27EnableMultiGeoSearch:true,%20MultiGeoSearchConfiguration:[{DataLocation\:%22EUR%22\,Endpoint\:%22https\://<mydev>EUR.sharepoint.com%22}]%27' --header 'Accept: application/json' --header 'Authorization: Bearer ...'
(<mydev> is exchanged for my real sharepoint of course)

In your API request, you have the EnableMultiGeoSearch:true and according to the documentation provided, it mentions that if this parameter is set to true, "the query shall be fanned out to the indexes of other geo locations of the multi-geo tenant", have you tried setting this value to false?

Related

Google Reply to Reviews API only return results of last 7 days [duplicate]

Based on google documentation, I am calling the endpoint for fetching all reviews like here:
curl \
'https://androidpublisher.googleapis.com/androidpublisher/v3/applications/com.questionpro/reviews' \
--header 'Authorization: Bearer [myAccessToken] \
--header 'Accept: application/json' \
--compressed
but this endpoint returns an empty objec {}, like there is no review to fetch but there are:
Click here to see public reviews that I want to fetch
If you check the doucmenation for Retrieving a set of reviews you will find it states.
Which implies to me that you have no new reviews in the last week so that is why your getting an empty object. If you want all the reviews then your going to have to download the cvs file via play store. This can not be done via the api.

Continuous deployment gitlab

Line of my .gitlab-ci.yml
IID=$(curl --verbose --request GET --header "Content-Type: application/json" --header "PRIVATE-TOKEN: ${CI_PUSH_TOKEN}" ${APP_REPO_URL}/merge_requests?author_id=xxxxxxxx\&search=${CI_COMMIT_SHORT_SHA} | jq '.[0].iid')
output jq: error (at :0): Cannot index object with number
Please refer to the documentation on Merge requests API and How to use the API to construct a properly formed cURL request with GitLab API before piping the result into jq.
There are a few things going on with your query.
First of all, according to the documentation, the /merge_requests endpoint will
Get all merge requests the authenticated user has access to.
This means that APP_REPO_URL needs to be the GitLab instance URL followed by /api/v4 and not the URL of the specific project.
curl "https://gitlab.example.com/api/v4/merge_requests"
If you need all merge requests for a given project, then you can use
curl "https://gitlab.example.com/api/v4/projects/:id/merge_requests"
where :id is the id of your project. See more at List project merge requests
Then, the search attribute is expecting either a title or a description and not a commit SHA:
Search merge requests against their title and description

Get list of files name and path in whole google cloud with a particular file extension using NodeJS

I have a google cloud bucket which is having the files with the extension .jtl, I need to get these file names and paths irrespective of the nesting of folders they are in using NodeJS.
How can we do that!
I think this link might help you
https://cloud.devsite.corp.google.com/storage/docs/json_api/v1/objects/list
You can try this API, and give the preferred parameters present in that,
for example: in your case you can give delimiter as jtl, and then you can copy the curl command or http or node JS as you prefer and execute this in your google cloud platform
The command will look something like this:
curl
'https://storage.googleapis.com/storage/v1/b/xyz12345/o?delimiter=jpg&includeTrailingDelimiter=true&key=[YOUR_API_KEY]'
--header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]'
--header 'Accept: application/json'
--compressed
Provide your API key and Access token to be able to run this in your google cloud platform.

Get programmingLanguage and topic for Github repo via API

How can I get the repo-language and topic for a Github Repo through the REST API. I looked at the documentation under - https://developer.github.com/v3/ , but could not get an answer.
Just found one way to do the search for topics as follows. Of course it needs a custom media type at moment.
From the documentation:
curl -H "Authentication: token TOKEN" \
-H "Accept: application/vnd.github.mercy-preview+json" \
https://api.github.com/search/repositories?q=topic:ruby+topic:rails
For the language, it is simply the URL like :
https://api.github.com/repos/postgres/pgadmin4/languages

Azure: Parameter 'requestid' value is invalid

I'm trying to use the Microsoft Speech API as documented here: https://www.microsoft.com/cognitive-services/en-us/Speech-api/documentation/GetStarted/GetStarted-cURL
I have a key and I authenticate fine. When I try to use the service I get this error:
Parameter 'requestid' value '1234844532343434' is invalid.
I've tried different types of numbers and strings with no luck. What format is Azure looking for in requestid?
My test script looks like this:
token="..."
requestid="1234844532343434"
curl -v -X POST "https://speech.platform.bing.com/recognize?scenarios=smd&appid=D4D52672-91D7-4C74-8AD8-42B1D98141A5&locale=your_locale&device.os=your_device_os&version=3.0&format=json&instanceid=your_instance_id&requestid=${requestid}" -H "Authorization: Bearer ${token}" -H 'Content-type: audio/wav; codec="audio/pcm"; samplerate=16000' --data-binary #man1_nb.wav
Based on the documentation here, the requestid parameter's value should be a GUID.
Please try using that.

Resources