Open a Drive document in the inline editor
curl --request GET \
--url https://api.openworklabs.com/v1/documents/google-drive/files/{fileId}/editor \
--header 'x-api-key: <api-key>'import requests
url = "https://api.openworklabs.com/v1/documents/google-drive/files/{fileId}/editor"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.openworklabs.com/v1/documents/google-drive/files/{fileId}/editor', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.openworklabs.com/v1/documents/google-drive/files/{fileId}/editor",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.openworklabs.com/v1/documents/google-drive/files/{fileId}/editor"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.openworklabs.com/v1/documents/google-drive/files/{fileId}/editor")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/documents/google-drive/files/{fileId}/editor")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"connectionId": "<string>",
"fileId": "<string>",
"name": "<string>",
"revision": "<string>",
"canEdit": true,
"kind": "spreadsheet",
"source": "google",
"sheets": [
{
"id": "<string>",
"name": "<string>",
"rows": 0,
"columns": 0
}
],
"activeSheetId": "<string>",
"startRow": 0,
"endRow": 0,
"cells": [
{
"row": 4503599627370496,
"column": 4503599627370496,
"text": "<string>",
"formula": "<string>"
}
],
"notice": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Documents
Open a Drive document in the inline editor
Requires organization membership, Workbot and Documents, and the member’s currently authorized Drive connection. Reads recheck provider access. Writes require current grants, explicit edits and a matching revision.
GET
/
v1
/
documents
/
google-drive
/
files
/
{fileId}
/
editor
Open a Drive document in the inline editor
curl --request GET \
--url https://api.openworklabs.com/v1/documents/google-drive/files/{fileId}/editor \
--header 'x-api-key: <api-key>'import requests
url = "https://api.openworklabs.com/v1/documents/google-drive/files/{fileId}/editor"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.openworklabs.com/v1/documents/google-drive/files/{fileId}/editor', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.openworklabs.com/v1/documents/google-drive/files/{fileId}/editor",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.openworklabs.com/v1/documents/google-drive/files/{fileId}/editor"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.openworklabs.com/v1/documents/google-drive/files/{fileId}/editor")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/documents/google-drive/files/{fileId}/editor")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"connectionId": "<string>",
"fileId": "<string>",
"name": "<string>",
"revision": "<string>",
"canEdit": true,
"kind": "spreadsheet",
"source": "google",
"sheets": [
{
"id": "<string>",
"name": "<string>",
"rows": 0,
"columns": 0
}
],
"activeSheetId": "<string>",
"startRow": 0,
"endRow": 0,
"cells": [
{
"row": 4503599627370496,
"column": 4503599627370496,
"text": "<string>",
"formula": "<string>"
}
],
"notice": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
denApiKeybearerAuth
Organization API key passed as the x-api-key header. The raw key is the header value; do not prefix it with Bearer.
Path Parameters
Required string length:
1 - 512Pattern:
^[A-Za-z0-9_-]+$Query Parameters
Maximum string length:
200Required range:
1 <= x <= 1048526Pattern:
^(google-workspace|emc_[A-Za-z0-9]+)$Response
Document result.
- Option 1
- Option 2
- Option 3
- Option 4
Required string length:
1 - 512Pattern:
^[A-Za-z0-9_-]+$Allowed value:
"spreadsheet"Available options:
google, xlsx Show child attributes
Show child attributes
Required range:
-9007199254740991 <= x <= 9007199254740991Required range:
-9007199254740991 <= x <= 9007199254740991Show child attributes
Show child attributes
Was this page helpful?