Notification Service
GET
info
{{baseUrl}}/info
HEADERS
data-partition-id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/info");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "data-partition-id: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/info" {:headers {:data-partition-id ""}})
require "http/client"
url = "{{baseUrl}}/info"
headers = HTTP::Headers{
"data-partition-id" => ""
}
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}}/info"),
Headers =
{
{ "data-partition-id", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/info");
var request = new RestRequest("", Method.Get);
request.AddHeader("data-partition-id", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/info"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("data-partition-id", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/info HTTP/1.1
Data-Partition-Id:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/info")
.setHeader("data-partition-id", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/info"))
.header("data-partition-id", "")
.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}}/info")
.get()
.addHeader("data-partition-id", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/info")
.header("data-partition-id", "")
.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}}/info');
xhr.setRequestHeader('data-partition-id', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/info',
headers: {'data-partition-id': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/info';
const options = {method: 'GET', headers: {'data-partition-id': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/info',
method: 'GET',
headers: {
'data-partition-id': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/info")
.get()
.addHeader("data-partition-id", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/info',
headers: {
'data-partition-id': ''
}
};
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}}/info',
headers: {'data-partition-id': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/info');
req.headers({
'data-partition-id': ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/info',
headers: {'data-partition-id': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/info';
const options = {method: 'GET', headers: {'data-partition-id': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"data-partition-id": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/info"]
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}}/info" in
let headers = Header.add (Header.init ()) "data-partition-id" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"data-partition-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/info', [
'headers' => [
'data-partition-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/info');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'data-partition-id' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/info');
$request->setRequestMethod('GET');
$request->setHeaders([
'data-partition-id' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("data-partition-id", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/info' -Method GET -Headers $headers
$headers=@{}
$headers.Add("data-partition-id", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/info' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'data-partition-id': "" }
conn.request("GET", "/baseUrl/info", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/info"
headers = {"data-partition-id": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/info"
response <- VERB("GET", url, add_headers('data-partition-id' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["data-partition-id"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/info') do |req|
req.headers['data-partition-id'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/info";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("data-partition-id", "".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}}/info \
--header 'data-partition-id: '
http GET {{baseUrl}}/info \
data-partition-id:''
wget --quiet \
--method GET \
--header 'data-partition-id: ' \
--output-document \
- {{baseUrl}}/info
import Foundation
let headers = ["data-partition-id": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/info")! 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()
POST
createSchema
{{baseUrl}}/schema
HEADERS
data-partition-id
BODY json
{
"schemaInfo": {
"schemaIdentity": {
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
},
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": {}
},
"schema": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/schema");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "data-partition-id: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/schema" {:headers {:data-partition-id ""}
:content-type :json
:form-params {:schemaInfo {:schemaIdentity {:authority ""
:source ""
:entityType ""
:schemaVersionMajor 0
:schemaVersionMinor 0
:schemaVersionPatch 0
:id ""}
:createdBy ""
:dateCreated ""
:status ""
:scope ""
:supersededBy {}}
:schema {}}})
require "http/client"
url = "{{baseUrl}}/schema"
headers = HTTP::Headers{
"data-partition-id" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\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}}/schema"),
Headers =
{
{ "data-partition-id", "" },
},
Content = new StringContent("{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\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}}/schema");
var request = new RestRequest("", Method.Post);
request.AddHeader("data-partition-id", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/schema"
payload := strings.NewReader("{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("data-partition-id", "")
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/schema HTTP/1.1
Data-Partition-Id:
Content-Type: application/json
Host: example.com
Content-Length: 349
{
"schemaInfo": {
"schemaIdentity": {
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
},
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": {}
},
"schema": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/schema")
.setHeader("data-partition-id", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/schema"))
.header("data-partition-id", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\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 \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/schema")
.post(body)
.addHeader("data-partition-id", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/schema")
.header("data-partition-id", "")
.header("content-type", "application/json")
.body("{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}")
.asString();
const data = JSON.stringify({
schemaInfo: {
schemaIdentity: {
authority: '',
source: '',
entityType: '',
schemaVersionMajor: 0,
schemaVersionMinor: 0,
schemaVersionPatch: 0,
id: ''
},
createdBy: '',
dateCreated: '',
status: '',
scope: '',
supersededBy: {}
},
schema: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/schema');
xhr.setRequestHeader('data-partition-id', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/schema',
headers: {'data-partition-id': '', 'content-type': 'application/json'},
data: {
schemaInfo: {
schemaIdentity: {
authority: '',
source: '',
entityType: '',
schemaVersionMajor: 0,
schemaVersionMinor: 0,
schemaVersionPatch: 0,
id: ''
},
createdBy: '',
dateCreated: '',
status: '',
scope: '',
supersededBy: {}
},
schema: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/schema';
const options = {
method: 'POST',
headers: {'data-partition-id': '', 'content-type': 'application/json'},
body: '{"schemaInfo":{"schemaIdentity":{"authority":"","source":"","entityType":"","schemaVersionMajor":0,"schemaVersionMinor":0,"schemaVersionPatch":0,"id":""},"createdBy":"","dateCreated":"","status":"","scope":"","supersededBy":{}},"schema":{}}'
};
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}}/schema',
method: 'POST',
headers: {
'data-partition-id': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "schemaInfo": {\n "schemaIdentity": {\n "authority": "",\n "source": "",\n "entityType": "",\n "schemaVersionMajor": 0,\n "schemaVersionMinor": 0,\n "schemaVersionPatch": 0,\n "id": ""\n },\n "createdBy": "",\n "dateCreated": "",\n "status": "",\n "scope": "",\n "supersededBy": {}\n },\n "schema": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/schema")
.post(body)
.addHeader("data-partition-id", "")
.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/schema',
headers: {
'data-partition-id': '',
'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({
schemaInfo: {
schemaIdentity: {
authority: '',
source: '',
entityType: '',
schemaVersionMajor: 0,
schemaVersionMinor: 0,
schemaVersionPatch: 0,
id: ''
},
createdBy: '',
dateCreated: '',
status: '',
scope: '',
supersededBy: {}
},
schema: {}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/schema',
headers: {'data-partition-id': '', 'content-type': 'application/json'},
body: {
schemaInfo: {
schemaIdentity: {
authority: '',
source: '',
entityType: '',
schemaVersionMajor: 0,
schemaVersionMinor: 0,
schemaVersionPatch: 0,
id: ''
},
createdBy: '',
dateCreated: '',
status: '',
scope: '',
supersededBy: {}
},
schema: {}
},
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}}/schema');
req.headers({
'data-partition-id': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
schemaInfo: {
schemaIdentity: {
authority: '',
source: '',
entityType: '',
schemaVersionMajor: 0,
schemaVersionMinor: 0,
schemaVersionPatch: 0,
id: ''
},
createdBy: '',
dateCreated: '',
status: '',
scope: '',
supersededBy: {}
},
schema: {}
});
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}}/schema',
headers: {'data-partition-id': '', 'content-type': 'application/json'},
data: {
schemaInfo: {
schemaIdentity: {
authority: '',
source: '',
entityType: '',
schemaVersionMajor: 0,
schemaVersionMinor: 0,
schemaVersionPatch: 0,
id: ''
},
createdBy: '',
dateCreated: '',
status: '',
scope: '',
supersededBy: {}
},
schema: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/schema';
const options = {
method: 'POST',
headers: {'data-partition-id': '', 'content-type': 'application/json'},
body: '{"schemaInfo":{"schemaIdentity":{"authority":"","source":"","entityType":"","schemaVersionMajor":0,"schemaVersionMinor":0,"schemaVersionPatch":0,"id":""},"createdBy":"","dateCreated":"","status":"","scope":"","supersededBy":{}},"schema":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"data-partition-id": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"schemaInfo": @{ @"schemaIdentity": @{ @"authority": @"", @"source": @"", @"entityType": @"", @"schemaVersionMajor": @0, @"schemaVersionMinor": @0, @"schemaVersionPatch": @0, @"id": @"" }, @"createdBy": @"", @"dateCreated": @"", @"status": @"", @"scope": @"", @"supersededBy": @{ } },
@"schema": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/schema"]
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}}/schema" in
let headers = Header.add_list (Header.init ()) [
("data-partition-id", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/schema",
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([
'schemaInfo' => [
'schemaIdentity' => [
'authority' => '',
'source' => '',
'entityType' => '',
'schemaVersionMajor' => 0,
'schemaVersionMinor' => 0,
'schemaVersionPatch' => 0,
'id' => ''
],
'createdBy' => '',
'dateCreated' => '',
'status' => '',
'scope' => '',
'supersededBy' => [
]
],
'schema' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"data-partition-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/schema', [
'body' => '{
"schemaInfo": {
"schemaIdentity": {
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
},
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": {}
},
"schema": {}
}',
'headers' => [
'content-type' => 'application/json',
'data-partition-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/schema');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'data-partition-id' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'schemaInfo' => [
'schemaIdentity' => [
'authority' => '',
'source' => '',
'entityType' => '',
'schemaVersionMajor' => 0,
'schemaVersionMinor' => 0,
'schemaVersionPatch' => 0,
'id' => ''
],
'createdBy' => '',
'dateCreated' => '',
'status' => '',
'scope' => '',
'supersededBy' => [
]
],
'schema' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'schemaInfo' => [
'schemaIdentity' => [
'authority' => '',
'source' => '',
'entityType' => '',
'schemaVersionMajor' => 0,
'schemaVersionMinor' => 0,
'schemaVersionPatch' => 0,
'id' => ''
],
'createdBy' => '',
'dateCreated' => '',
'status' => '',
'scope' => '',
'supersededBy' => [
]
],
'schema' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/schema');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'data-partition-id' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("data-partition-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/schema' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"schemaInfo": {
"schemaIdentity": {
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
},
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": {}
},
"schema": {}
}'
$headers=@{}
$headers.Add("data-partition-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/schema' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"schemaInfo": {
"schemaIdentity": {
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
},
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": {}
},
"schema": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}"
headers = {
'data-partition-id': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/schema", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/schema"
payload = {
"schemaInfo": {
"schemaIdentity": {
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
},
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": {}
},
"schema": {}
}
headers = {
"data-partition-id": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/schema"
payload <- "{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('data-partition-id' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/schema")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["data-partition-id"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\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/schema') do |req|
req.headers['data-partition-id'] = ''
req.body = "{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/schema";
let payload = json!({
"schemaInfo": json!({
"schemaIdentity": json!({
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
}),
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": json!({})
}),
"schema": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("data-partition-id", "".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}}/schema \
--header 'content-type: application/json' \
--header 'data-partition-id: ' \
--data '{
"schemaInfo": {
"schemaIdentity": {
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
},
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": {}
},
"schema": {}
}'
echo '{
"schemaInfo": {
"schemaIdentity": {
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
},
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": {}
},
"schema": {}
}' | \
http POST {{baseUrl}}/schema \
content-type:application/json \
data-partition-id:''
wget --quiet \
--method POST \
--header 'data-partition-id: ' \
--header 'content-type: application/json' \
--body-data '{\n "schemaInfo": {\n "schemaIdentity": {\n "authority": "",\n "source": "",\n "entityType": "",\n "schemaVersionMajor": 0,\n "schemaVersionMinor": 0,\n "schemaVersionPatch": 0,\n "id": ""\n },\n "createdBy": "",\n "dateCreated": "",\n "status": "",\n "scope": "",\n "supersededBy": {}\n },\n "schema": {}\n}' \
--output-document \
- {{baseUrl}}/schema
import Foundation
let headers = [
"data-partition-id": "",
"content-type": "application/json"
]
let parameters = [
"schemaInfo": [
"schemaIdentity": [
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
],
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": []
],
"schema": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/schema")! 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()
GET
getSchema
{{baseUrl}}/schema/:id
HEADERS
data-partition-id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/schema/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "data-partition-id: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/schema/:id" {:headers {:data-partition-id ""}})
require "http/client"
url = "{{baseUrl}}/schema/:id"
headers = HTTP::Headers{
"data-partition-id" => ""
}
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}}/schema/:id"),
Headers =
{
{ "data-partition-id", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/schema/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("data-partition-id", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/schema/:id"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("data-partition-id", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/schema/:id HTTP/1.1
Data-Partition-Id:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/schema/:id")
.setHeader("data-partition-id", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/schema/:id"))
.header("data-partition-id", "")
.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}}/schema/:id")
.get()
.addHeader("data-partition-id", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/schema/:id")
.header("data-partition-id", "")
.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}}/schema/:id');
xhr.setRequestHeader('data-partition-id', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/schema/:id',
headers: {'data-partition-id': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/schema/:id';
const options = {method: 'GET', headers: {'data-partition-id': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/schema/:id',
method: 'GET',
headers: {
'data-partition-id': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/schema/:id")
.get()
.addHeader("data-partition-id", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/schema/:id',
headers: {
'data-partition-id': ''
}
};
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}}/schema/:id',
headers: {'data-partition-id': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/schema/:id');
req.headers({
'data-partition-id': ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/schema/:id',
headers: {'data-partition-id': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/schema/:id';
const options = {method: 'GET', headers: {'data-partition-id': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"data-partition-id": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/schema/: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}}/schema/:id" in
let headers = Header.add (Header.init ()) "data-partition-id" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/schema/: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 => [
"data-partition-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/schema/:id', [
'headers' => [
'data-partition-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/schema/:id');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'data-partition-id' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/schema/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
'data-partition-id' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("data-partition-id", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/schema/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("data-partition-id", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/schema/:id' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'data-partition-id': "" }
conn.request("GET", "/baseUrl/schema/:id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/schema/:id"
headers = {"data-partition-id": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/schema/:id"
response <- VERB("GET", url, add_headers('data-partition-id' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/schema/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["data-partition-id"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/schema/:id') do |req|
req.headers['data-partition-id'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/schema/:id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("data-partition-id", "".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}}/schema/:id \
--header 'data-partition-id: '
http GET {{baseUrl}}/schema/:id \
data-partition-id:''
wget --quiet \
--method GET \
--header 'data-partition-id: ' \
--output-document \
- {{baseUrl}}/schema/:id
import Foundation
let headers = ["data-partition-id": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/schema/: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()
GET
getSchemaInfoList
{{baseUrl}}/schema
HEADERS
data-partition-id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/schema");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "data-partition-id: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/schema" {:headers {:data-partition-id ""}})
require "http/client"
url = "{{baseUrl}}/schema"
headers = HTTP::Headers{
"data-partition-id" => ""
}
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}}/schema"),
Headers =
{
{ "data-partition-id", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/schema");
var request = new RestRequest("", Method.Get);
request.AddHeader("data-partition-id", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/schema"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("data-partition-id", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/schema HTTP/1.1
Data-Partition-Id:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/schema")
.setHeader("data-partition-id", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/schema"))
.header("data-partition-id", "")
.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}}/schema")
.get()
.addHeader("data-partition-id", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/schema")
.header("data-partition-id", "")
.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}}/schema');
xhr.setRequestHeader('data-partition-id', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/schema',
headers: {'data-partition-id': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/schema';
const options = {method: 'GET', headers: {'data-partition-id': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/schema',
method: 'GET',
headers: {
'data-partition-id': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/schema")
.get()
.addHeader("data-partition-id", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/schema',
headers: {
'data-partition-id': ''
}
};
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}}/schema',
headers: {'data-partition-id': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/schema');
req.headers({
'data-partition-id': ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/schema',
headers: {'data-partition-id': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/schema';
const options = {method: 'GET', headers: {'data-partition-id': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"data-partition-id": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/schema"]
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}}/schema" in
let headers = Header.add (Header.init ()) "data-partition-id" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/schema",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"data-partition-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/schema', [
'headers' => [
'data-partition-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/schema');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'data-partition-id' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/schema');
$request->setRequestMethod('GET');
$request->setHeaders([
'data-partition-id' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("data-partition-id", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/schema' -Method GET -Headers $headers
$headers=@{}
$headers.Add("data-partition-id", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/schema' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'data-partition-id': "" }
conn.request("GET", "/baseUrl/schema", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/schema"
headers = {"data-partition-id": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/schema"
response <- VERB("GET", url, add_headers('data-partition-id' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/schema")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["data-partition-id"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/schema') do |req|
req.headers['data-partition-id'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/schema";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("data-partition-id", "".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}}/schema \
--header 'data-partition-id: '
http GET {{baseUrl}}/schema \
data-partition-id:''
wget --quiet \
--method GET \
--header 'data-partition-id: ' \
--output-document \
- {{baseUrl}}/schema
import Foundation
let headers = ["data-partition-id": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/schema")! 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()
PUT
upsertSchema
{{baseUrl}}/schema
HEADERS
data-partition-id
BODY json
{
"schemaInfo": {
"schemaIdentity": {
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
},
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": {}
},
"schema": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/schema");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "data-partition-id: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/schema" {:headers {:data-partition-id ""}
:content-type :json
:form-params {:schemaInfo {:schemaIdentity {:authority ""
:source ""
:entityType ""
:schemaVersionMajor 0
:schemaVersionMinor 0
:schemaVersionPatch 0
:id ""}
:createdBy ""
:dateCreated ""
:status ""
:scope ""
:supersededBy {}}
:schema {}}})
require "http/client"
url = "{{baseUrl}}/schema"
headers = HTTP::Headers{
"data-partition-id" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/schema"),
Headers =
{
{ "data-partition-id", "" },
},
Content = new StringContent("{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\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}}/schema");
var request = new RestRequest("", Method.Put);
request.AddHeader("data-partition-id", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/schema"
payload := strings.NewReader("{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("data-partition-id", "")
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))
}
PUT /baseUrl/schema HTTP/1.1
Data-Partition-Id:
Content-Type: application/json
Host: example.com
Content-Length: 349
{
"schemaInfo": {
"schemaIdentity": {
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
},
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": {}
},
"schema": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/schema")
.setHeader("data-partition-id", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/schema"))
.header("data-partition-id", "")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\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 \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/schema")
.put(body)
.addHeader("data-partition-id", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/schema")
.header("data-partition-id", "")
.header("content-type", "application/json")
.body("{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}")
.asString();
const data = JSON.stringify({
schemaInfo: {
schemaIdentity: {
authority: '',
source: '',
entityType: '',
schemaVersionMajor: 0,
schemaVersionMinor: 0,
schemaVersionPatch: 0,
id: ''
},
createdBy: '',
dateCreated: '',
status: '',
scope: '',
supersededBy: {}
},
schema: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/schema');
xhr.setRequestHeader('data-partition-id', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/schema',
headers: {'data-partition-id': '', 'content-type': 'application/json'},
data: {
schemaInfo: {
schemaIdentity: {
authority: '',
source: '',
entityType: '',
schemaVersionMajor: 0,
schemaVersionMinor: 0,
schemaVersionPatch: 0,
id: ''
},
createdBy: '',
dateCreated: '',
status: '',
scope: '',
supersededBy: {}
},
schema: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/schema';
const options = {
method: 'PUT',
headers: {'data-partition-id': '', 'content-type': 'application/json'},
body: '{"schemaInfo":{"schemaIdentity":{"authority":"","source":"","entityType":"","schemaVersionMajor":0,"schemaVersionMinor":0,"schemaVersionPatch":0,"id":""},"createdBy":"","dateCreated":"","status":"","scope":"","supersededBy":{}},"schema":{}}'
};
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}}/schema',
method: 'PUT',
headers: {
'data-partition-id': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "schemaInfo": {\n "schemaIdentity": {\n "authority": "",\n "source": "",\n "entityType": "",\n "schemaVersionMajor": 0,\n "schemaVersionMinor": 0,\n "schemaVersionPatch": 0,\n "id": ""\n },\n "createdBy": "",\n "dateCreated": "",\n "status": "",\n "scope": "",\n "supersededBy": {}\n },\n "schema": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/schema")
.put(body)
.addHeader("data-partition-id", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/schema',
headers: {
'data-partition-id': '',
'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({
schemaInfo: {
schemaIdentity: {
authority: '',
source: '',
entityType: '',
schemaVersionMajor: 0,
schemaVersionMinor: 0,
schemaVersionPatch: 0,
id: ''
},
createdBy: '',
dateCreated: '',
status: '',
scope: '',
supersededBy: {}
},
schema: {}
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/schema',
headers: {'data-partition-id': '', 'content-type': 'application/json'},
body: {
schemaInfo: {
schemaIdentity: {
authority: '',
source: '',
entityType: '',
schemaVersionMajor: 0,
schemaVersionMinor: 0,
schemaVersionPatch: 0,
id: ''
},
createdBy: '',
dateCreated: '',
status: '',
scope: '',
supersededBy: {}
},
schema: {}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/schema');
req.headers({
'data-partition-id': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
schemaInfo: {
schemaIdentity: {
authority: '',
source: '',
entityType: '',
schemaVersionMajor: 0,
schemaVersionMinor: 0,
schemaVersionPatch: 0,
id: ''
},
createdBy: '',
dateCreated: '',
status: '',
scope: '',
supersededBy: {}
},
schema: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/schema',
headers: {'data-partition-id': '', 'content-type': 'application/json'},
data: {
schemaInfo: {
schemaIdentity: {
authority: '',
source: '',
entityType: '',
schemaVersionMajor: 0,
schemaVersionMinor: 0,
schemaVersionPatch: 0,
id: ''
},
createdBy: '',
dateCreated: '',
status: '',
scope: '',
supersededBy: {}
},
schema: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/schema';
const options = {
method: 'PUT',
headers: {'data-partition-id': '', 'content-type': 'application/json'},
body: '{"schemaInfo":{"schemaIdentity":{"authority":"","source":"","entityType":"","schemaVersionMajor":0,"schemaVersionMinor":0,"schemaVersionPatch":0,"id":""},"createdBy":"","dateCreated":"","status":"","scope":"","supersededBy":{}},"schema":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"data-partition-id": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"schemaInfo": @{ @"schemaIdentity": @{ @"authority": @"", @"source": @"", @"entityType": @"", @"schemaVersionMajor": @0, @"schemaVersionMinor": @0, @"schemaVersionPatch": @0, @"id": @"" }, @"createdBy": @"", @"dateCreated": @"", @"status": @"", @"scope": @"", @"supersededBy": @{ } },
@"schema": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/schema"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[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}}/schema" in
let headers = Header.add_list (Header.init ()) [
("data-partition-id", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/schema",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'schemaInfo' => [
'schemaIdentity' => [
'authority' => '',
'source' => '',
'entityType' => '',
'schemaVersionMajor' => 0,
'schemaVersionMinor' => 0,
'schemaVersionPatch' => 0,
'id' => ''
],
'createdBy' => '',
'dateCreated' => '',
'status' => '',
'scope' => '',
'supersededBy' => [
]
],
'schema' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"data-partition-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/schema', [
'body' => '{
"schemaInfo": {
"schemaIdentity": {
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
},
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": {}
},
"schema": {}
}',
'headers' => [
'content-type' => 'application/json',
'data-partition-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/schema');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'data-partition-id' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'schemaInfo' => [
'schemaIdentity' => [
'authority' => '',
'source' => '',
'entityType' => '',
'schemaVersionMajor' => 0,
'schemaVersionMinor' => 0,
'schemaVersionPatch' => 0,
'id' => ''
],
'createdBy' => '',
'dateCreated' => '',
'status' => '',
'scope' => '',
'supersededBy' => [
]
],
'schema' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'schemaInfo' => [
'schemaIdentity' => [
'authority' => '',
'source' => '',
'entityType' => '',
'schemaVersionMajor' => 0,
'schemaVersionMinor' => 0,
'schemaVersionPatch' => 0,
'id' => ''
],
'createdBy' => '',
'dateCreated' => '',
'status' => '',
'scope' => '',
'supersededBy' => [
]
],
'schema' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/schema');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'data-partition-id' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("data-partition-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/schema' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"schemaInfo": {
"schemaIdentity": {
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
},
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": {}
},
"schema": {}
}'
$headers=@{}
$headers.Add("data-partition-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/schema' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"schemaInfo": {
"schemaIdentity": {
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
},
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": {}
},
"schema": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}"
headers = {
'data-partition-id': "",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/schema", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/schema"
payload = {
"schemaInfo": {
"schemaIdentity": {
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
},
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": {}
},
"schema": {}
}
headers = {
"data-partition-id": "",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/schema"
payload <- "{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('data-partition-id' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/schema")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["data-partition-id"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\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.put('/baseUrl/schema') do |req|
req.headers['data-partition-id'] = ''
req.body = "{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\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}}/schema";
let payload = json!({
"schemaInfo": json!({
"schemaIdentity": json!({
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
}),
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": json!({})
}),
"schema": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("data-partition-id", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/schema \
--header 'content-type: application/json' \
--header 'data-partition-id: ' \
--data '{
"schemaInfo": {
"schemaIdentity": {
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
},
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": {}
},
"schema": {}
}'
echo '{
"schemaInfo": {
"schemaIdentity": {
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
},
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": {}
},
"schema": {}
}' | \
http PUT {{baseUrl}}/schema \
content-type:application/json \
data-partition-id:''
wget --quiet \
--method PUT \
--header 'data-partition-id: ' \
--header 'content-type: application/json' \
--body-data '{\n "schemaInfo": {\n "schemaIdentity": {\n "authority": "",\n "source": "",\n "entityType": "",\n "schemaVersionMajor": 0,\n "schemaVersionMinor": 0,\n "schemaVersionPatch": 0,\n "id": ""\n },\n "createdBy": "",\n "dateCreated": "",\n "status": "",\n "scope": "",\n "supersededBy": {}\n },\n "schema": {}\n}' \
--output-document \
- {{baseUrl}}/schema
import Foundation
let headers = [
"data-partition-id": "",
"content-type": "application/json"
]
let parameters = [
"schemaInfo": [
"schemaIdentity": [
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
],
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": []
],
"schema": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/schema")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
PUT
upsertSystemSchema
{{baseUrl}}/schemas/system
HEADERS
data-partition-id
BODY json
{
"schemaInfo": {
"schemaIdentity": {
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
},
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": {}
},
"schema": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/schemas/system");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "data-partition-id: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/schemas/system" {:headers {:data-partition-id ""}
:content-type :json
:form-params {:schemaInfo {:schemaIdentity {:authority ""
:source ""
:entityType ""
:schemaVersionMajor 0
:schemaVersionMinor 0
:schemaVersionPatch 0
:id ""}
:createdBy ""
:dateCreated ""
:status ""
:scope ""
:supersededBy {}}
:schema {}}})
require "http/client"
url = "{{baseUrl}}/schemas/system"
headers = HTTP::Headers{
"data-partition-id" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/schemas/system"),
Headers =
{
{ "data-partition-id", "" },
},
Content = new StringContent("{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\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}}/schemas/system");
var request = new RestRequest("", Method.Put);
request.AddHeader("data-partition-id", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/schemas/system"
payload := strings.NewReader("{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("data-partition-id", "")
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))
}
PUT /baseUrl/schemas/system HTTP/1.1
Data-Partition-Id:
Content-Type: application/json
Host: example.com
Content-Length: 349
{
"schemaInfo": {
"schemaIdentity": {
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
},
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": {}
},
"schema": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/schemas/system")
.setHeader("data-partition-id", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/schemas/system"))
.header("data-partition-id", "")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\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 \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/schemas/system")
.put(body)
.addHeader("data-partition-id", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/schemas/system")
.header("data-partition-id", "")
.header("content-type", "application/json")
.body("{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}")
.asString();
const data = JSON.stringify({
schemaInfo: {
schemaIdentity: {
authority: '',
source: '',
entityType: '',
schemaVersionMajor: 0,
schemaVersionMinor: 0,
schemaVersionPatch: 0,
id: ''
},
createdBy: '',
dateCreated: '',
status: '',
scope: '',
supersededBy: {}
},
schema: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/schemas/system');
xhr.setRequestHeader('data-partition-id', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/schemas/system',
headers: {'data-partition-id': '', 'content-type': 'application/json'},
data: {
schemaInfo: {
schemaIdentity: {
authority: '',
source: '',
entityType: '',
schemaVersionMajor: 0,
schemaVersionMinor: 0,
schemaVersionPatch: 0,
id: ''
},
createdBy: '',
dateCreated: '',
status: '',
scope: '',
supersededBy: {}
},
schema: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/schemas/system';
const options = {
method: 'PUT',
headers: {'data-partition-id': '', 'content-type': 'application/json'},
body: '{"schemaInfo":{"schemaIdentity":{"authority":"","source":"","entityType":"","schemaVersionMajor":0,"schemaVersionMinor":0,"schemaVersionPatch":0,"id":""},"createdBy":"","dateCreated":"","status":"","scope":"","supersededBy":{}},"schema":{}}'
};
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}}/schemas/system',
method: 'PUT',
headers: {
'data-partition-id': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "schemaInfo": {\n "schemaIdentity": {\n "authority": "",\n "source": "",\n "entityType": "",\n "schemaVersionMajor": 0,\n "schemaVersionMinor": 0,\n "schemaVersionPatch": 0,\n "id": ""\n },\n "createdBy": "",\n "dateCreated": "",\n "status": "",\n "scope": "",\n "supersededBy": {}\n },\n "schema": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/schemas/system")
.put(body)
.addHeader("data-partition-id", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/schemas/system',
headers: {
'data-partition-id': '',
'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({
schemaInfo: {
schemaIdentity: {
authority: '',
source: '',
entityType: '',
schemaVersionMajor: 0,
schemaVersionMinor: 0,
schemaVersionPatch: 0,
id: ''
},
createdBy: '',
dateCreated: '',
status: '',
scope: '',
supersededBy: {}
},
schema: {}
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/schemas/system',
headers: {'data-partition-id': '', 'content-type': 'application/json'},
body: {
schemaInfo: {
schemaIdentity: {
authority: '',
source: '',
entityType: '',
schemaVersionMajor: 0,
schemaVersionMinor: 0,
schemaVersionPatch: 0,
id: ''
},
createdBy: '',
dateCreated: '',
status: '',
scope: '',
supersededBy: {}
},
schema: {}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/schemas/system');
req.headers({
'data-partition-id': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
schemaInfo: {
schemaIdentity: {
authority: '',
source: '',
entityType: '',
schemaVersionMajor: 0,
schemaVersionMinor: 0,
schemaVersionPatch: 0,
id: ''
},
createdBy: '',
dateCreated: '',
status: '',
scope: '',
supersededBy: {}
},
schema: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/schemas/system',
headers: {'data-partition-id': '', 'content-type': 'application/json'},
data: {
schemaInfo: {
schemaIdentity: {
authority: '',
source: '',
entityType: '',
schemaVersionMajor: 0,
schemaVersionMinor: 0,
schemaVersionPatch: 0,
id: ''
},
createdBy: '',
dateCreated: '',
status: '',
scope: '',
supersededBy: {}
},
schema: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/schemas/system';
const options = {
method: 'PUT',
headers: {'data-partition-id': '', 'content-type': 'application/json'},
body: '{"schemaInfo":{"schemaIdentity":{"authority":"","source":"","entityType":"","schemaVersionMajor":0,"schemaVersionMinor":0,"schemaVersionPatch":0,"id":""},"createdBy":"","dateCreated":"","status":"","scope":"","supersededBy":{}},"schema":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"data-partition-id": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"schemaInfo": @{ @"schemaIdentity": @{ @"authority": @"", @"source": @"", @"entityType": @"", @"schemaVersionMajor": @0, @"schemaVersionMinor": @0, @"schemaVersionPatch": @0, @"id": @"" }, @"createdBy": @"", @"dateCreated": @"", @"status": @"", @"scope": @"", @"supersededBy": @{ } },
@"schema": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/schemas/system"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[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}}/schemas/system" in
let headers = Header.add_list (Header.init ()) [
("data-partition-id", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/schemas/system",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'schemaInfo' => [
'schemaIdentity' => [
'authority' => '',
'source' => '',
'entityType' => '',
'schemaVersionMajor' => 0,
'schemaVersionMinor' => 0,
'schemaVersionPatch' => 0,
'id' => ''
],
'createdBy' => '',
'dateCreated' => '',
'status' => '',
'scope' => '',
'supersededBy' => [
]
],
'schema' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"data-partition-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/schemas/system', [
'body' => '{
"schemaInfo": {
"schemaIdentity": {
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
},
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": {}
},
"schema": {}
}',
'headers' => [
'content-type' => 'application/json',
'data-partition-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/schemas/system');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'data-partition-id' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'schemaInfo' => [
'schemaIdentity' => [
'authority' => '',
'source' => '',
'entityType' => '',
'schemaVersionMajor' => 0,
'schemaVersionMinor' => 0,
'schemaVersionPatch' => 0,
'id' => ''
],
'createdBy' => '',
'dateCreated' => '',
'status' => '',
'scope' => '',
'supersededBy' => [
]
],
'schema' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'schemaInfo' => [
'schemaIdentity' => [
'authority' => '',
'source' => '',
'entityType' => '',
'schemaVersionMajor' => 0,
'schemaVersionMinor' => 0,
'schemaVersionPatch' => 0,
'id' => ''
],
'createdBy' => '',
'dateCreated' => '',
'status' => '',
'scope' => '',
'supersededBy' => [
]
],
'schema' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/schemas/system');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'data-partition-id' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("data-partition-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/schemas/system' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"schemaInfo": {
"schemaIdentity": {
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
},
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": {}
},
"schema": {}
}'
$headers=@{}
$headers.Add("data-partition-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/schemas/system' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"schemaInfo": {
"schemaIdentity": {
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
},
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": {}
},
"schema": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}"
headers = {
'data-partition-id': "",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/schemas/system", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/schemas/system"
payload = {
"schemaInfo": {
"schemaIdentity": {
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
},
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": {}
},
"schema": {}
}
headers = {
"data-partition-id": "",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/schemas/system"
payload <- "{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('data-partition-id' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/schemas/system")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["data-partition-id"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\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.put('/baseUrl/schemas/system') do |req|
req.headers['data-partition-id'] = ''
req.body = "{\n \"schemaInfo\": {\n \"schemaIdentity\": {\n \"authority\": \"\",\n \"source\": \"\",\n \"entityType\": \"\",\n \"schemaVersionMajor\": 0,\n \"schemaVersionMinor\": 0,\n \"schemaVersionPatch\": 0,\n \"id\": \"\"\n },\n \"createdBy\": \"\",\n \"dateCreated\": \"\",\n \"status\": \"\",\n \"scope\": \"\",\n \"supersededBy\": {}\n },\n \"schema\": {}\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}}/schemas/system";
let payload = json!({
"schemaInfo": json!({
"schemaIdentity": json!({
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
}),
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": json!({})
}),
"schema": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("data-partition-id", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/schemas/system \
--header 'content-type: application/json' \
--header 'data-partition-id: ' \
--data '{
"schemaInfo": {
"schemaIdentity": {
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
},
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": {}
},
"schema": {}
}'
echo '{
"schemaInfo": {
"schemaIdentity": {
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
},
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": {}
},
"schema": {}
}' | \
http PUT {{baseUrl}}/schemas/system \
content-type:application/json \
data-partition-id:''
wget --quiet \
--method PUT \
--header 'data-partition-id: ' \
--header 'content-type: application/json' \
--body-data '{\n "schemaInfo": {\n "schemaIdentity": {\n "authority": "",\n "source": "",\n "entityType": "",\n "schemaVersionMajor": 0,\n "schemaVersionMinor": 0,\n "schemaVersionPatch": 0,\n "id": ""\n },\n "createdBy": "",\n "dateCreated": "",\n "status": "",\n "scope": "",\n "supersededBy": {}\n },\n "schema": {}\n}' \
--output-document \
- {{baseUrl}}/schemas/system
import Foundation
let headers = [
"data-partition-id": "",
"content-type": "application/json"
]
let parameters = [
"schemaInfo": [
"schemaIdentity": [
"authority": "",
"source": "",
"entityType": "",
"schemaVersionMajor": 0,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": ""
],
"createdBy": "",
"dateCreated": "",
"status": "",
"scope": "",
"supersededBy": []
],
"schema": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/schemas/system")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()