Get Folder
curl --request GET \
--url https://api.stackone.com/unified/documents/folders/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'x-account-id: <x-account-id>'import requests
url = "https://api.stackone.com/unified/documents/folders/{id}"
headers = {
"x-account-id": "<x-account-id>",
"Authorization": "Basic <encoded-value>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-account-id': '<x-account-id>', Authorization: 'Basic <encoded-value>'}
};
fetch('https://api.stackone.com/unified/documents/folders/{id}', 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.stackone.com/unified/documents/folders/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"x-account-id: <x-account-id>"
],
]);
$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.stackone.com/unified/documents/folders/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-account-id", "<x-account-id>")
req.Header.Add("Authorization", "Basic <encoded-value>")
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.stackone.com/unified/documents/folders/{id}")
.header("x-account-id", "<x-account-id>")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stackone.com/unified/documents/folders/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-account-id"] = '<x-account-id>'
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
"remote_id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
"name": "Information-Technology",
"description": "This is the description associated to the folder.",
"icon": "📁",
"size": 1024,
"url": "https://drive.google.com/folder/d/nd8932h9d/view",
"path": "/path/to/folder",
"owner_id": "c28xyrc55866bvuv",
"remote_owner_id": "e3cb75bf-aa84-466e-a6c1-b8322b257a48",
"parent_folder_id": "c28xyrc55866bvuv",
"remote_parent_folder_id": "e3cb75bf-aa84-466e-a6c1-b8322b257a48",
"drive_id": "c28xyrc55866bvuv",
"remote_drive_id": "e3cb75bf-aa84-466e-a6c1-b8322b257a48",
"created_at": "2023-02-23T00:00:00.000Z",
"updated_at": "2024-02-23T00:00:00.000Z",
"has_content": true,
"has_children": true,
"is_root": true,
"all_parent_folder_ids": [
"0123456789"
]
},
"raw": [
{
"method": "<string>",
"url": "<string>",
"body": {},
"response": {}
}
]
}{
"statusCode": 400,
"message": "Bad Request",
"timestamp": "2023-05-30T00:00:00.000Z",
"data": {
"statusCode": 400,
"message": "Bad Request",
"headers": {
"content-type": "application/json",
"x-request-id": "5678c28b211dace4e0a0f9171e6b88c5"
}
},
"provider_errors": [
{
"status": 400,
"url": "https://api.provider.com/v1/resource",
"raw": {
"message": "Invalid input parameters"
},
"headers": {
"content-type": "application/json",
"x-request-id": "5678c28b211dace4e0a0f9171e6b88c5"
}
}
]
}{
"statusCode": 401,
"message": "Unauthorized",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 403,
"message": "Forbidden resource",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 404,
"message": "Not Found",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 408,
"message": "Request timed out",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 409,
"message": "Conflict",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 412,
"message": "Account is suspended and cannot process requests",
"timestamp": "2023-05-30T00:00:00.000Z",
"errorCode": "AccountSuspendedError",
"details": {
"status": "suspended",
"expiresAt": "2023-11-07T05:31:56Z",
"statusReasons": [
{
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"description": "<string>"
}
]
}
}{
"statusCode": 422,
"message": "Unprocessable Entity",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 429,
"message": "Too many requests",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 500,
"message": "Internal server error",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 501,
"message": "Not Implemented",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 502,
"message": "Bad Gateway",
"timestamp": "2023-05-30T00:00:00.000Z"
}Get Folder
GET
/
unified
/
documents
/
folders
/
{id}
Get Folder
curl --request GET \
--url https://api.stackone.com/unified/documents/folders/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'x-account-id: <x-account-id>'import requests
url = "https://api.stackone.com/unified/documents/folders/{id}"
headers = {
"x-account-id": "<x-account-id>",
"Authorization": "Basic <encoded-value>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-account-id': '<x-account-id>', Authorization: 'Basic <encoded-value>'}
};
fetch('https://api.stackone.com/unified/documents/folders/{id}', 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.stackone.com/unified/documents/folders/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"x-account-id: <x-account-id>"
],
]);
$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.stackone.com/unified/documents/folders/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-account-id", "<x-account-id>")
req.Header.Add("Authorization", "Basic <encoded-value>")
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.stackone.com/unified/documents/folders/{id}")
.header("x-account-id", "<x-account-id>")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stackone.com/unified/documents/folders/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-account-id"] = '<x-account-id>'
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
"remote_id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
"name": "Information-Technology",
"description": "This is the description associated to the folder.",
"icon": "📁",
"size": 1024,
"url": "https://drive.google.com/folder/d/nd8932h9d/view",
"path": "/path/to/folder",
"owner_id": "c28xyrc55866bvuv",
"remote_owner_id": "e3cb75bf-aa84-466e-a6c1-b8322b257a48",
"parent_folder_id": "c28xyrc55866bvuv",
"remote_parent_folder_id": "e3cb75bf-aa84-466e-a6c1-b8322b257a48",
"drive_id": "c28xyrc55866bvuv",
"remote_drive_id": "e3cb75bf-aa84-466e-a6c1-b8322b257a48",
"created_at": "2023-02-23T00:00:00.000Z",
"updated_at": "2024-02-23T00:00:00.000Z",
"has_content": true,
"has_children": true,
"is_root": true,
"all_parent_folder_ids": [
"0123456789"
]
},
"raw": [
{
"method": "<string>",
"url": "<string>",
"body": {},
"response": {}
}
]
}{
"statusCode": 400,
"message": "Bad Request",
"timestamp": "2023-05-30T00:00:00.000Z",
"data": {
"statusCode": 400,
"message": "Bad Request",
"headers": {
"content-type": "application/json",
"x-request-id": "5678c28b211dace4e0a0f9171e6b88c5"
}
},
"provider_errors": [
{
"status": 400,
"url": "https://api.provider.com/v1/resource",
"raw": {
"message": "Invalid input parameters"
},
"headers": {
"content-type": "application/json",
"x-request-id": "5678c28b211dace4e0a0f9171e6b88c5"
}
}
]
}{
"statusCode": 401,
"message": "Unauthorized",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 403,
"message": "Forbidden resource",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 404,
"message": "Not Found",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 408,
"message": "Request timed out",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 409,
"message": "Conflict",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 412,
"message": "Account is suspended and cannot process requests",
"timestamp": "2023-05-30T00:00:00.000Z",
"errorCode": "AccountSuspendedError",
"details": {
"status": "suspended",
"expiresAt": "2023-11-07T05:31:56Z",
"statusReasons": [
{
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"description": "<string>"
}
]
}
}{
"statusCode": 422,
"message": "Unprocessable Entity",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 429,
"message": "Too many requests",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 500,
"message": "Internal server error",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 501,
"message": "Not Implemented",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 502,
"message": "Bad Gateway",
"timestamp": "2023-05-30T00:00:00.000Z"
}Authorizations
Headers
Query Parameters
The comma separated list of fields that will be returned in the response (if empty, all fields are returned)
Example:
"id,remote_id,name,description,icon,url,size,path,owner_id,remote_owner_id,parent_folder_id,remote_parent_folder_id,drive_id,remote_drive_id,created_at,updated_at,has_content,has_children,is_root,all_parent_folder_ids,remote_all_parent_folder_ids,unified_custom_fields"
Was this page helpful?