How to retrieve only spreadsheet title from google sheets v4 api - google-sheets-api

I am looking for an example of how to retrieve only the title of the spreadsheet for a given spreadsheetId using GET and no client library.

I found the answer.
fields=properties/title
E.g. https://sheets.googleapis.com/v4/spreadsheets/[spreadsheetId]?fields=properties%2Ftitle

Related

Add Quillbot API to Google Sheets

I have just discovered GPT-3 and found Quillbot website. I got suscribed, but I want to add their paraphrase function into Google Sheets.
I found that Google Sheets has a section where you can add functions via API. In order to apply this actions in bulk.
When you have a Quillbot premium account, you get an Api.
I have been searching if there is already something done. But I have not found it. Just this: https://rapidapi.com/quillbotapi-quillbotapi-default/api/quillbot-paraphraser
Can someone please help me to do this function in Google Sheets?
Thank you very much.

How to retrieve a document from Sharepoint API when only the document id is known?

I'm using Sharepoint v1.0 API and want to retrieve a file by it's document id. I can't find any documentation on how to retrieve a file this way. If I use the URL:
https://xxxxxxxx.sharepoint.com/sites/xxxxxxx/_layouts/15/DocIdRedir.aspx?ID=MLVDK4UWQQ8B-763006743-3089
The response is a 401 so direct calls don't work. I can query the API but I don't know how to translate the above URL to an URL I can use with that API. The URL should be something like:
https://xxxxxxxx.sharepoint.com/sites/xxxxxxx/_api/
What is the correct way to retrieve the document using the API? I've tried:
https://xxxxxxxx.sharepoint.com/sites/xxxxxxx/_api/search/query?refinementfilters=DlcDocId:equals("MLVDK4UWQQ8B-763006743-3089")
https://xxxxxxxx.sharepoint.com/sites/xxxxxxx/_api/search/query?DlcDocId='MLVDK4UWQQ8B-763006743-3089'
https://xxxxxxxx.sharepoint.com/sites/xxxxxxx/_api/Web/GetFolderByServerRelativeUrl('Shared
Documents')/Files
https://xxxxxxxx.sharepoint.com/sites/xxxxxxx/_api/Web/GetFileByServerRelativeUrl('_layouts/15/DocIdRedir.aspx?ID=MLVDK4UWQQ8B-763006743-3089')/Versions
Try to use DocId=MLVDK4UWQQ8B-763006743-3089 in search rest api:
https://xxxxxxxx.sharepoint.com/sites/xxxxxxx/_api/search/query?querytext='DocId=MLVDK4UWQQ8B-763006743-3089'
Reference:
Search By Document ID In SharePoint 2013
I know that is not an official API endpoint you are maybe looking for but if you want to download the document with SharePoint url you may try to use the download.aspx like
https://xxxxxxx.sharepoint.com/sites/xxxxx/_layouts/15/download.aspx?UniqueId=MLVDK4UWQQ8B-763006743-3089
I hope this will be of any help

Clone Google spreadsheet using Google sheets V4 and give access to teammates

I'm Using Google.Apis.Sheets.v4 from my Java project and accessing it using service account. I'm trying to duplicate a spreadsheet to create new one with the same data and different spreadsheet id using V4 API but I couldn't. Is it possible to do so?
And how to add new gmail user to access already existing sheet using Google V4 sheets API?
{
"role":"editor",
"type":"user",
"emailAddress":mohammed_kamal#gmail.com
}
If you plan on copying only a sheet, Sheets API is the right choice in this case but if you want to copy the whole spreadsheet, you need to make use of Drive API's copy file method. You can replicate the behavior by using the below request:
POST https://www.googleapis.com/drive/v3/files/fileId/copy
As for creating the permissions to the already existing spreadsheet by adding new users, you need to make use of Drive API as well and use the request below:
POST https://www.googleapis.com/drive/v3/files/fileId/permissions
With the following body:
{
"role":"editor",
"type":"user",
"emailAddress":mohammed_kamal#gmail.com
}
Note
In both of these requests, the fileId here corresponds to the id of the spreadsheet wanted to make a copy of.
Reference
Sheets API spreadsheets.sheets.copyTo;
Drive API Files:copy;
Drive API Permissions:create.

The parameters to be passed in fetch API to get data from google sheets

What url should i pass as a parameter of ferch() to connect to my google sheet. Simple google sheet API url is not working as there is no option in it to mention my spreadsheet id. Please help
To get data from a Google Spreadsheet you have to call the spreadsheet.values.get API endpoint by performing a GET request to:
https://sheets.googleapis.com/v4/spreadsheets/YOU SPREADSHEET ID/values/THE RANGE OF DATA YOU WANT TO GET
You can experiment with the API on this link.

Get Date From Google Custom Search API

How i can get date data like that google search. Is it possible to get it?
I never found it in google custom search API. The second picture i post is only snippet which got date and some description about it. The first picture from google search news and the second is google custom search
The following API request returns metadata, like published time, only if it is mentioned in its HTML source.
GET https://www.googleapis.com/customsearch/v1?key=APIkey&cx=CustomSearchEngineID&q=rambo
And refer to the "metatags" section
And Voila!
Hope that helps :)