File storage API
File storage APIv9.3.0
Welcome to the File Storage API. You can use this API to access all File Storage API endpoints. Base URL The base URL for all API requests is https://unify.apideck.com We also provide a Mock API that can be used for testing purposes: https://mock-api.apideck.com Headers Custom headers that are expected as part of the request. Note that RFC7230 states header names are case insensitive. | Name | Type | Required | Description | | --------------------- | ------- | -------- |…
- Endpoints
- 32 (11 GET, 9 POST, 6 DELETE, 5 PATCH)
- Base URL
https://unify.apideck.com- Authentication
- API key
- Spec format
- OpenAPI 3.0.3
- API version
- 9.3.0
- Provider
- apideck.com
- License
- Apache 2.0
- Categories
- Developer Tools
- Last updated
Use this API in Bruno:
- Download the Bruno collection above and unzip it.
- In Bruno, choose Open Collection and select the unzipped folder.
- Set the
baseUrlvariable (for examplehttps://unify.apideck.com) and your API key credentials, then send requests.
POST
Create DriveGroup
{{baseUrl}}/file-storage/drive-groups
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
BODY json
{
"created_at": "",
"created_by": "",
"description": "",
"display_name": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/drive-groups");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/file-storage/drive-groups" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json
:form-params {:created_at ""
:created_by ""
:description ""
:display_name ""
:id ""
:name ""
:updated_at ""
:updated_by ""}})
require "http/client"
url = "{{baseUrl}}/file-storage/drive-groups"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/file-storage/drive-groups"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/drive-groups");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/drive-groups"
payload := strings.NewReader("{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/file-storage/drive-groups HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 151
{
"created_at": "",
"created_by": "",
"description": "",
"display_name": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/file-storage/drive-groups")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/drive-groups"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/drive-groups")
.post(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/file-storage/drive-groups")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
.asString();
const data = JSON.stringify({
created_at: '',
created_by: '',
description: '',
display_name: '',
id: '',
name: '',
updated_at: '',
updated_by: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/file-storage/drive-groups');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/file-storage/drive-groups',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
created_at: '',
created_by: '',
description: '',
display_name: '',
id: '',
name: '',
updated_at: '',
updated_by: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/drive-groups';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"created_at":"","created_by":"","description":"","display_name":"","id":"","name":"","updated_at":"","updated_by":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/drive-groups',
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "created_at": "",\n "created_by": "",\n "description": "",\n "display_name": "",\n "id": "",\n "name": "",\n "updated_at": "",\n "updated_by": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/drive-groups")
.post(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/drive-groups',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
created_at: '',
created_by: '',
description: '',
display_name: '',
id: '',
name: '',
updated_at: '',
updated_by: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/file-storage/drive-groups',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: {
created_at: '',
created_by: '',
description: '',
display_name: '',
id: '',
name: '',
updated_at: '',
updated_by: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/file-storage/drive-groups');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
created_at: '',
created_by: '',
description: '',
display_name: '',
id: '',
name: '',
updated_at: '',
updated_by: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/file-storage/drive-groups',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
created_at: '',
created_by: '',
description: '',
display_name: '',
id: '',
name: '',
updated_at: '',
updated_by: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/drive-groups';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"created_at":"","created_by":"","description":"","display_name":"","id":"","name":"","updated_at":"","updated_by":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"created_at": @"",
@"created_by": @"",
@"description": @"",
@"display_name": @"",
@"id": @"",
@"name": @"",
@"updated_at": @"",
@"updated_by": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/drive-groups"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/drive-groups" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/drive-groups",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'created_at' => '',
'created_by' => '',
'description' => '',
'display_name' => '',
'id' => '',
'name' => '',
'updated_at' => '',
'updated_by' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/file-storage/drive-groups', [
'body' => '{
"created_at": "",
"created_by": "",
"description": "",
"display_name": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/drive-groups');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'created_at' => '',
'created_by' => '',
'description' => '',
'display_name' => '',
'id' => '',
'name' => '',
'updated_at' => '',
'updated_by' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'created_at' => '',
'created_by' => '',
'description' => '',
'display_name' => '',
'id' => '',
'name' => '',
'updated_at' => '',
'updated_by' => ''
]));
$request->setRequestUrl('{{baseUrl}}/file-storage/drive-groups');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/drive-groups' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"created_at": "",
"created_by": "",
"description": "",
"display_name": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/drive-groups' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"created_at": "",
"created_by": "",
"description": "",
"display_name": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/file-storage/drive-groups", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/drive-groups"
payload = {
"created_at": "",
"created_by": "",
"description": "",
"display_name": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/drive-groups"
payload <- "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/drive-groups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/file-storage/drive-groups') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/drive-groups";
let payload = json!({
"created_at": "",
"created_by": "",
"description": "",
"display_name": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/file-storage/drive-groups \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--data '{
"created_at": "",
"created_by": "",
"description": "",
"display_name": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}'
echo '{
"created_at": "",
"created_by": "",
"description": "",
"display_name": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}' | \
http POST {{baseUrl}}/file-storage/drive-groups \
authorization:'{{apiKey}}' \
content-type:application/json \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method POST \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "created_at": "",\n "created_by": "",\n "description": "",\n "display_name": "",\n "id": "",\n "name": "",\n "updated_at": "",\n "updated_by": ""\n}' \
--output-document \
- {{baseUrl}}/file-storage/drive-groups
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"created_at": "",
"created_by": "",
"description": "",
"display_name": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/drive-groups")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "add",
"resource": "DriveGroups",
"service": "google-drive",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
DELETE
Delete DriveGroup
{{baseUrl}}/file-storage/drive-groups/:id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/drive-groups/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/file-storage/drive-groups/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/file-storage/drive-groups/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/file-storage/drive-groups/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/drive-groups/:id");
var request = new RestRequest("", Method.Delete);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/drive-groups/:id"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/file-storage/drive-groups/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/file-storage/drive-groups/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/drive-groups/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/drive-groups/:id")
.delete(null)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/file-storage/drive-groups/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/file-storage/drive-groups/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/file-storage/drive-groups/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/drive-groups/:id';
const options = {
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/drive-groups/:id',
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/drive-groups/:id")
.delete(null)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/drive-groups/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/file-storage/drive-groups/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/file-storage/drive-groups/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/file-storage/drive-groups/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/drive-groups/:id';
const options = {
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/drive-groups/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/drive-groups/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/drive-groups/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/file-storage/drive-groups/:id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/drive-groups/:id');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/file-storage/drive-groups/:id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/drive-groups/:id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/drive-groups/:id' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("DELETE", "/baseUrl/file-storage/drive-groups/:id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/drive-groups/:id"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/drive-groups/:id"
response <- VERB("DELETE", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/drive-groups/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/file-storage/drive-groups/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/drive-groups/:id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/file-storage/drive-groups/:id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http DELETE {{baseUrl}}/file-storage/drive-groups/:id \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method DELETE \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/file-storage/drive-groups/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/drive-groups/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "delete",
"resource": "DriveGroups",
"service": "google-drive",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
GET
Get DriveGroup
{{baseUrl}}/file-storage/drive-groups/:id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/drive-groups/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/file-storage/drive-groups/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/file-storage/drive-groups/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/file-storage/drive-groups/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/drive-groups/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/drive-groups/:id"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/file-storage/drive-groups/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/file-storage/drive-groups/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/drive-groups/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/drive-groups/:id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/file-storage/drive-groups/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/file-storage/drive-groups/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/drive-groups/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/drive-groups/:id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/drive-groups/:id',
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/drive-groups/:id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/drive-groups/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/drive-groups/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/file-storage/drive-groups/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/drive-groups/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/drive-groups/:id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/drive-groups/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/drive-groups/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/drive-groups/: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: {{apiKey}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/file-storage/drive-groups/:id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/drive-groups/:id');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/file-storage/drive-groups/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/drive-groups/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/drive-groups/:id' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/file-storage/drive-groups/:id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/drive-groups/:id"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/drive-groups/:id"
response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/drive-groups/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/file-storage/drive-groups/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/drive-groups/:id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/file-storage/drive-groups/:id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/file-storage/drive-groups/:id \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method GET \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/file-storage/drive-groups/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/drive-groups/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"created_at": "2020-09-30T07:43:32.000Z",
"created_by": "12345",
"description": "A description",
"display_name": "accounting",
"id": "12345",
"name": "accounting",
"updated_at": "2020-09-30T07:43:32.000Z",
"updated_by": "12345"
},
"operation": "one",
"resource": "DriveGroups",
"service": "google-drive",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
GET
List DriveGroups
{{baseUrl}}/file-storage/drive-groups
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/drive-groups");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/file-storage/drive-groups" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/file-storage/drive-groups"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/file-storage/drive-groups"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/drive-groups");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/drive-groups"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/file-storage/drive-groups HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/file-storage/drive-groups")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/drive-groups"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/drive-groups")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/file-storage/drive-groups")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/file-storage/drive-groups');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/drive-groups',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/drive-groups';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/drive-groups',
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/drive-groups")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/drive-groups',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/drive-groups',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/file-storage/drive-groups');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/drive-groups',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/drive-groups';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/drive-groups"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/drive-groups" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/drive-groups",
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: {{apiKey}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/file-storage/drive-groups', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/drive-groups');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/file-storage/drive-groups');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/drive-groups' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/drive-groups' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/file-storage/drive-groups", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/drive-groups"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/drive-groups"
response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/drive-groups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/file-storage/drive-groups') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/drive-groups";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/file-storage/drive-groups \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/file-storage/drive-groups \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method GET \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/file-storage/drive-groups
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/drive-groups")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"links": {
"current": "https://unify.apideck.com/crm/companies",
"next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
"previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D"
},
"meta": {
"items_on_page": 50
},
"operation": "all",
"resource": "DriveGroups",
"service": "google-drive",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
PATCH
Update DriveGroup
{{baseUrl}}/file-storage/drive-groups/:id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"created_at": "",
"created_by": "",
"description": "",
"display_name": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/drive-groups/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/file-storage/drive-groups/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json
:form-params {:created_at ""
:created_by ""
:description ""
:display_name ""
:id ""
:name ""
:updated_at ""
:updated_by ""}})
require "http/client"
url = "{{baseUrl}}/file-storage/drive-groups/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/file-storage/drive-groups/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/drive-groups/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/drive-groups/:id"
payload := strings.NewReader("{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/file-storage/drive-groups/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 151
{
"created_at": "",
"created_by": "",
"description": "",
"display_name": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/file-storage/drive-groups/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/drive-groups/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/drive-groups/:id")
.patch(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/file-storage/drive-groups/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
.asString();
const data = JSON.stringify({
created_at: '',
created_by: '',
description: '',
display_name: '',
id: '',
name: '',
updated_at: '',
updated_by: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/file-storage/drive-groups/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/file-storage/drive-groups/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
created_at: '',
created_by: '',
description: '',
display_name: '',
id: '',
name: '',
updated_at: '',
updated_by: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/drive-groups/:id';
const options = {
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"created_at":"","created_by":"","description":"","display_name":"","id":"","name":"","updated_at":"","updated_by":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/drive-groups/:id',
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "created_at": "",\n "created_by": "",\n "description": "",\n "display_name": "",\n "id": "",\n "name": "",\n "updated_at": "",\n "updated_by": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/drive-groups/:id")
.patch(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/drive-groups/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
created_at: '',
created_by: '',
description: '',
display_name: '',
id: '',
name: '',
updated_at: '',
updated_by: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/file-storage/drive-groups/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: {
created_at: '',
created_by: '',
description: '',
display_name: '',
id: '',
name: '',
updated_at: '',
updated_by: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/file-storage/drive-groups/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
created_at: '',
created_by: '',
description: '',
display_name: '',
id: '',
name: '',
updated_at: '',
updated_by: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/file-storage/drive-groups/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
created_at: '',
created_by: '',
description: '',
display_name: '',
id: '',
name: '',
updated_at: '',
updated_by: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/drive-groups/:id';
const options = {
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"created_at":"","created_by":"","description":"","display_name":"","id":"","name":"","updated_at":"","updated_by":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"created_at": @"",
@"created_by": @"",
@"description": @"",
@"display_name": @"",
@"id": @"",
@"name": @"",
@"updated_at": @"",
@"updated_by": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/drive-groups/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/drive-groups/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/drive-groups/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'created_at' => '',
'created_by' => '',
'description' => '',
'display_name' => '',
'id' => '',
'name' => '',
'updated_at' => '',
'updated_by' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/file-storage/drive-groups/:id', [
'body' => '{
"created_at": "",
"created_by": "",
"description": "",
"display_name": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/drive-groups/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'created_at' => '',
'created_by' => '',
'description' => '',
'display_name' => '',
'id' => '',
'name' => '',
'updated_at' => '',
'updated_by' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'created_at' => '',
'created_by' => '',
'description' => '',
'display_name' => '',
'id' => '',
'name' => '',
'updated_at' => '',
'updated_by' => ''
]));
$request->setRequestUrl('{{baseUrl}}/file-storage/drive-groups/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/drive-groups/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"created_at": "",
"created_by": "",
"description": "",
"display_name": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/drive-groups/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"created_at": "",
"created_by": "",
"description": "",
"display_name": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/file-storage/drive-groups/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/drive-groups/:id"
payload = {
"created_at": "",
"created_by": "",
"description": "",
"display_name": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/drive-groups/:id"
payload <- "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/drive-groups/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/file-storage/drive-groups/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"display_name\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/drive-groups/:id";
let payload = json!({
"created_at": "",
"created_by": "",
"description": "",
"display_name": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/file-storage/drive-groups/:id \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--data '{
"created_at": "",
"created_by": "",
"description": "",
"display_name": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}'
echo '{
"created_at": "",
"created_by": "",
"description": "",
"display_name": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}' | \
http PATCH {{baseUrl}}/file-storage/drive-groups/:id \
authorization:'{{apiKey}}' \
content-type:application/json \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method PATCH \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "created_at": "",\n "created_by": "",\n "description": "",\n "display_name": "",\n "id": "",\n "name": "",\n "updated_at": "",\n "updated_by": ""\n}' \
--output-document \
- {{baseUrl}}/file-storage/drive-groups/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"created_at": "",
"created_by": "",
"description": "",
"display_name": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/drive-groups/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "update",
"resource": "DriveGroups",
"service": "google-drive",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
POST
Create Drive
{{baseUrl}}/file-storage/drives
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
BODY json
{
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/drives");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/file-storage/drives" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json
:form-params {:created_at ""
:created_by ""
:description ""
:id ""
:name ""
:updated_at ""
:updated_by ""}})
require "http/client"
url = "{{baseUrl}}/file-storage/drives"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/file-storage/drives"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/drives");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/drives"
payload := strings.NewReader("{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/file-storage/drives HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 129
{
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/file-storage/drives")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/drives"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/drives")
.post(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/file-storage/drives")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
.asString();
const data = JSON.stringify({
created_at: '',
created_by: '',
description: '',
id: '',
name: '',
updated_at: '',
updated_by: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/file-storage/drives');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/file-storage/drives',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
created_at: '',
created_by: '',
description: '',
id: '',
name: '',
updated_at: '',
updated_by: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/drives';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"created_at":"","created_by":"","description":"","id":"","name":"","updated_at":"","updated_by":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/drives',
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "created_at": "",\n "created_by": "",\n "description": "",\n "id": "",\n "name": "",\n "updated_at": "",\n "updated_by": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/drives")
.post(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/drives',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
created_at: '',
created_by: '',
description: '',
id: '',
name: '',
updated_at: '',
updated_by: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/file-storage/drives',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: {
created_at: '',
created_by: '',
description: '',
id: '',
name: '',
updated_at: '',
updated_by: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/file-storage/drives');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
created_at: '',
created_by: '',
description: '',
id: '',
name: '',
updated_at: '',
updated_by: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/file-storage/drives',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
created_at: '',
created_by: '',
description: '',
id: '',
name: '',
updated_at: '',
updated_by: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/drives';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"created_at":"","created_by":"","description":"","id":"","name":"","updated_at":"","updated_by":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"created_at": @"",
@"created_by": @"",
@"description": @"",
@"id": @"",
@"name": @"",
@"updated_at": @"",
@"updated_by": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/drives"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/drives" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/drives",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'created_at' => '',
'created_by' => '',
'description' => '',
'id' => '',
'name' => '',
'updated_at' => '',
'updated_by' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/file-storage/drives', [
'body' => '{
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/drives');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'created_at' => '',
'created_by' => '',
'description' => '',
'id' => '',
'name' => '',
'updated_at' => '',
'updated_by' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'created_at' => '',
'created_by' => '',
'description' => '',
'id' => '',
'name' => '',
'updated_at' => '',
'updated_by' => ''
]));
$request->setRequestUrl('{{baseUrl}}/file-storage/drives');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/drives' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/drives' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/file-storage/drives", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/drives"
payload = {
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/drives"
payload <- "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/drives")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/file-storage/drives') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/drives";
let payload = json!({
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/file-storage/drives \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--data '{
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}'
echo '{
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}' | \
http POST {{baseUrl}}/file-storage/drives \
authorization:'{{apiKey}}' \
content-type:application/json \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method POST \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "created_at": "",\n "created_by": "",\n "description": "",\n "id": "",\n "name": "",\n "updated_at": "",\n "updated_by": ""\n}' \
--output-document \
- {{baseUrl}}/file-storage/drives
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/drives")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "add",
"resource": "Drives",
"service": "google-drive",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
DELETE
Delete Drive
{{baseUrl}}/file-storage/drives/:id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/drives/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/file-storage/drives/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/file-storage/drives/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/file-storage/drives/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/drives/:id");
var request = new RestRequest("", Method.Delete);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/drives/:id"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/file-storage/drives/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/file-storage/drives/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/drives/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/drives/:id")
.delete(null)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/file-storage/drives/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/file-storage/drives/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/file-storage/drives/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/drives/:id';
const options = {
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/drives/:id',
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/drives/:id")
.delete(null)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/drives/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/file-storage/drives/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/file-storage/drives/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/file-storage/drives/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/drives/:id';
const options = {
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/drives/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/drives/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/drives/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/file-storage/drives/:id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/drives/:id');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/file-storage/drives/:id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/drives/:id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/drives/:id' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("DELETE", "/baseUrl/file-storage/drives/:id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/drives/:id"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/drives/:id"
response <- VERB("DELETE", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/drives/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/file-storage/drives/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/drives/:id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/file-storage/drives/:id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http DELETE {{baseUrl}}/file-storage/drives/:id \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method DELETE \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/file-storage/drives/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/drives/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "delete",
"resource": "Drives",
"service": "google-drive",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
GET
Get Drive
{{baseUrl}}/file-storage/drives/:id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/drives/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/file-storage/drives/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/file-storage/drives/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/file-storage/drives/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/drives/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/drives/:id"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/file-storage/drives/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/file-storage/drives/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/drives/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/drives/:id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/file-storage/drives/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/file-storage/drives/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/drives/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/drives/:id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/drives/:id',
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/drives/:id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/drives/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/drives/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/file-storage/drives/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/drives/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/drives/:id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/drives/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/drives/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/drives/: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: {{apiKey}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/file-storage/drives/:id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/drives/:id');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/file-storage/drives/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/drives/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/drives/:id' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/file-storage/drives/:id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/drives/:id"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/drives/:id"
response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/drives/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/file-storage/drives/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/drives/:id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/file-storage/drives/:id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/file-storage/drives/:id \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method GET \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/file-storage/drives/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/drives/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"created_at": "2020-09-30T07:43:32.000Z",
"created_by": "12345",
"description": "A description",
"id": "12345",
"name": "Project Resources",
"updated_at": "2020-09-30T07:43:32.000Z",
"updated_by": "12345"
},
"operation": "one",
"resource": "Drives",
"service": "google-drive",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
GET
List Drives
{{baseUrl}}/file-storage/drives
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/drives");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/file-storage/drives" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/file-storage/drives"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/file-storage/drives"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/drives");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/drives"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/file-storage/drives HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/file-storage/drives")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/drives"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/drives")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/file-storage/drives")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/file-storage/drives');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/drives',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/drives';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/drives',
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/drives")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/drives',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/drives',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/file-storage/drives');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/drives',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/drives';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/drives"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/drives" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/drives",
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: {{apiKey}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/file-storage/drives', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/drives');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/file-storage/drives');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/drives' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/drives' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/file-storage/drives", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/drives"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/drives"
response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/drives")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/file-storage/drives') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/drives";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/file-storage/drives \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/file-storage/drives \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method GET \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/file-storage/drives
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/drives")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"links": {
"current": "https://unify.apideck.com/crm/companies",
"next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
"previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D"
},
"meta": {
"items_on_page": 50
},
"operation": "all",
"resource": "Drives",
"service": "google-drive",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
PATCH
Update Drive
{{baseUrl}}/file-storage/drives/:id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/drives/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/file-storage/drives/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json
:form-params {:created_at ""
:created_by ""
:description ""
:id ""
:name ""
:updated_at ""
:updated_by ""}})
require "http/client"
url = "{{baseUrl}}/file-storage/drives/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/file-storage/drives/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/drives/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/drives/:id"
payload := strings.NewReader("{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/file-storage/drives/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 129
{
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/file-storage/drives/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/drives/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/drives/:id")
.patch(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/file-storage/drives/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
.asString();
const data = JSON.stringify({
created_at: '',
created_by: '',
description: '',
id: '',
name: '',
updated_at: '',
updated_by: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/file-storage/drives/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/file-storage/drives/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
created_at: '',
created_by: '',
description: '',
id: '',
name: '',
updated_at: '',
updated_by: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/drives/:id';
const options = {
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"created_at":"","created_by":"","description":"","id":"","name":"","updated_at":"","updated_by":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/drives/:id',
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "created_at": "",\n "created_by": "",\n "description": "",\n "id": "",\n "name": "",\n "updated_at": "",\n "updated_by": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/drives/:id")
.patch(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/drives/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
created_at: '',
created_by: '',
description: '',
id: '',
name: '',
updated_at: '',
updated_by: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/file-storage/drives/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: {
created_at: '',
created_by: '',
description: '',
id: '',
name: '',
updated_at: '',
updated_by: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/file-storage/drives/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
created_at: '',
created_by: '',
description: '',
id: '',
name: '',
updated_at: '',
updated_by: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/file-storage/drives/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
created_at: '',
created_by: '',
description: '',
id: '',
name: '',
updated_at: '',
updated_by: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/drives/:id';
const options = {
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"created_at":"","created_by":"","description":"","id":"","name":"","updated_at":"","updated_by":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"created_at": @"",
@"created_by": @"",
@"description": @"",
@"id": @"",
@"name": @"",
@"updated_at": @"",
@"updated_by": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/drives/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/drives/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/drives/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'created_at' => '',
'created_by' => '',
'description' => '',
'id' => '',
'name' => '',
'updated_at' => '',
'updated_by' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/file-storage/drives/:id', [
'body' => '{
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/drives/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'created_at' => '',
'created_by' => '',
'description' => '',
'id' => '',
'name' => '',
'updated_at' => '',
'updated_by' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'created_at' => '',
'created_by' => '',
'description' => '',
'id' => '',
'name' => '',
'updated_at' => '',
'updated_by' => ''
]));
$request->setRequestUrl('{{baseUrl}}/file-storage/drives/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/drives/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/drives/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/file-storage/drives/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/drives/:id"
payload = {
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/drives/:id"
payload <- "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/drives/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/file-storage/drives/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"created_at\": \"\",\n \"created_by\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"updated_at\": \"\",\n \"updated_by\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/drives/:id";
let payload = json!({
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/file-storage/drives/:id \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--data '{
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}'
echo '{
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
}' | \
http PATCH {{baseUrl}}/file-storage/drives/:id \
authorization:'{{apiKey}}' \
content-type:application/json \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method PATCH \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "created_at": "",\n "created_by": "",\n "description": "",\n "id": "",\n "name": "",\n "updated_at": "",\n "updated_by": ""\n}' \
--output-document \
- {{baseUrl}}/file-storage/drives/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"created_at": "",
"created_by": "",
"description": "",
"id": "",
"name": "",
"updated_at": "",
"updated_by": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/drives/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "update",
"resource": "Drives",
"service": "google-drive",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
DELETE
Delete File
{{baseUrl}}/file-storage/files/:id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/files/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/file-storage/files/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/file-storage/files/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/file-storage/files/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/files/:id");
var request = new RestRequest("", Method.Delete);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/files/:id"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/file-storage/files/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/file-storage/files/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/files/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/files/:id")
.delete(null)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/file-storage/files/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/file-storage/files/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/file-storage/files/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/files/:id';
const options = {
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/files/:id',
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/files/:id")
.delete(null)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/files/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/file-storage/files/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/file-storage/files/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/file-storage/files/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/files/:id';
const options = {
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/files/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/files/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/files/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/file-storage/files/:id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/files/:id');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/file-storage/files/:id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/files/:id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/files/:id' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("DELETE", "/baseUrl/file-storage/files/:id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/files/:id"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/files/:id"
response <- VERB("DELETE", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/files/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/file-storage/files/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/files/:id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/file-storage/files/:id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http DELETE {{baseUrl}}/file-storage/files/:id \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method DELETE \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/file-storage/files/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/files/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "delete",
"resource": "files",
"service": "google-drive",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
GET
Download File
{{baseUrl}}/file-storage/files/:id/download
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/files/:id/download");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/file-storage/files/:id/download" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/file-storage/files/:id/download"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/file-storage/files/:id/download"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/files/:id/download");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/files/:id/download"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/file-storage/files/:id/download HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/file-storage/files/:id/download")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/files/:id/download"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/files/:id/download")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/file-storage/files/:id/download")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/file-storage/files/:id/download');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/files/:id/download',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/files/:id/download';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/files/:id/download',
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/files/:id/download")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/files/:id/download',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/files/:id/download',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/file-storage/files/:id/download');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/files/:id/download',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/files/:id/download';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/files/:id/download"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/files/:id/download" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/files/:id/download",
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: {{apiKey}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/file-storage/files/:id/download', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/files/:id/download');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/file-storage/files/:id/download');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/files/:id/download' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/files/:id/download' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/file-storage/files/:id/download", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/files/:id/download"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/files/:id/download"
response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/files/:id/download")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/file-storage/files/:id/download') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/files/:id/download";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/file-storage/files/:id/download \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/file-storage/files/:id/download \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method GET \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/file-storage/files/:id/download
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/files/:id/download")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
GET
Get File
{{baseUrl}}/file-storage/files/:id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/files/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/file-storage/files/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/file-storage/files/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/file-storage/files/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/files/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/files/:id"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/file-storage/files/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/file-storage/files/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/files/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/files/:id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/file-storage/files/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/file-storage/files/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/files/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/files/:id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/files/:id',
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/files/:id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/files/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/files/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/file-storage/files/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/files/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/files/:id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/files/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/files/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/files/: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: {{apiKey}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/file-storage/files/:id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/files/:id');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/file-storage/files/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/files/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/files/:id' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/file-storage/files/:id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/files/:id"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/files/:id"
response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/files/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/file-storage/files/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/files/:id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/file-storage/files/:id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/file-storage/files/:id \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method GET \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/file-storage/files/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/files/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"created_at": "2020-09-30T07:43:32.000Z",
"created_by": "12345",
"description": "A sample image",
"downstream_id": "12345",
"id": "12345",
"mime_type": "image/jpeg",
"name": "sample.jpg",
"path": "/Documents/sample.jpg",
"size": 1810673,
"type": "file",
"updated_at": "2020-09-30T07:43:32.000Z",
"updated_by": "12345"
},
"operation": "one",
"resource": "files",
"service": "google-drive",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
GET
List Files
{{baseUrl}}/file-storage/files
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/files");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/file-storage/files" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/file-storage/files"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/file-storage/files"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/files");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/files"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/file-storage/files HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/file-storage/files")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/files"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/files")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/file-storage/files")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/file-storage/files');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/files',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/files';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/files',
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/files")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/files',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/files',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/file-storage/files');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/files',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/files';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/files"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/files" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/files",
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: {{apiKey}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/file-storage/files', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/files');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/file-storage/files');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/files' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/files' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/file-storage/files", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/files"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/files"
response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/file-storage/files') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/files";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/file-storage/files \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/file-storage/files \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method GET \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/file-storage/files
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/files")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"links": {
"current": "https://unify.apideck.com/crm/companies",
"next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
"previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D"
},
"meta": {
"items_on_page": 50
},
"operation": "all",
"resource": "files",
"service": "google-drive",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
PATCH
Rename or move File
{{baseUrl}}/file-storage/files/:id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"description": "",
"name": "",
"parent_folder_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/files/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"description\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/file-storage/files/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json
:form-params {:description ""
:name ""
:parent_folder_id ""}})
require "http/client"
url = "{{baseUrl}}/file-storage/files/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"description\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/file-storage/files/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"description\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/files/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"description\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/files/:id"
payload := strings.NewReader("{\n \"description\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/file-storage/files/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 63
{
"description": "",
"name": "",
"parent_folder_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/file-storage/files/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"description\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/files/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"description\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/files/:id")
.patch(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/file-storage/files/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"description\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
description: '',
name: '',
parent_folder_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/file-storage/files/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/file-storage/files/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {description: '', name: '', parent_folder_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/files/:id';
const options = {
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"description":"","name":"","parent_folder_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/files/:id',
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "description": "",\n "name": "",\n "parent_folder_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/files/:id")
.patch(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/files/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({description: '', name: '', parent_folder_id: ''}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/file-storage/files/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: {description: '', name: '', parent_folder_id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/file-storage/files/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
description: '',
name: '',
parent_folder_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/file-storage/files/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {description: '', name: '', parent_folder_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/files/:id';
const options = {
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"description":"","name":"","parent_folder_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"description": @"",
@"name": @"",
@"parent_folder_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/files/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/files/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"description\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/files/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => '',
'name' => '',
'parent_folder_id' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/file-storage/files/:id', [
'body' => '{
"description": "",
"name": "",
"parent_folder_id": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/files/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'description' => '',
'name' => '',
'parent_folder_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'description' => '',
'name' => '',
'parent_folder_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/file-storage/files/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/files/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"name": "",
"parent_folder_id": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/files/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"name": "",
"parent_folder_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"description\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}"
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/file-storage/files/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/files/:id"
payload = {
"description": "",
"name": "",
"parent_folder_id": ""
}
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/files/:id"
payload <- "{\n \"description\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/files/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"description\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/file-storage/files/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"description\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/files/:id";
let payload = json!({
"description": "",
"name": "",
"parent_folder_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/file-storage/files/:id \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--data '{
"description": "",
"name": "",
"parent_folder_id": ""
}'
echo '{
"description": "",
"name": "",
"parent_folder_id": ""
}' | \
http PATCH {{baseUrl}}/file-storage/files/:id \
authorization:'{{apiKey}}' \
content-type:application/json \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method PATCH \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "description": "",\n "name": "",\n "parent_folder_id": ""\n}' \
--output-document \
- {{baseUrl}}/file-storage/files/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"description": "",
"name": "",
"parent_folder_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/files/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "update",
"resource": "files",
"service": "google-drive",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
POST
Search Files
{{baseUrl}}/file-storage/files/search
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
BODY json
{
"drive_id": "",
"query": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/files/search");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"drive_id\": \"\",\n \"query\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/file-storage/files/search" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json
:form-params {:drive_id ""
:query ""}})
require "http/client"
url = "{{baseUrl}}/file-storage/files/search"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"drive_id\": \"\",\n \"query\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/file-storage/files/search"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"drive_id\": \"\",\n \"query\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/files/search");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"drive_id\": \"\",\n \"query\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/files/search"
payload := strings.NewReader("{\n \"drive_id\": \"\",\n \"query\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/file-storage/files/search HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 35
{
"drive_id": "",
"query": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/file-storage/files/search")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"drive_id\": \"\",\n \"query\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/files/search"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"drive_id\": \"\",\n \"query\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"drive_id\": \"\",\n \"query\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/files/search")
.post(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/file-storage/files/search")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"drive_id\": \"\",\n \"query\": \"\"\n}")
.asString();
const data = JSON.stringify({
drive_id: '',
query: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/file-storage/files/search');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/file-storage/files/search',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {drive_id: '', query: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/files/search';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"drive_id":"","query":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/files/search',
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "drive_id": "",\n "query": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"drive_id\": \"\",\n \"query\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/files/search")
.post(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/files/search',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({drive_id: '', query: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/file-storage/files/search',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: {drive_id: '', query: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/file-storage/files/search');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
drive_id: '',
query: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/file-storage/files/search',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {drive_id: '', query: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/files/search';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"drive_id":"","query":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"drive_id": @"",
@"query": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/files/search"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/files/search" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"drive_id\": \"\",\n \"query\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/files/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'drive_id' => '',
'query' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/file-storage/files/search', [
'body' => '{
"drive_id": "",
"query": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/files/search');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'drive_id' => '',
'query' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'drive_id' => '',
'query' => ''
]));
$request->setRequestUrl('{{baseUrl}}/file-storage/files/search');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/files/search' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"drive_id": "",
"query": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/files/search' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"drive_id": "",
"query": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"drive_id\": \"\",\n \"query\": \"\"\n}"
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/file-storage/files/search", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/files/search"
payload = {
"drive_id": "",
"query": ""
}
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/files/search"
payload <- "{\n \"drive_id\": \"\",\n \"query\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/files/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"drive_id\": \"\",\n \"query\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/file-storage/files/search') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"drive_id\": \"\",\n \"query\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/files/search";
let payload = json!({
"drive_id": "",
"query": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/file-storage/files/search \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--data '{
"drive_id": "",
"query": ""
}'
echo '{
"drive_id": "",
"query": ""
}' | \
http POST {{baseUrl}}/file-storage/files/search \
authorization:'{{apiKey}}' \
content-type:application/json \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method POST \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "drive_id": "",\n "query": ""\n}' \
--output-document \
- {{baseUrl}}/file-storage/files/search
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"drive_id": "",
"query": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/files/search")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"links": {
"current": "https://unify.apideck.com/crm/companies",
"next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
"previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D"
},
"meta": {
"items_on_page": 50
},
"operation": "all",
"resource": "files",
"service": "google-drive",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
POST
Upload file
{{baseUrl}}/file-storage/files
HEADERS
x-apideck-metadata
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/files");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-metadata: ");
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/file-storage/files" {:headers {:x-apideck-metadata ""
:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/file-storage/files"
headers = HTTP::Headers{
"x-apideck-metadata" => ""
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.post url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/file-storage/files"),
Headers =
{
{ "x-apideck-metadata", "" },
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/files");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-metadata", "");
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/files"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-apideck-metadata", "")
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/file-storage/files HTTP/1.1
X-Apideck-Metadata:
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/file-storage/files")
.setHeader("x-apideck-metadata", "")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/files"))
.header("x-apideck-metadata", "")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/files")
.post(null)
.addHeader("x-apideck-metadata", "")
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/file-storage/files")
.header("x-apideck-metadata", "")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/file-storage/files');
xhr.setRequestHeader('x-apideck-metadata', '');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/file-storage/files',
headers: {
'x-apideck-metadata': '',
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/files';
const options = {
method: 'POST',
headers: {
'x-apideck-metadata': '',
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/files',
method: 'POST',
headers: {
'x-apideck-metadata': '',
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/files")
.post(null)
.addHeader("x-apideck-metadata", "")
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/files',
headers: {
'x-apideck-metadata': '',
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/file-storage/files',
headers: {
'x-apideck-metadata': '',
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/file-storage/files');
req.headers({
'x-apideck-metadata': '',
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/file-storage/files',
headers: {
'x-apideck-metadata': '',
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/files';
const options = {
method: 'POST',
headers: {
'x-apideck-metadata': '',
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-metadata": @"",
@"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/files"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/files" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-metadata", "");
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: ",
"x-apideck-metadata: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/file-storage/files', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
'x-apideck-metadata' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/files');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-apideck-metadata' => '',
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/file-storage/files');
$request->setRequestMethod('POST');
$request->setHeaders([
'x-apideck-metadata' => '',
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-metadata", "")
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/files' -Method POST -Headers $headers
$headers=@{}
$headers.Add("x-apideck-metadata", "")
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/files' -Method POST -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-metadata': "",
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("POST", "/baseUrl/file-storage/files", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/files"
headers = {
"x-apideck-metadata": "",
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.post(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/files"
response <- VERB("POST", url, add_headers('x-apideck-metadata' = '', 'x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-apideck-metadata"] = ''
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/file-storage/files') do |req|
req.headers['x-apideck-metadata'] = ''
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/files";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-metadata", "".parse().unwrap());
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/file-storage/files \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-metadata: '
http POST {{baseUrl}}/file-storage/files \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:'' \
x-apideck-metadata:''
wget --quiet \
--method POST \
--header 'x-apideck-metadata: ' \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/file-storage/files
import Foundation
let headers = [
"x-apideck-metadata": "",
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/files")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "add",
"resource": "files",
"service": "google-drive",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
POST
Copy Folder
{{baseUrl}}/file-storage/folders/:id/copy
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"id": "",
"name": "",
"parent_folder_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/folders/:id/copy");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/file-storage/folders/:id/copy" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json
:form-params {:id ""
:name ""
:parent_folder_id ""}})
require "http/client"
url = "{{baseUrl}}/file-storage/folders/:id/copy"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/file-storage/folders/:id/copy"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/folders/:id/copy");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/folders/:id/copy"
payload := strings.NewReader("{\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/file-storage/folders/:id/copy HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 54
{
"id": "",
"name": "",
"parent_folder_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/file-storage/folders/:id/copy")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/folders/:id/copy"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/folders/:id/copy")
.post(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/file-storage/folders/:id/copy")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
id: '',
name: '',
parent_folder_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/file-storage/folders/:id/copy');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/file-storage/folders/:id/copy',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {id: '', name: '', parent_folder_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/folders/:id/copy';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"id":"","name":"","parent_folder_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/folders/:id/copy',
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "id": "",\n "name": "",\n "parent_folder_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/folders/:id/copy")
.post(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/folders/:id/copy',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({id: '', name: '', parent_folder_id: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/file-storage/folders/:id/copy',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: {id: '', name: '', parent_folder_id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/file-storage/folders/:id/copy');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
id: '',
name: '',
parent_folder_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/file-storage/folders/:id/copy',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {id: '', name: '', parent_folder_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/folders/:id/copy';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"id":"","name":"","parent_folder_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"id": @"",
@"name": @"",
@"parent_folder_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/folders/:id/copy"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/folders/:id/copy" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/folders/:id/copy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '',
'name' => '',
'parent_folder_id' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/file-storage/folders/:id/copy', [
'body' => '{
"id": "",
"name": "",
"parent_folder_id": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/folders/:id/copy');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'id' => '',
'name' => '',
'parent_folder_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'id' => '',
'name' => '',
'parent_folder_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/file-storage/folders/:id/copy');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/folders/:id/copy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"id": "",
"name": "",
"parent_folder_id": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/folders/:id/copy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"id": "",
"name": "",
"parent_folder_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}"
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/file-storage/folders/:id/copy", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/folders/:id/copy"
payload = {
"id": "",
"name": "",
"parent_folder_id": ""
}
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/folders/:id/copy"
payload <- "{\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/folders/:id/copy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/file-storage/folders/:id/copy') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/folders/:id/copy";
let payload = json!({
"id": "",
"name": "",
"parent_folder_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/file-storage/folders/:id/copy \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--data '{
"id": "",
"name": "",
"parent_folder_id": ""
}'
echo '{
"id": "",
"name": "",
"parent_folder_id": ""
}' | \
http POST {{baseUrl}}/file-storage/folders/:id/copy \
authorization:'{{apiKey}}' \
content-type:application/json \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method POST \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "id": "",\n "name": "",\n "parent_folder_id": ""\n}' \
--output-document \
- {{baseUrl}}/file-storage/folders/:id/copy
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"id": "",
"name": "",
"parent_folder_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/folders/:id/copy")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "update",
"resource": "Folders",
"service": "undefined",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
POST
Create Folder
{{baseUrl}}/file-storage/folders
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
BODY json
{
"description": "",
"drive_id": "",
"id": "",
"name": "",
"parent_folder_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/folders");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"description\": \"\",\n \"drive_id\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/file-storage/folders" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json
:form-params {:description ""
:drive_id ""
:id ""
:name ""
:parent_folder_id ""}})
require "http/client"
url = "{{baseUrl}}/file-storage/folders"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"description\": \"\",\n \"drive_id\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/file-storage/folders"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"description\": \"\",\n \"drive_id\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/folders");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"description\": \"\",\n \"drive_id\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/folders"
payload := strings.NewReader("{\n \"description\": \"\",\n \"drive_id\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/file-storage/folders HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 93
{
"description": "",
"drive_id": "",
"id": "",
"name": "",
"parent_folder_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/file-storage/folders")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"description\": \"\",\n \"drive_id\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/folders"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"description\": \"\",\n \"drive_id\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"drive_id\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/folders")
.post(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/file-storage/folders")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"description\": \"\",\n \"drive_id\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
description: '',
drive_id: '',
id: '',
name: '',
parent_folder_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/file-storage/folders');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/file-storage/folders',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {description: '', drive_id: '', id: '', name: '', parent_folder_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/folders';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"description":"","drive_id":"","id":"","name":"","parent_folder_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/folders',
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "description": "",\n "drive_id": "",\n "id": "",\n "name": "",\n "parent_folder_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"drive_id\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/folders")
.post(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/folders',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({description: '', drive_id: '', id: '', name: '', parent_folder_id: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/file-storage/folders',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: {description: '', drive_id: '', id: '', name: '', parent_folder_id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/file-storage/folders');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
description: '',
drive_id: '',
id: '',
name: '',
parent_folder_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/file-storage/folders',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {description: '', drive_id: '', id: '', name: '', parent_folder_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/folders';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"description":"","drive_id":"","id":"","name":"","parent_folder_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"description": @"",
@"drive_id": @"",
@"id": @"",
@"name": @"",
@"parent_folder_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/folders"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/folders" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"description\": \"\",\n \"drive_id\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/folders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'description' => '',
'drive_id' => '',
'id' => '',
'name' => '',
'parent_folder_id' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/file-storage/folders', [
'body' => '{
"description": "",
"drive_id": "",
"id": "",
"name": "",
"parent_folder_id": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/folders');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'description' => '',
'drive_id' => '',
'id' => '',
'name' => '',
'parent_folder_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'description' => '',
'drive_id' => '',
'id' => '',
'name' => '',
'parent_folder_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/file-storage/folders');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/folders' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"drive_id": "",
"id": "",
"name": "",
"parent_folder_id": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/folders' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"drive_id": "",
"id": "",
"name": "",
"parent_folder_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"description\": \"\",\n \"drive_id\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}"
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/file-storage/folders", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/folders"
payload = {
"description": "",
"drive_id": "",
"id": "",
"name": "",
"parent_folder_id": ""
}
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/folders"
payload <- "{\n \"description\": \"\",\n \"drive_id\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/folders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"description\": \"\",\n \"drive_id\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/file-storage/folders') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"description\": \"\",\n \"drive_id\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/folders";
let payload = json!({
"description": "",
"drive_id": "",
"id": "",
"name": "",
"parent_folder_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/file-storage/folders \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--data '{
"description": "",
"drive_id": "",
"id": "",
"name": "",
"parent_folder_id": ""
}'
echo '{
"description": "",
"drive_id": "",
"id": "",
"name": "",
"parent_folder_id": ""
}' | \
http POST {{baseUrl}}/file-storage/folders \
authorization:'{{apiKey}}' \
content-type:application/json \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method POST \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "description": "",\n "drive_id": "",\n "id": "",\n "name": "",\n "parent_folder_id": ""\n}' \
--output-document \
- {{baseUrl}}/file-storage/folders
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"description": "",
"drive_id": "",
"id": "",
"name": "",
"parent_folder_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/folders")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "add",
"resource": "Folders",
"service": "undefined",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
DELETE
Delete Folder
{{baseUrl}}/file-storage/folders/:id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/folders/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/file-storage/folders/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/file-storage/folders/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/file-storage/folders/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/folders/:id");
var request = new RestRequest("", Method.Delete);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/folders/:id"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/file-storage/folders/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/file-storage/folders/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/folders/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/folders/:id")
.delete(null)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/file-storage/folders/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/file-storage/folders/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/file-storage/folders/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/folders/:id';
const options = {
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/folders/:id',
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/folders/:id")
.delete(null)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/folders/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/file-storage/folders/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/file-storage/folders/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/file-storage/folders/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/folders/:id';
const options = {
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/folders/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/folders/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/folders/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/file-storage/folders/:id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/folders/:id');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/file-storage/folders/:id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/folders/:id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/folders/:id' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("DELETE", "/baseUrl/file-storage/folders/:id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/folders/:id"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/folders/:id"
response <- VERB("DELETE", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/folders/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/file-storage/folders/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/folders/:id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/file-storage/folders/:id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http DELETE {{baseUrl}}/file-storage/folders/:id \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method DELETE \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/file-storage/folders/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/folders/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "delete",
"resource": "Folders",
"service": "undefined",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
GET
Get Folder
{{baseUrl}}/file-storage/folders/:id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/folders/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/file-storage/folders/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/file-storage/folders/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/file-storage/folders/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/folders/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/folders/:id"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/file-storage/folders/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/file-storage/folders/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/folders/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/folders/:id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/file-storage/folders/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/file-storage/folders/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/folders/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/folders/:id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/folders/:id',
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/folders/:id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/folders/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/folders/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/file-storage/folders/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/folders/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/folders/:id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/folders/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/folders/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/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: {{apiKey}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/file-storage/folders/:id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/folders/:id');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/file-storage/folders/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/folders/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/folders/:id' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/file-storage/folders/:id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/folders/:id"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/folders/:id"
response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/folders/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/file-storage/folders/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/folders/:id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/file-storage/folders/:id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/file-storage/folders/:id \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method GET \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/file-storage/folders/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/folders/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"created_at": "2020-09-30T07:43:32.000Z",
"created_by": "12345",
"description": "My Personal Documents",
"id": "12345",
"name": "Documents",
"path": "/Personal/Documents",
"size": 1810673,
"updated_at": "2020-09-30T07:43:32.000Z",
"updated_by": "12345"
},
"operation": "one",
"resource": "Folders",
"service": "undefined",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
PATCH
Rename or move Folder
{{baseUrl}}/file-storage/folders/:id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{
"description": "",
"id": "",
"name": "",
"parent_folder_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/folders/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/file-storage/folders/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json
:form-params {:description ""
:id ""
:name ""
:parent_folder_id ""}})
require "http/client"
url = "{{baseUrl}}/file-storage/folders/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/file-storage/folders/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/folders/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/folders/:id"
payload := strings.NewReader("{\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/file-storage/folders/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 75
{
"description": "",
"id": "",
"name": "",
"parent_folder_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/file-storage/folders/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/folders/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/folders/:id")
.patch(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/file-storage/folders/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
description: '',
id: '',
name: '',
parent_folder_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/file-storage/folders/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/file-storage/folders/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {description: '', id: '', name: '', parent_folder_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/folders/:id';
const options = {
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"description":"","id":"","name":"","parent_folder_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/folders/:id',
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "description": "",\n "id": "",\n "name": "",\n "parent_folder_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/folders/:id")
.patch(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/folders/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({description: '', id: '', name: '', parent_folder_id: ''}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/file-storage/folders/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: {description: '', id: '', name: '', parent_folder_id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/file-storage/folders/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
description: '',
id: '',
name: '',
parent_folder_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/file-storage/folders/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {description: '', id: '', name: '', parent_folder_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/folders/:id';
const options = {
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"description":"","id":"","name":"","parent_folder_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"description": @"",
@"id": @"",
@"name": @"",
@"parent_folder_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/folders/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/folders/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/folders/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => '',
'id' => '',
'name' => '',
'parent_folder_id' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/file-storage/folders/:id', [
'body' => '{
"description": "",
"id": "",
"name": "",
"parent_folder_id": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/folders/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'description' => '',
'id' => '',
'name' => '',
'parent_folder_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'description' => '',
'id' => '',
'name' => '',
'parent_folder_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/file-storage/folders/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/folders/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"id": "",
"name": "",
"parent_folder_id": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/folders/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"id": "",
"name": "",
"parent_folder_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}"
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/file-storage/folders/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/folders/:id"
payload = {
"description": "",
"id": "",
"name": "",
"parent_folder_id": ""
}
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/folders/:id"
payload <- "{\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/folders/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/file-storage/folders/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"description\": \"\",\n \"id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/folders/:id";
let payload = json!({
"description": "",
"id": "",
"name": "",
"parent_folder_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/file-storage/folders/:id \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--data '{
"description": "",
"id": "",
"name": "",
"parent_folder_id": ""
}'
echo '{
"description": "",
"id": "",
"name": "",
"parent_folder_id": ""
}' | \
http PATCH {{baseUrl}}/file-storage/folders/:id \
authorization:'{{apiKey}}' \
content-type:application/json \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method PATCH \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "description": "",\n "id": "",\n "name": "",\n "parent_folder_id": ""\n}' \
--output-document \
- {{baseUrl}}/file-storage/folders/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"description": "",
"id": "",
"name": "",
"parent_folder_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/folders/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "update",
"resource": "Folders",
"service": "undefined",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/shared-links");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/file-storage/shared-links" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json
:form-params {:created_at ""
:download_url ""
:expires_at ""
:password ""
:password_protected false
:scope ""
:target {:id ""
:name ""
:type ""}
:target_id ""
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/file-storage/shared-links"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/file-storage/shared-links"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/shared-links");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/shared-links"
payload := strings.NewReader("{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/file-storage/shared-links HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 244
{
"created_at": "",
"download_url": "",
"expires_at": "",
"password": "",
"password_protected": false,
"scope": "",
"target": {
"id": "",
"name": "",
"type": ""
},
"target_id": "",
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/file-storage/shared-links")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/shared-links"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/shared-links")
.post(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/file-storage/shared-links")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
created_at: '',
download_url: '',
expires_at: '',
password: '',
password_protected: false,
scope: '',
target: {
id: '',
name: '',
type: ''
},
target_id: '',
updated_at: '',
url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/file-storage/shared-links');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/file-storage/shared-links',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
created_at: '',
download_url: '',
expires_at: '',
password: '',
password_protected: false,
scope: '',
target: {id: '', name: '', type: ''},
target_id: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/shared-links';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"created_at":"","download_url":"","expires_at":"","password":"","password_protected":false,"scope":"","target":{"id":"","name":"","type":""},"target_id":"","updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/shared-links',
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "created_at": "",\n "download_url": "",\n "expires_at": "",\n "password": "",\n "password_protected": false,\n "scope": "",\n "target": {\n "id": "",\n "name": "",\n "type": ""\n },\n "target_id": "",\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/shared-links")
.post(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/shared-links',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
created_at: '',
download_url: '',
expires_at: '',
password: '',
password_protected: false,
scope: '',
target: {id: '', name: '', type: ''},
target_id: '',
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/file-storage/shared-links',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: {
created_at: '',
download_url: '',
expires_at: '',
password: '',
password_protected: false,
scope: '',
target: {id: '', name: '', type: ''},
target_id: '',
updated_at: '',
url: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/file-storage/shared-links');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
created_at: '',
download_url: '',
expires_at: '',
password: '',
password_protected: false,
scope: '',
target: {
id: '',
name: '',
type: ''
},
target_id: '',
updated_at: '',
url: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/file-storage/shared-links',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
created_at: '',
download_url: '',
expires_at: '',
password: '',
password_protected: false,
scope: '',
target: {id: '', name: '', type: ''},
target_id: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/shared-links';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"created_at":"","download_url":"","expires_at":"","password":"","password_protected":false,"scope":"","target":{"id":"","name":"","type":""},"target_id":"","updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"created_at": @"",
@"download_url": @"",
@"expires_at": @"",
@"password": @"",
@"password_protected": @NO,
@"scope": @"",
@"target": @{ @"id": @"", @"name": @"", @"type": @"" },
@"target_id": @"",
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/shared-links"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/shared-links" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/shared-links",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'created_at' => '',
'download_url' => '',
'expires_at' => '',
'password' => '',
'password_protected' => null,
'scope' => '',
'target' => [
'id' => '',
'name' => '',
'type' => ''
],
'target_id' => '',
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/file-storage/shared-links', [
'body' => '{
"created_at": "",
"download_url": "",
"expires_at": "",
"password": "",
"password_protected": false,
"scope": "",
"target": {
"id": "",
"name": "",
"type": ""
},
"target_id": "",
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/shared-links');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'created_at' => '',
'download_url' => '',
'expires_at' => '',
'password' => '',
'password_protected' => null,
'scope' => '',
'target' => [
'id' => '',
'name' => '',
'type' => ''
],
'target_id' => '',
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'created_at' => '',
'download_url' => '',
'expires_at' => '',
'password' => '',
'password_protected' => null,
'scope' => '',
'target' => [
'id' => '',
'name' => '',
'type' => ''
],
'target_id' => '',
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/file-storage/shared-links');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/shared-links' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"created_at": "",
"download_url": "",
"expires_at": "",
"password": "",
"password_protected": false,
"scope": "",
"target": {
"id": "",
"name": "",
"type": ""
},
"target_id": "",
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/shared-links' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"created_at": "",
"download_url": "",
"expires_at": "",
"password": "",
"password_protected": false,
"scope": "",
"target": {
"id": "",
"name": "",
"type": ""
},
"target_id": "",
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/file-storage/shared-links", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/shared-links"
payload = {
"created_at": "",
"download_url": "",
"expires_at": "",
"password": "",
"password_protected": False,
"scope": "",
"target": {
"id": "",
"name": "",
"type": ""
},
"target_id": "",
"updated_at": "",
"url": ""
}
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/shared-links"
payload <- "{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/shared-links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/file-storage/shared-links') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/shared-links";
let payload = json!({
"created_at": "",
"download_url": "",
"expires_at": "",
"password": "",
"password_protected": false,
"scope": "",
"target": json!({
"id": "",
"name": "",
"type": ""
}),
"target_id": "",
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/file-storage/shared-links \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--data '{
"created_at": "",
"download_url": "",
"expires_at": "",
"password": "",
"password_protected": false,
"scope": "",
"target": {
"id": "",
"name": "",
"type": ""
},
"target_id": "",
"updated_at": "",
"url": ""
}'
echo '{
"created_at": "",
"download_url": "",
"expires_at": "",
"password": "",
"password_protected": false,
"scope": "",
"target": {
"id": "",
"name": "",
"type": ""
},
"target_id": "",
"updated_at": "",
"url": ""
}' | \
http POST {{baseUrl}}/file-storage/shared-links \
authorization:'{{apiKey}}' \
content-type:application/json \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method POST \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "created_at": "",\n "download_url": "",\n "expires_at": "",\n "password": "",\n "password_protected": false,\n "scope": "",\n "target": {\n "id": "",\n "name": "",\n "type": ""\n },\n "target_id": "",\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/file-storage/shared-links
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"created_at": "",
"download_url": "",
"expires_at": "",
"password": "",
"password_protected": false,
"scope": "",
"target": [
"id": "",
"name": "",
"type": ""
],
"target_id": "",
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/shared-links")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "add",
"resource": "Shared Links",
"service": "dropbox",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/shared-links/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/file-storage/shared-links/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/file-storage/shared-links/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/file-storage/shared-links/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/shared-links/:id");
var request = new RestRequest("", Method.Delete);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/shared-links/:id"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/file-storage/shared-links/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/file-storage/shared-links/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/shared-links/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/shared-links/:id")
.delete(null)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/file-storage/shared-links/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/file-storage/shared-links/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/file-storage/shared-links/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/shared-links/:id';
const options = {
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/shared-links/:id',
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/shared-links/:id")
.delete(null)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/shared-links/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/file-storage/shared-links/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/file-storage/shared-links/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/file-storage/shared-links/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/shared-links/:id';
const options = {
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/shared-links/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/shared-links/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/shared-links/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/file-storage/shared-links/:id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/shared-links/:id');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/file-storage/shared-links/:id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/shared-links/:id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/shared-links/:id' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("DELETE", "/baseUrl/file-storage/shared-links/:id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/shared-links/:id"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/shared-links/:id"
response <- VERB("DELETE", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/shared-links/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/file-storage/shared-links/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/shared-links/:id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/file-storage/shared-links/:id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http DELETE {{baseUrl}}/file-storage/shared-links/:id \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method DELETE \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/file-storage/shared-links/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/shared-links/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "delete",
"resource": "Shared Links",
"service": "dropbox",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/shared-links/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/file-storage/shared-links/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/file-storage/shared-links/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/file-storage/shared-links/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/shared-links/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/shared-links/:id"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/file-storage/shared-links/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/file-storage/shared-links/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/shared-links/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/shared-links/:id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/file-storage/shared-links/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/file-storage/shared-links/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/shared-links/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/shared-links/:id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/shared-links/:id',
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/shared-links/:id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/shared-links/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/shared-links/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/file-storage/shared-links/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/shared-links/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/shared-links/:id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/shared-links/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/shared-links/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/shared-links/: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: {{apiKey}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/file-storage/shared-links/:id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/shared-links/:id');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/file-storage/shared-links/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/shared-links/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/shared-links/:id' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/file-storage/shared-links/:id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/shared-links/:id"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/shared-links/:id"
response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/shared-links/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/file-storage/shared-links/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/shared-links/:id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/file-storage/shared-links/:id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/file-storage/shared-links/:id \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method GET \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/file-storage/shared-links/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/shared-links/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"created_at": "2020-09-30T07:43:32.000Z",
"download_url": "https://www.box.com/shared/static/rh935iit6ewrmw0unyul.jpeg",
"expires_at": "2022-09-30T07:43:32.000Z",
"scope": "company",
"updated_at": "2020-09-30T07:43:32.000Z",
"url": "https://www.box.com/s/vspke7y05sb214wjokpk"
},
"operation": "one",
"resource": "Shared Links",
"service": "dropbox",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/shared-links");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/file-storage/shared-links" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/file-storage/shared-links"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/file-storage/shared-links"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/shared-links");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/shared-links"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/file-storage/shared-links HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/file-storage/shared-links")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/shared-links"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/shared-links")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/file-storage/shared-links")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/file-storage/shared-links');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/shared-links',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/shared-links';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/shared-links',
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/shared-links")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/shared-links',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/shared-links',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/file-storage/shared-links');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/shared-links',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/shared-links';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/shared-links"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/shared-links" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/shared-links",
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: {{apiKey}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/file-storage/shared-links', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/shared-links');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/file-storage/shared-links');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/shared-links' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/shared-links' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/file-storage/shared-links", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/shared-links"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/shared-links"
response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/shared-links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/file-storage/shared-links') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/shared-links";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/file-storage/shared-links \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/file-storage/shared-links \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method GET \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/file-storage/shared-links
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/shared-links")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"links": {
"current": "https://unify.apideck.com/crm/companies",
"next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
"previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D"
},
"meta": {
"items_on_page": 50
},
"operation": "all",
"resource": "Shared Links",
"service": "dropbox",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/shared-links/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/file-storage/shared-links/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json
:form-params {:created_at ""
:download_url ""
:expires_at ""
:password ""
:password_protected false
:scope ""
:target {:id ""
:name ""
:type ""}
:target_id ""
:updated_at ""
:url ""}})
require "http/client"
url = "{{baseUrl}}/file-storage/shared-links/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/file-storage/shared-links/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/shared-links/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/shared-links/:id"
payload := strings.NewReader("{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/file-storage/shared-links/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 244
{
"created_at": "",
"download_url": "",
"expires_at": "",
"password": "",
"password_protected": false,
"scope": "",
"target": {
"id": "",
"name": "",
"type": ""
},
"target_id": "",
"updated_at": "",
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/file-storage/shared-links/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/shared-links/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/shared-links/:id")
.patch(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/file-storage/shared-links/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
created_at: '',
download_url: '',
expires_at: '',
password: '',
password_protected: false,
scope: '',
target: {
id: '',
name: '',
type: ''
},
target_id: '',
updated_at: '',
url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/file-storage/shared-links/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/file-storage/shared-links/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
created_at: '',
download_url: '',
expires_at: '',
password: '',
password_protected: false,
scope: '',
target: {id: '', name: '', type: ''},
target_id: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/shared-links/:id';
const options = {
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"created_at":"","download_url":"","expires_at":"","password":"","password_protected":false,"scope":"","target":{"id":"","name":"","type":""},"target_id":"","updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/shared-links/:id',
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "created_at": "",\n "download_url": "",\n "expires_at": "",\n "password": "",\n "password_protected": false,\n "scope": "",\n "target": {\n "id": "",\n "name": "",\n "type": ""\n },\n "target_id": "",\n "updated_at": "",\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/shared-links/:id")
.patch(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/shared-links/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
created_at: '',
download_url: '',
expires_at: '',
password: '',
password_protected: false,
scope: '',
target: {id: '', name: '', type: ''},
target_id: '',
updated_at: '',
url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/file-storage/shared-links/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: {
created_at: '',
download_url: '',
expires_at: '',
password: '',
password_protected: false,
scope: '',
target: {id: '', name: '', type: ''},
target_id: '',
updated_at: '',
url: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/file-storage/shared-links/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
created_at: '',
download_url: '',
expires_at: '',
password: '',
password_protected: false,
scope: '',
target: {
id: '',
name: '',
type: ''
},
target_id: '',
updated_at: '',
url: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/file-storage/shared-links/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
created_at: '',
download_url: '',
expires_at: '',
password: '',
password_protected: false,
scope: '',
target: {id: '', name: '', type: ''},
target_id: '',
updated_at: '',
url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/shared-links/:id';
const options = {
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"created_at":"","download_url":"","expires_at":"","password":"","password_protected":false,"scope":"","target":{"id":"","name":"","type":""},"target_id":"","updated_at":"","url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"created_at": @"",
@"download_url": @"",
@"expires_at": @"",
@"password": @"",
@"password_protected": @NO,
@"scope": @"",
@"target": @{ @"id": @"", @"name": @"", @"type": @"" },
@"target_id": @"",
@"updated_at": @"",
@"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/shared-links/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/shared-links/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/shared-links/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'created_at' => '',
'download_url' => '',
'expires_at' => '',
'password' => '',
'password_protected' => null,
'scope' => '',
'target' => [
'id' => '',
'name' => '',
'type' => ''
],
'target_id' => '',
'updated_at' => '',
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/file-storage/shared-links/:id', [
'body' => '{
"created_at": "",
"download_url": "",
"expires_at": "",
"password": "",
"password_protected": false,
"scope": "",
"target": {
"id": "",
"name": "",
"type": ""
},
"target_id": "",
"updated_at": "",
"url": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/shared-links/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'created_at' => '',
'download_url' => '',
'expires_at' => '',
'password' => '',
'password_protected' => null,
'scope' => '',
'target' => [
'id' => '',
'name' => '',
'type' => ''
],
'target_id' => '',
'updated_at' => '',
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'created_at' => '',
'download_url' => '',
'expires_at' => '',
'password' => '',
'password_protected' => null,
'scope' => '',
'target' => [
'id' => '',
'name' => '',
'type' => ''
],
'target_id' => '',
'updated_at' => '',
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/file-storage/shared-links/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/shared-links/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"created_at": "",
"download_url": "",
"expires_at": "",
"password": "",
"password_protected": false,
"scope": "",
"target": {
"id": "",
"name": "",
"type": ""
},
"target_id": "",
"updated_at": "",
"url": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/shared-links/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"created_at": "",
"download_url": "",
"expires_at": "",
"password": "",
"password_protected": false,
"scope": "",
"target": {
"id": "",
"name": "",
"type": ""
},
"target_id": "",
"updated_at": "",
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/file-storage/shared-links/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/shared-links/:id"
payload = {
"created_at": "",
"download_url": "",
"expires_at": "",
"password": "",
"password_protected": False,
"scope": "",
"target": {
"id": "",
"name": "",
"type": ""
},
"target_id": "",
"updated_at": "",
"url": ""
}
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/shared-links/:id"
payload <- "{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/shared-links/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/file-storage/shared-links/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"created_at\": \"\",\n \"download_url\": \"\",\n \"expires_at\": \"\",\n \"password\": \"\",\n \"password_protected\": false,\n \"scope\": \"\",\n \"target\": {\n \"id\": \"\",\n \"name\": \"\",\n \"type\": \"\"\n },\n \"target_id\": \"\",\n \"updated_at\": \"\",\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/shared-links/:id";
let payload = json!({
"created_at": "",
"download_url": "",
"expires_at": "",
"password": "",
"password_protected": false,
"scope": "",
"target": json!({
"id": "",
"name": "",
"type": ""
}),
"target_id": "",
"updated_at": "",
"url": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/file-storage/shared-links/:id \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--data '{
"created_at": "",
"download_url": "",
"expires_at": "",
"password": "",
"password_protected": false,
"scope": "",
"target": {
"id": "",
"name": "",
"type": ""
},
"target_id": "",
"updated_at": "",
"url": ""
}'
echo '{
"created_at": "",
"download_url": "",
"expires_at": "",
"password": "",
"password_protected": false,
"scope": "",
"target": {
"id": "",
"name": "",
"type": ""
},
"target_id": "",
"updated_at": "",
"url": ""
}' | \
http PATCH {{baseUrl}}/file-storage/shared-links/:id \
authorization:'{{apiKey}}' \
content-type:application/json \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method PATCH \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "created_at": "",\n "download_url": "",\n "expires_at": "",\n "password": "",\n "password_protected": false,\n "scope": "",\n "target": {\n "id": "",\n "name": "",\n "type": ""\n },\n "target_id": "",\n "updated_at": "",\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/file-storage/shared-links/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"created_at": "",
"download_url": "",
"expires_at": "",
"password": "",
"password_protected": false,
"scope": "",
"target": [
"id": "",
"name": "",
"type": ""
],
"target_id": "",
"updated_at": "",
"url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/shared-links/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "update",
"resource": "Shared Links",
"service": "dropbox",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
DELETE
Abort Upload Session
{{baseUrl}}/file-storage/upload-sessions/:id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/upload-sessions/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/file-storage/upload-sessions/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/file-storage/upload-sessions/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/file-storage/upload-sessions/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/upload-sessions/:id");
var request = new RestRequest("", Method.Delete);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/upload-sessions/:id"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/file-storage/upload-sessions/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/file-storage/upload-sessions/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/upload-sessions/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/upload-sessions/:id")
.delete(null)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/file-storage/upload-sessions/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/file-storage/upload-sessions/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/file-storage/upload-sessions/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/upload-sessions/:id';
const options = {
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/upload-sessions/:id',
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/upload-sessions/:id")
.delete(null)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/upload-sessions/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/file-storage/upload-sessions/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/file-storage/upload-sessions/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/file-storage/upload-sessions/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/upload-sessions/:id';
const options = {
method: 'DELETE',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/upload-sessions/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/upload-sessions/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/upload-sessions/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/file-storage/upload-sessions/:id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/upload-sessions/:id');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/file-storage/upload-sessions/:id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/upload-sessions/:id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/upload-sessions/:id' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("DELETE", "/baseUrl/file-storage/upload-sessions/:id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/upload-sessions/:id"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/upload-sessions/:id"
response <- VERB("DELETE", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/upload-sessions/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/file-storage/upload-sessions/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/upload-sessions/:id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/file-storage/upload-sessions/:id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http DELETE {{baseUrl}}/file-storage/upload-sessions/:id \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method DELETE \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/file-storage/upload-sessions/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/upload-sessions/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "one",
"resource": "UploadSessions",
"service": "dropbox",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
POST
Finish Upload Session
{{baseUrl}}/file-storage/upload-sessions/:id/finish
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
id
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/upload-sessions/:id/finish");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/file-storage/upload-sessions/:id/finish" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json})
require "http/client"
url = "{{baseUrl}}/file-storage/upload-sessions/:id/finish"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/file-storage/upload-sessions/:id/finish"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/upload-sessions/:id/finish");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/upload-sessions/:id/finish"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/file-storage/upload-sessions/:id/finish HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/file-storage/upload-sessions/:id/finish")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/upload-sessions/:id/finish"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{}");
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/upload-sessions/:id/finish")
.post(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/file-storage/upload-sessions/:id/finish")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{}")
.asString();
const data = JSON.stringify({});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/file-storage/upload-sessions/:id/finish');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/file-storage/upload-sessions/:id/finish',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/upload-sessions/:id/finish';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/upload-sessions/:id/finish',
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/upload-sessions/:id/finish")
.post(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/upload-sessions/:id/finish',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/file-storage/upload-sessions/:id/finish',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: {},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/file-storage/upload-sessions/:id/finish');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/file-storage/upload-sessions/:id/finish',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/upload-sessions/:id/finish';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/upload-sessions/:id/finish"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/upload-sessions/:id/finish" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/upload-sessions/:id/finish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/file-storage/upload-sessions/:id/finish', [
'body' => '{}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/upload-sessions/:id/finish');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
]));
$request->setRequestUrl('{{baseUrl}}/file-storage/upload-sessions/:id/finish');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/upload-sessions/:id/finish' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/upload-sessions/:id/finish' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{}"
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/file-storage/upload-sessions/:id/finish", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/upload-sessions/:id/finish"
payload = {}
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/upload-sessions/:id/finish"
payload <- "{}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/upload-sessions/:id/finish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/file-storage/upload-sessions/:id/finish') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.body = "{}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/upload-sessions/:id/finish";
let payload = json!({});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/file-storage/upload-sessions/:id/finish \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--data '{}'
echo '{}' | \
http POST {{baseUrl}}/file-storage/upload-sessions/:id/finish \
authorization:'{{apiKey}}' \
content-type:application/json \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method POST \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/file-storage/upload-sessions/:id/finish
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/upload-sessions/:id/finish")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"created_at": "2020-09-30T07:43:32.000Z",
"created_by": "12345",
"description": "A sample image",
"downstream_id": "12345",
"id": "12345",
"mime_type": "image/jpeg",
"name": "sample.jpg",
"path": "/Documents/sample.jpg",
"size": 1810673,
"type": "file",
"updated_at": "2020-09-30T07:43:32.000Z",
"updated_by": "12345"
},
"operation": "one",
"resource": "files",
"service": "google-drive",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
GET
Get Upload Session
{{baseUrl}}/file-storage/upload-sessions/:id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/upload-sessions/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/file-storage/upload-sessions/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/file-storage/upload-sessions/:id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/file-storage/upload-sessions/:id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/upload-sessions/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/upload-sessions/:id"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/file-storage/upload-sessions/:id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/file-storage/upload-sessions/:id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/upload-sessions/:id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/upload-sessions/:id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/file-storage/upload-sessions/:id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/file-storage/upload-sessions/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/upload-sessions/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/upload-sessions/:id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/upload-sessions/:id',
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/upload-sessions/:id")
.get()
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/upload-sessions/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/upload-sessions/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/file-storage/upload-sessions/:id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/file-storage/upload-sessions/:id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/upload-sessions/:id';
const options = {
method: 'GET',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/upload-sessions/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/upload-sessions/:id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/upload-sessions/: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: {{apiKey}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/file-storage/upload-sessions/:id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/upload-sessions/:id');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/file-storage/upload-sessions/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/upload-sessions/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/upload-sessions/:id' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/file-storage/upload-sessions/:id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/upload-sessions/:id"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/upload-sessions/:id"
response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/upload-sessions/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/file-storage/upload-sessions/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/upload-sessions/:id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/file-storage/upload-sessions/:id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/file-storage/upload-sessions/:id \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method GET \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/file-storage/upload-sessions/:id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/upload-sessions/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"expires_at": "2022-09-30T07:43:32.000Z",
"id": "12345",
"parallel_upload_supported": true,
"part_size": 1000000,
"success": true,
"uploaded_byte_range": "0-42"
},
"operation": "one",
"resource": "UploadSessions",
"service": "dropbox",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
POST
Start Upload Session
{{baseUrl}}/file-storage/upload-sessions
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
BODY json
{
"drive_id": "",
"name": "",
"parent_folder_id": "",
"size": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/upload-sessions");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"drive_id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\",\n \"size\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/file-storage/upload-sessions" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json
:form-params {:drive_id ""
:name ""
:parent_folder_id ""
:size 0}})
require "http/client"
url = "{{baseUrl}}/file-storage/upload-sessions"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"drive_id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\",\n \"size\": 0\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/file-storage/upload-sessions"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"drive_id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\",\n \"size\": 0\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/upload-sessions");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"drive_id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\",\n \"size\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/upload-sessions"
payload := strings.NewReader("{\n \"drive_id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\",\n \"size\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/file-storage/upload-sessions HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 73
{
"drive_id": "",
"name": "",
"parent_folder_id": "",
"size": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/file-storage/upload-sessions")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"drive_id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\",\n \"size\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/upload-sessions"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"drive_id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\",\n \"size\": 0\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"drive_id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\",\n \"size\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/upload-sessions")
.post(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/file-storage/upload-sessions")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"drive_id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\",\n \"size\": 0\n}")
.asString();
const data = JSON.stringify({
drive_id: '',
name: '',
parent_folder_id: '',
size: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/file-storage/upload-sessions');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/file-storage/upload-sessions',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {drive_id: '', name: '', parent_folder_id: '', size: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/upload-sessions';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"drive_id":"","name":"","parent_folder_id":"","size":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/upload-sessions',
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "drive_id": "",\n "name": "",\n "parent_folder_id": "",\n "size": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"drive_id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\",\n \"size\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/upload-sessions")
.post(body)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/upload-sessions',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({drive_id: '', name: '', parent_folder_id: '', size: 0}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/file-storage/upload-sessions',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: {drive_id: '', name: '', parent_folder_id: '', size: 0},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/file-storage/upload-sessions');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
drive_id: '',
name: '',
parent_folder_id: '',
size: 0
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/file-storage/upload-sessions',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {drive_id: '', name: '', parent_folder_id: '', size: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/upload-sessions';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"drive_id":"","name":"","parent_folder_id":"","size":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"drive_id": @"",
@"name": @"",
@"parent_folder_id": @"",
@"size": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/upload-sessions"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/upload-sessions" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"drive_id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\",\n \"size\": 0\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/upload-sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'drive_id' => '',
'name' => '',
'parent_folder_id' => '',
'size' => 0
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/file-storage/upload-sessions', [
'body' => '{
"drive_id": "",
"name": "",
"parent_folder_id": "",
"size": 0
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/upload-sessions');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'drive_id' => '',
'name' => '',
'parent_folder_id' => '',
'size' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'drive_id' => '',
'name' => '',
'parent_folder_id' => '',
'size' => 0
]));
$request->setRequestUrl('{{baseUrl}}/file-storage/upload-sessions');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/upload-sessions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"drive_id": "",
"name": "",
"parent_folder_id": "",
"size": 0
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/upload-sessions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"drive_id": "",
"name": "",
"parent_folder_id": "",
"size": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"drive_id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\",\n \"size\": 0\n}"
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/file-storage/upload-sessions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/upload-sessions"
payload = {
"drive_id": "",
"name": "",
"parent_folder_id": "",
"size": 0
}
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/upload-sessions"
payload <- "{\n \"drive_id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\",\n \"size\": 0\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/upload-sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"drive_id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\",\n \"size\": 0\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/file-storage/upload-sessions') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"drive_id\": \"\",\n \"name\": \"\",\n \"parent_folder_id\": \"\",\n \"size\": 0\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/upload-sessions";
let payload = json!({
"drive_id": "",
"name": "",
"parent_folder_id": "",
"size": 0
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/file-storage/upload-sessions \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--data '{
"drive_id": "",
"name": "",
"parent_folder_id": "",
"size": 0
}'
echo '{
"drive_id": "",
"name": "",
"parent_folder_id": "",
"size": 0
}' | \
http POST {{baseUrl}}/file-storage/upload-sessions \
authorization:'{{apiKey}}' \
content-type:application/json \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method POST \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "drive_id": "",\n "name": "",\n "parent_folder_id": "",\n "size": 0\n}' \
--output-document \
- {{baseUrl}}/file-storage/upload-sessions
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"drive_id": "",
"name": "",
"parent_folder_id": "",
"size": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/upload-sessions")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "one",
"resource": "UploadSessions",
"service": "dropbox",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}
PUT
Upload part of File to Upload Session
{{baseUrl}}/file-storage/upload-sessions/:id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
part_number
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/file-storage/upload-sessions/:id?part_number=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/file-storage/upload-sessions/:id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:query-params {:part_number ""}})
require "http/client"
url = "{{baseUrl}}/file-storage/upload-sessions/:id?part_number="
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
}
response = HTTP::Client.put url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/file-storage/upload-sessions/:id?part_number="),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/file-storage/upload-sessions/:id?part_number=");
var request = new RestRequest("", Method.Put);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/file-storage/upload-sessions/:id?part_number="
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("x-apideck-consumer-id", "")
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("authorization", "{{apiKey}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/file-storage/upload-sessions/:id?part_number= HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/file-storage/upload-sessions/:id?part_number=")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/file-storage/upload-sessions/:id?part_number="))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.method("PUT", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/file-storage/upload-sessions/:id?part_number=")
.put(null)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/file-storage/upload-sessions/:id?part_number=")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/file-storage/upload-sessions/:id?part_number=');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/file-storage/upload-sessions/:id',
params: {part_number: ''},
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/file-storage/upload-sessions/:id?part_number=';
const options = {
method: 'PUT',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/file-storage/upload-sessions/:id?part_number=',
method: 'PUT',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/file-storage/upload-sessions/:id?part_number=")
.put(null)
.addHeader("x-apideck-consumer-id", "")
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/file-storage/upload-sessions/:id?part_number=',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/file-storage/upload-sessions/:id',
qs: {part_number: ''},
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/file-storage/upload-sessions/:id');
req.query({
part_number: ''
});
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/file-storage/upload-sessions/:id',
params: {part_number: ''},
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/file-storage/upload-sessions/:id?part_number=';
const options = {
method: 'PUT',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
@"x-apideck-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/file-storage/upload-sessions/:id?part_number="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/file-storage/upload-sessions/:id?part_number=" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-consumer-id", "");
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/file-storage/upload-sessions/:id?part_number=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"x-apideck-app-id: ",
"x-apideck-consumer-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/file-storage/upload-sessions/:id?part_number=', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/file-storage/upload-sessions/:id');
$request->setMethod(HTTP_METH_PUT);
$request->setQueryData([
'part_number' => ''
]);
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/file-storage/upload-sessions/:id');
$request->setRequestMethod('PUT');
$request->setQuery(new http\QueryString([
'part_number' => ''
]));
$request->setHeaders([
'x-apideck-consumer-id' => '',
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/file-storage/upload-sessions/:id?part_number=' -Method PUT -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/file-storage/upload-sessions/:id?part_number=' -Method PUT -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("PUT", "/baseUrl/file-storage/upload-sessions/:id?part_number=", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/file-storage/upload-sessions/:id"
querystring = {"part_number":""}
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.put(url, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/file-storage/upload-sessions/:id"
queryString <- list(part_number = "")
response <- VERB("PUT", url, query = queryString, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/file-storage/upload-sessions/:id?part_number=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.put('/baseUrl/file-storage/upload-sessions/:id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.params['part_number'] = ''
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/file-storage/upload-sessions/:id";
let querystring = [
("part_number", ""),
];
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-consumer-id", "".parse().unwrap());
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.query(&querystring)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url '{{baseUrl}}/file-storage/upload-sessions/:id?part_number=' \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http PUT '{{baseUrl}}/file-storage/upload-sessions/:id?part_number=' \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method PUT \
--header 'x-apideck-consumer-id: ' \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- '{{baseUrl}}/file-storage/upload-sessions/:id?part_number='
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/file-storage/upload-sessions/:id?part_number=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": {
"id": "12345"
},
"operation": "one",
"resource": "UploadSessions",
"service": "dropbox",
"status": "OK",
"status_code": 200
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#requestvalidationerror",
"status_code": 400,
"type_name": "RequestValidationError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
"error": "Unauthorized",
"message": "Unauthorized Request",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 401,
"type_name": "UnauthorizedError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "You have reached your limit of 2000",
"error": "Payment Required",
"message": "Request Limit Reached",
"ref": "https://developers.apideck.com/errors#requestlimiterror",
"status_code": 402,
"type_name": "RequestLimitError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Not Found",
"message": "Unknown Widget",
"ref": "https://developers.apideck.com/errors#entitynotfounderror",
"status_code": 404,
"type_name": "EntityNotFoundError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unprocessable request, please verify your request headers and body.",
"error": "Unprocessable Entity",
"message": "Invalid State",
"ref": "https://developers.apideck.com/errors#invalidstateerror",
"status_code": 422,
"type_name": "InvalidStateError"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"error": "Bad Request",
"message": "Invalid Params",
"ref": "https://developers.apideck.com/errors#unauthorizederror",
"status_code": 400,
"type_name": "RequestHeadersValidationError"
}