Vault API
Vault APIv9.3.0
Welcome to the Vault API 👋 When you're looking to connect to an API, the first step is authentication. Vault helps you handle OAuth flows, store API keys, and refresh access tokens from users (called consumers in Apideck). Base URL The base URL for all API requests is https://unify.apideck.com Get Started To use the Apideck APIs, you need to sign up for free at https://app.apideck.com/signup. Follow the steps below to get started. - Create a free account. - Go to the Dashboard. - Get your API key and the application ID. - Select and configure the integrations you want to make available to…
- Endpoints
- 20 (10 GET, 5 POST, 3 PATCH, 2 DELETE)
- 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.
GET
Authorize
{{baseUrl}}/vault/authorize/:service_id/:application_id
QUERY PARAMS
state
redirect_uri
service_id
application_id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/vault/authorize/:service_id/:application_id?state=&redirect_uri=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/vault/authorize/:service_id/:application_id" {:query-params {:state ""
:redirect_uri ""}})
require "http/client"
url = "{{baseUrl}}/vault/authorize/:service_id/:application_id?state=&redirect_uri="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/vault/authorize/:service_id/:application_id?state=&redirect_uri="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/vault/authorize/:service_id/:application_id?state=&redirect_uri=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/vault/authorize/:service_id/:application_id?state=&redirect_uri="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/vault/authorize/:service_id/:application_id?state=&redirect_uri= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/vault/authorize/:service_id/:application_id?state=&redirect_uri=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/vault/authorize/:service_id/:application_id?state=&redirect_uri="))
.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}}/vault/authorize/:service_id/:application_id?state=&redirect_uri=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/vault/authorize/:service_id/:application_id?state=&redirect_uri=")
.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}}/vault/authorize/:service_id/:application_id?state=&redirect_uri=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/vault/authorize/:service_id/:application_id',
params: {state: '', redirect_uri: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/vault/authorize/:service_id/:application_id?state=&redirect_uri=';
const options = {method: 'GET'};
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}}/vault/authorize/:service_id/:application_id?state=&redirect_uri=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/vault/authorize/:service_id/:application_id?state=&redirect_uri=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/vault/authorize/:service_id/:application_id?state=&redirect_uri=',
headers: {}
};
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}}/vault/authorize/:service_id/:application_id',
qs: {state: '', redirect_uri: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/vault/authorize/:service_id/:application_id');
req.query({
state: '',
redirect_uri: ''
});
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}}/vault/authorize/:service_id/:application_id',
params: {state: '', redirect_uri: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/vault/authorize/:service_id/:application_id?state=&redirect_uri=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/vault/authorize/:service_id/:application_id?state=&redirect_uri="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/vault/authorize/:service_id/:application_id?state=&redirect_uri=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/vault/authorize/:service_id/:application_id?state=&redirect_uri=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/vault/authorize/:service_id/:application_id?state=&redirect_uri=');
echo $response->getBody();
setUrl('{{baseUrl}}/vault/authorize/:service_id/:application_id');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'state' => '',
'redirect_uri' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/vault/authorize/:service_id/:application_id');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'state' => '',
'redirect_uri' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/vault/authorize/:service_id/:application_id?state=&redirect_uri=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/vault/authorize/:service_id/:application_id?state=&redirect_uri=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/vault/authorize/:service_id/:application_id?state=&redirect_uri=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/vault/authorize/:service_id/:application_id"
querystring = {"state":"","redirect_uri":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/vault/authorize/:service_id/:application_id"
queryString <- list(
state = "",
redirect_uri = ""
)
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/vault/authorize/:service_id/:application_id?state=&redirect_uri=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/vault/authorize/:service_id/:application_id') do |req|
req.params['state'] = ''
req.params['redirect_uri'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/vault/authorize/:service_id/:application_id";
let querystring = [
("state", ""),
("redirect_uri", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/vault/authorize/:service_id/:application_id?state=&redirect_uri='
http GET '{{baseUrl}}/vault/authorize/:service_id/:application_id?state=&redirect_uri='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/vault/authorize/:service_id/:application_id?state=&redirect_uri='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/vault/authorize/:service_id/:application_id?state=&redirect_uri=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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()
GET
Callback
{{baseUrl}}/vault/callback
QUERY PARAMS
state
code
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/vault/callback?state=&code=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/vault/callback" {:query-params {:state ""
:code ""}})
require "http/client"
url = "{{baseUrl}}/vault/callback?state=&code="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/vault/callback?state=&code="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/vault/callback?state=&code=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/vault/callback?state=&code="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/vault/callback?state=&code= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/vault/callback?state=&code=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/vault/callback?state=&code="))
.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}}/vault/callback?state=&code=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/vault/callback?state=&code=")
.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}}/vault/callback?state=&code=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/vault/callback',
params: {state: '', code: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/vault/callback?state=&code=';
const options = {method: 'GET'};
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}}/vault/callback?state=&code=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/vault/callback?state=&code=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/vault/callback?state=&code=',
headers: {}
};
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}}/vault/callback',
qs: {state: '', code: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/vault/callback');
req.query({
state: '',
code: ''
});
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}}/vault/callback',
params: {state: '', code: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/vault/callback?state=&code=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/vault/callback?state=&code="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/vault/callback?state=&code=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/vault/callback?state=&code=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/vault/callback?state=&code=');
echo $response->getBody();
setUrl('{{baseUrl}}/vault/callback');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'state' => '',
'code' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/vault/callback');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'state' => '',
'code' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/vault/callback?state=&code=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/vault/callback?state=&code=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/vault/callback?state=&code=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/vault/callback"
querystring = {"state":"","code":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/vault/callback"
queryString <- list(
state = "",
code = ""
)
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/vault/callback?state=&code=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/vault/callback') do |req|
req.params['state'] = ''
req.params['code'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/vault/callback";
let querystring = [
("state", ""),
("code", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/vault/callback?state=&code='
http GET '{{baseUrl}}/vault/callback?state=&code='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/vault/callback?state=&code='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/vault/callback?state=&code=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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()
POST
Create connection
{{baseUrl}}/vault/connections/:unified_api/:service_id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
service_id
unified_api
BODY json
{
"auth_type": "",
"authorize_url": "",
"configurable_resources": [],
"configuration": [
{
"defaults": [
{
"id": "",
"options": [],
"target": "",
"value": ""
}
],
"resource": ""
}
],
"created_at": "",
"enabled": false,
"form_fields": [
{
"allow_custom_values": false,
"custom_field": false,
"description": "",
"disabled": false,
"hidden": false,
"id": "",
"label": "",
"options": [],
"placeholder": "",
"prefix": "",
"required": false,
"sensitive": false,
"suffix": "",
"type": ""
}
],
"has_guide": false,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": {},
"name": "",
"oauth_grant_type": "",
"resource_schema_support": [],
"resource_settings_support": [],
"revoke_url": "",
"service_id": "",
"settings": {},
"settings_required_for_authorization": [],
"state": "",
"status": "",
"subscriptions": [
{
"created_at": "",
"downstream_event_types": [],
"downstream_id": "",
"execute_url": "",
"unify_event_types": []
}
],
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": false,
"website": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/vault/connections/:unified_api/:service_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 \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/vault/connections/:unified_api/:service_id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json
:form-params {:auth_type ""
:authorize_url ""
:configurable_resources []
:configuration [{:defaults [{:id ""
:options []
:target ""
:value ""}]
:resource ""}]
:created_at ""
:enabled false
:form_fields [{:allow_custom_values false
:custom_field false
:description ""
:disabled false
:hidden false
:id ""
:label ""
:options []
:placeholder ""
:prefix ""
:required false
:sensitive false
:suffix ""
:type ""}]
:has_guide false
:icon ""
:id ""
:integration_state ""
:logo ""
:metadata {}
:name ""
:oauth_grant_type ""
:resource_schema_support []
:resource_settings_support []
:revoke_url ""
:service_id ""
:settings {}
:settings_required_for_authorization []
:state ""
:status ""
:subscriptions [{:created_at ""
:downstream_event_types []
:downstream_id ""
:execute_url ""
:unify_event_types []}]
:tag_line ""
:unified_api ""
:updated_at ""
:validation_support false
:website ""}})
require "http/client"
url = "{{baseUrl}}/vault/connections/:unified_api/:service_id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\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}}/vault/connections/:unified_api/:service_id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\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}}/vault/connections/:unified_api/:service_id");
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 \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/vault/connections/:unified_api/:service_id"
payload := strings.NewReader("{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\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/vault/connections/:unified_api/:service_id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 1314
{
"auth_type": "",
"authorize_url": "",
"configurable_resources": [],
"configuration": [
{
"defaults": [
{
"id": "",
"options": [],
"target": "",
"value": ""
}
],
"resource": ""
}
],
"created_at": "",
"enabled": false,
"form_fields": [
{
"allow_custom_values": false,
"custom_field": false,
"description": "",
"disabled": false,
"hidden": false,
"id": "",
"label": "",
"options": [],
"placeholder": "",
"prefix": "",
"required": false,
"sensitive": false,
"suffix": "",
"type": ""
}
],
"has_guide": false,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": {},
"name": "",
"oauth_grant_type": "",
"resource_schema_support": [],
"resource_settings_support": [],
"revoke_url": "",
"service_id": "",
"settings": {},
"settings_required_for_authorization": [],
"state": "",
"status": "",
"subscriptions": [
{
"created_at": "",
"downstream_event_types": [],
"downstream_id": "",
"execute_url": "",
"unify_event_types": []
}
],
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": false,
"website": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/vault/connections/:unified_api/:service_id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/vault/connections/:unified_api/:service_id"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\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 \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/vault/connections/:unified_api/:service_id")
.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}}/vault/connections/:unified_api/:service_id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\n}")
.asString();
const data = JSON.stringify({
auth_type: '',
authorize_url: '',
configurable_resources: [],
configuration: [
{
defaults: [
{
id: '',
options: [],
target: '',
value: ''
}
],
resource: ''
}
],
created_at: '',
enabled: false,
form_fields: [
{
allow_custom_values: false,
custom_field: false,
description: '',
disabled: false,
hidden: false,
id: '',
label: '',
options: [],
placeholder: '',
prefix: '',
required: false,
sensitive: false,
suffix: '',
type: ''
}
],
has_guide: false,
icon: '',
id: '',
integration_state: '',
logo: '',
metadata: {},
name: '',
oauth_grant_type: '',
resource_schema_support: [],
resource_settings_support: [],
revoke_url: '',
service_id: '',
settings: {},
settings_required_for_authorization: [],
state: '',
status: '',
subscriptions: [
{
created_at: '',
downstream_event_types: [],
downstream_id: '',
execute_url: '',
unify_event_types: []
}
],
tag_line: '',
unified_api: '',
updated_at: '',
validation_support: false,
website: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/vault/connections/:unified_api/:service_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: 'POST',
url: '{{baseUrl}}/vault/connections/:unified_api/:service_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
auth_type: '',
authorize_url: '',
configurable_resources: [],
configuration: [{defaults: [{id: '', options: [], target: '', value: ''}], resource: ''}],
created_at: '',
enabled: false,
form_fields: [
{
allow_custom_values: false,
custom_field: false,
description: '',
disabled: false,
hidden: false,
id: '',
label: '',
options: [],
placeholder: '',
prefix: '',
required: false,
sensitive: false,
suffix: '',
type: ''
}
],
has_guide: false,
icon: '',
id: '',
integration_state: '',
logo: '',
metadata: {},
name: '',
oauth_grant_type: '',
resource_schema_support: [],
resource_settings_support: [],
revoke_url: '',
service_id: '',
settings: {},
settings_required_for_authorization: [],
state: '',
status: '',
subscriptions: [
{
created_at: '',
downstream_event_types: [],
downstream_id: '',
execute_url: '',
unify_event_types: []
}
],
tag_line: '',
unified_api: '',
updated_at: '',
validation_support: false,
website: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/vault/connections/:unified_api/:service_id';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"auth_type":"","authorize_url":"","configurable_resources":[],"configuration":[{"defaults":[{"id":"","options":[],"target":"","value":""}],"resource":""}],"created_at":"","enabled":false,"form_fields":[{"allow_custom_values":false,"custom_field":false,"description":"","disabled":false,"hidden":false,"id":"","label":"","options":[],"placeholder":"","prefix":"","required":false,"sensitive":false,"suffix":"","type":""}],"has_guide":false,"icon":"","id":"","integration_state":"","logo":"","metadata":{},"name":"","oauth_grant_type":"","resource_schema_support":[],"resource_settings_support":[],"revoke_url":"","service_id":"","settings":{},"settings_required_for_authorization":[],"state":"","status":"","subscriptions":[{"created_at":"","downstream_event_types":[],"downstream_id":"","execute_url":"","unify_event_types":[]}],"tag_line":"","unified_api":"","updated_at":"","validation_support":false,"website":""}'
};
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}}/vault/connections/:unified_api/:service_id',
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "auth_type": "",\n "authorize_url": "",\n "configurable_resources": [],\n "configuration": [\n {\n "defaults": [\n {\n "id": "",\n "options": [],\n "target": "",\n "value": ""\n }\n ],\n "resource": ""\n }\n ],\n "created_at": "",\n "enabled": false,\n "form_fields": [\n {\n "allow_custom_values": false,\n "custom_field": false,\n "description": "",\n "disabled": false,\n "hidden": false,\n "id": "",\n "label": "",\n "options": [],\n "placeholder": "",\n "prefix": "",\n "required": false,\n "sensitive": false,\n "suffix": "",\n "type": ""\n }\n ],\n "has_guide": false,\n "icon": "",\n "id": "",\n "integration_state": "",\n "logo": "",\n "metadata": {},\n "name": "",\n "oauth_grant_type": "",\n "resource_schema_support": [],\n "resource_settings_support": [],\n "revoke_url": "",\n "service_id": "",\n "settings": {},\n "settings_required_for_authorization": [],\n "state": "",\n "status": "",\n "subscriptions": [\n {\n "created_at": "",\n "downstream_event_types": [],\n "downstream_id": "",\n "execute_url": "",\n "unify_event_types": []\n }\n ],\n "tag_line": "",\n "unified_api": "",\n "updated_at": "",\n "validation_support": false,\n "website": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/vault/connections/:unified_api/:service_id")
.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/vault/connections/:unified_api/:service_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({
auth_type: '',
authorize_url: '',
configurable_resources: [],
configuration: [{defaults: [{id: '', options: [], target: '', value: ''}], resource: ''}],
created_at: '',
enabled: false,
form_fields: [
{
allow_custom_values: false,
custom_field: false,
description: '',
disabled: false,
hidden: false,
id: '',
label: '',
options: [],
placeholder: '',
prefix: '',
required: false,
sensitive: false,
suffix: '',
type: ''
}
],
has_guide: false,
icon: '',
id: '',
integration_state: '',
logo: '',
metadata: {},
name: '',
oauth_grant_type: '',
resource_schema_support: [],
resource_settings_support: [],
revoke_url: '',
service_id: '',
settings: {},
settings_required_for_authorization: [],
state: '',
status: '',
subscriptions: [
{
created_at: '',
downstream_event_types: [],
downstream_id: '',
execute_url: '',
unify_event_types: []
}
],
tag_line: '',
unified_api: '',
updated_at: '',
validation_support: false,
website: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/vault/connections/:unified_api/:service_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: {
auth_type: '',
authorize_url: '',
configurable_resources: [],
configuration: [{defaults: [{id: '', options: [], target: '', value: ''}], resource: ''}],
created_at: '',
enabled: false,
form_fields: [
{
allow_custom_values: false,
custom_field: false,
description: '',
disabled: false,
hidden: false,
id: '',
label: '',
options: [],
placeholder: '',
prefix: '',
required: false,
sensitive: false,
suffix: '',
type: ''
}
],
has_guide: false,
icon: '',
id: '',
integration_state: '',
logo: '',
metadata: {},
name: '',
oauth_grant_type: '',
resource_schema_support: [],
resource_settings_support: [],
revoke_url: '',
service_id: '',
settings: {},
settings_required_for_authorization: [],
state: '',
status: '',
subscriptions: [
{
created_at: '',
downstream_event_types: [],
downstream_id: '',
execute_url: '',
unify_event_types: []
}
],
tag_line: '',
unified_api: '',
updated_at: '',
validation_support: false,
website: ''
},
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}}/vault/connections/:unified_api/:service_id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
auth_type: '',
authorize_url: '',
configurable_resources: [],
configuration: [
{
defaults: [
{
id: '',
options: [],
target: '',
value: ''
}
],
resource: ''
}
],
created_at: '',
enabled: false,
form_fields: [
{
allow_custom_values: false,
custom_field: false,
description: '',
disabled: false,
hidden: false,
id: '',
label: '',
options: [],
placeholder: '',
prefix: '',
required: false,
sensitive: false,
suffix: '',
type: ''
}
],
has_guide: false,
icon: '',
id: '',
integration_state: '',
logo: '',
metadata: {},
name: '',
oauth_grant_type: '',
resource_schema_support: [],
resource_settings_support: [],
revoke_url: '',
service_id: '',
settings: {},
settings_required_for_authorization: [],
state: '',
status: '',
subscriptions: [
{
created_at: '',
downstream_event_types: [],
downstream_id: '',
execute_url: '',
unify_event_types: []
}
],
tag_line: '',
unified_api: '',
updated_at: '',
validation_support: false,
website: ''
});
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}}/vault/connections/:unified_api/:service_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
auth_type: '',
authorize_url: '',
configurable_resources: [],
configuration: [{defaults: [{id: '', options: [], target: '', value: ''}], resource: ''}],
created_at: '',
enabled: false,
form_fields: [
{
allow_custom_values: false,
custom_field: false,
description: '',
disabled: false,
hidden: false,
id: '',
label: '',
options: [],
placeholder: '',
prefix: '',
required: false,
sensitive: false,
suffix: '',
type: ''
}
],
has_guide: false,
icon: '',
id: '',
integration_state: '',
logo: '',
metadata: {},
name: '',
oauth_grant_type: '',
resource_schema_support: [],
resource_settings_support: [],
revoke_url: '',
service_id: '',
settings: {},
settings_required_for_authorization: [],
state: '',
status: '',
subscriptions: [
{
created_at: '',
downstream_event_types: [],
downstream_id: '',
execute_url: '',
unify_event_types: []
}
],
tag_line: '',
unified_api: '',
updated_at: '',
validation_support: false,
website: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/vault/connections/:unified_api/:service_id';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"auth_type":"","authorize_url":"","configurable_resources":[],"configuration":[{"defaults":[{"id":"","options":[],"target":"","value":""}],"resource":""}],"created_at":"","enabled":false,"form_fields":[{"allow_custom_values":false,"custom_field":false,"description":"","disabled":false,"hidden":false,"id":"","label":"","options":[],"placeholder":"","prefix":"","required":false,"sensitive":false,"suffix":"","type":""}],"has_guide":false,"icon":"","id":"","integration_state":"","logo":"","metadata":{},"name":"","oauth_grant_type":"","resource_schema_support":[],"resource_settings_support":[],"revoke_url":"","service_id":"","settings":{},"settings_required_for_authorization":[],"state":"","status":"","subscriptions":[{"created_at":"","downstream_event_types":[],"downstream_id":"","execute_url":"","unify_event_types":[]}],"tag_line":"","unified_api":"","updated_at":"","validation_support":false,"website":""}'
};
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 = @{ @"auth_type": @"",
@"authorize_url": @"",
@"configurable_resources": @[ ],
@"configuration": @[ @{ @"defaults": @[ @{ @"id": @"", @"options": @[ ], @"target": @"", @"value": @"" } ], @"resource": @"" } ],
@"created_at": @"",
@"enabled": @NO,
@"form_fields": @[ @{ @"allow_custom_values": @NO, @"custom_field": @NO, @"description": @"", @"disabled": @NO, @"hidden": @NO, @"id": @"", @"label": @"", @"options": @[ ], @"placeholder": @"", @"prefix": @"", @"required": @NO, @"sensitive": @NO, @"suffix": @"", @"type": @"" } ],
@"has_guide": @NO,
@"icon": @"",
@"id": @"",
@"integration_state": @"",
@"logo": @"",
@"metadata": @{ },
@"name": @"",
@"oauth_grant_type": @"",
@"resource_schema_support": @[ ],
@"resource_settings_support": @[ ],
@"revoke_url": @"",
@"service_id": @"",
@"settings": @{ },
@"settings_required_for_authorization": @[ ],
@"state": @"",
@"status": @"",
@"subscriptions": @[ @{ @"created_at": @"", @"downstream_event_types": @[ ], @"downstream_id": @"", @"execute_url": @"", @"unify_event_types": @[ ] } ],
@"tag_line": @"",
@"unified_api": @"",
@"updated_at": @"",
@"validation_support": @NO,
@"website": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/vault/connections/:unified_api/:service_id"]
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}}/vault/connections/:unified_api/:service_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 \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/vault/connections/:unified_api/:service_id",
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([
'auth_type' => '',
'authorize_url' => '',
'configurable_resources' => [
],
'configuration' => [
[
'defaults' => [
[
'id' => '',
'options' => [
],
'target' => '',
'value' => ''
]
],
'resource' => ''
]
],
'created_at' => '',
'enabled' => null,
'form_fields' => [
[
'allow_custom_values' => null,
'custom_field' => null,
'description' => '',
'disabled' => null,
'hidden' => null,
'id' => '',
'label' => '',
'options' => [
],
'placeholder' => '',
'prefix' => '',
'required' => null,
'sensitive' => null,
'suffix' => '',
'type' => ''
]
],
'has_guide' => null,
'icon' => '',
'id' => '',
'integration_state' => '',
'logo' => '',
'metadata' => [
],
'name' => '',
'oauth_grant_type' => '',
'resource_schema_support' => [
],
'resource_settings_support' => [
],
'revoke_url' => '',
'service_id' => '',
'settings' => [
],
'settings_required_for_authorization' => [
],
'state' => '',
'status' => '',
'subscriptions' => [
[
'created_at' => '',
'downstream_event_types' => [
],
'downstream_id' => '',
'execute_url' => '',
'unify_event_types' => [
]
]
],
'tag_line' => '',
'unified_api' => '',
'updated_at' => '',
'validation_support' => null,
'website' => ''
]),
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}}/vault/connections/:unified_api/:service_id', [
'body' => '{
"auth_type": "",
"authorize_url": "",
"configurable_resources": [],
"configuration": [
{
"defaults": [
{
"id": "",
"options": [],
"target": "",
"value": ""
}
],
"resource": ""
}
],
"created_at": "",
"enabled": false,
"form_fields": [
{
"allow_custom_values": false,
"custom_field": false,
"description": "",
"disabled": false,
"hidden": false,
"id": "",
"label": "",
"options": [],
"placeholder": "",
"prefix": "",
"required": false,
"sensitive": false,
"suffix": "",
"type": ""
}
],
"has_guide": false,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": {},
"name": "",
"oauth_grant_type": "",
"resource_schema_support": [],
"resource_settings_support": [],
"revoke_url": "",
"service_id": "",
"settings": {},
"settings_required_for_authorization": [],
"state": "",
"status": "",
"subscriptions": [
{
"created_at": "",
"downstream_event_types": [],
"downstream_id": "",
"execute_url": "",
"unify_event_types": []
}
],
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": false,
"website": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/vault/connections/:unified_api/:service_id');
$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([
'auth_type' => '',
'authorize_url' => '',
'configurable_resources' => [
],
'configuration' => [
[
'defaults' => [
[
'id' => '',
'options' => [
],
'target' => '',
'value' => ''
]
],
'resource' => ''
]
],
'created_at' => '',
'enabled' => null,
'form_fields' => [
[
'allow_custom_values' => null,
'custom_field' => null,
'description' => '',
'disabled' => null,
'hidden' => null,
'id' => '',
'label' => '',
'options' => [
],
'placeholder' => '',
'prefix' => '',
'required' => null,
'sensitive' => null,
'suffix' => '',
'type' => ''
]
],
'has_guide' => null,
'icon' => '',
'id' => '',
'integration_state' => '',
'logo' => '',
'metadata' => [
],
'name' => '',
'oauth_grant_type' => '',
'resource_schema_support' => [
],
'resource_settings_support' => [
],
'revoke_url' => '',
'service_id' => '',
'settings' => [
],
'settings_required_for_authorization' => [
],
'state' => '',
'status' => '',
'subscriptions' => [
[
'created_at' => '',
'downstream_event_types' => [
],
'downstream_id' => '',
'execute_url' => '',
'unify_event_types' => [
]
]
],
'tag_line' => '',
'unified_api' => '',
'updated_at' => '',
'validation_support' => null,
'website' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'auth_type' => '',
'authorize_url' => '',
'configurable_resources' => [
],
'configuration' => [
[
'defaults' => [
[
'id' => '',
'options' => [
],
'target' => '',
'value' => ''
]
],
'resource' => ''
]
],
'created_at' => '',
'enabled' => null,
'form_fields' => [
[
'allow_custom_values' => null,
'custom_field' => null,
'description' => '',
'disabled' => null,
'hidden' => null,
'id' => '',
'label' => '',
'options' => [
],
'placeholder' => '',
'prefix' => '',
'required' => null,
'sensitive' => null,
'suffix' => '',
'type' => ''
]
],
'has_guide' => null,
'icon' => '',
'id' => '',
'integration_state' => '',
'logo' => '',
'metadata' => [
],
'name' => '',
'oauth_grant_type' => '',
'resource_schema_support' => [
],
'resource_settings_support' => [
],
'revoke_url' => '',
'service_id' => '',
'settings' => [
],
'settings_required_for_authorization' => [
],
'state' => '',
'status' => '',
'subscriptions' => [
[
'created_at' => '',
'downstream_event_types' => [
],
'downstream_id' => '',
'execute_url' => '',
'unify_event_types' => [
]
]
],
'tag_line' => '',
'unified_api' => '',
'updated_at' => '',
'validation_support' => null,
'website' => ''
]));
$request->setRequestUrl('{{baseUrl}}/vault/connections/:unified_api/:service_id');
$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}}/vault/connections/:unified_api/:service_id' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"auth_type": "",
"authorize_url": "",
"configurable_resources": [],
"configuration": [
{
"defaults": [
{
"id": "",
"options": [],
"target": "",
"value": ""
}
],
"resource": ""
}
],
"created_at": "",
"enabled": false,
"form_fields": [
{
"allow_custom_values": false,
"custom_field": false,
"description": "",
"disabled": false,
"hidden": false,
"id": "",
"label": "",
"options": [],
"placeholder": "",
"prefix": "",
"required": false,
"sensitive": false,
"suffix": "",
"type": ""
}
],
"has_guide": false,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": {},
"name": "",
"oauth_grant_type": "",
"resource_schema_support": [],
"resource_settings_support": [],
"revoke_url": "",
"service_id": "",
"settings": {},
"settings_required_for_authorization": [],
"state": "",
"status": "",
"subscriptions": [
{
"created_at": "",
"downstream_event_types": [],
"downstream_id": "",
"execute_url": "",
"unify_event_types": []
}
],
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": false,
"website": ""
}'
$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}}/vault/connections/:unified_api/:service_id' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"auth_type": "",
"authorize_url": "",
"configurable_resources": [],
"configuration": [
{
"defaults": [
{
"id": "",
"options": [],
"target": "",
"value": ""
}
],
"resource": ""
}
],
"created_at": "",
"enabled": false,
"form_fields": [
{
"allow_custom_values": false,
"custom_field": false,
"description": "",
"disabled": false,
"hidden": false,
"id": "",
"label": "",
"options": [],
"placeholder": "",
"prefix": "",
"required": false,
"sensitive": false,
"suffix": "",
"type": ""
}
],
"has_guide": false,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": {},
"name": "",
"oauth_grant_type": "",
"resource_schema_support": [],
"resource_settings_support": [],
"revoke_url": "",
"service_id": "",
"settings": {},
"settings_required_for_authorization": [],
"state": "",
"status": "",
"subscriptions": [
{
"created_at": "",
"downstream_event_types": [],
"downstream_id": "",
"execute_url": "",
"unify_event_types": []
}
],
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": false,
"website": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\n}"
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/vault/connections/:unified_api/:service_id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/vault/connections/:unified_api/:service_id"
payload = {
"auth_type": "",
"authorize_url": "",
"configurable_resources": [],
"configuration": [
{
"defaults": [
{
"id": "",
"options": [],
"target": "",
"value": ""
}
],
"resource": ""
}
],
"created_at": "",
"enabled": False,
"form_fields": [
{
"allow_custom_values": False,
"custom_field": False,
"description": "",
"disabled": False,
"hidden": False,
"id": "",
"label": "",
"options": [],
"placeholder": "",
"prefix": "",
"required": False,
"sensitive": False,
"suffix": "",
"type": ""
}
],
"has_guide": False,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": {},
"name": "",
"oauth_grant_type": "",
"resource_schema_support": [],
"resource_settings_support": [],
"revoke_url": "",
"service_id": "",
"settings": {},
"settings_required_for_authorization": [],
"state": "",
"status": "",
"subscriptions": [
{
"created_at": "",
"downstream_event_types": [],
"downstream_id": "",
"execute_url": "",
"unify_event_types": []
}
],
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": False,
"website": ""
}
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}}/vault/connections/:unified_api/:service_id"
payload <- "{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\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}}/vault/connections/:unified_api/:service_id")
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 \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\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/vault/connections/:unified_api/:service_id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/vault/connections/:unified_api/:service_id";
let payload = json!({
"auth_type": "",
"authorize_url": "",
"configurable_resources": (),
"configuration": (
json!({
"defaults": (
json!({
"id": "",
"options": (),
"target": "",
"value": ""
})
),
"resource": ""
})
),
"created_at": "",
"enabled": false,
"form_fields": (
json!({
"allow_custom_values": false,
"custom_field": false,
"description": "",
"disabled": false,
"hidden": false,
"id": "",
"label": "",
"options": (),
"placeholder": "",
"prefix": "",
"required": false,
"sensitive": false,
"suffix": "",
"type": ""
})
),
"has_guide": false,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": json!({}),
"name": "",
"oauth_grant_type": "",
"resource_schema_support": (),
"resource_settings_support": (),
"revoke_url": "",
"service_id": "",
"settings": json!({}),
"settings_required_for_authorization": (),
"state": "",
"status": "",
"subscriptions": (
json!({
"created_at": "",
"downstream_event_types": (),
"downstream_id": "",
"execute_url": "",
"unify_event_types": ()
})
),
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": false,
"website": ""
});
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}}/vault/connections/:unified_api/:service_id \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--data '{
"auth_type": "",
"authorize_url": "",
"configurable_resources": [],
"configuration": [
{
"defaults": [
{
"id": "",
"options": [],
"target": "",
"value": ""
}
],
"resource": ""
}
],
"created_at": "",
"enabled": false,
"form_fields": [
{
"allow_custom_values": false,
"custom_field": false,
"description": "",
"disabled": false,
"hidden": false,
"id": "",
"label": "",
"options": [],
"placeholder": "",
"prefix": "",
"required": false,
"sensitive": false,
"suffix": "",
"type": ""
}
],
"has_guide": false,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": {},
"name": "",
"oauth_grant_type": "",
"resource_schema_support": [],
"resource_settings_support": [],
"revoke_url": "",
"service_id": "",
"settings": {},
"settings_required_for_authorization": [],
"state": "",
"status": "",
"subscriptions": [
{
"created_at": "",
"downstream_event_types": [],
"downstream_id": "",
"execute_url": "",
"unify_event_types": []
}
],
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": false,
"website": ""
}'
echo '{
"auth_type": "",
"authorize_url": "",
"configurable_resources": [],
"configuration": [
{
"defaults": [
{
"id": "",
"options": [],
"target": "",
"value": ""
}
],
"resource": ""
}
],
"created_at": "",
"enabled": false,
"form_fields": [
{
"allow_custom_values": false,
"custom_field": false,
"description": "",
"disabled": false,
"hidden": false,
"id": "",
"label": "",
"options": [],
"placeholder": "",
"prefix": "",
"required": false,
"sensitive": false,
"suffix": "",
"type": ""
}
],
"has_guide": false,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": {},
"name": "",
"oauth_grant_type": "",
"resource_schema_support": [],
"resource_settings_support": [],
"revoke_url": "",
"service_id": "",
"settings": {},
"settings_required_for_authorization": [],
"state": "",
"status": "",
"subscriptions": [
{
"created_at": "",
"downstream_event_types": [],
"downstream_id": "",
"execute_url": "",
"unify_event_types": []
}
],
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": false,
"website": ""
}' | \
http POST {{baseUrl}}/vault/connections/:unified_api/:service_id \
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 "auth_type": "",\n "authorize_url": "",\n "configurable_resources": [],\n "configuration": [\n {\n "defaults": [\n {\n "id": "",\n "options": [],\n "target": "",\n "value": ""\n }\n ],\n "resource": ""\n }\n ],\n "created_at": "",\n "enabled": false,\n "form_fields": [\n {\n "allow_custom_values": false,\n "custom_field": false,\n "description": "",\n "disabled": false,\n "hidden": false,\n "id": "",\n "label": "",\n "options": [],\n "placeholder": "",\n "prefix": "",\n "required": false,\n "sensitive": false,\n "suffix": "",\n "type": ""\n }\n ],\n "has_guide": false,\n "icon": "",\n "id": "",\n "integration_state": "",\n "logo": "",\n "metadata": {},\n "name": "",\n "oauth_grant_type": "",\n "resource_schema_support": [],\n "resource_settings_support": [],\n "revoke_url": "",\n "service_id": "",\n "settings": {},\n "settings_required_for_authorization": [],\n "state": "",\n "status": "",\n "subscriptions": [\n {\n "created_at": "",\n "downstream_event_types": [],\n "downstream_id": "",\n "execute_url": "",\n "unify_event_types": []\n }\n ],\n "tag_line": "",\n "unified_api": "",\n "updated_at": "",\n "validation_support": false,\n "website": ""\n}' \
--output-document \
- {{baseUrl}}/vault/connections/:unified_api/:service_id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"auth_type": "",
"authorize_url": "",
"configurable_resources": [],
"configuration": [
[
"defaults": [
[
"id": "",
"options": [],
"target": "",
"value": ""
]
],
"resource": ""
]
],
"created_at": "",
"enabled": false,
"form_fields": [
[
"allow_custom_values": false,
"custom_field": false,
"description": "",
"disabled": false,
"hidden": false,
"id": "",
"label": "",
"options": [],
"placeholder": "",
"prefix": "",
"required": false,
"sensitive": false,
"suffix": "",
"type": ""
]
],
"has_guide": false,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": [],
"name": "",
"oauth_grant_type": "",
"resource_schema_support": [],
"resource_settings_support": [],
"revoke_url": "",
"service_id": "",
"settings": [],
"settings_required_for_authorization": [],
"state": "",
"status": "",
"subscriptions": [
[
"created_at": "",
"downstream_event_types": [],
"downstream_id": "",
"execute_url": "",
"unify_event_types": []
]
],
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": false,
"website": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/vault/connections/:unified_api/:service_id")! 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": {
"auth_type": "oauth2",
"authorize_url": "https://unify.apideck.com/vault/authorize/salesforce/?state=",
"configurable_resources": [
"opportunities",
"companies",
"contacts",
"leads"
],
"created_at": 1615563533390,
"enabled": true,
"form_fields": [
{
"custom_field": false,
"disabled": false,
"id": "instance_url",
"label": "Instance url",
"mask": false,
"placeholder": "",
"required": true,
"sensitive": false,
"type": "text",
"value": "https://eu28.salesforce.com"
},
{
"custom_field": false,
"disabled": false,
"id": "api_key",
"label": "API Key",
"mask": false,
"placeholder": "",
"required": true,
"sensitive": true,
"type": "text",
"value": "123455677"
}
],
"has_guide": true,
"icon": "https://res.cloudinary.com/apideck/image/upload/v1529456047/catalog/salesforce/icon128x128.png",
"id": "crm+salesforce",
"integration_state": "configured",
"logo": "https://c1.sfdcstatic.com/content/dam/web/en_us/www/images/home/logo-salesforce-m.svg",
"metadata": {
"account": {
"id": "c01458a5-7276-41ce-bc19-639906b0450a",
"name": "My Company"
},
"plan": "enterprise"
},
"name": "Salesforce",
"oauth_grant_type": "authorization_code",
"resource_schema_support": [
"leads"
],
"resource_settings_support": [
"leads"
],
"revoke_url": "https://unify.apideck.com/vault/revoke/salesforce/?state=",
"service_id": "salesforce",
"settings": {
"api_key": "12345xxxxxx",
"instance_url": "https://eu28.salesforce.com"
},
"settings_required_for_authorization": [
"client_id",
"client_secret"
],
"state": "authorized",
"tag_line": "CRM software solutions and enterprise cloud computing from Salesforce, the leader in customer relationship management (CRM) and PaaS. Free 30 day trial.",
"unified_api": "crm",
"updated_at": 1616662325753,
"website": "https://www.salesforce.com"
},
"status": "OK",
"status_code": 201
}
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
Deletes a connection
{{baseUrl}}/vault/connections/:unified_api/:service_id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
service_id
unified_api
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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/vault/connections/:unified_api/:service_id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http DELETE {{baseUrl}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/vault/connections/:unified_api/:service_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
{
"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
Get Access Token
{{baseUrl}}/vault/connections/:unified_api/:service_id/token
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
service_id
unified_api
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/vault/connections/:unified_api/:service_id/token");
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}}/vault/connections/:unified_api/:service_id/token" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json})
require "http/client"
url = "{{baseUrl}}/vault/connections/:unified_api/:service_id/token"
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}}/vault/connections/:unified_api/:service_id/token"),
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}}/vault/connections/:unified_api/:service_id/token");
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}}/vault/connections/:unified_api/:service_id/token"
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/vault/connections/:unified_api/:service_id/token 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}}/vault/connections/:unified_api/:service_id/token")
.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}}/vault/connections/:unified_api/:service_id/token"))
.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}}/vault/connections/:unified_api/:service_id/token")
.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}}/vault/connections/:unified_api/:service_id/token")
.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}}/vault/connections/:unified_api/:service_id/token');
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}}/vault/connections/:unified_api/:service_id/token',
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}}/vault/connections/:unified_api/:service_id/token';
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}}/vault/connections/:unified_api/:service_id/token',
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}}/vault/connections/:unified_api/:service_id/token")
.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/vault/connections/:unified_api/:service_id/token',
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}}/vault/connections/:unified_api/:service_id/token',
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}}/vault/connections/:unified_api/:service_id/token');
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}}/vault/connections/:unified_api/:service_id/token',
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}}/vault/connections/:unified_api/:service_id/token';
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}}/vault/connections/:unified_api/:service_id/token"]
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}}/vault/connections/:unified_api/:service_id/token" 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}}/vault/connections/:unified_api/:service_id/token",
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}}/vault/connections/:unified_api/:service_id/token', [
'body' => '{}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/vault/connections/:unified_api/:service_id/token');
$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}}/vault/connections/:unified_api/:service_id/token');
$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}}/vault/connections/:unified_api/:service_id/token' -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}}/vault/connections/:unified_api/:service_id/token' -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/vault/connections/:unified_api/:service_id/token", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/vault/connections/:unified_api/:service_id/token"
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}}/vault/connections/:unified_api/:service_id/token"
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}}/vault/connections/:unified_api/:service_id/token")
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/vault/connections/:unified_api/:service_id/token') 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}}/vault/connections/:unified_api/:service_id/token";
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}}/vault/connections/:unified_api/:service_id/token \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--data '{}'
echo '{}' | \
http POST {{baseUrl}}/vault/connections/:unified_api/:service_id/token \
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}}/vault/connections/:unified_api/:service_id/token
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}}/vault/connections/:unified_api/:service_id/token")! 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": {
"auth_type": "oauth2",
"authorize_url": "https://unify.apideck.com/vault/authorize/salesforce/?state=",
"configurable_resources": [
"opportunities",
"companies",
"contacts",
"leads"
],
"created_at": 1615563533390,
"enabled": true,
"form_fields": [
{
"custom_field": false,
"disabled": false,
"id": "instance_url",
"label": "Instance url",
"mask": false,
"placeholder": "",
"required": true,
"sensitive": false,
"type": "text",
"value": "https://eu28.salesforce.com"
},
{
"custom_field": false,
"disabled": false,
"id": "api_key",
"label": "API Key",
"mask": false,
"placeholder": "",
"required": true,
"sensitive": true,
"type": "text",
"value": "123455677"
}
],
"has_guide": true,
"icon": "https://res.cloudinary.com/apideck/image/upload/v1529456047/catalog/salesforce/icon128x128.png",
"id": "crm+salesforce",
"integration_state": "configured",
"logo": "https://c1.sfdcstatic.com/content/dam/web/en_us/www/images/home/logo-salesforce-m.svg",
"metadata": {
"account": {
"id": "c01458a5-7276-41ce-bc19-639906b0450a",
"name": "My Company"
},
"plan": "enterprise"
},
"name": "Salesforce",
"oauth_grant_type": "authorization_code",
"resource_schema_support": [
"leads"
],
"resource_settings_support": [
"leads"
],
"revoke_url": "https://unify.apideck.com/vault/revoke/salesforce/?state=",
"service_id": "salesforce",
"settings": {
"api_key": "12345xxxxxx",
"instance_url": "https://eu28.salesforce.com"
},
"settings_required_for_authorization": [
"client_id",
"client_secret"
],
"state": "authorized",
"tag_line": "CRM software solutions and enterprise cloud computing from Salesforce, the leader in customer relationship management (CRM) and PaaS. Free 30 day trial.",
"unified_api": "crm",
"updated_at": 1616662325753,
"website": "https://www.salesforce.com"
},
"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 all connections
{{baseUrl}}/vault/connections
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}}/vault/connections");
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}}/vault/connections" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/vault/connections"
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}}/vault/connections"),
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}}/vault/connections");
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}}/vault/connections"
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/vault/connections HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/vault/connections")
.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}}/vault/connections"))
.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}}/vault/connections")
.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}}/vault/connections")
.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}}/vault/connections');
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}}/vault/connections',
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}}/vault/connections';
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}}/vault/connections',
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}}/vault/connections")
.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/vault/connections',
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}}/vault/connections',
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}}/vault/connections');
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}}/vault/connections',
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}}/vault/connections';
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}}/vault/connections"]
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}}/vault/connections" 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}}/vault/connections",
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}}/vault/connections', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/vault/connections');
$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}}/vault/connections');
$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}}/vault/connections' -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}}/vault/connections' -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/vault/connections", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/vault/connections"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/vault/connections"
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}}/vault/connections")
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/vault/connections') 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}}/vault/connections";
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}}/vault/connections \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/vault/connections \
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}}/vault/connections
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/vault/connections")! 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
{
"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 connection
{{baseUrl}}/vault/connections/:unified_api/:service_id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
service_id
unified_api
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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/vault/connections/:unified_api/:service_id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/vault/connections/:unified_api/:service_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": {
"auth_type": "oauth2",
"authorize_url": "https://unify.apideck.com/vault/authorize/salesforce/?state=",
"configurable_resources": [
"opportunities",
"companies",
"contacts",
"leads"
],
"created_at": 1615563533390,
"enabled": true,
"form_fields": [
{
"custom_field": false,
"disabled": false,
"id": "instance_url",
"label": "Instance url",
"mask": false,
"placeholder": "",
"required": true,
"sensitive": false,
"type": "text",
"value": "https://eu28.salesforce.com"
},
{
"custom_field": false,
"disabled": false,
"id": "api_key",
"label": "API Key",
"mask": false,
"placeholder": "",
"required": true,
"sensitive": true,
"type": "text",
"value": "123455677"
}
],
"has_guide": true,
"icon": "https://res.cloudinary.com/apideck/image/upload/v1529456047/catalog/salesforce/icon128x128.png",
"id": "crm+salesforce",
"integration_state": "configured",
"logo": "https://c1.sfdcstatic.com/content/dam/web/en_us/www/images/home/logo-salesforce-m.svg",
"metadata": {
"account": {
"id": "c01458a5-7276-41ce-bc19-639906b0450a",
"name": "My Company"
},
"plan": "enterprise"
},
"name": "Salesforce",
"oauth_grant_type": "authorization_code",
"resource_schema_support": [
"leads"
],
"resource_settings_support": [
"leads"
],
"revoke_url": "https://unify.apideck.com/vault/revoke/salesforce/?state=",
"service_id": "salesforce",
"settings": {
"api_key": "12345xxxxxx",
"instance_url": "https://eu28.salesforce.com"
},
"settings_required_for_authorization": [
"client_id",
"client_secret"
],
"state": "authorized",
"tag_line": "CRM software solutions and enterprise cloud computing from Salesforce, the leader in customer relationship management (CRM) and PaaS. Free 30 day trial.",
"unified_api": "crm",
"updated_at": 1616662325753,
"website": "https://www.salesforce.com"
},
"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 resource settings
{{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
unified_api
service_id
resource
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config");
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}}/vault/connections/:unified_api/:service_id/:resource/config" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config"
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}}/vault/connections/:unified_api/:service_id/:resource/config"),
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}}/vault/connections/:unified_api/:service_id/:resource/config");
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}}/vault/connections/:unified_api/:service_id/:resource/config"
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/vault/connections/:unified_api/:service_id/:resource/config HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config")
.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}}/vault/connections/:unified_api/:service_id/:resource/config"))
.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}}/vault/connections/:unified_api/:service_id/:resource/config")
.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}}/vault/connections/:unified_api/:service_id/:resource/config")
.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}}/vault/connections/:unified_api/:service_id/:resource/config');
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}}/vault/connections/:unified_api/:service_id/:resource/config',
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}}/vault/connections/:unified_api/:service_id/:resource/config';
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}}/vault/connections/:unified_api/:service_id/:resource/config',
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}}/vault/connections/:unified_api/:service_id/:resource/config")
.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/vault/connections/:unified_api/:service_id/:resource/config',
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}}/vault/connections/:unified_api/:service_id/:resource/config',
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}}/vault/connections/:unified_api/:service_id/:resource/config');
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}}/vault/connections/:unified_api/:service_id/:resource/config',
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}}/vault/connections/:unified_api/:service_id/:resource/config';
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}}/vault/connections/:unified_api/:service_id/:resource/config"]
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}}/vault/connections/:unified_api/:service_id/:resource/config" 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}}/vault/connections/:unified_api/:service_id/:resource/config",
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}}/vault/connections/:unified_api/:service_id/:resource/config', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config');
$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}}/vault/connections/:unified_api/:service_id/:resource/config');
$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}}/vault/connections/:unified_api/:service_id/:resource/config' -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}}/vault/connections/:unified_api/:service_id/:resource/config' -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/vault/connections/:unified_api/:service_id/:resource/config", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config"
headers = {
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config"
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}}/vault/connections/:unified_api/:service_id/:resource/config")
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/vault/connections/:unified_api/:service_id/:resource/config') 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}}/vault/connections/:unified_api/:service_id/:resource/config";
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}}/vault/connections/:unified_api/:service_id/:resource/config \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config \
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}}/vault/connections/:unified_api/:service_id/:resource/config
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config")! 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": {
"auth_type": "oauth2",
"authorize_url": "https://unify.apideck.com/vault/authorize/salesforce/?state=",
"configurable_resources": [
"opportunities",
"companies",
"contacts",
"leads"
],
"created_at": 1615563533390,
"enabled": true,
"form_fields": [
{
"custom_field": false,
"disabled": false,
"id": "instance_url",
"label": "Instance url",
"mask": false,
"placeholder": "",
"required": true,
"sensitive": false,
"type": "text",
"value": "https://eu28.salesforce.com"
},
{
"custom_field": false,
"disabled": false,
"id": "api_key",
"label": "API Key",
"mask": false,
"placeholder": "",
"required": true,
"sensitive": true,
"type": "text",
"value": "123455677"
}
],
"has_guide": true,
"icon": "https://res.cloudinary.com/apideck/image/upload/v1529456047/catalog/salesforce/icon128x128.png",
"id": "crm+salesforce",
"integration_state": "configured",
"logo": "https://c1.sfdcstatic.com/content/dam/web/en_us/www/images/home/logo-salesforce-m.svg",
"metadata": {
"account": {
"id": "c01458a5-7276-41ce-bc19-639906b0450a",
"name": "My Company"
},
"plan": "enterprise"
},
"name": "Salesforce",
"oauth_grant_type": "authorization_code",
"resource_schema_support": [
"leads"
],
"resource_settings_support": [
"leads"
],
"revoke_url": "https://unify.apideck.com/vault/revoke/salesforce/?state=",
"service_id": "salesforce",
"settings": {
"api_key": "12345xxxxxx",
"instance_url": "https://eu28.salesforce.com"
},
"settings_required_for_authorization": [
"client_id",
"client_secret"
],
"state": "authorized",
"tag_line": "CRM software solutions and enterprise cloud computing from Salesforce, the leader in customer relationship management (CRM) and PaaS. Free 30 day trial.",
"unified_api": "crm",
"updated_at": 1616662325753,
"website": "https://www.salesforce.com"
},
"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
Import connection
{{baseUrl}}/vault/connections/:unified_api/:service_id/import
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
service_id
unified_api
BODY json
{
"credentials": {
"access_token": "",
"expires_in": 0,
"issued_at": "",
"refresh_token": ""
},
"metadata": {},
"settings": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/vault/connections/:unified_api/:service_id/import");
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 \"credentials\": {\n \"access_token\": \"\",\n \"expires_in\": 0,\n \"issued_at\": \"\",\n \"refresh_token\": \"\"\n },\n \"metadata\": {},\n \"settings\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/vault/connections/:unified_api/:service_id/import" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json
:form-params {:credentials {:access_token ""
:expires_in 0
:issued_at ""
:refresh_token ""}
:metadata {}
:settings {}}})
require "http/client"
url = "{{baseUrl}}/vault/connections/:unified_api/:service_id/import"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"credentials\": {\n \"access_token\": \"\",\n \"expires_in\": 0,\n \"issued_at\": \"\",\n \"refresh_token\": \"\"\n },\n \"metadata\": {},\n \"settings\": {}\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}}/vault/connections/:unified_api/:service_id/import"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"credentials\": {\n \"access_token\": \"\",\n \"expires_in\": 0,\n \"issued_at\": \"\",\n \"refresh_token\": \"\"\n },\n \"metadata\": {},\n \"settings\": {}\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}}/vault/connections/:unified_api/:service_id/import");
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 \"credentials\": {\n \"access_token\": \"\",\n \"expires_in\": 0,\n \"issued_at\": \"\",\n \"refresh_token\": \"\"\n },\n \"metadata\": {},\n \"settings\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/vault/connections/:unified_api/:service_id/import"
payload := strings.NewReader("{\n \"credentials\": {\n \"access_token\": \"\",\n \"expires_in\": 0,\n \"issued_at\": \"\",\n \"refresh_token\": \"\"\n },\n \"metadata\": {},\n \"settings\": {}\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/vault/connections/:unified_api/:service_id/import HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 152
{
"credentials": {
"access_token": "",
"expires_in": 0,
"issued_at": "",
"refresh_token": ""
},
"metadata": {},
"settings": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/vault/connections/:unified_api/:service_id/import")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"credentials\": {\n \"access_token\": \"\",\n \"expires_in\": 0,\n \"issued_at\": \"\",\n \"refresh_token\": \"\"\n },\n \"metadata\": {},\n \"settings\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/vault/connections/:unified_api/:service_id/import"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"credentials\": {\n \"access_token\": \"\",\n \"expires_in\": 0,\n \"issued_at\": \"\",\n \"refresh_token\": \"\"\n },\n \"metadata\": {},\n \"settings\": {}\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 \"credentials\": {\n \"access_token\": \"\",\n \"expires_in\": 0,\n \"issued_at\": \"\",\n \"refresh_token\": \"\"\n },\n \"metadata\": {},\n \"settings\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/vault/connections/:unified_api/:service_id/import")
.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}}/vault/connections/:unified_api/:service_id/import")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"credentials\": {\n \"access_token\": \"\",\n \"expires_in\": 0,\n \"issued_at\": \"\",\n \"refresh_token\": \"\"\n },\n \"metadata\": {},\n \"settings\": {}\n}")
.asString();
const data = JSON.stringify({
credentials: {
access_token: '',
expires_in: 0,
issued_at: '',
refresh_token: ''
},
metadata: {},
settings: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/vault/connections/:unified_api/:service_id/import');
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}}/vault/connections/:unified_api/:service_id/import',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
credentials: {access_token: '', expires_in: 0, issued_at: '', refresh_token: ''},
metadata: {},
settings: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/vault/connections/:unified_api/:service_id/import';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"credentials":{"access_token":"","expires_in":0,"issued_at":"","refresh_token":""},"metadata":{},"settings":{}}'
};
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}}/vault/connections/:unified_api/:service_id/import',
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "credentials": {\n "access_token": "",\n "expires_in": 0,\n "issued_at": "",\n "refresh_token": ""\n },\n "metadata": {},\n "settings": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"credentials\": {\n \"access_token\": \"\",\n \"expires_in\": 0,\n \"issued_at\": \"\",\n \"refresh_token\": \"\"\n },\n \"metadata\": {},\n \"settings\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/vault/connections/:unified_api/:service_id/import")
.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/vault/connections/:unified_api/:service_id/import',
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({
credentials: {access_token: '', expires_in: 0, issued_at: '', refresh_token: ''},
metadata: {},
settings: {}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/vault/connections/:unified_api/:service_id/import',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: {
credentials: {access_token: '', expires_in: 0, issued_at: '', refresh_token: ''},
metadata: {},
settings: {}
},
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}}/vault/connections/:unified_api/:service_id/import');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
credentials: {
access_token: '',
expires_in: 0,
issued_at: '',
refresh_token: ''
},
metadata: {},
settings: {}
});
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}}/vault/connections/:unified_api/:service_id/import',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
credentials: {access_token: '', expires_in: 0, issued_at: '', refresh_token: ''},
metadata: {},
settings: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/vault/connections/:unified_api/:service_id/import';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"credentials":{"access_token":"","expires_in":0,"issued_at":"","refresh_token":""},"metadata":{},"settings":{}}'
};
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 = @{ @"credentials": @{ @"access_token": @"", @"expires_in": @0, @"issued_at": @"", @"refresh_token": @"" },
@"metadata": @{ },
@"settings": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/vault/connections/:unified_api/:service_id/import"]
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}}/vault/connections/:unified_api/:service_id/import" 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 \"credentials\": {\n \"access_token\": \"\",\n \"expires_in\": 0,\n \"issued_at\": \"\",\n \"refresh_token\": \"\"\n },\n \"metadata\": {},\n \"settings\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/vault/connections/:unified_api/:service_id/import",
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([
'credentials' => [
'access_token' => '',
'expires_in' => 0,
'issued_at' => '',
'refresh_token' => ''
],
'metadata' => [
],
'settings' => [
]
]),
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}}/vault/connections/:unified_api/:service_id/import', [
'body' => '{
"credentials": {
"access_token": "",
"expires_in": 0,
"issued_at": "",
"refresh_token": ""
},
"metadata": {},
"settings": {}
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/vault/connections/:unified_api/:service_id/import');
$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([
'credentials' => [
'access_token' => '',
'expires_in' => 0,
'issued_at' => '',
'refresh_token' => ''
],
'metadata' => [
],
'settings' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'credentials' => [
'access_token' => '',
'expires_in' => 0,
'issued_at' => '',
'refresh_token' => ''
],
'metadata' => [
],
'settings' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/vault/connections/:unified_api/:service_id/import');
$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}}/vault/connections/:unified_api/:service_id/import' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"credentials": {
"access_token": "",
"expires_in": 0,
"issued_at": "",
"refresh_token": ""
},
"metadata": {},
"settings": {}
}'
$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}}/vault/connections/:unified_api/:service_id/import' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"credentials": {
"access_token": "",
"expires_in": 0,
"issued_at": "",
"refresh_token": ""
},
"metadata": {},
"settings": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"credentials\": {\n \"access_token\": \"\",\n \"expires_in\": 0,\n \"issued_at\": \"\",\n \"refresh_token\": \"\"\n },\n \"metadata\": {},\n \"settings\": {}\n}"
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/vault/connections/:unified_api/:service_id/import", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/vault/connections/:unified_api/:service_id/import"
payload = {
"credentials": {
"access_token": "",
"expires_in": 0,
"issued_at": "",
"refresh_token": ""
},
"metadata": {},
"settings": {}
}
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}}/vault/connections/:unified_api/:service_id/import"
payload <- "{\n \"credentials\": {\n \"access_token\": \"\",\n \"expires_in\": 0,\n \"issued_at\": \"\",\n \"refresh_token\": \"\"\n },\n \"metadata\": {},\n \"settings\": {}\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}}/vault/connections/:unified_api/:service_id/import")
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 \"credentials\": {\n \"access_token\": \"\",\n \"expires_in\": 0,\n \"issued_at\": \"\",\n \"refresh_token\": \"\"\n },\n \"metadata\": {},\n \"settings\": {}\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/vault/connections/:unified_api/:service_id/import') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"credentials\": {\n \"access_token\": \"\",\n \"expires_in\": 0,\n \"issued_at\": \"\",\n \"refresh_token\": \"\"\n },\n \"metadata\": {},\n \"settings\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/vault/connections/:unified_api/:service_id/import";
let payload = json!({
"credentials": json!({
"access_token": "",
"expires_in": 0,
"issued_at": "",
"refresh_token": ""
}),
"metadata": json!({}),
"settings": 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}}/vault/connections/:unified_api/:service_id/import \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--data '{
"credentials": {
"access_token": "",
"expires_in": 0,
"issued_at": "",
"refresh_token": ""
},
"metadata": {},
"settings": {}
}'
echo '{
"credentials": {
"access_token": "",
"expires_in": 0,
"issued_at": "",
"refresh_token": ""
},
"metadata": {},
"settings": {}
}' | \
http POST {{baseUrl}}/vault/connections/:unified_api/:service_id/import \
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 "credentials": {\n "access_token": "",\n "expires_in": 0,\n "issued_at": "",\n "refresh_token": ""\n },\n "metadata": {},\n "settings": {}\n}' \
--output-document \
- {{baseUrl}}/vault/connections/:unified_api/:service_id/import
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"credentials": [
"access_token": "",
"expires_in": 0,
"issued_at": "",
"refresh_token": ""
],
"metadata": [],
"settings": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/vault/connections/:unified_api/:service_id/import")! 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": {
"auth_type": "oauth2",
"authorize_url": "https://unify.apideck.com/vault/authorize/salesforce/?state=",
"configurable_resources": [
"opportunities",
"companies",
"contacts",
"leads"
],
"created_at": 1615563533390,
"enabled": true,
"form_fields": [
{
"custom_field": false,
"disabled": false,
"id": "instance_url",
"label": "Instance url",
"mask": false,
"placeholder": "",
"required": true,
"sensitive": false,
"type": "text",
"value": "https://eu28.salesforce.com"
},
{
"custom_field": false,
"disabled": false,
"id": "api_key",
"label": "API Key",
"mask": false,
"placeholder": "",
"required": true,
"sensitive": true,
"type": "text",
"value": "123455677"
}
],
"has_guide": true,
"icon": "https://res.cloudinary.com/apideck/image/upload/v1529456047/catalog/salesforce/icon128x128.png",
"id": "crm+salesforce",
"integration_state": "configured",
"logo": "https://c1.sfdcstatic.com/content/dam/web/en_us/www/images/home/logo-salesforce-m.svg",
"metadata": {
"account": {
"id": "c01458a5-7276-41ce-bc19-639906b0450a",
"name": "My Company"
},
"plan": "enterprise"
},
"name": "Salesforce",
"oauth_grant_type": "authorization_code",
"resource_schema_support": [
"leads"
],
"resource_settings_support": [
"leads"
],
"revoke_url": "https://unify.apideck.com/vault/revoke/salesforce/?state=",
"service_id": "salesforce",
"settings": {
"api_key": "12345xxxxxx",
"instance_url": "https://eu28.salesforce.com"
},
"settings_required_for_authorization": [
"client_id",
"client_secret"
],
"state": "authorized",
"tag_line": "CRM software solutions and enterprise cloud computing from Salesforce, the leader in customer relationship management (CRM) and PaaS. Free 30 day trial.",
"unified_api": "crm",
"updated_at": 1616662325753,
"website": "https://www.salesforce.com"
},
"status": "OK",
"status_code": 201
}
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
Revoke connection
{{baseUrl}}/vault/revoke/:service_id/:application_id
QUERY PARAMS
state
redirect_uri
service_id
application_id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/vault/revoke/:service_id/:application_id?state=&redirect_uri=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/vault/revoke/:service_id/:application_id" {:query-params {:state ""
:redirect_uri ""}})
require "http/client"
url = "{{baseUrl}}/vault/revoke/:service_id/:application_id?state=&redirect_uri="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/vault/revoke/:service_id/:application_id?state=&redirect_uri="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/vault/revoke/:service_id/:application_id?state=&redirect_uri=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/vault/revoke/:service_id/:application_id?state=&redirect_uri="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/vault/revoke/:service_id/:application_id?state=&redirect_uri= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/vault/revoke/:service_id/:application_id?state=&redirect_uri=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/vault/revoke/:service_id/:application_id?state=&redirect_uri="))
.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}}/vault/revoke/:service_id/:application_id?state=&redirect_uri=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/vault/revoke/:service_id/:application_id?state=&redirect_uri=")
.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}}/vault/revoke/:service_id/:application_id?state=&redirect_uri=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/vault/revoke/:service_id/:application_id',
params: {state: '', redirect_uri: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/vault/revoke/:service_id/:application_id?state=&redirect_uri=';
const options = {method: 'GET'};
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}}/vault/revoke/:service_id/:application_id?state=&redirect_uri=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/vault/revoke/:service_id/:application_id?state=&redirect_uri=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/vault/revoke/:service_id/:application_id?state=&redirect_uri=',
headers: {}
};
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}}/vault/revoke/:service_id/:application_id',
qs: {state: '', redirect_uri: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/vault/revoke/:service_id/:application_id');
req.query({
state: '',
redirect_uri: ''
});
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}}/vault/revoke/:service_id/:application_id',
params: {state: '', redirect_uri: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/vault/revoke/:service_id/:application_id?state=&redirect_uri=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/vault/revoke/:service_id/:application_id?state=&redirect_uri="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/vault/revoke/:service_id/:application_id?state=&redirect_uri=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/vault/revoke/:service_id/:application_id?state=&redirect_uri=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/vault/revoke/:service_id/:application_id?state=&redirect_uri=');
echo $response->getBody();
setUrl('{{baseUrl}}/vault/revoke/:service_id/:application_id');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'state' => '',
'redirect_uri' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/vault/revoke/:service_id/:application_id');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'state' => '',
'redirect_uri' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/vault/revoke/:service_id/:application_id?state=&redirect_uri=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/vault/revoke/:service_id/:application_id?state=&redirect_uri=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/vault/revoke/:service_id/:application_id?state=&redirect_uri=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/vault/revoke/:service_id/:application_id"
querystring = {"state":"","redirect_uri":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/vault/revoke/:service_id/:application_id"
queryString <- list(
state = "",
redirect_uri = ""
)
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/vault/revoke/:service_id/:application_id?state=&redirect_uri=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/vault/revoke/:service_id/:application_id') do |req|
req.params['state'] = ''
req.params['redirect_uri'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/vault/revoke/:service_id/:application_id";
let querystring = [
("state", ""),
("redirect_uri", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/vault/revoke/:service_id/:application_id?state=&redirect_uri='
http GET '{{baseUrl}}/vault/revoke/:service_id/:application_id?state=&redirect_uri='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/vault/revoke/:service_id/:application_id?state=&redirect_uri='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/vault/revoke/:service_id/:application_id?state=&redirect_uri=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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()
PATCH
Update connection
{{baseUrl}}/vault/connections/:unified_api/:service_id
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
service_id
unified_api
BODY json
{
"auth_type": "",
"authorize_url": "",
"configurable_resources": [],
"configuration": [
{
"defaults": [
{
"id": "",
"options": [],
"target": "",
"value": ""
}
],
"resource": ""
}
],
"created_at": "",
"enabled": false,
"form_fields": [
{
"allow_custom_values": false,
"custom_field": false,
"description": "",
"disabled": false,
"hidden": false,
"id": "",
"label": "",
"options": [],
"placeholder": "",
"prefix": "",
"required": false,
"sensitive": false,
"suffix": "",
"type": ""
}
],
"has_guide": false,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": {},
"name": "",
"oauth_grant_type": "",
"resource_schema_support": [],
"resource_settings_support": [],
"revoke_url": "",
"service_id": "",
"settings": {},
"settings_required_for_authorization": [],
"state": "",
"status": "",
"subscriptions": [
{
"created_at": "",
"downstream_event_types": [],
"downstream_id": "",
"execute_url": "",
"unify_event_types": []
}
],
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": false,
"website": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/vault/connections/:unified_api/:service_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 \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/vault/connections/:unified_api/:service_id" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json
:form-params {:auth_type ""
:authorize_url ""
:configurable_resources []
:configuration [{:defaults [{:id ""
:options []
:target ""
:value ""}]
:resource ""}]
:created_at ""
:enabled false
:form_fields [{:allow_custom_values false
:custom_field false
:description ""
:disabled false
:hidden false
:id ""
:label ""
:options []
:placeholder ""
:prefix ""
:required false
:sensitive false
:suffix ""
:type ""}]
:has_guide false
:icon ""
:id ""
:integration_state ""
:logo ""
:metadata {}
:name ""
:oauth_grant_type ""
:resource_schema_support []
:resource_settings_support []
:revoke_url ""
:service_id ""
:settings {}
:settings_required_for_authorization []
:state ""
:status ""
:subscriptions [{:created_at ""
:downstream_event_types []
:downstream_id ""
:execute_url ""
:unify_event_types []}]
:tag_line ""
:unified_api ""
:updated_at ""
:validation_support false
:website ""}})
require "http/client"
url = "{{baseUrl}}/vault/connections/:unified_api/:service_id"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\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}}/vault/connections/:unified_api/:service_id"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\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}}/vault/connections/:unified_api/:service_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 \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/vault/connections/:unified_api/:service_id"
payload := strings.NewReader("{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\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/vault/connections/:unified_api/:service_id HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 1314
{
"auth_type": "",
"authorize_url": "",
"configurable_resources": [],
"configuration": [
{
"defaults": [
{
"id": "",
"options": [],
"target": "",
"value": ""
}
],
"resource": ""
}
],
"created_at": "",
"enabled": false,
"form_fields": [
{
"allow_custom_values": false,
"custom_field": false,
"description": "",
"disabled": false,
"hidden": false,
"id": "",
"label": "",
"options": [],
"placeholder": "",
"prefix": "",
"required": false,
"sensitive": false,
"suffix": "",
"type": ""
}
],
"has_guide": false,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": {},
"name": "",
"oauth_grant_type": "",
"resource_schema_support": [],
"resource_settings_support": [],
"revoke_url": "",
"service_id": "",
"settings": {},
"settings_required_for_authorization": [],
"state": "",
"status": "",
"subscriptions": [
{
"created_at": "",
"downstream_event_types": [],
"downstream_id": "",
"execute_url": "",
"unify_event_types": []
}
],
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": false,
"website": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/vault/connections/:unified_api/:service_id")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/vault/connections/:unified_api/:service_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 \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\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 \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_id")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\n}")
.asString();
const data = JSON.stringify({
auth_type: '',
authorize_url: '',
configurable_resources: [],
configuration: [
{
defaults: [
{
id: '',
options: [],
target: '',
value: ''
}
],
resource: ''
}
],
created_at: '',
enabled: false,
form_fields: [
{
allow_custom_values: false,
custom_field: false,
description: '',
disabled: false,
hidden: false,
id: '',
label: '',
options: [],
placeholder: '',
prefix: '',
required: false,
sensitive: false,
suffix: '',
type: ''
}
],
has_guide: false,
icon: '',
id: '',
integration_state: '',
logo: '',
metadata: {},
name: '',
oauth_grant_type: '',
resource_schema_support: [],
resource_settings_support: [],
revoke_url: '',
service_id: '',
settings: {},
settings_required_for_authorization: [],
state: '',
status: '',
subscriptions: [
{
created_at: '',
downstream_event_types: [],
downstream_id: '',
execute_url: '',
unify_event_types: []
}
],
tag_line: '',
unified_api: '',
updated_at: '',
validation_support: false,
website: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
auth_type: '',
authorize_url: '',
configurable_resources: [],
configuration: [{defaults: [{id: '', options: [], target: '', value: ''}], resource: ''}],
created_at: '',
enabled: false,
form_fields: [
{
allow_custom_values: false,
custom_field: false,
description: '',
disabled: false,
hidden: false,
id: '',
label: '',
options: [],
placeholder: '',
prefix: '',
required: false,
sensitive: false,
suffix: '',
type: ''
}
],
has_guide: false,
icon: '',
id: '',
integration_state: '',
logo: '',
metadata: {},
name: '',
oauth_grant_type: '',
resource_schema_support: [],
resource_settings_support: [],
revoke_url: '',
service_id: '',
settings: {},
settings_required_for_authorization: [],
state: '',
status: '',
subscriptions: [
{
created_at: '',
downstream_event_types: [],
downstream_id: '',
execute_url: '',
unify_event_types: []
}
],
tag_line: '',
unified_api: '',
updated_at: '',
validation_support: false,
website: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/vault/connections/:unified_api/:service_id';
const options = {
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"auth_type":"","authorize_url":"","configurable_resources":[],"configuration":[{"defaults":[{"id":"","options":[],"target":"","value":""}],"resource":""}],"created_at":"","enabled":false,"form_fields":[{"allow_custom_values":false,"custom_field":false,"description":"","disabled":false,"hidden":false,"id":"","label":"","options":[],"placeholder":"","prefix":"","required":false,"sensitive":false,"suffix":"","type":""}],"has_guide":false,"icon":"","id":"","integration_state":"","logo":"","metadata":{},"name":"","oauth_grant_type":"","resource_schema_support":[],"resource_settings_support":[],"revoke_url":"","service_id":"","settings":{},"settings_required_for_authorization":[],"state":"","status":"","subscriptions":[{"created_at":"","downstream_event_types":[],"downstream_id":"","execute_url":"","unify_event_types":[]}],"tag_line":"","unified_api":"","updated_at":"","validation_support":false,"website":""}'
};
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}}/vault/connections/:unified_api/:service_id',
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "auth_type": "",\n "authorize_url": "",\n "configurable_resources": [],\n "configuration": [\n {\n "defaults": [\n {\n "id": "",\n "options": [],\n "target": "",\n "value": ""\n }\n ],\n "resource": ""\n }\n ],\n "created_at": "",\n "enabled": false,\n "form_fields": [\n {\n "allow_custom_values": false,\n "custom_field": false,\n "description": "",\n "disabled": false,\n "hidden": false,\n "id": "",\n "label": "",\n "options": [],\n "placeholder": "",\n "prefix": "",\n "required": false,\n "sensitive": false,\n "suffix": "",\n "type": ""\n }\n ],\n "has_guide": false,\n "icon": "",\n "id": "",\n "integration_state": "",\n "logo": "",\n "metadata": {},\n "name": "",\n "oauth_grant_type": "",\n "resource_schema_support": [],\n "resource_settings_support": [],\n "revoke_url": "",\n "service_id": "",\n "settings": {},\n "settings_required_for_authorization": [],\n "state": "",\n "status": "",\n "subscriptions": [\n {\n "created_at": "",\n "downstream_event_types": [],\n "downstream_id": "",\n "execute_url": "",\n "unify_event_types": []\n }\n ],\n "tag_line": "",\n "unified_api": "",\n "updated_at": "",\n "validation_support": false,\n "website": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/vault/connections/:unified_api/:service_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/vault/connections/:unified_api/:service_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({
auth_type: '',
authorize_url: '',
configurable_resources: [],
configuration: [{defaults: [{id: '', options: [], target: '', value: ''}], resource: ''}],
created_at: '',
enabled: false,
form_fields: [
{
allow_custom_values: false,
custom_field: false,
description: '',
disabled: false,
hidden: false,
id: '',
label: '',
options: [],
placeholder: '',
prefix: '',
required: false,
sensitive: false,
suffix: '',
type: ''
}
],
has_guide: false,
icon: '',
id: '',
integration_state: '',
logo: '',
metadata: {},
name: '',
oauth_grant_type: '',
resource_schema_support: [],
resource_settings_support: [],
revoke_url: '',
service_id: '',
settings: {},
settings_required_for_authorization: [],
state: '',
status: '',
subscriptions: [
{
created_at: '',
downstream_event_types: [],
downstream_id: '',
execute_url: '',
unify_event_types: []
}
],
tag_line: '',
unified_api: '',
updated_at: '',
validation_support: false,
website: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/vault/connections/:unified_api/:service_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: {
auth_type: '',
authorize_url: '',
configurable_resources: [],
configuration: [{defaults: [{id: '', options: [], target: '', value: ''}], resource: ''}],
created_at: '',
enabled: false,
form_fields: [
{
allow_custom_values: false,
custom_field: false,
description: '',
disabled: false,
hidden: false,
id: '',
label: '',
options: [],
placeholder: '',
prefix: '',
required: false,
sensitive: false,
suffix: '',
type: ''
}
],
has_guide: false,
icon: '',
id: '',
integration_state: '',
logo: '',
metadata: {},
name: '',
oauth_grant_type: '',
resource_schema_support: [],
resource_settings_support: [],
revoke_url: '',
service_id: '',
settings: {},
settings_required_for_authorization: [],
state: '',
status: '',
subscriptions: [
{
created_at: '',
downstream_event_types: [],
downstream_id: '',
execute_url: '',
unify_event_types: []
}
],
tag_line: '',
unified_api: '',
updated_at: '',
validation_support: false,
website: ''
},
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}}/vault/connections/:unified_api/:service_id');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
auth_type: '',
authorize_url: '',
configurable_resources: [],
configuration: [
{
defaults: [
{
id: '',
options: [],
target: '',
value: ''
}
],
resource: ''
}
],
created_at: '',
enabled: false,
form_fields: [
{
allow_custom_values: false,
custom_field: false,
description: '',
disabled: false,
hidden: false,
id: '',
label: '',
options: [],
placeholder: '',
prefix: '',
required: false,
sensitive: false,
suffix: '',
type: ''
}
],
has_guide: false,
icon: '',
id: '',
integration_state: '',
logo: '',
metadata: {},
name: '',
oauth_grant_type: '',
resource_schema_support: [],
resource_settings_support: [],
revoke_url: '',
service_id: '',
settings: {},
settings_required_for_authorization: [],
state: '',
status: '',
subscriptions: [
{
created_at: '',
downstream_event_types: [],
downstream_id: '',
execute_url: '',
unify_event_types: []
}
],
tag_line: '',
unified_api: '',
updated_at: '',
validation_support: false,
website: ''
});
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}}/vault/connections/:unified_api/:service_id',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
auth_type: '',
authorize_url: '',
configurable_resources: [],
configuration: [{defaults: [{id: '', options: [], target: '', value: ''}], resource: ''}],
created_at: '',
enabled: false,
form_fields: [
{
allow_custom_values: false,
custom_field: false,
description: '',
disabled: false,
hidden: false,
id: '',
label: '',
options: [],
placeholder: '',
prefix: '',
required: false,
sensitive: false,
suffix: '',
type: ''
}
],
has_guide: false,
icon: '',
id: '',
integration_state: '',
logo: '',
metadata: {},
name: '',
oauth_grant_type: '',
resource_schema_support: [],
resource_settings_support: [],
revoke_url: '',
service_id: '',
settings: {},
settings_required_for_authorization: [],
state: '',
status: '',
subscriptions: [
{
created_at: '',
downstream_event_types: [],
downstream_id: '',
execute_url: '',
unify_event_types: []
}
],
tag_line: '',
unified_api: '',
updated_at: '',
validation_support: false,
website: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/vault/connections/:unified_api/:service_id';
const options = {
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"auth_type":"","authorize_url":"","configurable_resources":[],"configuration":[{"defaults":[{"id":"","options":[],"target":"","value":""}],"resource":""}],"created_at":"","enabled":false,"form_fields":[{"allow_custom_values":false,"custom_field":false,"description":"","disabled":false,"hidden":false,"id":"","label":"","options":[],"placeholder":"","prefix":"","required":false,"sensitive":false,"suffix":"","type":""}],"has_guide":false,"icon":"","id":"","integration_state":"","logo":"","metadata":{},"name":"","oauth_grant_type":"","resource_schema_support":[],"resource_settings_support":[],"revoke_url":"","service_id":"","settings":{},"settings_required_for_authorization":[],"state":"","status":"","subscriptions":[{"created_at":"","downstream_event_types":[],"downstream_id":"","execute_url":"","unify_event_types":[]}],"tag_line":"","unified_api":"","updated_at":"","validation_support":false,"website":""}'
};
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 = @{ @"auth_type": @"",
@"authorize_url": @"",
@"configurable_resources": @[ ],
@"configuration": @[ @{ @"defaults": @[ @{ @"id": @"", @"options": @[ ], @"target": @"", @"value": @"" } ], @"resource": @"" } ],
@"created_at": @"",
@"enabled": @NO,
@"form_fields": @[ @{ @"allow_custom_values": @NO, @"custom_field": @NO, @"description": @"", @"disabled": @NO, @"hidden": @NO, @"id": @"", @"label": @"", @"options": @[ ], @"placeholder": @"", @"prefix": @"", @"required": @NO, @"sensitive": @NO, @"suffix": @"", @"type": @"" } ],
@"has_guide": @NO,
@"icon": @"",
@"id": @"",
@"integration_state": @"",
@"logo": @"",
@"metadata": @{ },
@"name": @"",
@"oauth_grant_type": @"",
@"resource_schema_support": @[ ],
@"resource_settings_support": @[ ],
@"revoke_url": @"",
@"service_id": @"",
@"settings": @{ },
@"settings_required_for_authorization": @[ ],
@"state": @"",
@"status": @"",
@"subscriptions": @[ @{ @"created_at": @"", @"downstream_event_types": @[ ], @"downstream_id": @"", @"execute_url": @"", @"unify_event_types": @[ ] } ],
@"tag_line": @"",
@"unified_api": @"",
@"updated_at": @"",
@"validation_support": @NO,
@"website": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_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 \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/vault/connections/:unified_api/:service_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([
'auth_type' => '',
'authorize_url' => '',
'configurable_resources' => [
],
'configuration' => [
[
'defaults' => [
[
'id' => '',
'options' => [
],
'target' => '',
'value' => ''
]
],
'resource' => ''
]
],
'created_at' => '',
'enabled' => null,
'form_fields' => [
[
'allow_custom_values' => null,
'custom_field' => null,
'description' => '',
'disabled' => null,
'hidden' => null,
'id' => '',
'label' => '',
'options' => [
],
'placeholder' => '',
'prefix' => '',
'required' => null,
'sensitive' => null,
'suffix' => '',
'type' => ''
]
],
'has_guide' => null,
'icon' => '',
'id' => '',
'integration_state' => '',
'logo' => '',
'metadata' => [
],
'name' => '',
'oauth_grant_type' => '',
'resource_schema_support' => [
],
'resource_settings_support' => [
],
'revoke_url' => '',
'service_id' => '',
'settings' => [
],
'settings_required_for_authorization' => [
],
'state' => '',
'status' => '',
'subscriptions' => [
[
'created_at' => '',
'downstream_event_types' => [
],
'downstream_id' => '',
'execute_url' => '',
'unify_event_types' => [
]
]
],
'tag_line' => '',
'unified_api' => '',
'updated_at' => '',
'validation_support' => null,
'website' => ''
]),
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}}/vault/connections/:unified_api/:service_id', [
'body' => '{
"auth_type": "",
"authorize_url": "",
"configurable_resources": [],
"configuration": [
{
"defaults": [
{
"id": "",
"options": [],
"target": "",
"value": ""
}
],
"resource": ""
}
],
"created_at": "",
"enabled": false,
"form_fields": [
{
"allow_custom_values": false,
"custom_field": false,
"description": "",
"disabled": false,
"hidden": false,
"id": "",
"label": "",
"options": [],
"placeholder": "",
"prefix": "",
"required": false,
"sensitive": false,
"suffix": "",
"type": ""
}
],
"has_guide": false,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": {},
"name": "",
"oauth_grant_type": "",
"resource_schema_support": [],
"resource_settings_support": [],
"revoke_url": "",
"service_id": "",
"settings": {},
"settings_required_for_authorization": [],
"state": "",
"status": "",
"subscriptions": [
{
"created_at": "",
"downstream_event_types": [],
"downstream_id": "",
"execute_url": "",
"unify_event_types": []
}
],
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": false,
"website": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/vault/connections/:unified_api/:service_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([
'auth_type' => '',
'authorize_url' => '',
'configurable_resources' => [
],
'configuration' => [
[
'defaults' => [
[
'id' => '',
'options' => [
],
'target' => '',
'value' => ''
]
],
'resource' => ''
]
],
'created_at' => '',
'enabled' => null,
'form_fields' => [
[
'allow_custom_values' => null,
'custom_field' => null,
'description' => '',
'disabled' => null,
'hidden' => null,
'id' => '',
'label' => '',
'options' => [
],
'placeholder' => '',
'prefix' => '',
'required' => null,
'sensitive' => null,
'suffix' => '',
'type' => ''
]
],
'has_guide' => null,
'icon' => '',
'id' => '',
'integration_state' => '',
'logo' => '',
'metadata' => [
],
'name' => '',
'oauth_grant_type' => '',
'resource_schema_support' => [
],
'resource_settings_support' => [
],
'revoke_url' => '',
'service_id' => '',
'settings' => [
],
'settings_required_for_authorization' => [
],
'state' => '',
'status' => '',
'subscriptions' => [
[
'created_at' => '',
'downstream_event_types' => [
],
'downstream_id' => '',
'execute_url' => '',
'unify_event_types' => [
]
]
],
'tag_line' => '',
'unified_api' => '',
'updated_at' => '',
'validation_support' => null,
'website' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'auth_type' => '',
'authorize_url' => '',
'configurable_resources' => [
],
'configuration' => [
[
'defaults' => [
[
'id' => '',
'options' => [
],
'target' => '',
'value' => ''
]
],
'resource' => ''
]
],
'created_at' => '',
'enabled' => null,
'form_fields' => [
[
'allow_custom_values' => null,
'custom_field' => null,
'description' => '',
'disabled' => null,
'hidden' => null,
'id' => '',
'label' => '',
'options' => [
],
'placeholder' => '',
'prefix' => '',
'required' => null,
'sensitive' => null,
'suffix' => '',
'type' => ''
]
],
'has_guide' => null,
'icon' => '',
'id' => '',
'integration_state' => '',
'logo' => '',
'metadata' => [
],
'name' => '',
'oauth_grant_type' => '',
'resource_schema_support' => [
],
'resource_settings_support' => [
],
'revoke_url' => '',
'service_id' => '',
'settings' => [
],
'settings_required_for_authorization' => [
],
'state' => '',
'status' => '',
'subscriptions' => [
[
'created_at' => '',
'downstream_event_types' => [
],
'downstream_id' => '',
'execute_url' => '',
'unify_event_types' => [
]
]
],
'tag_line' => '',
'unified_api' => '',
'updated_at' => '',
'validation_support' => null,
'website' => ''
]));
$request->setRequestUrl('{{baseUrl}}/vault/connections/:unified_api/:service_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}}/vault/connections/:unified_api/:service_id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"auth_type": "",
"authorize_url": "",
"configurable_resources": [],
"configuration": [
{
"defaults": [
{
"id": "",
"options": [],
"target": "",
"value": ""
}
],
"resource": ""
}
],
"created_at": "",
"enabled": false,
"form_fields": [
{
"allow_custom_values": false,
"custom_field": false,
"description": "",
"disabled": false,
"hidden": false,
"id": "",
"label": "",
"options": [],
"placeholder": "",
"prefix": "",
"required": false,
"sensitive": false,
"suffix": "",
"type": ""
}
],
"has_guide": false,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": {},
"name": "",
"oauth_grant_type": "",
"resource_schema_support": [],
"resource_settings_support": [],
"revoke_url": "",
"service_id": "",
"settings": {},
"settings_required_for_authorization": [],
"state": "",
"status": "",
"subscriptions": [
{
"created_at": "",
"downstream_event_types": [],
"downstream_id": "",
"execute_url": "",
"unify_event_types": []
}
],
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": false,
"website": ""
}'
$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}}/vault/connections/:unified_api/:service_id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"auth_type": "",
"authorize_url": "",
"configurable_resources": [],
"configuration": [
{
"defaults": [
{
"id": "",
"options": [],
"target": "",
"value": ""
}
],
"resource": ""
}
],
"created_at": "",
"enabled": false,
"form_fields": [
{
"allow_custom_values": false,
"custom_field": false,
"description": "",
"disabled": false,
"hidden": false,
"id": "",
"label": "",
"options": [],
"placeholder": "",
"prefix": "",
"required": false,
"sensitive": false,
"suffix": "",
"type": ""
}
],
"has_guide": false,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": {},
"name": "",
"oauth_grant_type": "",
"resource_schema_support": [],
"resource_settings_support": [],
"revoke_url": "",
"service_id": "",
"settings": {},
"settings_required_for_authorization": [],
"state": "",
"status": "",
"subscriptions": [
{
"created_at": "",
"downstream_event_types": [],
"downstream_id": "",
"execute_url": "",
"unify_event_types": []
}
],
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": false,
"website": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\n}"
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/vault/connections/:unified_api/:service_id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/vault/connections/:unified_api/:service_id"
payload = {
"auth_type": "",
"authorize_url": "",
"configurable_resources": [],
"configuration": [
{
"defaults": [
{
"id": "",
"options": [],
"target": "",
"value": ""
}
],
"resource": ""
}
],
"created_at": "",
"enabled": False,
"form_fields": [
{
"allow_custom_values": False,
"custom_field": False,
"description": "",
"disabled": False,
"hidden": False,
"id": "",
"label": "",
"options": [],
"placeholder": "",
"prefix": "",
"required": False,
"sensitive": False,
"suffix": "",
"type": ""
}
],
"has_guide": False,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": {},
"name": "",
"oauth_grant_type": "",
"resource_schema_support": [],
"resource_settings_support": [],
"revoke_url": "",
"service_id": "",
"settings": {},
"settings_required_for_authorization": [],
"state": "",
"status": "",
"subscriptions": [
{
"created_at": "",
"downstream_event_types": [],
"downstream_id": "",
"execute_url": "",
"unify_event_types": []
}
],
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": False,
"website": ""
}
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}}/vault/connections/:unified_api/:service_id"
payload <- "{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\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}}/vault/connections/:unified_api/:service_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 \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\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/vault/connections/:unified_api/:service_id') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\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}}/vault/connections/:unified_api/:service_id";
let payload = json!({
"auth_type": "",
"authorize_url": "",
"configurable_resources": (),
"configuration": (
json!({
"defaults": (
json!({
"id": "",
"options": (),
"target": "",
"value": ""
})
),
"resource": ""
})
),
"created_at": "",
"enabled": false,
"form_fields": (
json!({
"allow_custom_values": false,
"custom_field": false,
"description": "",
"disabled": false,
"hidden": false,
"id": "",
"label": "",
"options": (),
"placeholder": "",
"prefix": "",
"required": false,
"sensitive": false,
"suffix": "",
"type": ""
})
),
"has_guide": false,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": json!({}),
"name": "",
"oauth_grant_type": "",
"resource_schema_support": (),
"resource_settings_support": (),
"revoke_url": "",
"service_id": "",
"settings": json!({}),
"settings_required_for_authorization": (),
"state": "",
"status": "",
"subscriptions": (
json!({
"created_at": "",
"downstream_event_types": (),
"downstream_id": "",
"execute_url": "",
"unify_event_types": ()
})
),
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": false,
"website": ""
});
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}}/vault/connections/:unified_api/:service_id \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--data '{
"auth_type": "",
"authorize_url": "",
"configurable_resources": [],
"configuration": [
{
"defaults": [
{
"id": "",
"options": [],
"target": "",
"value": ""
}
],
"resource": ""
}
],
"created_at": "",
"enabled": false,
"form_fields": [
{
"allow_custom_values": false,
"custom_field": false,
"description": "",
"disabled": false,
"hidden": false,
"id": "",
"label": "",
"options": [],
"placeholder": "",
"prefix": "",
"required": false,
"sensitive": false,
"suffix": "",
"type": ""
}
],
"has_guide": false,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": {},
"name": "",
"oauth_grant_type": "",
"resource_schema_support": [],
"resource_settings_support": [],
"revoke_url": "",
"service_id": "",
"settings": {},
"settings_required_for_authorization": [],
"state": "",
"status": "",
"subscriptions": [
{
"created_at": "",
"downstream_event_types": [],
"downstream_id": "",
"execute_url": "",
"unify_event_types": []
}
],
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": false,
"website": ""
}'
echo '{
"auth_type": "",
"authorize_url": "",
"configurable_resources": [],
"configuration": [
{
"defaults": [
{
"id": "",
"options": [],
"target": "",
"value": ""
}
],
"resource": ""
}
],
"created_at": "",
"enabled": false,
"form_fields": [
{
"allow_custom_values": false,
"custom_field": false,
"description": "",
"disabled": false,
"hidden": false,
"id": "",
"label": "",
"options": [],
"placeholder": "",
"prefix": "",
"required": false,
"sensitive": false,
"suffix": "",
"type": ""
}
],
"has_guide": false,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": {},
"name": "",
"oauth_grant_type": "",
"resource_schema_support": [],
"resource_settings_support": [],
"revoke_url": "",
"service_id": "",
"settings": {},
"settings_required_for_authorization": [],
"state": "",
"status": "",
"subscriptions": [
{
"created_at": "",
"downstream_event_types": [],
"downstream_id": "",
"execute_url": "",
"unify_event_types": []
}
],
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": false,
"website": ""
}' | \
http PATCH {{baseUrl}}/vault/connections/:unified_api/:service_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 "auth_type": "",\n "authorize_url": "",\n "configurable_resources": [],\n "configuration": [\n {\n "defaults": [\n {\n "id": "",\n "options": [],\n "target": "",\n "value": ""\n }\n ],\n "resource": ""\n }\n ],\n "created_at": "",\n "enabled": false,\n "form_fields": [\n {\n "allow_custom_values": false,\n "custom_field": false,\n "description": "",\n "disabled": false,\n "hidden": false,\n "id": "",\n "label": "",\n "options": [],\n "placeholder": "",\n "prefix": "",\n "required": false,\n "sensitive": false,\n "suffix": "",\n "type": ""\n }\n ],\n "has_guide": false,\n "icon": "",\n "id": "",\n "integration_state": "",\n "logo": "",\n "metadata": {},\n "name": "",\n "oauth_grant_type": "",\n "resource_schema_support": [],\n "resource_settings_support": [],\n "revoke_url": "",\n "service_id": "",\n "settings": {},\n "settings_required_for_authorization": [],\n "state": "",\n "status": "",\n "subscriptions": [\n {\n "created_at": "",\n "downstream_event_types": [],\n "downstream_id": "",\n "execute_url": "",\n "unify_event_types": []\n }\n ],\n "tag_line": "",\n "unified_api": "",\n "updated_at": "",\n "validation_support": false,\n "website": ""\n}' \
--output-document \
- {{baseUrl}}/vault/connections/:unified_api/:service_id
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"auth_type": "",
"authorize_url": "",
"configurable_resources": [],
"configuration": [
[
"defaults": [
[
"id": "",
"options": [],
"target": "",
"value": ""
]
],
"resource": ""
]
],
"created_at": "",
"enabled": false,
"form_fields": [
[
"allow_custom_values": false,
"custom_field": false,
"description": "",
"disabled": false,
"hidden": false,
"id": "",
"label": "",
"options": [],
"placeholder": "",
"prefix": "",
"required": false,
"sensitive": false,
"suffix": "",
"type": ""
]
],
"has_guide": false,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": [],
"name": "",
"oauth_grant_type": "",
"resource_schema_support": [],
"resource_settings_support": [],
"revoke_url": "",
"service_id": "",
"settings": [],
"settings_required_for_authorization": [],
"state": "",
"status": "",
"subscriptions": [
[
"created_at": "",
"downstream_event_types": [],
"downstream_id": "",
"execute_url": "",
"unify_event_types": []
]
],
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": false,
"website": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/vault/connections/:unified_api/:service_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": {
"auth_type": "oauth2",
"authorize_url": "https://unify.apideck.com/vault/authorize/salesforce/?state=",
"configurable_resources": [
"opportunities",
"companies",
"contacts",
"leads"
],
"created_at": 1615563533390,
"enabled": true,
"form_fields": [
{
"custom_field": false,
"disabled": false,
"id": "instance_url",
"label": "Instance url",
"mask": false,
"placeholder": "",
"required": true,
"sensitive": false,
"type": "text",
"value": "https://eu28.salesforce.com"
},
{
"custom_field": false,
"disabled": false,
"id": "api_key",
"label": "API Key",
"mask": false,
"placeholder": "",
"required": true,
"sensitive": true,
"type": "text",
"value": "123455677"
}
],
"has_guide": true,
"icon": "https://res.cloudinary.com/apideck/image/upload/v1529456047/catalog/salesforce/icon128x128.png",
"id": "crm+salesforce",
"integration_state": "configured",
"logo": "https://c1.sfdcstatic.com/content/dam/web/en_us/www/images/home/logo-salesforce-m.svg",
"metadata": {
"account": {
"id": "c01458a5-7276-41ce-bc19-639906b0450a",
"name": "My Company"
},
"plan": "enterprise"
},
"name": "Salesforce",
"oauth_grant_type": "authorization_code",
"resource_schema_support": [
"leads"
],
"resource_settings_support": [
"leads"
],
"revoke_url": "https://unify.apideck.com/vault/revoke/salesforce/?state=",
"service_id": "salesforce",
"settings": {
"api_key": "12345xxxxxx",
"instance_url": "https://eu28.salesforce.com"
},
"settings_required_for_authorization": [
"client_id",
"client_secret"
],
"state": "authorized",
"tag_line": "CRM software solutions and enterprise cloud computing from Salesforce, the leader in customer relationship management (CRM) and PaaS. Free 30 day trial.",
"unified_api": "crm",
"updated_at": 1616662325753,
"website": "https://www.salesforce.com"
},
"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 settings
{{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
service_id
unified_api
resource
BODY json
{
"auth_type": "",
"authorize_url": "",
"configurable_resources": [],
"configuration": [
{
"defaults": [
{
"id": "",
"options": [],
"target": "",
"value": ""
}
],
"resource": ""
}
],
"created_at": "",
"enabled": false,
"form_fields": [
{
"allow_custom_values": false,
"custom_field": false,
"description": "",
"disabled": false,
"hidden": false,
"id": "",
"label": "",
"options": [],
"placeholder": "",
"prefix": "",
"required": false,
"sensitive": false,
"suffix": "",
"type": ""
}
],
"has_guide": false,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": {},
"name": "",
"oauth_grant_type": "",
"resource_schema_support": [],
"resource_settings_support": [],
"revoke_url": "",
"service_id": "",
"settings": {},
"settings_required_for_authorization": [],
"state": "",
"status": "",
"subscriptions": [
{
"created_at": "",
"downstream_event_types": [],
"downstream_id": "",
"execute_url": "",
"unify_event_types": []
}
],
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": false,
"website": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config");
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 \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json
:form-params {:auth_type ""
:authorize_url ""
:configurable_resources []
:configuration [{:defaults [{:id ""
:options []
:target ""
:value ""}]
:resource ""}]
:created_at ""
:enabled false
:form_fields [{:allow_custom_values false
:custom_field false
:description ""
:disabled false
:hidden false
:id ""
:label ""
:options []
:placeholder ""
:prefix ""
:required false
:sensitive false
:suffix ""
:type ""}]
:has_guide false
:icon ""
:id ""
:integration_state ""
:logo ""
:metadata {}
:name ""
:oauth_grant_type ""
:resource_schema_support []
:resource_settings_support []
:revoke_url ""
:service_id ""
:settings {}
:settings_required_for_authorization []
:state ""
:status ""
:subscriptions [{:created_at ""
:downstream_event_types []
:downstream_id ""
:execute_url ""
:unify_event_types []}]
:tag_line ""
:unified_api ""
:updated_at ""
:validation_support false
:website ""}})
require "http/client"
url = "{{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\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}}/vault/connections/:unified_api/:service_id/:resource/config"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\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}}/vault/connections/:unified_api/:service_id/:resource/config");
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 \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config"
payload := strings.NewReader("{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\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/vault/connections/:unified_api/:service_id/:resource/config HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 1314
{
"auth_type": "",
"authorize_url": "",
"configurable_resources": [],
"configuration": [
{
"defaults": [
{
"id": "",
"options": [],
"target": "",
"value": ""
}
],
"resource": ""
}
],
"created_at": "",
"enabled": false,
"form_fields": [
{
"allow_custom_values": false,
"custom_field": false,
"description": "",
"disabled": false,
"hidden": false,
"id": "",
"label": "",
"options": [],
"placeholder": "",
"prefix": "",
"required": false,
"sensitive": false,
"suffix": "",
"type": ""
}
],
"has_guide": false,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": {},
"name": "",
"oauth_grant_type": "",
"resource_schema_support": [],
"resource_settings_support": [],
"revoke_url": "",
"service_id": "",
"settings": {},
"settings_required_for_authorization": [],
"state": "",
"status": "",
"subscriptions": [
{
"created_at": "",
"downstream_event_types": [],
"downstream_id": "",
"execute_url": "",
"unify_event_types": []
}
],
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": false,
"website": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config"))
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\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 \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config")
.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}}/vault/connections/:unified_api/:service_id/:resource/config")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\n}")
.asString();
const data = JSON.stringify({
auth_type: '',
authorize_url: '',
configurable_resources: [],
configuration: [
{
defaults: [
{
id: '',
options: [],
target: '',
value: ''
}
],
resource: ''
}
],
created_at: '',
enabled: false,
form_fields: [
{
allow_custom_values: false,
custom_field: false,
description: '',
disabled: false,
hidden: false,
id: '',
label: '',
options: [],
placeholder: '',
prefix: '',
required: false,
sensitive: false,
suffix: '',
type: ''
}
],
has_guide: false,
icon: '',
id: '',
integration_state: '',
logo: '',
metadata: {},
name: '',
oauth_grant_type: '',
resource_schema_support: [],
resource_settings_support: [],
revoke_url: '',
service_id: '',
settings: {},
settings_required_for_authorization: [],
state: '',
status: '',
subscriptions: [
{
created_at: '',
downstream_event_types: [],
downstream_id: '',
execute_url: '',
unify_event_types: []
}
],
tag_line: '',
unified_api: '',
updated_at: '',
validation_support: false,
website: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config');
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}}/vault/connections/:unified_api/:service_id/:resource/config',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
auth_type: '',
authorize_url: '',
configurable_resources: [],
configuration: [{defaults: [{id: '', options: [], target: '', value: ''}], resource: ''}],
created_at: '',
enabled: false,
form_fields: [
{
allow_custom_values: false,
custom_field: false,
description: '',
disabled: false,
hidden: false,
id: '',
label: '',
options: [],
placeholder: '',
prefix: '',
required: false,
sensitive: false,
suffix: '',
type: ''
}
],
has_guide: false,
icon: '',
id: '',
integration_state: '',
logo: '',
metadata: {},
name: '',
oauth_grant_type: '',
resource_schema_support: [],
resource_settings_support: [],
revoke_url: '',
service_id: '',
settings: {},
settings_required_for_authorization: [],
state: '',
status: '',
subscriptions: [
{
created_at: '',
downstream_event_types: [],
downstream_id: '',
execute_url: '',
unify_event_types: []
}
],
tag_line: '',
unified_api: '',
updated_at: '',
validation_support: false,
website: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config';
const options = {
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"auth_type":"","authorize_url":"","configurable_resources":[],"configuration":[{"defaults":[{"id":"","options":[],"target":"","value":""}],"resource":""}],"created_at":"","enabled":false,"form_fields":[{"allow_custom_values":false,"custom_field":false,"description":"","disabled":false,"hidden":false,"id":"","label":"","options":[],"placeholder":"","prefix":"","required":false,"sensitive":false,"suffix":"","type":""}],"has_guide":false,"icon":"","id":"","integration_state":"","logo":"","metadata":{},"name":"","oauth_grant_type":"","resource_schema_support":[],"resource_settings_support":[],"revoke_url":"","service_id":"","settings":{},"settings_required_for_authorization":[],"state":"","status":"","subscriptions":[{"created_at":"","downstream_event_types":[],"downstream_id":"","execute_url":"","unify_event_types":[]}],"tag_line":"","unified_api":"","updated_at":"","validation_support":false,"website":""}'
};
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}}/vault/connections/:unified_api/:service_id/:resource/config',
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "auth_type": "",\n "authorize_url": "",\n "configurable_resources": [],\n "configuration": [\n {\n "defaults": [\n {\n "id": "",\n "options": [],\n "target": "",\n "value": ""\n }\n ],\n "resource": ""\n }\n ],\n "created_at": "",\n "enabled": false,\n "form_fields": [\n {\n "allow_custom_values": false,\n "custom_field": false,\n "description": "",\n "disabled": false,\n "hidden": false,\n "id": "",\n "label": "",\n "options": [],\n "placeholder": "",\n "prefix": "",\n "required": false,\n "sensitive": false,\n "suffix": "",\n "type": ""\n }\n ],\n "has_guide": false,\n "icon": "",\n "id": "",\n "integration_state": "",\n "logo": "",\n "metadata": {},\n "name": "",\n "oauth_grant_type": "",\n "resource_schema_support": [],\n "resource_settings_support": [],\n "revoke_url": "",\n "service_id": "",\n "settings": {},\n "settings_required_for_authorization": [],\n "state": "",\n "status": "",\n "subscriptions": [\n {\n "created_at": "",\n "downstream_event_types": [],\n "downstream_id": "",\n "execute_url": "",\n "unify_event_types": []\n }\n ],\n "tag_line": "",\n "unified_api": "",\n "updated_at": "",\n "validation_support": false,\n "website": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config")
.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/vault/connections/:unified_api/:service_id/:resource/config',
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({
auth_type: '',
authorize_url: '',
configurable_resources: [],
configuration: [{defaults: [{id: '', options: [], target: '', value: ''}], resource: ''}],
created_at: '',
enabled: false,
form_fields: [
{
allow_custom_values: false,
custom_field: false,
description: '',
disabled: false,
hidden: false,
id: '',
label: '',
options: [],
placeholder: '',
prefix: '',
required: false,
sensitive: false,
suffix: '',
type: ''
}
],
has_guide: false,
icon: '',
id: '',
integration_state: '',
logo: '',
metadata: {},
name: '',
oauth_grant_type: '',
resource_schema_support: [],
resource_settings_support: [],
revoke_url: '',
service_id: '',
settings: {},
settings_required_for_authorization: [],
state: '',
status: '',
subscriptions: [
{
created_at: '',
downstream_event_types: [],
downstream_id: '',
execute_url: '',
unify_event_types: []
}
],
tag_line: '',
unified_api: '',
updated_at: '',
validation_support: false,
website: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: {
auth_type: '',
authorize_url: '',
configurable_resources: [],
configuration: [{defaults: [{id: '', options: [], target: '', value: ''}], resource: ''}],
created_at: '',
enabled: false,
form_fields: [
{
allow_custom_values: false,
custom_field: false,
description: '',
disabled: false,
hidden: false,
id: '',
label: '',
options: [],
placeholder: '',
prefix: '',
required: false,
sensitive: false,
suffix: '',
type: ''
}
],
has_guide: false,
icon: '',
id: '',
integration_state: '',
logo: '',
metadata: {},
name: '',
oauth_grant_type: '',
resource_schema_support: [],
resource_settings_support: [],
revoke_url: '',
service_id: '',
settings: {},
settings_required_for_authorization: [],
state: '',
status: '',
subscriptions: [
{
created_at: '',
downstream_event_types: [],
downstream_id: '',
execute_url: '',
unify_event_types: []
}
],
tag_line: '',
unified_api: '',
updated_at: '',
validation_support: false,
website: ''
},
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}}/vault/connections/:unified_api/:service_id/:resource/config');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
auth_type: '',
authorize_url: '',
configurable_resources: [],
configuration: [
{
defaults: [
{
id: '',
options: [],
target: '',
value: ''
}
],
resource: ''
}
],
created_at: '',
enabled: false,
form_fields: [
{
allow_custom_values: false,
custom_field: false,
description: '',
disabled: false,
hidden: false,
id: '',
label: '',
options: [],
placeholder: '',
prefix: '',
required: false,
sensitive: false,
suffix: '',
type: ''
}
],
has_guide: false,
icon: '',
id: '',
integration_state: '',
logo: '',
metadata: {},
name: '',
oauth_grant_type: '',
resource_schema_support: [],
resource_settings_support: [],
revoke_url: '',
service_id: '',
settings: {},
settings_required_for_authorization: [],
state: '',
status: '',
subscriptions: [
{
created_at: '',
downstream_event_types: [],
downstream_id: '',
execute_url: '',
unify_event_types: []
}
],
tag_line: '',
unified_api: '',
updated_at: '',
validation_support: false,
website: ''
});
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}}/vault/connections/:unified_api/:service_id/:resource/config',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
auth_type: '',
authorize_url: '',
configurable_resources: [],
configuration: [{defaults: [{id: '', options: [], target: '', value: ''}], resource: ''}],
created_at: '',
enabled: false,
form_fields: [
{
allow_custom_values: false,
custom_field: false,
description: '',
disabled: false,
hidden: false,
id: '',
label: '',
options: [],
placeholder: '',
prefix: '',
required: false,
sensitive: false,
suffix: '',
type: ''
}
],
has_guide: false,
icon: '',
id: '',
integration_state: '',
logo: '',
metadata: {},
name: '',
oauth_grant_type: '',
resource_schema_support: [],
resource_settings_support: [],
revoke_url: '',
service_id: '',
settings: {},
settings_required_for_authorization: [],
state: '',
status: '',
subscriptions: [
{
created_at: '',
downstream_event_types: [],
downstream_id: '',
execute_url: '',
unify_event_types: []
}
],
tag_line: '',
unified_api: '',
updated_at: '',
validation_support: false,
website: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config';
const options = {
method: 'PATCH',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"auth_type":"","authorize_url":"","configurable_resources":[],"configuration":[{"defaults":[{"id":"","options":[],"target":"","value":""}],"resource":""}],"created_at":"","enabled":false,"form_fields":[{"allow_custom_values":false,"custom_field":false,"description":"","disabled":false,"hidden":false,"id":"","label":"","options":[],"placeholder":"","prefix":"","required":false,"sensitive":false,"suffix":"","type":""}],"has_guide":false,"icon":"","id":"","integration_state":"","logo":"","metadata":{},"name":"","oauth_grant_type":"","resource_schema_support":[],"resource_settings_support":[],"revoke_url":"","service_id":"","settings":{},"settings_required_for_authorization":[],"state":"","status":"","subscriptions":[{"created_at":"","downstream_event_types":[],"downstream_id":"","execute_url":"","unify_event_types":[]}],"tag_line":"","unified_api":"","updated_at":"","validation_support":false,"website":""}'
};
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 = @{ @"auth_type": @"",
@"authorize_url": @"",
@"configurable_resources": @[ ],
@"configuration": @[ @{ @"defaults": @[ @{ @"id": @"", @"options": @[ ], @"target": @"", @"value": @"" } ], @"resource": @"" } ],
@"created_at": @"",
@"enabled": @NO,
@"form_fields": @[ @{ @"allow_custom_values": @NO, @"custom_field": @NO, @"description": @"", @"disabled": @NO, @"hidden": @NO, @"id": @"", @"label": @"", @"options": @[ ], @"placeholder": @"", @"prefix": @"", @"required": @NO, @"sensitive": @NO, @"suffix": @"", @"type": @"" } ],
@"has_guide": @NO,
@"icon": @"",
@"id": @"",
@"integration_state": @"",
@"logo": @"",
@"metadata": @{ },
@"name": @"",
@"oauth_grant_type": @"",
@"resource_schema_support": @[ ],
@"resource_settings_support": @[ ],
@"revoke_url": @"",
@"service_id": @"",
@"settings": @{ },
@"settings_required_for_authorization": @[ ],
@"state": @"",
@"status": @"",
@"subscriptions": @[ @{ @"created_at": @"", @"downstream_event_types": @[ ], @"downstream_id": @"", @"execute_url": @"", @"unify_event_types": @[ ] } ],
@"tag_line": @"",
@"unified_api": @"",
@"updated_at": @"",
@"validation_support": @NO,
@"website": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config"]
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}}/vault/connections/:unified_api/:service_id/:resource/config" 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 \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config",
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([
'auth_type' => '',
'authorize_url' => '',
'configurable_resources' => [
],
'configuration' => [
[
'defaults' => [
[
'id' => '',
'options' => [
],
'target' => '',
'value' => ''
]
],
'resource' => ''
]
],
'created_at' => '',
'enabled' => null,
'form_fields' => [
[
'allow_custom_values' => null,
'custom_field' => null,
'description' => '',
'disabled' => null,
'hidden' => null,
'id' => '',
'label' => '',
'options' => [
],
'placeholder' => '',
'prefix' => '',
'required' => null,
'sensitive' => null,
'suffix' => '',
'type' => ''
]
],
'has_guide' => null,
'icon' => '',
'id' => '',
'integration_state' => '',
'logo' => '',
'metadata' => [
],
'name' => '',
'oauth_grant_type' => '',
'resource_schema_support' => [
],
'resource_settings_support' => [
],
'revoke_url' => '',
'service_id' => '',
'settings' => [
],
'settings_required_for_authorization' => [
],
'state' => '',
'status' => '',
'subscriptions' => [
[
'created_at' => '',
'downstream_event_types' => [
],
'downstream_id' => '',
'execute_url' => '',
'unify_event_types' => [
]
]
],
'tag_line' => '',
'unified_api' => '',
'updated_at' => '',
'validation_support' => null,
'website' => ''
]),
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}}/vault/connections/:unified_api/:service_id/:resource/config', [
'body' => '{
"auth_type": "",
"authorize_url": "",
"configurable_resources": [],
"configuration": [
{
"defaults": [
{
"id": "",
"options": [],
"target": "",
"value": ""
}
],
"resource": ""
}
],
"created_at": "",
"enabled": false,
"form_fields": [
{
"allow_custom_values": false,
"custom_field": false,
"description": "",
"disabled": false,
"hidden": false,
"id": "",
"label": "",
"options": [],
"placeholder": "",
"prefix": "",
"required": false,
"sensitive": false,
"suffix": "",
"type": ""
}
],
"has_guide": false,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": {},
"name": "",
"oauth_grant_type": "",
"resource_schema_support": [],
"resource_settings_support": [],
"revoke_url": "",
"service_id": "",
"settings": {},
"settings_required_for_authorization": [],
"state": "",
"status": "",
"subscriptions": [
{
"created_at": "",
"downstream_event_types": [],
"downstream_id": "",
"execute_url": "",
"unify_event_types": []
}
],
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": false,
"website": ""
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config');
$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([
'auth_type' => '',
'authorize_url' => '',
'configurable_resources' => [
],
'configuration' => [
[
'defaults' => [
[
'id' => '',
'options' => [
],
'target' => '',
'value' => ''
]
],
'resource' => ''
]
],
'created_at' => '',
'enabled' => null,
'form_fields' => [
[
'allow_custom_values' => null,
'custom_field' => null,
'description' => '',
'disabled' => null,
'hidden' => null,
'id' => '',
'label' => '',
'options' => [
],
'placeholder' => '',
'prefix' => '',
'required' => null,
'sensitive' => null,
'suffix' => '',
'type' => ''
]
],
'has_guide' => null,
'icon' => '',
'id' => '',
'integration_state' => '',
'logo' => '',
'metadata' => [
],
'name' => '',
'oauth_grant_type' => '',
'resource_schema_support' => [
],
'resource_settings_support' => [
],
'revoke_url' => '',
'service_id' => '',
'settings' => [
],
'settings_required_for_authorization' => [
],
'state' => '',
'status' => '',
'subscriptions' => [
[
'created_at' => '',
'downstream_event_types' => [
],
'downstream_id' => '',
'execute_url' => '',
'unify_event_types' => [
]
]
],
'tag_line' => '',
'unified_api' => '',
'updated_at' => '',
'validation_support' => null,
'website' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'auth_type' => '',
'authorize_url' => '',
'configurable_resources' => [
],
'configuration' => [
[
'defaults' => [
[
'id' => '',
'options' => [
],
'target' => '',
'value' => ''
]
],
'resource' => ''
]
],
'created_at' => '',
'enabled' => null,
'form_fields' => [
[
'allow_custom_values' => null,
'custom_field' => null,
'description' => '',
'disabled' => null,
'hidden' => null,
'id' => '',
'label' => '',
'options' => [
],
'placeholder' => '',
'prefix' => '',
'required' => null,
'sensitive' => null,
'suffix' => '',
'type' => ''
]
],
'has_guide' => null,
'icon' => '',
'id' => '',
'integration_state' => '',
'logo' => '',
'metadata' => [
],
'name' => '',
'oauth_grant_type' => '',
'resource_schema_support' => [
],
'resource_settings_support' => [
],
'revoke_url' => '',
'service_id' => '',
'settings' => [
],
'settings_required_for_authorization' => [
],
'state' => '',
'status' => '',
'subscriptions' => [
[
'created_at' => '',
'downstream_event_types' => [
],
'downstream_id' => '',
'execute_url' => '',
'unify_event_types' => [
]
]
],
'tag_line' => '',
'unified_api' => '',
'updated_at' => '',
'validation_support' => null,
'website' => ''
]));
$request->setRequestUrl('{{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config');
$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}}/vault/connections/:unified_api/:service_id/:resource/config' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"auth_type": "",
"authorize_url": "",
"configurable_resources": [],
"configuration": [
{
"defaults": [
{
"id": "",
"options": [],
"target": "",
"value": ""
}
],
"resource": ""
}
],
"created_at": "",
"enabled": false,
"form_fields": [
{
"allow_custom_values": false,
"custom_field": false,
"description": "",
"disabled": false,
"hidden": false,
"id": "",
"label": "",
"options": [],
"placeholder": "",
"prefix": "",
"required": false,
"sensitive": false,
"suffix": "",
"type": ""
}
],
"has_guide": false,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": {},
"name": "",
"oauth_grant_type": "",
"resource_schema_support": [],
"resource_settings_support": [],
"revoke_url": "",
"service_id": "",
"settings": {},
"settings_required_for_authorization": [],
"state": "",
"status": "",
"subscriptions": [
{
"created_at": "",
"downstream_event_types": [],
"downstream_id": "",
"execute_url": "",
"unify_event_types": []
}
],
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": false,
"website": ""
}'
$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}}/vault/connections/:unified_api/:service_id/:resource/config' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"auth_type": "",
"authorize_url": "",
"configurable_resources": [],
"configuration": [
{
"defaults": [
{
"id": "",
"options": [],
"target": "",
"value": ""
}
],
"resource": ""
}
],
"created_at": "",
"enabled": false,
"form_fields": [
{
"allow_custom_values": false,
"custom_field": false,
"description": "",
"disabled": false,
"hidden": false,
"id": "",
"label": "",
"options": [],
"placeholder": "",
"prefix": "",
"required": false,
"sensitive": false,
"suffix": "",
"type": ""
}
],
"has_guide": false,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": {},
"name": "",
"oauth_grant_type": "",
"resource_schema_support": [],
"resource_settings_support": [],
"revoke_url": "",
"service_id": "",
"settings": {},
"settings_required_for_authorization": [],
"state": "",
"status": "",
"subscriptions": [
{
"created_at": "",
"downstream_event_types": [],
"downstream_id": "",
"execute_url": "",
"unify_event_types": []
}
],
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": false,
"website": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\n}"
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/vault/connections/:unified_api/:service_id/:resource/config", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config"
payload = {
"auth_type": "",
"authorize_url": "",
"configurable_resources": [],
"configuration": [
{
"defaults": [
{
"id": "",
"options": [],
"target": "",
"value": ""
}
],
"resource": ""
}
],
"created_at": "",
"enabled": False,
"form_fields": [
{
"allow_custom_values": False,
"custom_field": False,
"description": "",
"disabled": False,
"hidden": False,
"id": "",
"label": "",
"options": [],
"placeholder": "",
"prefix": "",
"required": False,
"sensitive": False,
"suffix": "",
"type": ""
}
],
"has_guide": False,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": {},
"name": "",
"oauth_grant_type": "",
"resource_schema_support": [],
"resource_settings_support": [],
"revoke_url": "",
"service_id": "",
"settings": {},
"settings_required_for_authorization": [],
"state": "",
"status": "",
"subscriptions": [
{
"created_at": "",
"downstream_event_types": [],
"downstream_id": "",
"execute_url": "",
"unify_event_types": []
}
],
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": False,
"website": ""
}
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}}/vault/connections/:unified_api/:service_id/:resource/config"
payload <- "{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\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}}/vault/connections/:unified_api/:service_id/:resource/config")
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 \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\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/vault/connections/:unified_api/:service_id/:resource/config') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"auth_type\": \"\",\n \"authorize_url\": \"\",\n \"configurable_resources\": [],\n \"configuration\": [\n {\n \"defaults\": [\n {\n \"id\": \"\",\n \"options\": [],\n \"target\": \"\",\n \"value\": \"\"\n }\n ],\n \"resource\": \"\"\n }\n ],\n \"created_at\": \"\",\n \"enabled\": false,\n \"form_fields\": [\n {\n \"allow_custom_values\": false,\n \"custom_field\": false,\n \"description\": \"\",\n \"disabled\": false,\n \"hidden\": false,\n \"id\": \"\",\n \"label\": \"\",\n \"options\": [],\n \"placeholder\": \"\",\n \"prefix\": \"\",\n \"required\": false,\n \"sensitive\": false,\n \"suffix\": \"\",\n \"type\": \"\"\n }\n ],\n \"has_guide\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"integration_state\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"oauth_grant_type\": \"\",\n \"resource_schema_support\": [],\n \"resource_settings_support\": [],\n \"revoke_url\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"settings_required_for_authorization\": [],\n \"state\": \"\",\n \"status\": \"\",\n \"subscriptions\": [\n {\n \"created_at\": \"\",\n \"downstream_event_types\": [],\n \"downstream_id\": \"\",\n \"execute_url\": \"\",\n \"unify_event_types\": []\n }\n ],\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"validation_support\": false,\n \"website\": \"\"\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}}/vault/connections/:unified_api/:service_id/:resource/config";
let payload = json!({
"auth_type": "",
"authorize_url": "",
"configurable_resources": (),
"configuration": (
json!({
"defaults": (
json!({
"id": "",
"options": (),
"target": "",
"value": ""
})
),
"resource": ""
})
),
"created_at": "",
"enabled": false,
"form_fields": (
json!({
"allow_custom_values": false,
"custom_field": false,
"description": "",
"disabled": false,
"hidden": false,
"id": "",
"label": "",
"options": (),
"placeholder": "",
"prefix": "",
"required": false,
"sensitive": false,
"suffix": "",
"type": ""
})
),
"has_guide": false,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": json!({}),
"name": "",
"oauth_grant_type": "",
"resource_schema_support": (),
"resource_settings_support": (),
"revoke_url": "",
"service_id": "",
"settings": json!({}),
"settings_required_for_authorization": (),
"state": "",
"status": "",
"subscriptions": (
json!({
"created_at": "",
"downstream_event_types": (),
"downstream_id": "",
"execute_url": "",
"unify_event_types": ()
})
),
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": false,
"website": ""
});
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}}/vault/connections/:unified_api/:service_id/:resource/config \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--data '{
"auth_type": "",
"authorize_url": "",
"configurable_resources": [],
"configuration": [
{
"defaults": [
{
"id": "",
"options": [],
"target": "",
"value": ""
}
],
"resource": ""
}
],
"created_at": "",
"enabled": false,
"form_fields": [
{
"allow_custom_values": false,
"custom_field": false,
"description": "",
"disabled": false,
"hidden": false,
"id": "",
"label": "",
"options": [],
"placeholder": "",
"prefix": "",
"required": false,
"sensitive": false,
"suffix": "",
"type": ""
}
],
"has_guide": false,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": {},
"name": "",
"oauth_grant_type": "",
"resource_schema_support": [],
"resource_settings_support": [],
"revoke_url": "",
"service_id": "",
"settings": {},
"settings_required_for_authorization": [],
"state": "",
"status": "",
"subscriptions": [
{
"created_at": "",
"downstream_event_types": [],
"downstream_id": "",
"execute_url": "",
"unify_event_types": []
}
],
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": false,
"website": ""
}'
echo '{
"auth_type": "",
"authorize_url": "",
"configurable_resources": [],
"configuration": [
{
"defaults": [
{
"id": "",
"options": [],
"target": "",
"value": ""
}
],
"resource": ""
}
],
"created_at": "",
"enabled": false,
"form_fields": [
{
"allow_custom_values": false,
"custom_field": false,
"description": "",
"disabled": false,
"hidden": false,
"id": "",
"label": "",
"options": [],
"placeholder": "",
"prefix": "",
"required": false,
"sensitive": false,
"suffix": "",
"type": ""
}
],
"has_guide": false,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": {},
"name": "",
"oauth_grant_type": "",
"resource_schema_support": [],
"resource_settings_support": [],
"revoke_url": "",
"service_id": "",
"settings": {},
"settings_required_for_authorization": [],
"state": "",
"status": "",
"subscriptions": [
{
"created_at": "",
"downstream_event_types": [],
"downstream_id": "",
"execute_url": "",
"unify_event_types": []
}
],
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": false,
"website": ""
}' | \
http PATCH {{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config \
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 "auth_type": "",\n "authorize_url": "",\n "configurable_resources": [],\n "configuration": [\n {\n "defaults": [\n {\n "id": "",\n "options": [],\n "target": "",\n "value": ""\n }\n ],\n "resource": ""\n }\n ],\n "created_at": "",\n "enabled": false,\n "form_fields": [\n {\n "allow_custom_values": false,\n "custom_field": false,\n "description": "",\n "disabled": false,\n "hidden": false,\n "id": "",\n "label": "",\n "options": [],\n "placeholder": "",\n "prefix": "",\n "required": false,\n "sensitive": false,\n "suffix": "",\n "type": ""\n }\n ],\n "has_guide": false,\n "icon": "",\n "id": "",\n "integration_state": "",\n "logo": "",\n "metadata": {},\n "name": "",\n "oauth_grant_type": "",\n "resource_schema_support": [],\n "resource_settings_support": [],\n "revoke_url": "",\n "service_id": "",\n "settings": {},\n "settings_required_for_authorization": [],\n "state": "",\n "status": "",\n "subscriptions": [\n {\n "created_at": "",\n "downstream_event_types": [],\n "downstream_id": "",\n "execute_url": "",\n "unify_event_types": []\n }\n ],\n "tag_line": "",\n "unified_api": "",\n "updated_at": "",\n "validation_support": false,\n "website": ""\n}' \
--output-document \
- {{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"auth_type": "",
"authorize_url": "",
"configurable_resources": [],
"configuration": [
[
"defaults": [
[
"id": "",
"options": [],
"target": "",
"value": ""
]
],
"resource": ""
]
],
"created_at": "",
"enabled": false,
"form_fields": [
[
"allow_custom_values": false,
"custom_field": false,
"description": "",
"disabled": false,
"hidden": false,
"id": "",
"label": "",
"options": [],
"placeholder": "",
"prefix": "",
"required": false,
"sensitive": false,
"suffix": "",
"type": ""
]
],
"has_guide": false,
"icon": "",
"id": "",
"integration_state": "",
"logo": "",
"metadata": [],
"name": "",
"oauth_grant_type": "",
"resource_schema_support": [],
"resource_settings_support": [],
"revoke_url": "",
"service_id": "",
"settings": [],
"settings_required_for_authorization": [],
"state": "",
"status": "",
"subscriptions": [
[
"created_at": "",
"downstream_event_types": [],
"downstream_id": "",
"execute_url": "",
"unify_event_types": []
]
],
"tag_line": "",
"unified_api": "",
"updated_at": "",
"validation_support": false,
"website": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/vault/connections/:unified_api/:service_id/:resource/config")! 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": {
"auth_type": "oauth2",
"authorize_url": "https://unify.apideck.com/vault/authorize/salesforce/?state=",
"configurable_resources": [
"opportunities",
"companies",
"contacts",
"leads"
],
"created_at": 1615563533390,
"enabled": true,
"form_fields": [
{
"custom_field": false,
"disabled": false,
"id": "instance_url",
"label": "Instance url",
"mask": false,
"placeholder": "",
"required": true,
"sensitive": false,
"type": "text",
"value": "https://eu28.salesforce.com"
},
{
"custom_field": false,
"disabled": false,
"id": "api_key",
"label": "API Key",
"mask": false,
"placeholder": "",
"required": true,
"sensitive": true,
"type": "text",
"value": "123455677"
}
],
"has_guide": true,
"icon": "https://res.cloudinary.com/apideck/image/upload/v1529456047/catalog/salesforce/icon128x128.png",
"id": "crm+salesforce",
"integration_state": "configured",
"logo": "https://c1.sfdcstatic.com/content/dam/web/en_us/www/images/home/logo-salesforce-m.svg",
"metadata": {
"account": {
"id": "c01458a5-7276-41ce-bc19-639906b0450a",
"name": "My Company"
},
"plan": "enterprise"
},
"name": "Salesforce",
"oauth_grant_type": "authorization_code",
"resource_schema_support": [
"leads"
],
"resource_settings_support": [
"leads"
],
"revoke_url": "https://unify.apideck.com/vault/revoke/salesforce/?state=",
"service_id": "salesforce",
"settings": {
"api_key": "12345xxxxxx",
"instance_url": "https://eu28.salesforce.com"
},
"settings_required_for_authorization": [
"client_id",
"client_secret"
],
"state": "authorized",
"tag_line": "CRM software solutions and enterprise cloud computing from Salesforce, the leader in customer relationship management (CRM) and PaaS. Free 30 day trial.",
"unified_api": "crm",
"updated_at": 1616662325753,
"website": "https://www.salesforce.com"
},
"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
Consumer request counts
{{baseUrl}}/vault/consumers/:consumer_id/stats
HEADERS
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
start_datetime
end_datetime
consumer_id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/vault/consumers/:consumer_id/stats?start_datetime=&end_datetime=");
struct curl_slist *headers = NULL;
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}}/vault/consumers/:consumer_id/stats" {:headers {:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:query-params {:start_datetime ""
:end_datetime ""}})
require "http/client"
url = "{{baseUrl}}/vault/consumers/:consumer_id/stats?start_datetime=&end_datetime="
headers = HTTP::Headers{
"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}}/vault/consumers/:consumer_id/stats?start_datetime=&end_datetime="),
Headers =
{
{ "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}}/vault/consumers/:consumer_id/stats?start_datetime=&end_datetime=");
var request = new RestRequest("", Method.Get);
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}}/vault/consumers/:consumer_id/stats?start_datetime=&end_datetime="
req, _ := http.NewRequest("GET", url, nil)
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/vault/consumers/:consumer_id/stats?start_datetime=&end_datetime= HTTP/1.1
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/vault/consumers/:consumer_id/stats?start_datetime=&end_datetime=")
.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}}/vault/consumers/:consumer_id/stats?start_datetime=&end_datetime="))
.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}}/vault/consumers/:consumer_id/stats?start_datetime=&end_datetime=")
.get()
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/vault/consumers/:consumer_id/stats?start_datetime=&end_datetime=")
.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}}/vault/consumers/:consumer_id/stats?start_datetime=&end_datetime=');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/vault/consumers/:consumer_id/stats',
params: {start_datetime: '', end_datetime: ''},
headers: {'x-apideck-app-id': '', authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/vault/consumers/:consumer_id/stats?start_datetime=&end_datetime=';
const options = {method: 'GET', headers: {'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}}/vault/consumers/:consumer_id/stats?start_datetime=&end_datetime=',
method: 'GET',
headers: {
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/vault/consumers/:consumer_id/stats?start_datetime=&end_datetime=")
.get()
.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/vault/consumers/:consumer_id/stats?start_datetime=&end_datetime=',
headers: {
'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}}/vault/consumers/:consumer_id/stats',
qs: {start_datetime: '', end_datetime: ''},
headers: {'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}}/vault/consumers/:consumer_id/stats');
req.query({
start_datetime: '',
end_datetime: ''
});
req.headers({
'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}}/vault/consumers/:consumer_id/stats',
params: {start_datetime: '', end_datetime: ''},
headers: {'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}}/vault/consumers/:consumer_id/stats?start_datetime=&end_datetime=';
const options = {method: 'GET', headers: {'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-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/vault/consumers/:consumer_id/stats?start_datetime=&end_datetime="]
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}}/vault/consumers/:consumer_id/stats?start_datetime=&end_datetime=" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/vault/consumers/:consumer_id/stats?start_datetime=&end_datetime=",
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: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/vault/consumers/:consumer_id/stats?start_datetime=&end_datetime=', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/vault/consumers/:consumer_id/stats');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'start_datetime' => '',
'end_datetime' => ''
]);
$request->setHeaders([
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/vault/consumers/:consumer_id/stats');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'start_datetime' => '',
'end_datetime' => ''
]));
$request->setHeaders([
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/vault/consumers/:consumer_id/stats?start_datetime=&end_datetime=' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/vault/consumers/:consumer_id/stats?start_datetime=&end_datetime=' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/vault/consumers/:consumer_id/stats?start_datetime=&end_datetime=", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/vault/consumers/:consumer_id/stats"
querystring = {"start_datetime":"","end_datetime":""}
headers = {
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/vault/consumers/:consumer_id/stats"
queryString <- list(
start_datetime = "",
end_datetime = ""
)
response <- VERB("GET", url, query = queryString, add_headers('x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/vault/consumers/:consumer_id/stats?start_datetime=&end_datetime=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
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/vault/consumers/:consumer_id/stats') do |req|
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.params['start_datetime'] = ''
req.params['end_datetime'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/vault/consumers/:consumer_id/stats";
let querystring = [
("start_datetime", ""),
("end_datetime", ""),
];
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("authorization", "{{apiKey}}".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/vault/consumers/:consumer_id/stats?start_datetime=&end_datetime=' \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: '
http GET '{{baseUrl}}/vault/consumers/:consumer_id/stats?start_datetime=&end_datetime=' \
authorization:'{{apiKey}}' \
x-apideck-app-id:''
wget --quiet \
--method GET \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- '{{baseUrl}}/vault/consumers/:consumer_id/stats?start_datetime=&end_datetime='
import Foundation
let headers = [
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/vault/consumers/:consumer_id/stats?start_datetime=&end_datetime=")! 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": {
"aggregated_request_count": 40,
"application_id": "1111",
"consumer_id": "test_user_id",
"end_datetime": "2021-05-10T12:00:00.000Z",
"start_datetime": "2021-05-01T12:00:00.000Z"
},
"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 consumer
{{baseUrl}}/vault/consumers
HEADERS
x-apideck-app-id
Authorization
{{apiKey}}
BODY json
{
"aggregated_request_count": "",
"application_id": "",
"connections": [
{
"auth_type": "",
"consumer_id": "",
"created_at": "",
"enabled": false,
"icon": "",
"id": "",
"logo": "",
"metadata": {},
"name": "",
"service_id": "",
"settings": {},
"state": "",
"tag_line": "",
"unified_api": "",
"updated_at": "",
"website": ""
}
],
"consumer_id": "",
"created": "",
"metadata": {
"account_name": "",
"email": "",
"image": "",
"user_name": ""
},
"modified": "",
"request_count_updated": "",
"request_counts": {
"proxy": "",
"unify": "",
"vault": ""
},
"services": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/vault/consumers");
struct curl_slist *headers = NULL;
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 \"aggregated_request_count\": \"\",\n \"application_id\": \"\",\n \"connections\": [\n {\n \"auth_type\": \"\",\n \"consumer_id\": \"\",\n \"created_at\": \"\",\n \"enabled\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"state\": \"\",\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"website\": \"\"\n }\n ],\n \"consumer_id\": \"\",\n \"created\": \"\",\n \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"modified\": \"\",\n \"request_count_updated\": \"\",\n \"request_counts\": {\n \"proxy\": \"\",\n \"unify\": \"\",\n \"vault\": \"\"\n },\n \"services\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/vault/consumers" {:headers {:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json
:form-params {:aggregated_request_count ""
:application_id ""
:connections [{:auth_type ""
:consumer_id ""
:created_at ""
:enabled false
:icon ""
:id ""
:logo ""
:metadata {}
:name ""
:service_id ""
:settings {}
:state ""
:tag_line ""
:unified_api ""
:updated_at ""
:website ""}]
:consumer_id ""
:created ""
:metadata {:account_name ""
:email ""
:image ""
:user_name ""}
:modified ""
:request_count_updated ""
:request_counts {:proxy ""
:unify ""
:vault ""}
:services []}})
require "http/client"
url = "{{baseUrl}}/vault/consumers"
headers = HTTP::Headers{
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"aggregated_request_count\": \"\",\n \"application_id\": \"\",\n \"connections\": [\n {\n \"auth_type\": \"\",\n \"consumer_id\": \"\",\n \"created_at\": \"\",\n \"enabled\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"state\": \"\",\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"website\": \"\"\n }\n ],\n \"consumer_id\": \"\",\n \"created\": \"\",\n \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"modified\": \"\",\n \"request_count_updated\": \"\",\n \"request_counts\": {\n \"proxy\": \"\",\n \"unify\": \"\",\n \"vault\": \"\"\n },\n \"services\": []\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}}/vault/consumers"),
Headers =
{
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"aggregated_request_count\": \"\",\n \"application_id\": \"\",\n \"connections\": [\n {\n \"auth_type\": \"\",\n \"consumer_id\": \"\",\n \"created_at\": \"\",\n \"enabled\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"state\": \"\",\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"website\": \"\"\n }\n ],\n \"consumer_id\": \"\",\n \"created\": \"\",\n \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"modified\": \"\",\n \"request_count_updated\": \"\",\n \"request_counts\": {\n \"proxy\": \"\",\n \"unify\": \"\",\n \"vault\": \"\"\n },\n \"services\": []\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}}/vault/consumers");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"aggregated_request_count\": \"\",\n \"application_id\": \"\",\n \"connections\": [\n {\n \"auth_type\": \"\",\n \"consumer_id\": \"\",\n \"created_at\": \"\",\n \"enabled\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"state\": \"\",\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"website\": \"\"\n }\n ],\n \"consumer_id\": \"\",\n \"created\": \"\",\n \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"modified\": \"\",\n \"request_count_updated\": \"\",\n \"request_counts\": {\n \"proxy\": \"\",\n \"unify\": \"\",\n \"vault\": \"\"\n },\n \"services\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/vault/consumers"
payload := strings.NewReader("{\n \"aggregated_request_count\": \"\",\n \"application_id\": \"\",\n \"connections\": [\n {\n \"auth_type\": \"\",\n \"consumer_id\": \"\",\n \"created_at\": \"\",\n \"enabled\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"state\": \"\",\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"website\": \"\"\n }\n ],\n \"consumer_id\": \"\",\n \"created\": \"\",\n \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"modified\": \"\",\n \"request_count_updated\": \"\",\n \"request_counts\": {\n \"proxy\": \"\",\n \"unify\": \"\",\n \"vault\": \"\"\n },\n \"services\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
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/vault/consumers HTTP/1.1
X-Apideck-App-Id:
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 721
{
"aggregated_request_count": "",
"application_id": "",
"connections": [
{
"auth_type": "",
"consumer_id": "",
"created_at": "",
"enabled": false,
"icon": "",
"id": "",
"logo": "",
"metadata": {},
"name": "",
"service_id": "",
"settings": {},
"state": "",
"tag_line": "",
"unified_api": "",
"updated_at": "",
"website": ""
}
],
"consumer_id": "",
"created": "",
"metadata": {
"account_name": "",
"email": "",
"image": "",
"user_name": ""
},
"modified": "",
"request_count_updated": "",
"request_counts": {
"proxy": "",
"unify": "",
"vault": ""
},
"services": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/vault/consumers")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"aggregated_request_count\": \"\",\n \"application_id\": \"\",\n \"connections\": [\n {\n \"auth_type\": \"\",\n \"consumer_id\": \"\",\n \"created_at\": \"\",\n \"enabled\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"state\": \"\",\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"website\": \"\"\n }\n ],\n \"consumer_id\": \"\",\n \"created\": \"\",\n \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"modified\": \"\",\n \"request_count_updated\": \"\",\n \"request_counts\": {\n \"proxy\": \"\",\n \"unify\": \"\",\n \"vault\": \"\"\n },\n \"services\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/vault/consumers"))
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"aggregated_request_count\": \"\",\n \"application_id\": \"\",\n \"connections\": [\n {\n \"auth_type\": \"\",\n \"consumer_id\": \"\",\n \"created_at\": \"\",\n \"enabled\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"state\": \"\",\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"website\": \"\"\n }\n ],\n \"consumer_id\": \"\",\n \"created\": \"\",\n \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"modified\": \"\",\n \"request_count_updated\": \"\",\n \"request_counts\": {\n \"proxy\": \"\",\n \"unify\": \"\",\n \"vault\": \"\"\n },\n \"services\": []\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 \"aggregated_request_count\": \"\",\n \"application_id\": \"\",\n \"connections\": [\n {\n \"auth_type\": \"\",\n \"consumer_id\": \"\",\n \"created_at\": \"\",\n \"enabled\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"state\": \"\",\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"website\": \"\"\n }\n ],\n \"consumer_id\": \"\",\n \"created\": \"\",\n \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"modified\": \"\",\n \"request_count_updated\": \"\",\n \"request_counts\": {\n \"proxy\": \"\",\n \"unify\": \"\",\n \"vault\": \"\"\n },\n \"services\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/vault/consumers")
.post(body)
.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}}/vault/consumers")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"aggregated_request_count\": \"\",\n \"application_id\": \"\",\n \"connections\": [\n {\n \"auth_type\": \"\",\n \"consumer_id\": \"\",\n \"created_at\": \"\",\n \"enabled\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"state\": \"\",\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"website\": \"\"\n }\n ],\n \"consumer_id\": \"\",\n \"created\": \"\",\n \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"modified\": \"\",\n \"request_count_updated\": \"\",\n \"request_counts\": {\n \"proxy\": \"\",\n \"unify\": \"\",\n \"vault\": \"\"\n },\n \"services\": []\n}")
.asString();
const data = JSON.stringify({
aggregated_request_count: '',
application_id: '',
connections: [
{
auth_type: '',
consumer_id: '',
created_at: '',
enabled: false,
icon: '',
id: '',
logo: '',
metadata: {},
name: '',
service_id: '',
settings: {},
state: '',
tag_line: '',
unified_api: '',
updated_at: '',
website: ''
}
],
consumer_id: '',
created: '',
metadata: {
account_name: '',
email: '',
image: '',
user_name: ''
},
modified: '',
request_count_updated: '',
request_counts: {
proxy: '',
unify: '',
vault: ''
},
services: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/vault/consumers');
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}}/vault/consumers',
headers: {
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
aggregated_request_count: '',
application_id: '',
connections: [
{
auth_type: '',
consumer_id: '',
created_at: '',
enabled: false,
icon: '',
id: '',
logo: '',
metadata: {},
name: '',
service_id: '',
settings: {},
state: '',
tag_line: '',
unified_api: '',
updated_at: '',
website: ''
}
],
consumer_id: '',
created: '',
metadata: {account_name: '', email: '', image: '', user_name: ''},
modified: '',
request_count_updated: '',
request_counts: {proxy: '', unify: '', vault: ''},
services: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/vault/consumers';
const options = {
method: 'POST',
headers: {
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"aggregated_request_count":"","application_id":"","connections":[{"auth_type":"","consumer_id":"","created_at":"","enabled":false,"icon":"","id":"","logo":"","metadata":{},"name":"","service_id":"","settings":{},"state":"","tag_line":"","unified_api":"","updated_at":"","website":""}],"consumer_id":"","created":"","metadata":{"account_name":"","email":"","image":"","user_name":""},"modified":"","request_count_updated":"","request_counts":{"proxy":"","unify":"","vault":""},"services":[]}'
};
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}}/vault/consumers',
method: 'POST',
headers: {
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "aggregated_request_count": "",\n "application_id": "",\n "connections": [\n {\n "auth_type": "",\n "consumer_id": "",\n "created_at": "",\n "enabled": false,\n "icon": "",\n "id": "",\n "logo": "",\n "metadata": {},\n "name": "",\n "service_id": "",\n "settings": {},\n "state": "",\n "tag_line": "",\n "unified_api": "",\n "updated_at": "",\n "website": ""\n }\n ],\n "consumer_id": "",\n "created": "",\n "metadata": {\n "account_name": "",\n "email": "",\n "image": "",\n "user_name": ""\n },\n "modified": "",\n "request_count_updated": "",\n "request_counts": {\n "proxy": "",\n "unify": "",\n "vault": ""\n },\n "services": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"aggregated_request_count\": \"\",\n \"application_id\": \"\",\n \"connections\": [\n {\n \"auth_type\": \"\",\n \"consumer_id\": \"\",\n \"created_at\": \"\",\n \"enabled\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"state\": \"\",\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"website\": \"\"\n }\n ],\n \"consumer_id\": \"\",\n \"created\": \"\",\n \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"modified\": \"\",\n \"request_count_updated\": \"\",\n \"request_counts\": {\n \"proxy\": \"\",\n \"unify\": \"\",\n \"vault\": \"\"\n },\n \"services\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/vault/consumers")
.post(body)
.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/vault/consumers',
headers: {
'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({
aggregated_request_count: '',
application_id: '',
connections: [
{
auth_type: '',
consumer_id: '',
created_at: '',
enabled: false,
icon: '',
id: '',
logo: '',
metadata: {},
name: '',
service_id: '',
settings: {},
state: '',
tag_line: '',
unified_api: '',
updated_at: '',
website: ''
}
],
consumer_id: '',
created: '',
metadata: {account_name: '', email: '', image: '', user_name: ''},
modified: '',
request_count_updated: '',
request_counts: {proxy: '', unify: '', vault: ''},
services: []
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/vault/consumers',
headers: {
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: {
aggregated_request_count: '',
application_id: '',
connections: [
{
auth_type: '',
consumer_id: '',
created_at: '',
enabled: false,
icon: '',
id: '',
logo: '',
metadata: {},
name: '',
service_id: '',
settings: {},
state: '',
tag_line: '',
unified_api: '',
updated_at: '',
website: ''
}
],
consumer_id: '',
created: '',
metadata: {account_name: '', email: '', image: '', user_name: ''},
modified: '',
request_count_updated: '',
request_counts: {proxy: '', unify: '', vault: ''},
services: []
},
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}}/vault/consumers');
req.headers({
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
aggregated_request_count: '',
application_id: '',
connections: [
{
auth_type: '',
consumer_id: '',
created_at: '',
enabled: false,
icon: '',
id: '',
logo: '',
metadata: {},
name: '',
service_id: '',
settings: {},
state: '',
tag_line: '',
unified_api: '',
updated_at: '',
website: ''
}
],
consumer_id: '',
created: '',
metadata: {
account_name: '',
email: '',
image: '',
user_name: ''
},
modified: '',
request_count_updated: '',
request_counts: {
proxy: '',
unify: '',
vault: ''
},
services: []
});
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}}/vault/consumers',
headers: {
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
aggregated_request_count: '',
application_id: '',
connections: [
{
auth_type: '',
consumer_id: '',
created_at: '',
enabled: false,
icon: '',
id: '',
logo: '',
metadata: {},
name: '',
service_id: '',
settings: {},
state: '',
tag_line: '',
unified_api: '',
updated_at: '',
website: ''
}
],
consumer_id: '',
created: '',
metadata: {account_name: '', email: '', image: '', user_name: ''},
modified: '',
request_count_updated: '',
request_counts: {proxy: '', unify: '', vault: ''},
services: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/vault/consumers';
const options = {
method: 'POST',
headers: {
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"aggregated_request_count":"","application_id":"","connections":[{"auth_type":"","consumer_id":"","created_at":"","enabled":false,"icon":"","id":"","logo":"","metadata":{},"name":"","service_id":"","settings":{},"state":"","tag_line":"","unified_api":"","updated_at":"","website":""}],"consumer_id":"","created":"","metadata":{"account_name":"","email":"","image":"","user_name":""},"modified":"","request_count_updated":"","request_counts":{"proxy":"","unify":"","vault":""},"services":[]}'
};
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-app-id": @"",
@"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"aggregated_request_count": @"",
@"application_id": @"",
@"connections": @[ @{ @"auth_type": @"", @"consumer_id": @"", @"created_at": @"", @"enabled": @NO, @"icon": @"", @"id": @"", @"logo": @"", @"metadata": @{ }, @"name": @"", @"service_id": @"", @"settings": @{ }, @"state": @"", @"tag_line": @"", @"unified_api": @"", @"updated_at": @"", @"website": @"" } ],
@"consumer_id": @"",
@"created": @"",
@"metadata": @{ @"account_name": @"", @"email": @"", @"image": @"", @"user_name": @"" },
@"modified": @"",
@"request_count_updated": @"",
@"request_counts": @{ @"proxy": @"", @"unify": @"", @"vault": @"" },
@"services": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/vault/consumers"]
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}}/vault/consumers" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"aggregated_request_count\": \"\",\n \"application_id\": \"\",\n \"connections\": [\n {\n \"auth_type\": \"\",\n \"consumer_id\": \"\",\n \"created_at\": \"\",\n \"enabled\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"state\": \"\",\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"website\": \"\"\n }\n ],\n \"consumer_id\": \"\",\n \"created\": \"\",\n \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"modified\": \"\",\n \"request_count_updated\": \"\",\n \"request_counts\": {\n \"proxy\": \"\",\n \"unify\": \"\",\n \"vault\": \"\"\n },\n \"services\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/vault/consumers",
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([
'aggregated_request_count' => '',
'application_id' => '',
'connections' => [
[
'auth_type' => '',
'consumer_id' => '',
'created_at' => '',
'enabled' => null,
'icon' => '',
'id' => '',
'logo' => '',
'metadata' => [
],
'name' => '',
'service_id' => '',
'settings' => [
],
'state' => '',
'tag_line' => '',
'unified_api' => '',
'updated_at' => '',
'website' => ''
]
],
'consumer_id' => '',
'created' => '',
'metadata' => [
'account_name' => '',
'email' => '',
'image' => '',
'user_name' => ''
],
'modified' => '',
'request_count_updated' => '',
'request_counts' => [
'proxy' => '',
'unify' => '',
'vault' => ''
],
'services' => [
]
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json",
"x-apideck-app-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/vault/consumers', [
'body' => '{
"aggregated_request_count": "",
"application_id": "",
"connections": [
{
"auth_type": "",
"consumer_id": "",
"created_at": "",
"enabled": false,
"icon": "",
"id": "",
"logo": "",
"metadata": {},
"name": "",
"service_id": "",
"settings": {},
"state": "",
"tag_line": "",
"unified_api": "",
"updated_at": "",
"website": ""
}
],
"consumer_id": "",
"created": "",
"metadata": {
"account_name": "",
"email": "",
"image": "",
"user_name": ""
},
"modified": "",
"request_count_updated": "",
"request_counts": {
"proxy": "",
"unify": "",
"vault": ""
},
"services": []
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/vault/consumers');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'aggregated_request_count' => '',
'application_id' => '',
'connections' => [
[
'auth_type' => '',
'consumer_id' => '',
'created_at' => '',
'enabled' => null,
'icon' => '',
'id' => '',
'logo' => '',
'metadata' => [
],
'name' => '',
'service_id' => '',
'settings' => [
],
'state' => '',
'tag_line' => '',
'unified_api' => '',
'updated_at' => '',
'website' => ''
]
],
'consumer_id' => '',
'created' => '',
'metadata' => [
'account_name' => '',
'email' => '',
'image' => '',
'user_name' => ''
],
'modified' => '',
'request_count_updated' => '',
'request_counts' => [
'proxy' => '',
'unify' => '',
'vault' => ''
],
'services' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'aggregated_request_count' => '',
'application_id' => '',
'connections' => [
[
'auth_type' => '',
'consumer_id' => '',
'created_at' => '',
'enabled' => null,
'icon' => '',
'id' => '',
'logo' => '',
'metadata' => [
],
'name' => '',
'service_id' => '',
'settings' => [
],
'state' => '',
'tag_line' => '',
'unified_api' => '',
'updated_at' => '',
'website' => ''
]
],
'consumer_id' => '',
'created' => '',
'metadata' => [
'account_name' => '',
'email' => '',
'image' => '',
'user_name' => ''
],
'modified' => '',
'request_count_updated' => '',
'request_counts' => [
'proxy' => '',
'unify' => '',
'vault' => ''
],
'services' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/vault/consumers');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'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-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/vault/consumers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"aggregated_request_count": "",
"application_id": "",
"connections": [
{
"auth_type": "",
"consumer_id": "",
"created_at": "",
"enabled": false,
"icon": "",
"id": "",
"logo": "",
"metadata": {},
"name": "",
"service_id": "",
"settings": {},
"state": "",
"tag_line": "",
"unified_api": "",
"updated_at": "",
"website": ""
}
],
"consumer_id": "",
"created": "",
"metadata": {
"account_name": "",
"email": "",
"image": "",
"user_name": ""
},
"modified": "",
"request_count_updated": "",
"request_counts": {
"proxy": "",
"unify": "",
"vault": ""
},
"services": []
}'
$headers=@{}
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/vault/consumers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"aggregated_request_count": "",
"application_id": "",
"connections": [
{
"auth_type": "",
"consumer_id": "",
"created_at": "",
"enabled": false,
"icon": "",
"id": "",
"logo": "",
"metadata": {},
"name": "",
"service_id": "",
"settings": {},
"state": "",
"tag_line": "",
"unified_api": "",
"updated_at": "",
"website": ""
}
],
"consumer_id": "",
"created": "",
"metadata": {
"account_name": "",
"email": "",
"image": "",
"user_name": ""
},
"modified": "",
"request_count_updated": "",
"request_counts": {
"proxy": "",
"unify": "",
"vault": ""
},
"services": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"aggregated_request_count\": \"\",\n \"application_id\": \"\",\n \"connections\": [\n {\n \"auth_type\": \"\",\n \"consumer_id\": \"\",\n \"created_at\": \"\",\n \"enabled\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"state\": \"\",\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"website\": \"\"\n }\n ],\n \"consumer_id\": \"\",\n \"created\": \"\",\n \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"modified\": \"\",\n \"request_count_updated\": \"\",\n \"request_counts\": {\n \"proxy\": \"\",\n \"unify\": \"\",\n \"vault\": \"\"\n },\n \"services\": []\n}"
headers = {
'x-apideck-app-id': "",
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/vault/consumers", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/vault/consumers"
payload = {
"aggregated_request_count": "",
"application_id": "",
"connections": [
{
"auth_type": "",
"consumer_id": "",
"created_at": "",
"enabled": False,
"icon": "",
"id": "",
"logo": "",
"metadata": {},
"name": "",
"service_id": "",
"settings": {},
"state": "",
"tag_line": "",
"unified_api": "",
"updated_at": "",
"website": ""
}
],
"consumer_id": "",
"created": "",
"metadata": {
"account_name": "",
"email": "",
"image": "",
"user_name": ""
},
"modified": "",
"request_count_updated": "",
"request_counts": {
"proxy": "",
"unify": "",
"vault": ""
},
"services": []
}
headers = {
"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}}/vault/consumers"
payload <- "{\n \"aggregated_request_count\": \"\",\n \"application_id\": \"\",\n \"connections\": [\n {\n \"auth_type\": \"\",\n \"consumer_id\": \"\",\n \"created_at\": \"\",\n \"enabled\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"state\": \"\",\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"website\": \"\"\n }\n ],\n \"consumer_id\": \"\",\n \"created\": \"\",\n \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"modified\": \"\",\n \"request_count_updated\": \"\",\n \"request_counts\": {\n \"proxy\": \"\",\n \"unify\": \"\",\n \"vault\": \"\"\n },\n \"services\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/vault/consumers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"aggregated_request_count\": \"\",\n \"application_id\": \"\",\n \"connections\": [\n {\n \"auth_type\": \"\",\n \"consumer_id\": \"\",\n \"created_at\": \"\",\n \"enabled\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"state\": \"\",\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"website\": \"\"\n }\n ],\n \"consumer_id\": \"\",\n \"created\": \"\",\n \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"modified\": \"\",\n \"request_count_updated\": \"\",\n \"request_counts\": {\n \"proxy\": \"\",\n \"unify\": \"\",\n \"vault\": \"\"\n },\n \"services\": []\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/vault/consumers') do |req|
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"aggregated_request_count\": \"\",\n \"application_id\": \"\",\n \"connections\": [\n {\n \"auth_type\": \"\",\n \"consumer_id\": \"\",\n \"created_at\": \"\",\n \"enabled\": false,\n \"icon\": \"\",\n \"id\": \"\",\n \"logo\": \"\",\n \"metadata\": {},\n \"name\": \"\",\n \"service_id\": \"\",\n \"settings\": {},\n \"state\": \"\",\n \"tag_line\": \"\",\n \"unified_api\": \"\",\n \"updated_at\": \"\",\n \"website\": \"\"\n }\n ],\n \"consumer_id\": \"\",\n \"created\": \"\",\n \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"modified\": \"\",\n \"request_count_updated\": \"\",\n \"request_counts\": {\n \"proxy\": \"\",\n \"unify\": \"\",\n \"vault\": \"\"\n },\n \"services\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/vault/consumers";
let payload = json!({
"aggregated_request_count": "",
"application_id": "",
"connections": (
json!({
"auth_type": "",
"consumer_id": "",
"created_at": "",
"enabled": false,
"icon": "",
"id": "",
"logo": "",
"metadata": json!({}),
"name": "",
"service_id": "",
"settings": json!({}),
"state": "",
"tag_line": "",
"unified_api": "",
"updated_at": "",
"website": ""
})
),
"consumer_id": "",
"created": "",
"metadata": json!({
"account_name": "",
"email": "",
"image": "",
"user_name": ""
}),
"modified": "",
"request_count_updated": "",
"request_counts": json!({
"proxy": "",
"unify": "",
"vault": ""
}),
"services": ()
});
let mut headers = reqwest::header::HeaderMap::new();
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}}/vault/consumers \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--data '{
"aggregated_request_count": "",
"application_id": "",
"connections": [
{
"auth_type": "",
"consumer_id": "",
"created_at": "",
"enabled": false,
"icon": "",
"id": "",
"logo": "",
"metadata": {},
"name": "",
"service_id": "",
"settings": {},
"state": "",
"tag_line": "",
"unified_api": "",
"updated_at": "",
"website": ""
}
],
"consumer_id": "",
"created": "",
"metadata": {
"account_name": "",
"email": "",
"image": "",
"user_name": ""
},
"modified": "",
"request_count_updated": "",
"request_counts": {
"proxy": "",
"unify": "",
"vault": ""
},
"services": []
}'
echo '{
"aggregated_request_count": "",
"application_id": "",
"connections": [
{
"auth_type": "",
"consumer_id": "",
"created_at": "",
"enabled": false,
"icon": "",
"id": "",
"logo": "",
"metadata": {},
"name": "",
"service_id": "",
"settings": {},
"state": "",
"tag_line": "",
"unified_api": "",
"updated_at": "",
"website": ""
}
],
"consumer_id": "",
"created": "",
"metadata": {
"account_name": "",
"email": "",
"image": "",
"user_name": ""
},
"modified": "",
"request_count_updated": "",
"request_counts": {
"proxy": "",
"unify": "",
"vault": ""
},
"services": []
}' | \
http POST {{baseUrl}}/vault/consumers \
authorization:'{{apiKey}}' \
content-type:application/json \
x-apideck-app-id:''
wget --quiet \
--method POST \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "aggregated_request_count": "",\n "application_id": "",\n "connections": [\n {\n "auth_type": "",\n "consumer_id": "",\n "created_at": "",\n "enabled": false,\n "icon": "",\n "id": "",\n "logo": "",\n "metadata": {},\n "name": "",\n "service_id": "",\n "settings": {},\n "state": "",\n "tag_line": "",\n "unified_api": "",\n "updated_at": "",\n "website": ""\n }\n ],\n "consumer_id": "",\n "created": "",\n "metadata": {\n "account_name": "",\n "email": "",\n "image": "",\n "user_name": ""\n },\n "modified": "",\n "request_count_updated": "",\n "request_counts": {\n "proxy": "",\n "unify": "",\n "vault": ""\n },\n "services": []\n}' \
--output-document \
- {{baseUrl}}/vault/consumers
import Foundation
let headers = [
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"aggregated_request_count": "",
"application_id": "",
"connections": [
[
"auth_type": "",
"consumer_id": "",
"created_at": "",
"enabled": false,
"icon": "",
"id": "",
"logo": "",
"metadata": [],
"name": "",
"service_id": "",
"settings": [],
"state": "",
"tag_line": "",
"unified_api": "",
"updated_at": "",
"website": ""
]
],
"consumer_id": "",
"created": "",
"metadata": [
"account_name": "",
"email": "",
"image": "",
"user_name": ""
],
"modified": "",
"request_count_updated": "",
"request_counts": [
"proxy": "",
"unify": "",
"vault": ""
],
"services": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/vault/consumers")! 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": {
"aggregated_request_count": 101,
"application_id": "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
"consumer_id": "test_consumer_id",
"created": "2021-05-07T12:55:42.242Z",
"modified": "2021-05-07T12:55:42.242Z",
"request_count_updated": "2021-05-07T12:55:42.242Z",
"services": [
"salesforce",
"stripe"
]
},
"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 consumer
{{baseUrl}}/vault/consumers/:consumer_id
HEADERS
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
consumer_id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/vault/consumers/:consumer_id");
struct curl_slist *headers = NULL;
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}}/vault/consumers/:consumer_id" {:headers {:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/vault/consumers/:consumer_id"
headers = HTTP::Headers{
"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}}/vault/consumers/:consumer_id"),
Headers =
{
{ "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}}/vault/consumers/:consumer_id");
var request = new RestRequest("", Method.Delete);
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}}/vault/consumers/:consumer_id"
req, _ := http.NewRequest("DELETE", url, nil)
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/vault/consumers/:consumer_id HTTP/1.1
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/vault/consumers/: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}}/vault/consumers/: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}}/vault/consumers/:consumer_id")
.delete(null)
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/vault/consumers/: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}}/vault/consumers/: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}}/vault/consumers/:consumer_id',
headers: {'x-apideck-app-id': '', authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/vault/consumers/:consumer_id';
const options = {
method: 'DELETE',
headers: {'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}}/vault/consumers/:consumer_id',
method: 'DELETE',
headers: {
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/vault/consumers/:consumer_id")
.delete(null)
.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/vault/consumers/:consumer_id',
headers: {
'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}}/vault/consumers/:consumer_id',
headers: {'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}}/vault/consumers/:consumer_id');
req.headers({
'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}}/vault/consumers/:consumer_id',
headers: {'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}}/vault/consumers/:consumer_id';
const options = {
method: 'DELETE',
headers: {'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-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/vault/consumers/:consumer_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}}/vault/consumers/:consumer_id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/vault/consumers/:consumer_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: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/vault/consumers/:consumer_id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/vault/consumers/:consumer_id');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/vault/consumers/:consumer_id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/vault/consumers/:consumer_id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/vault/consumers/:consumer_id' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("DELETE", "/baseUrl/vault/consumers/:consumer_id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/vault/consumers/:consumer_id"
headers = {
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/vault/consumers/:consumer_id"
response <- VERB("DELETE", url, add_headers('x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/vault/consumers/:consumer_id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
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/vault/consumers/:consumer_id') do |req|
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}}/vault/consumers/:consumer_id";
let mut headers = reqwest::header::HeaderMap::new();
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}}/vault/consumers/:consumer_id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: '
http DELETE {{baseUrl}}/vault/consumers/:consumer_id \
authorization:'{{apiKey}}' \
x-apideck-app-id:''
wget --quiet \
--method DELETE \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/vault/consumers/:consumer_id
import Foundation
let headers = [
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/vault/consumers/:consumer_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
{
"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 all consumers
{{baseUrl}}/vault/consumers
HEADERS
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}}/vault/consumers");
struct curl_slist *headers = NULL;
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}}/vault/consumers" {:headers {:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/vault/consumers"
headers = HTTP::Headers{
"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}}/vault/consumers"),
Headers =
{
{ "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}}/vault/consumers");
var request = new RestRequest("", Method.Get);
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}}/vault/consumers"
req, _ := http.NewRequest("GET", url, nil)
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/vault/consumers HTTP/1.1
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/vault/consumers")
.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}}/vault/consumers"))
.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}}/vault/consumers")
.get()
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/vault/consumers")
.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}}/vault/consumers');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/vault/consumers',
headers: {'x-apideck-app-id': '', authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/vault/consumers';
const options = {method: 'GET', headers: {'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}}/vault/consumers',
method: 'GET',
headers: {
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/vault/consumers")
.get()
.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/vault/consumers',
headers: {
'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}}/vault/consumers',
headers: {'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}}/vault/consumers');
req.headers({
'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}}/vault/consumers',
headers: {'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}}/vault/consumers';
const options = {method: 'GET', headers: {'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-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/vault/consumers"]
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}}/vault/consumers" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/vault/consumers",
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: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/vault/consumers', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/vault/consumers');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/vault/consumers');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/vault/consumers' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/vault/consumers' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/vault/consumers", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/vault/consumers"
headers = {
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/vault/consumers"
response <- VERB("GET", url, add_headers('x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/vault/consumers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
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/vault/consumers') do |req|
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}}/vault/consumers";
let mut headers = reqwest::header::HeaderMap::new();
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}}/vault/consumers \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: '
http GET {{baseUrl}}/vault/consumers \
authorization:'{{apiKey}}' \
x-apideck-app-id:''
wget --quiet \
--method GET \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/vault/consumers
import Foundation
let headers = [
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/vault/consumers")! 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
},
"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 consumer
{{baseUrl}}/vault/consumers/:consumer_id
HEADERS
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
consumer_id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/vault/consumers/:consumer_id");
struct curl_slist *headers = NULL;
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}}/vault/consumers/:consumer_id" {:headers {:x-apideck-app-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/vault/consumers/:consumer_id"
headers = HTTP::Headers{
"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}}/vault/consumers/:consumer_id"),
Headers =
{
{ "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}}/vault/consumers/:consumer_id");
var request = new RestRequest("", Method.Get);
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}}/vault/consumers/:consumer_id"
req, _ := http.NewRequest("GET", url, nil)
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/vault/consumers/:consumer_id HTTP/1.1
X-Apideck-App-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/vault/consumers/: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}}/vault/consumers/: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}}/vault/consumers/:consumer_id")
.get()
.addHeader("x-apideck-app-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/vault/consumers/: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}}/vault/consumers/: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}}/vault/consumers/:consumer_id',
headers: {'x-apideck-app-id': '', authorization: '{{apiKey}}'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/vault/consumers/:consumer_id';
const options = {method: 'GET', headers: {'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}}/vault/consumers/:consumer_id',
method: 'GET',
headers: {
'x-apideck-app-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/vault/consumers/:consumer_id")
.get()
.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/vault/consumers/:consumer_id',
headers: {
'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}}/vault/consumers/:consumer_id',
headers: {'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}}/vault/consumers/:consumer_id');
req.headers({
'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}}/vault/consumers/:consumer_id',
headers: {'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}}/vault/consumers/:consumer_id';
const options = {method: 'GET', headers: {'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-app-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/vault/consumers/:consumer_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}}/vault/consumers/:consumer_id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/vault/consumers/:consumer_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: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/vault/consumers/:consumer_id', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/vault/consumers/:consumer_id');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/vault/consumers/:consumer_id');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/vault/consumers/:consumer_id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/vault/consumers/:consumer_id' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-app-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/vault/consumers/:consumer_id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/vault/consumers/:consumer_id"
headers = {
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/vault/consumers/:consumer_id"
response <- VERB("GET", url, add_headers('x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/vault/consumers/:consumer_id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
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/vault/consumers/:consumer_id') do |req|
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}}/vault/consumers/:consumer_id";
let mut headers = reqwest::header::HeaderMap::new();
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}}/vault/consumers/:consumer_id \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: '
http GET {{baseUrl}}/vault/consumers/:consumer_id \
authorization:'{{apiKey}}' \
x-apideck-app-id:''
wget --quiet \
--method GET \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/vault/consumers/:consumer_id
import Foundation
let headers = [
"x-apideck-app-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/vault/consumers/:consumer_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": {
"aggregated_request_count": 101,
"application_id": "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
"consumer_id": "test_consumer_id",
"created": "2021-05-07T12:55:42.242Z",
"modified": "2021-05-07T12:55:42.242Z",
"request_count_updated": "2021-05-07T12:55:42.242Z",
"services": [
"salesforce",
"stripe"
]
},
"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 consumer
{{baseUrl}}/vault/consumers/:consumer_id
HEADERS
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS
consumer_id
BODY json
{
"metadata": {
"account_name": "",
"email": "",
"image": "",
"user_name": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/vault/consumers/:consumer_id");
struct curl_slist *headers = NULL;
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 \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/vault/consumers/:consumer_id" {:headers {:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json
:form-params {:metadata {:account_name ""
:email ""
:image ""
:user_name ""}}})
require "http/client"
url = "{{baseUrl}}/vault/consumers/:consumer_id"
headers = HTTP::Headers{
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n }\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}}/vault/consumers/:consumer_id"),
Headers =
{
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n }\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}}/vault/consumers/:consumer_id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/vault/consumers/:consumer_id"
payload := strings.NewReader("{\n \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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/vault/consumers/:consumer_id HTTP/1.1
X-Apideck-App-Id:
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 101
{
"metadata": {
"account_name": "",
"email": "",
"image": "",
"user_name": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/vault/consumers/:consumer_id")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/vault/consumers/:consumer_id"))
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n }\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 \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/vault/consumers/:consumer_id")
.patch(body)
.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}}/vault/consumers/:consumer_id")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
metadata: {
account_name: '',
email: '',
image: '',
user_name: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/vault/consumers/: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}}/vault/consumers/:consumer_id',
headers: {
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {metadata: {account_name: '', email: '', image: '', user_name: ''}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/vault/consumers/:consumer_id';
const options = {
method: 'PATCH',
headers: {
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"metadata":{"account_name":"","email":"","image":"","user_name":""}}'
};
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}}/vault/consumers/:consumer_id',
method: 'PATCH',
headers: {
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "metadata": {\n "account_name": "",\n "email": "",\n "image": "",\n "user_name": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/vault/consumers/:consumer_id")
.patch(body)
.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/vault/consumers/:consumer_id',
headers: {
'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({metadata: {account_name: '', email: '', image: '', user_name: ''}}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/vault/consumers/:consumer_id',
headers: {
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: {metadata: {account_name: '', email: '', image: '', user_name: ''}},
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}}/vault/consumers/:consumer_id');
req.headers({
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
metadata: {
account_name: '',
email: '',
image: '',
user_name: ''
}
});
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}}/vault/consumers/:consumer_id',
headers: {
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {metadata: {account_name: '', email: '', image: '', user_name: ''}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/vault/consumers/:consumer_id';
const options = {
method: 'PATCH',
headers: {
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"metadata":{"account_name":"","email":"","image":"","user_name":""}}'
};
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-app-id": @"",
@"authorization": @"{{apiKey}}",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"metadata": @{ @"account_name": @"", @"email": @"", @"image": @"", @"user_name": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/vault/consumers/:consumer_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}}/vault/consumers/:consumer_id" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-app-id", "");
("authorization", "{{apiKey}}");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n }\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/vault/consumers/:consumer_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([
'metadata' => [
'account_name' => '',
'email' => '',
'image' => '',
'user_name' => ''
]
]),
CURLOPT_HTTPHEADER => [
"authorization: {{apiKey}}",
"content-type: application/json",
"x-apideck-app-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/vault/consumers/:consumer_id', [
'body' => '{
"metadata": {
"account_name": "",
"email": "",
"image": "",
"user_name": ""
}
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/vault/consumers/:consumer_id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'x-apideck-app-id' => '',
'authorization' => '{{apiKey}}',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'metadata' => [
'account_name' => '',
'email' => '',
'image' => '',
'user_name' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'metadata' => [
'account_name' => '',
'email' => '',
'image' => '',
'user_name' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/vault/consumers/:consumer_id');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'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-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/vault/consumers/:consumer_id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"metadata": {
"account_name": "",
"email": "",
"image": "",
"user_name": ""
}
}'
$headers=@{}
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/vault/consumers/:consumer_id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"metadata": {
"account_name": "",
"email": "",
"image": "",
"user_name": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n }\n}"
headers = {
'x-apideck-app-id': "",
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/vault/consumers/:consumer_id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/vault/consumers/:consumer_id"
payload = { "metadata": {
"account_name": "",
"email": "",
"image": "",
"user_name": ""
} }
headers = {
"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}}/vault/consumers/:consumer_id"
payload <- "{\n \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n }\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/vault/consumers/:consumer_id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n }\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/vault/consumers/:consumer_id') do |req|
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n }\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}}/vault/consumers/:consumer_id";
let payload = json!({"metadata": json!({
"account_name": "",
"email": "",
"image": "",
"user_name": ""
})});
let mut headers = reqwest::header::HeaderMap::new();
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}}/vault/consumers/:consumer_id \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--data '{
"metadata": {
"account_name": "",
"email": "",
"image": "",
"user_name": ""
}
}'
echo '{
"metadata": {
"account_name": "",
"email": "",
"image": "",
"user_name": ""
}
}' | \
http PATCH {{baseUrl}}/vault/consumers/:consumer_id \
authorization:'{{apiKey}}' \
content-type:application/json \
x-apideck-app-id:''
wget --quiet \
--method PATCH \
--header 'x-apideck-app-id: ' \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--body-data '{\n "metadata": {\n "account_name": "",\n "email": "",\n "image": "",\n "user_name": ""\n }\n}' \
--output-document \
- {{baseUrl}}/vault/consumers/:consumer_id
import Foundation
let headers = [
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = ["metadata": [
"account_name": "",
"email": "",
"image": "",
"user_name": ""
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/vault/consumers/:consumer_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": {
"aggregated_request_count": 101,
"application_id": "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
"consumer_id": "test_consumer_id",
"created": "2021-05-07T12:55:42.242Z",
"modified": "2021-05-07T12:55:42.242Z",
"request_count_updated": "2021-05-07T12:55:42.242Z",
"services": [
"salesforce",
"stripe"
]
},
"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 all consumer request logs
{{baseUrl}}/vault/logs
HEADERS
x-apideck-app-id
x-apideck-consumer-id
Authorization
{{apiKey}}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/vault/logs");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "x-apideck-consumer-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}}/vault/logs" {:headers {:x-apideck-app-id ""
:x-apideck-consumer-id ""
:authorization "{{apiKey}}"}})
require "http/client"
url = "{{baseUrl}}/vault/logs"
headers = HTTP::Headers{
"x-apideck-app-id" => ""
"x-apideck-consumer-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}}/vault/logs"),
Headers =
{
{ "x-apideck-app-id", "" },
{ "x-apideck-consumer-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}}/vault/logs");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/vault/logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-apideck-app-id", "")
req.Header.Add("x-apideck-consumer-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/vault/logs HTTP/1.1
X-Apideck-App-Id:
X-Apideck-Consumer-Id:
Authorization: {{apiKey}}
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/vault/logs")
.setHeader("x-apideck-app-id", "")
.setHeader("x-apideck-consumer-id", "")
.setHeader("authorization", "{{apiKey}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/vault/logs"))
.header("x-apideck-app-id", "")
.header("x-apideck-consumer-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}}/vault/logs")
.get()
.addHeader("x-apideck-app-id", "")
.addHeader("x-apideck-consumer-id", "")
.addHeader("authorization", "{{apiKey}}")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/vault/logs")
.header("x-apideck-app-id", "")
.header("x-apideck-consumer-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}}/vault/logs');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/vault/logs',
headers: {
'x-apideck-app-id': '',
'x-apideck-consumer-id': '',
authorization: '{{apiKey}}'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/vault/logs';
const options = {
method: 'GET',
headers: {
'x-apideck-app-id': '',
'x-apideck-consumer-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}}/vault/logs',
method: 'GET',
headers: {
'x-apideck-app-id': '',
'x-apideck-consumer-id': '',
authorization: '{{apiKey}}'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/vault/logs")
.get()
.addHeader("x-apideck-app-id", "")
.addHeader("x-apideck-consumer-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/vault/logs',
headers: {
'x-apideck-app-id': '',
'x-apideck-consumer-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}}/vault/logs',
headers: {
'x-apideck-app-id': '',
'x-apideck-consumer-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}}/vault/logs');
req.headers({
'x-apideck-app-id': '',
'x-apideck-consumer-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}}/vault/logs',
headers: {
'x-apideck-app-id': '',
'x-apideck-consumer-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}}/vault/logs';
const options = {
method: 'GET',
headers: {
'x-apideck-app-id': '',
'x-apideck-consumer-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-app-id": @"",
@"x-apideck-consumer-id": @"",
@"authorization": @"{{apiKey}}" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/vault/logs"]
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}}/vault/logs" in
let headers = Header.add_list (Header.init ()) [
("x-apideck-app-id", "");
("x-apideck-consumer-id", "");
("authorization", "{{apiKey}}");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/vault/logs",
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}}/vault/logs', [
'headers' => [
'authorization' => '{{apiKey}}',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/vault/logs');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
'authorization' => '{{apiKey}}'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/vault/logs');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
'authorization' => '{{apiKey}}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-app-id", "")
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/vault/logs' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-app-id", "")
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/vault/logs' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'x-apideck-app-id': "",
'x-apideck-consumer-id': "",
'authorization': "{{apiKey}}"
}
conn.request("GET", "/baseUrl/vault/logs", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/vault/logs"
headers = {
"x-apideck-app-id": "",
"x-apideck-consumer-id": "",
"authorization": "{{apiKey}}"
}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/vault/logs"
response <- VERB("GET", url, add_headers('x-apideck-app-id' = '', 'x-apideck-consumer-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/vault/logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-apideck-app-id"] = ''
request["x-apideck-consumer-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/vault/logs') do |req|
req.headers['x-apideck-app-id'] = ''
req.headers['x-apideck-consumer-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/vault/logs";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-apideck-app-id", "".parse().unwrap());
headers.insert("x-apideck-consumer-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}}/vault/logs \
--header 'authorization: {{apiKey}}' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/vault/logs \
authorization:'{{apiKey}}' \
x-apideck-app-id:'' \
x-apideck-consumer-id:''
wget --quiet \
--method GET \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--header 'authorization: {{apiKey}}' \
--output-document \
- {{baseUrl}}/vault/logs
import Foundation
let headers = [
"x-apideck-app-id": "",
"x-apideck-consumer-id": "",
"authorization": "{{apiKey}}"
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/vault/logs")! 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
},
"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 Session
{{baseUrl}}/vault/sessions
HEADERS
x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
BODY json
{
"consumer_metadata": {
"account_name": "",
"email": "",
"image": "",
"user_name": ""
},
"custom_consumer_settings": {},
"redirect_uri": "",
"settings": {
"allow_actions": [],
"auto_redirect": false,
"hide_guides": false,
"hide_resource_settings": false,
"isolation_mode": false,
"sandbox_mode": false,
"session_length": "",
"show_logs": false,
"show_sidebar": false,
"show_suggestions": false,
"unified_apis": []
},
"theme": {
"favicon": "",
"logo": "",
"primary_color": "",
"privacy_url": "",
"sidepanel_background_color": "",
"sidepanel_text_color": "",
"terms_url": "",
"vault_name": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/vault/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 \"consumer_metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"custom_consumer_settings\": {},\n \"redirect_uri\": \"\",\n \"settings\": {\n \"allow_actions\": [],\n \"auto_redirect\": false,\n \"hide_guides\": false,\n \"hide_resource_settings\": false,\n \"isolation_mode\": false,\n \"sandbox_mode\": false,\n \"session_length\": \"\",\n \"show_logs\": false,\n \"show_sidebar\": false,\n \"show_suggestions\": false,\n \"unified_apis\": []\n },\n \"theme\": {\n \"favicon\": \"\",\n \"logo\": \"\",\n \"primary_color\": \"\",\n \"privacy_url\": \"\",\n \"sidepanel_background_color\": \"\",\n \"sidepanel_text_color\": \"\",\n \"terms_url\": \"\",\n \"vault_name\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/vault/sessions" {:headers {:x-apideck-consumer-id ""
:x-apideck-app-id ""
:authorization "{{apiKey}}"}
:content-type :json
:form-params {:consumer_metadata {:account_name ""
:email ""
:image ""
:user_name ""}
:custom_consumer_settings {}
:redirect_uri ""
:settings {:allow_actions []
:auto_redirect false
:hide_guides false
:hide_resource_settings false
:isolation_mode false
:sandbox_mode false
:session_length ""
:show_logs false
:show_sidebar false
:show_suggestions false
:unified_apis []}
:theme {:favicon ""
:logo ""
:primary_color ""
:privacy_url ""
:sidepanel_background_color ""
:sidepanel_text_color ""
:terms_url ""
:vault_name ""}}})
require "http/client"
url = "{{baseUrl}}/vault/sessions"
headers = HTTP::Headers{
"x-apideck-consumer-id" => ""
"x-apideck-app-id" => ""
"authorization" => "{{apiKey}}"
"content-type" => "application/json"
}
reqBody = "{\n \"consumer_metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"custom_consumer_settings\": {},\n \"redirect_uri\": \"\",\n \"settings\": {\n \"allow_actions\": [],\n \"auto_redirect\": false,\n \"hide_guides\": false,\n \"hide_resource_settings\": false,\n \"isolation_mode\": false,\n \"sandbox_mode\": false,\n \"session_length\": \"\",\n \"show_logs\": false,\n \"show_sidebar\": false,\n \"show_suggestions\": false,\n \"unified_apis\": []\n },\n \"theme\": {\n \"favicon\": \"\",\n \"logo\": \"\",\n \"primary_color\": \"\",\n \"privacy_url\": \"\",\n \"sidepanel_background_color\": \"\",\n \"sidepanel_text_color\": \"\",\n \"terms_url\": \"\",\n \"vault_name\": \"\"\n }\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}}/vault/sessions"),
Headers =
{
{ "x-apideck-consumer-id", "" },
{ "x-apideck-app-id", "" },
{ "authorization", "{{apiKey}}" },
},
Content = new StringContent("{\n \"consumer_metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"custom_consumer_settings\": {},\n \"redirect_uri\": \"\",\n \"settings\": {\n \"allow_actions\": [],\n \"auto_redirect\": false,\n \"hide_guides\": false,\n \"hide_resource_settings\": false,\n \"isolation_mode\": false,\n \"sandbox_mode\": false,\n \"session_length\": \"\",\n \"show_logs\": false,\n \"show_sidebar\": false,\n \"show_suggestions\": false,\n \"unified_apis\": []\n },\n \"theme\": {\n \"favicon\": \"\",\n \"logo\": \"\",\n \"primary_color\": \"\",\n \"privacy_url\": \"\",\n \"sidepanel_background_color\": \"\",\n \"sidepanel_text_color\": \"\",\n \"terms_url\": \"\",\n \"vault_name\": \"\"\n }\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}}/vault/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 \"consumer_metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"custom_consumer_settings\": {},\n \"redirect_uri\": \"\",\n \"settings\": {\n \"allow_actions\": [],\n \"auto_redirect\": false,\n \"hide_guides\": false,\n \"hide_resource_settings\": false,\n \"isolation_mode\": false,\n \"sandbox_mode\": false,\n \"session_length\": \"\",\n \"show_logs\": false,\n \"show_sidebar\": false,\n \"show_suggestions\": false,\n \"unified_apis\": []\n },\n \"theme\": {\n \"favicon\": \"\",\n \"logo\": \"\",\n \"primary_color\": \"\",\n \"privacy_url\": \"\",\n \"sidepanel_background_color\": \"\",\n \"sidepanel_text_color\": \"\",\n \"terms_url\": \"\",\n \"vault_name\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/vault/sessions"
payload := strings.NewReader("{\n \"consumer_metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"custom_consumer_settings\": {},\n \"redirect_uri\": \"\",\n \"settings\": {\n \"allow_actions\": [],\n \"auto_redirect\": false,\n \"hide_guides\": false,\n \"hide_resource_settings\": false,\n \"isolation_mode\": false,\n \"sandbox_mode\": false,\n \"session_length\": \"\",\n \"show_logs\": false,\n \"show_sidebar\": false,\n \"show_suggestions\": false,\n \"unified_apis\": []\n },\n \"theme\": {\n \"favicon\": \"\",\n \"logo\": \"\",\n \"primary_color\": \"\",\n \"privacy_url\": \"\",\n \"sidepanel_background_color\": \"\",\n \"sidepanel_text_color\": \"\",\n \"terms_url\": \"\",\n \"vault_name\": \"\"\n }\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/vault/sessions HTTP/1.1
X-Apideck-Consumer-Id:
X-Apideck-App-Id:
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 703
{
"consumer_metadata": {
"account_name": "",
"email": "",
"image": "",
"user_name": ""
},
"custom_consumer_settings": {},
"redirect_uri": "",
"settings": {
"allow_actions": [],
"auto_redirect": false,
"hide_guides": false,
"hide_resource_settings": false,
"isolation_mode": false,
"sandbox_mode": false,
"session_length": "",
"show_logs": false,
"show_sidebar": false,
"show_suggestions": false,
"unified_apis": []
},
"theme": {
"favicon": "",
"logo": "",
"primary_color": "",
"privacy_url": "",
"sidepanel_background_color": "",
"sidepanel_text_color": "",
"terms_url": "",
"vault_name": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/vault/sessions")
.setHeader("x-apideck-consumer-id", "")
.setHeader("x-apideck-app-id", "")
.setHeader("authorization", "{{apiKey}}")
.setHeader("content-type", "application/json")
.setBody("{\n \"consumer_metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"custom_consumer_settings\": {},\n \"redirect_uri\": \"\",\n \"settings\": {\n \"allow_actions\": [],\n \"auto_redirect\": false,\n \"hide_guides\": false,\n \"hide_resource_settings\": false,\n \"isolation_mode\": false,\n \"sandbox_mode\": false,\n \"session_length\": \"\",\n \"show_logs\": false,\n \"show_sidebar\": false,\n \"show_suggestions\": false,\n \"unified_apis\": []\n },\n \"theme\": {\n \"favicon\": \"\",\n \"logo\": \"\",\n \"primary_color\": \"\",\n \"privacy_url\": \"\",\n \"sidepanel_background_color\": \"\",\n \"sidepanel_text_color\": \"\",\n \"terms_url\": \"\",\n \"vault_name\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/vault/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 \"consumer_metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"custom_consumer_settings\": {},\n \"redirect_uri\": \"\",\n \"settings\": {\n \"allow_actions\": [],\n \"auto_redirect\": false,\n \"hide_guides\": false,\n \"hide_resource_settings\": false,\n \"isolation_mode\": false,\n \"sandbox_mode\": false,\n \"session_length\": \"\",\n \"show_logs\": false,\n \"show_sidebar\": false,\n \"show_suggestions\": false,\n \"unified_apis\": []\n },\n \"theme\": {\n \"favicon\": \"\",\n \"logo\": \"\",\n \"primary_color\": \"\",\n \"privacy_url\": \"\",\n \"sidepanel_background_color\": \"\",\n \"sidepanel_text_color\": \"\",\n \"terms_url\": \"\",\n \"vault_name\": \"\"\n }\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 \"consumer_metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"custom_consumer_settings\": {},\n \"redirect_uri\": \"\",\n \"settings\": {\n \"allow_actions\": [],\n \"auto_redirect\": false,\n \"hide_guides\": false,\n \"hide_resource_settings\": false,\n \"isolation_mode\": false,\n \"sandbox_mode\": false,\n \"session_length\": \"\",\n \"show_logs\": false,\n \"show_sidebar\": false,\n \"show_suggestions\": false,\n \"unified_apis\": []\n },\n \"theme\": {\n \"favicon\": \"\",\n \"logo\": \"\",\n \"primary_color\": \"\",\n \"privacy_url\": \"\",\n \"sidepanel_background_color\": \"\",\n \"sidepanel_text_color\": \"\",\n \"terms_url\": \"\",\n \"vault_name\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/vault/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}}/vault/sessions")
.header("x-apideck-consumer-id", "")
.header("x-apideck-app-id", "")
.header("authorization", "{{apiKey}}")
.header("content-type", "application/json")
.body("{\n \"consumer_metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"custom_consumer_settings\": {},\n \"redirect_uri\": \"\",\n \"settings\": {\n \"allow_actions\": [],\n \"auto_redirect\": false,\n \"hide_guides\": false,\n \"hide_resource_settings\": false,\n \"isolation_mode\": false,\n \"sandbox_mode\": false,\n \"session_length\": \"\",\n \"show_logs\": false,\n \"show_sidebar\": false,\n \"show_suggestions\": false,\n \"unified_apis\": []\n },\n \"theme\": {\n \"favicon\": \"\",\n \"logo\": \"\",\n \"primary_color\": \"\",\n \"privacy_url\": \"\",\n \"sidepanel_background_color\": \"\",\n \"sidepanel_text_color\": \"\",\n \"terms_url\": \"\",\n \"vault_name\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
consumer_metadata: {
account_name: '',
email: '',
image: '',
user_name: ''
},
custom_consumer_settings: {},
redirect_uri: '',
settings: {
allow_actions: [],
auto_redirect: false,
hide_guides: false,
hide_resource_settings: false,
isolation_mode: false,
sandbox_mode: false,
session_length: '',
show_logs: false,
show_sidebar: false,
show_suggestions: false,
unified_apis: []
},
theme: {
favicon: '',
logo: '',
primary_color: '',
privacy_url: '',
sidepanel_background_color: '',
sidepanel_text_color: '',
terms_url: '',
vault_name: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/vault/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}}/vault/sessions',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
consumer_metadata: {account_name: '', email: '', image: '', user_name: ''},
custom_consumer_settings: {},
redirect_uri: '',
settings: {
allow_actions: [],
auto_redirect: false,
hide_guides: false,
hide_resource_settings: false,
isolation_mode: false,
sandbox_mode: false,
session_length: '',
show_logs: false,
show_sidebar: false,
show_suggestions: false,
unified_apis: []
},
theme: {
favicon: '',
logo: '',
primary_color: '',
privacy_url: '',
sidepanel_background_color: '',
sidepanel_text_color: '',
terms_url: '',
vault_name: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/vault/sessions';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"consumer_metadata":{"account_name":"","email":"","image":"","user_name":""},"custom_consumer_settings":{},"redirect_uri":"","settings":{"allow_actions":[],"auto_redirect":false,"hide_guides":false,"hide_resource_settings":false,"isolation_mode":false,"sandbox_mode":false,"session_length":"","show_logs":false,"show_sidebar":false,"show_suggestions":false,"unified_apis":[]},"theme":{"favicon":"","logo":"","primary_color":"","privacy_url":"","sidepanel_background_color":"","sidepanel_text_color":"","terms_url":"","vault_name":""}}'
};
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}}/vault/sessions',
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
processData: false,
data: '{\n "consumer_metadata": {\n "account_name": "",\n "email": "",\n "image": "",\n "user_name": ""\n },\n "custom_consumer_settings": {},\n "redirect_uri": "",\n "settings": {\n "allow_actions": [],\n "auto_redirect": false,\n "hide_guides": false,\n "hide_resource_settings": false,\n "isolation_mode": false,\n "sandbox_mode": false,\n "session_length": "",\n "show_logs": false,\n "show_sidebar": false,\n "show_suggestions": false,\n "unified_apis": []\n },\n "theme": {\n "favicon": "",\n "logo": "",\n "primary_color": "",\n "privacy_url": "",\n "sidepanel_background_color": "",\n "sidepanel_text_color": "",\n "terms_url": "",\n "vault_name": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"consumer_metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"custom_consumer_settings\": {},\n \"redirect_uri\": \"\",\n \"settings\": {\n \"allow_actions\": [],\n \"auto_redirect\": false,\n \"hide_guides\": false,\n \"hide_resource_settings\": false,\n \"isolation_mode\": false,\n \"sandbox_mode\": false,\n \"session_length\": \"\",\n \"show_logs\": false,\n \"show_sidebar\": false,\n \"show_suggestions\": false,\n \"unified_apis\": []\n },\n \"theme\": {\n \"favicon\": \"\",\n \"logo\": \"\",\n \"primary_color\": \"\",\n \"privacy_url\": \"\",\n \"sidepanel_background_color\": \"\",\n \"sidepanel_text_color\": \"\",\n \"terms_url\": \"\",\n \"vault_name\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/vault/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/vault/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({
consumer_metadata: {account_name: '', email: '', image: '', user_name: ''},
custom_consumer_settings: {},
redirect_uri: '',
settings: {
allow_actions: [],
auto_redirect: false,
hide_guides: false,
hide_resource_settings: false,
isolation_mode: false,
sandbox_mode: false,
session_length: '',
show_logs: false,
show_sidebar: false,
show_suggestions: false,
unified_apis: []
},
theme: {
favicon: '',
logo: '',
primary_color: '',
privacy_url: '',
sidepanel_background_color: '',
sidepanel_text_color: '',
terms_url: '',
vault_name: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/vault/sessions',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: {
consumer_metadata: {account_name: '', email: '', image: '', user_name: ''},
custom_consumer_settings: {},
redirect_uri: '',
settings: {
allow_actions: [],
auto_redirect: false,
hide_guides: false,
hide_resource_settings: false,
isolation_mode: false,
sandbox_mode: false,
session_length: '',
show_logs: false,
show_sidebar: false,
show_suggestions: false,
unified_apis: []
},
theme: {
favicon: '',
logo: '',
primary_color: '',
privacy_url: '',
sidepanel_background_color: '',
sidepanel_text_color: '',
terms_url: '',
vault_name: ''
}
},
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}}/vault/sessions');
req.headers({
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
});
req.type('json');
req.send({
consumer_metadata: {
account_name: '',
email: '',
image: '',
user_name: ''
},
custom_consumer_settings: {},
redirect_uri: '',
settings: {
allow_actions: [],
auto_redirect: false,
hide_guides: false,
hide_resource_settings: false,
isolation_mode: false,
sandbox_mode: false,
session_length: '',
show_logs: false,
show_sidebar: false,
show_suggestions: false,
unified_apis: []
},
theme: {
favicon: '',
logo: '',
primary_color: '',
privacy_url: '',
sidepanel_background_color: '',
sidepanel_text_color: '',
terms_url: '',
vault_name: ''
}
});
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}}/vault/sessions',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
data: {
consumer_metadata: {account_name: '', email: '', image: '', user_name: ''},
custom_consumer_settings: {},
redirect_uri: '',
settings: {
allow_actions: [],
auto_redirect: false,
hide_guides: false,
hide_resource_settings: false,
isolation_mode: false,
sandbox_mode: false,
session_length: '',
show_logs: false,
show_sidebar: false,
show_suggestions: false,
unified_apis: []
},
theme: {
favicon: '',
logo: '',
primary_color: '',
privacy_url: '',
sidepanel_background_color: '',
sidepanel_text_color: '',
terms_url: '',
vault_name: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/vault/sessions';
const options = {
method: 'POST',
headers: {
'x-apideck-consumer-id': '',
'x-apideck-app-id': '',
authorization: '{{apiKey}}',
'content-type': 'application/json'
},
body: '{"consumer_metadata":{"account_name":"","email":"","image":"","user_name":""},"custom_consumer_settings":{},"redirect_uri":"","settings":{"allow_actions":[],"auto_redirect":false,"hide_guides":false,"hide_resource_settings":false,"isolation_mode":false,"sandbox_mode":false,"session_length":"","show_logs":false,"show_sidebar":false,"show_suggestions":false,"unified_apis":[]},"theme":{"favicon":"","logo":"","primary_color":"","privacy_url":"","sidepanel_background_color":"","sidepanel_text_color":"","terms_url":"","vault_name":""}}'
};
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 = @{ @"consumer_metadata": @{ @"account_name": @"", @"email": @"", @"image": @"", @"user_name": @"" },
@"custom_consumer_settings": @{ },
@"redirect_uri": @"",
@"settings": @{ @"allow_actions": @[ ], @"auto_redirect": @NO, @"hide_guides": @NO, @"hide_resource_settings": @NO, @"isolation_mode": @NO, @"sandbox_mode": @NO, @"session_length": @"", @"show_logs": @NO, @"show_sidebar": @NO, @"show_suggestions": @NO, @"unified_apis": @[ ] },
@"theme": @{ @"favicon": @"", @"logo": @"", @"primary_color": @"", @"privacy_url": @"", @"sidepanel_background_color": @"", @"sidepanel_text_color": @"", @"terms_url": @"", @"vault_name": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/vault/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}}/vault/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 \"consumer_metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"custom_consumer_settings\": {},\n \"redirect_uri\": \"\",\n \"settings\": {\n \"allow_actions\": [],\n \"auto_redirect\": false,\n \"hide_guides\": false,\n \"hide_resource_settings\": false,\n \"isolation_mode\": false,\n \"sandbox_mode\": false,\n \"session_length\": \"\",\n \"show_logs\": false,\n \"show_sidebar\": false,\n \"show_suggestions\": false,\n \"unified_apis\": []\n },\n \"theme\": {\n \"favicon\": \"\",\n \"logo\": \"\",\n \"primary_color\": \"\",\n \"privacy_url\": \"\",\n \"sidepanel_background_color\": \"\",\n \"sidepanel_text_color\": \"\",\n \"terms_url\": \"\",\n \"vault_name\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/vault/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([
'consumer_metadata' => [
'account_name' => '',
'email' => '',
'image' => '',
'user_name' => ''
],
'custom_consumer_settings' => [
],
'redirect_uri' => '',
'settings' => [
'allow_actions' => [
],
'auto_redirect' => null,
'hide_guides' => null,
'hide_resource_settings' => null,
'isolation_mode' => null,
'sandbox_mode' => null,
'session_length' => '',
'show_logs' => null,
'show_sidebar' => null,
'show_suggestions' => null,
'unified_apis' => [
]
],
'theme' => [
'favicon' => '',
'logo' => '',
'primary_color' => '',
'privacy_url' => '',
'sidepanel_background_color' => '',
'sidepanel_text_color' => '',
'terms_url' => '',
'vault_name' => ''
]
]),
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}}/vault/sessions', [
'body' => '{
"consumer_metadata": {
"account_name": "",
"email": "",
"image": "",
"user_name": ""
},
"custom_consumer_settings": {},
"redirect_uri": "",
"settings": {
"allow_actions": [],
"auto_redirect": false,
"hide_guides": false,
"hide_resource_settings": false,
"isolation_mode": false,
"sandbox_mode": false,
"session_length": "",
"show_logs": false,
"show_sidebar": false,
"show_suggestions": false,
"unified_apis": []
},
"theme": {
"favicon": "",
"logo": "",
"primary_color": "",
"privacy_url": "",
"sidepanel_background_color": "",
"sidepanel_text_color": "",
"terms_url": "",
"vault_name": ""
}
}',
'headers' => [
'authorization' => '{{apiKey}}',
'content-type' => 'application/json',
'x-apideck-app-id' => '',
'x-apideck-consumer-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/vault/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([
'consumer_metadata' => [
'account_name' => '',
'email' => '',
'image' => '',
'user_name' => ''
],
'custom_consumer_settings' => [
],
'redirect_uri' => '',
'settings' => [
'allow_actions' => [
],
'auto_redirect' => null,
'hide_guides' => null,
'hide_resource_settings' => null,
'isolation_mode' => null,
'sandbox_mode' => null,
'session_length' => '',
'show_logs' => null,
'show_sidebar' => null,
'show_suggestions' => null,
'unified_apis' => [
]
],
'theme' => [
'favicon' => '',
'logo' => '',
'primary_color' => '',
'privacy_url' => '',
'sidepanel_background_color' => '',
'sidepanel_text_color' => '',
'terms_url' => '',
'vault_name' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'consumer_metadata' => [
'account_name' => '',
'email' => '',
'image' => '',
'user_name' => ''
],
'custom_consumer_settings' => [
],
'redirect_uri' => '',
'settings' => [
'allow_actions' => [
],
'auto_redirect' => null,
'hide_guides' => null,
'hide_resource_settings' => null,
'isolation_mode' => null,
'sandbox_mode' => null,
'session_length' => '',
'show_logs' => null,
'show_sidebar' => null,
'show_suggestions' => null,
'unified_apis' => [
]
],
'theme' => [
'favicon' => '',
'logo' => '',
'primary_color' => '',
'privacy_url' => '',
'sidepanel_background_color' => '',
'sidepanel_text_color' => '',
'terms_url' => '',
'vault_name' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/vault/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}}/vault/sessions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"consumer_metadata": {
"account_name": "",
"email": "",
"image": "",
"user_name": ""
},
"custom_consumer_settings": {},
"redirect_uri": "",
"settings": {
"allow_actions": [],
"auto_redirect": false,
"hide_guides": false,
"hide_resource_settings": false,
"isolation_mode": false,
"sandbox_mode": false,
"session_length": "",
"show_logs": false,
"show_sidebar": false,
"show_suggestions": false,
"unified_apis": []
},
"theme": {
"favicon": "",
"logo": "",
"primary_color": "",
"privacy_url": "",
"sidepanel_background_color": "",
"sidepanel_text_color": "",
"terms_url": "",
"vault_name": ""
}
}'
$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}}/vault/sessions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"consumer_metadata": {
"account_name": "",
"email": "",
"image": "",
"user_name": ""
},
"custom_consumer_settings": {},
"redirect_uri": "",
"settings": {
"allow_actions": [],
"auto_redirect": false,
"hide_guides": false,
"hide_resource_settings": false,
"isolation_mode": false,
"sandbox_mode": false,
"session_length": "",
"show_logs": false,
"show_sidebar": false,
"show_suggestions": false,
"unified_apis": []
},
"theme": {
"favicon": "",
"logo": "",
"primary_color": "",
"privacy_url": "",
"sidepanel_background_color": "",
"sidepanel_text_color": "",
"terms_url": "",
"vault_name": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"consumer_metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"custom_consumer_settings\": {},\n \"redirect_uri\": \"\",\n \"settings\": {\n \"allow_actions\": [],\n \"auto_redirect\": false,\n \"hide_guides\": false,\n \"hide_resource_settings\": false,\n \"isolation_mode\": false,\n \"sandbox_mode\": false,\n \"session_length\": \"\",\n \"show_logs\": false,\n \"show_sidebar\": false,\n \"show_suggestions\": false,\n \"unified_apis\": []\n },\n \"theme\": {\n \"favicon\": \"\",\n \"logo\": \"\",\n \"primary_color\": \"\",\n \"privacy_url\": \"\",\n \"sidepanel_background_color\": \"\",\n \"sidepanel_text_color\": \"\",\n \"terms_url\": \"\",\n \"vault_name\": \"\"\n }\n}"
headers = {
'x-apideck-consumer-id': "",
'x-apideck-app-id': "",
'authorization': "{{apiKey}}",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/vault/sessions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/vault/sessions"
payload = {
"consumer_metadata": {
"account_name": "",
"email": "",
"image": "",
"user_name": ""
},
"custom_consumer_settings": {},
"redirect_uri": "",
"settings": {
"allow_actions": [],
"auto_redirect": False,
"hide_guides": False,
"hide_resource_settings": False,
"isolation_mode": False,
"sandbox_mode": False,
"session_length": "",
"show_logs": False,
"show_sidebar": False,
"show_suggestions": False,
"unified_apis": []
},
"theme": {
"favicon": "",
"logo": "",
"primary_color": "",
"privacy_url": "",
"sidepanel_background_color": "",
"sidepanel_text_color": "",
"terms_url": "",
"vault_name": ""
}
}
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}}/vault/sessions"
payload <- "{\n \"consumer_metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"custom_consumer_settings\": {},\n \"redirect_uri\": \"\",\n \"settings\": {\n \"allow_actions\": [],\n \"auto_redirect\": false,\n \"hide_guides\": false,\n \"hide_resource_settings\": false,\n \"isolation_mode\": false,\n \"sandbox_mode\": false,\n \"session_length\": \"\",\n \"show_logs\": false,\n \"show_sidebar\": false,\n \"show_suggestions\": false,\n \"unified_apis\": []\n },\n \"theme\": {\n \"favicon\": \"\",\n \"logo\": \"\",\n \"primary_color\": \"\",\n \"privacy_url\": \"\",\n \"sidepanel_background_color\": \"\",\n \"sidepanel_text_color\": \"\",\n \"terms_url\": \"\",\n \"vault_name\": \"\"\n }\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}}/vault/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 \"consumer_metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"custom_consumer_settings\": {},\n \"redirect_uri\": \"\",\n \"settings\": {\n \"allow_actions\": [],\n \"auto_redirect\": false,\n \"hide_guides\": false,\n \"hide_resource_settings\": false,\n \"isolation_mode\": false,\n \"sandbox_mode\": false,\n \"session_length\": \"\",\n \"show_logs\": false,\n \"show_sidebar\": false,\n \"show_suggestions\": false,\n \"unified_apis\": []\n },\n \"theme\": {\n \"favicon\": \"\",\n \"logo\": \"\",\n \"primary_color\": \"\",\n \"privacy_url\": \"\",\n \"sidepanel_background_color\": \"\",\n \"sidepanel_text_color\": \"\",\n \"terms_url\": \"\",\n \"vault_name\": \"\"\n }\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/vault/sessions') do |req|
req.headers['x-apideck-consumer-id'] = ''
req.headers['x-apideck-app-id'] = ''
req.headers['authorization'] = '{{apiKey}}'
req.body = "{\n \"consumer_metadata\": {\n \"account_name\": \"\",\n \"email\": \"\",\n \"image\": \"\",\n \"user_name\": \"\"\n },\n \"custom_consumer_settings\": {},\n \"redirect_uri\": \"\",\n \"settings\": {\n \"allow_actions\": [],\n \"auto_redirect\": false,\n \"hide_guides\": false,\n \"hide_resource_settings\": false,\n \"isolation_mode\": false,\n \"sandbox_mode\": false,\n \"session_length\": \"\",\n \"show_logs\": false,\n \"show_sidebar\": false,\n \"show_suggestions\": false,\n \"unified_apis\": []\n },\n \"theme\": {\n \"favicon\": \"\",\n \"logo\": \"\",\n \"primary_color\": \"\",\n \"privacy_url\": \"\",\n \"sidepanel_background_color\": \"\",\n \"sidepanel_text_color\": \"\",\n \"terms_url\": \"\",\n \"vault_name\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/vault/sessions";
let payload = json!({
"consumer_metadata": json!({
"account_name": "",
"email": "",
"image": "",
"user_name": ""
}),
"custom_consumer_settings": json!({}),
"redirect_uri": "",
"settings": json!({
"allow_actions": (),
"auto_redirect": false,
"hide_guides": false,
"hide_resource_settings": false,
"isolation_mode": false,
"sandbox_mode": false,
"session_length": "",
"show_logs": false,
"show_sidebar": false,
"show_suggestions": false,
"unified_apis": ()
}),
"theme": json!({
"favicon": "",
"logo": "",
"primary_color": "",
"privacy_url": "",
"sidepanel_background_color": "",
"sidepanel_text_color": "",
"terms_url": "",
"vault_name": ""
})
});
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}}/vault/sessions \
--header 'authorization: {{apiKey}}' \
--header 'content-type: application/json' \
--header 'x-apideck-app-id: ' \
--header 'x-apideck-consumer-id: ' \
--data '{
"consumer_metadata": {
"account_name": "",
"email": "",
"image": "",
"user_name": ""
},
"custom_consumer_settings": {},
"redirect_uri": "",
"settings": {
"allow_actions": [],
"auto_redirect": false,
"hide_guides": false,
"hide_resource_settings": false,
"isolation_mode": false,
"sandbox_mode": false,
"session_length": "",
"show_logs": false,
"show_sidebar": false,
"show_suggestions": false,
"unified_apis": []
},
"theme": {
"favicon": "",
"logo": "",
"primary_color": "",
"privacy_url": "",
"sidepanel_background_color": "",
"sidepanel_text_color": "",
"terms_url": "",
"vault_name": ""
}
}'
echo '{
"consumer_metadata": {
"account_name": "",
"email": "",
"image": "",
"user_name": ""
},
"custom_consumer_settings": {},
"redirect_uri": "",
"settings": {
"allow_actions": [],
"auto_redirect": false,
"hide_guides": false,
"hide_resource_settings": false,
"isolation_mode": false,
"sandbox_mode": false,
"session_length": "",
"show_logs": false,
"show_sidebar": false,
"show_suggestions": false,
"unified_apis": []
},
"theme": {
"favicon": "",
"logo": "",
"primary_color": "",
"privacy_url": "",
"sidepanel_background_color": "",
"sidepanel_text_color": "",
"terms_url": "",
"vault_name": ""
}
}' | \
http POST {{baseUrl}}/vault/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 "consumer_metadata": {\n "account_name": "",\n "email": "",\n "image": "",\n "user_name": ""\n },\n "custom_consumer_settings": {},\n "redirect_uri": "",\n "settings": {\n "allow_actions": [],\n "auto_redirect": false,\n "hide_guides": false,\n "hide_resource_settings": false,\n "isolation_mode": false,\n "sandbox_mode": false,\n "session_length": "",\n "show_logs": false,\n "show_sidebar": false,\n "show_suggestions": false,\n "unified_apis": []\n },\n "theme": {\n "favicon": "",\n "logo": "",\n "primary_color": "",\n "privacy_url": "",\n "sidepanel_background_color": "",\n "sidepanel_text_color": "",\n "terms_url": "",\n "vault_name": ""\n }\n}' \
--output-document \
- {{baseUrl}}/vault/sessions
import Foundation
let headers = [
"x-apideck-consumer-id": "",
"x-apideck-app-id": "",
"authorization": "{{apiKey}}",
"content-type": "application/json"
]
let parameters = [
"consumer_metadata": [
"account_name": "",
"email": "",
"image": "",
"user_name": ""
],
"custom_consumer_settings": [],
"redirect_uri": "",
"settings": [
"allow_actions": [],
"auto_redirect": false,
"hide_guides": false,
"hide_resource_settings": false,
"isolation_mode": false,
"sandbox_mode": false,
"session_length": "",
"show_logs": false,
"show_sidebar": false,
"show_suggestions": false,
"unified_apis": []
],
"theme": [
"favicon": "",
"logo": "",
"primary_color": "",
"privacy_url": "",
"sidepanel_background_color": "",
"sidepanel_text_color": "",
"terms_url": "",
"vault_name": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/vault/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": {
"session_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb25zdW1lcl9pZCI6InRlc3RfdXNlcl9pZCIsImFwcGxpY2F0aW9uX2lkIj",
"session_uri": "http://vault.apideck.com/session/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb25zdW1lcl9pZCI6InRlc3RfdXNlcl9pZCIsImFwcGxpY2F0aW9uX2lkIj"
},
"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"
}