Cloud Channel API
POST
cloudchannel.accounts.channelPartnerLinks.channelPartnerRepricingConfigs.create
{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs
QUERY PARAMS
parent
BODY json
{
"name": "",
"repricingConfig": {
"adjustment": {
"percentageAdjustment": {
"percentage": {
"value": ""
}
}
},
"channelPartnerGranularity": {},
"conditionalOverrides": [
{
"adjustment": {},
"rebillingBasis": "",
"repricingCondition": {
"skuGroupCondition": {
"skuGroup": ""
}
}
}
],
"effectiveInvoiceMonth": {
"day": 0,
"month": 0,
"year": 0
},
"entitlementGranularity": {
"entitlement": ""
},
"rebillingBasis": ""
},
"updateTime": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs" {:content-type :json
:form-params {:name ""
:repricingConfig {:adjustment {:percentageAdjustment {:percentage {:value ""}}}
:channelPartnerGranularity {}
:conditionalOverrides [{:adjustment {}
:rebillingBasis ""
:repricingCondition {:skuGroupCondition {:skuGroup ""}}}]
:effectiveInvoiceMonth {:day 0
:month 0
:year 0}
:entitlementGranularity {:entitlement ""}
:rebillingBasis ""}
:updateTime ""}})
require "http/client"
url = "{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\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}}/v1/:parent/channelPartnerRepricingConfigs"),
Content = new StringContent("{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\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}}/v1/:parent/channelPartnerRepricingConfigs");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs"
payload := strings.NewReader("{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v1/:parent/channelPartnerRepricingConfigs HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 623
{
"name": "",
"repricingConfig": {
"adjustment": {
"percentageAdjustment": {
"percentage": {
"value": ""
}
}
},
"channelPartnerGranularity": {},
"conditionalOverrides": [
{
"adjustment": {},
"rebillingBasis": "",
"repricingCondition": {
"skuGroupCondition": {
"skuGroup": ""
}
}
}
],
"effectiveInvoiceMonth": {
"day": 0,
"month": 0,
"year": 0
},
"entitlementGranularity": {
"entitlement": ""
},
"rebillingBasis": ""
},
"updateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs")
.setHeader("content-type", "application/json")
.setBody("{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\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 \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs")
.header("content-type", "application/json")
.body("{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}")
.asString();
const data = JSON.stringify({
name: '',
repricingConfig: {
adjustment: {
percentageAdjustment: {
percentage: {
value: ''
}
}
},
channelPartnerGranularity: {},
conditionalOverrides: [
{
adjustment: {},
rebillingBasis: '',
repricingCondition: {
skuGroupCondition: {
skuGroup: ''
}
}
}
],
effectiveInvoiceMonth: {
day: 0,
month: 0,
year: 0
},
entitlementGranularity: {
entitlement: ''
},
rebillingBasis: ''
},
updateTime: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs',
headers: {'content-type': 'application/json'},
data: {
name: '',
repricingConfig: {
adjustment: {percentageAdjustment: {percentage: {value: ''}}},
channelPartnerGranularity: {},
conditionalOverrides: [
{
adjustment: {},
rebillingBasis: '',
repricingCondition: {skuGroupCondition: {skuGroup: ''}}
}
],
effectiveInvoiceMonth: {day: 0, month: 0, year: 0},
entitlementGranularity: {entitlement: ''},
rebillingBasis: ''
},
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","repricingConfig":{"adjustment":{"percentageAdjustment":{"percentage":{"value":""}}},"channelPartnerGranularity":{},"conditionalOverrides":[{"adjustment":{},"rebillingBasis":"","repricingCondition":{"skuGroupCondition":{"skuGroup":""}}}],"effectiveInvoiceMonth":{"day":0,"month":0,"year":0},"entitlementGranularity":{"entitlement":""},"rebillingBasis":""},"updateTime":""}'
};
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}}/v1/:parent/channelPartnerRepricingConfigs',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "name": "",\n "repricingConfig": {\n "adjustment": {\n "percentageAdjustment": {\n "percentage": {\n "value": ""\n }\n }\n },\n "channelPartnerGranularity": {},\n "conditionalOverrides": [\n {\n "adjustment": {},\n "rebillingBasis": "",\n "repricingCondition": {\n "skuGroupCondition": {\n "skuGroup": ""\n }\n }\n }\n ],\n "effectiveInvoiceMonth": {\n "day": 0,\n "month": 0,\n "year": 0\n },\n "entitlementGranularity": {\n "entitlement": ""\n },\n "rebillingBasis": ""\n },\n "updateTime": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs")
.post(body)
.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/v1/:parent/channelPartnerRepricingConfigs',
headers: {
'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({
name: '',
repricingConfig: {
adjustment: {percentageAdjustment: {percentage: {value: ''}}},
channelPartnerGranularity: {},
conditionalOverrides: [
{
adjustment: {},
rebillingBasis: '',
repricingCondition: {skuGroupCondition: {skuGroup: ''}}
}
],
effectiveInvoiceMonth: {day: 0, month: 0, year: 0},
entitlementGranularity: {entitlement: ''},
rebillingBasis: ''
},
updateTime: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs',
headers: {'content-type': 'application/json'},
body: {
name: '',
repricingConfig: {
adjustment: {percentageAdjustment: {percentage: {value: ''}}},
channelPartnerGranularity: {},
conditionalOverrides: [
{
adjustment: {},
rebillingBasis: '',
repricingCondition: {skuGroupCondition: {skuGroup: ''}}
}
],
effectiveInvoiceMonth: {day: 0, month: 0, year: 0},
entitlementGranularity: {entitlement: ''},
rebillingBasis: ''
},
updateTime: ''
},
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}}/v1/:parent/channelPartnerRepricingConfigs');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
name: '',
repricingConfig: {
adjustment: {
percentageAdjustment: {
percentage: {
value: ''
}
}
},
channelPartnerGranularity: {},
conditionalOverrides: [
{
adjustment: {},
rebillingBasis: '',
repricingCondition: {
skuGroupCondition: {
skuGroup: ''
}
}
}
],
effectiveInvoiceMonth: {
day: 0,
month: 0,
year: 0
},
entitlementGranularity: {
entitlement: ''
},
rebillingBasis: ''
},
updateTime: ''
});
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}}/v1/:parent/channelPartnerRepricingConfigs',
headers: {'content-type': 'application/json'},
data: {
name: '',
repricingConfig: {
adjustment: {percentageAdjustment: {percentage: {value: ''}}},
channelPartnerGranularity: {},
conditionalOverrides: [
{
adjustment: {},
rebillingBasis: '',
repricingCondition: {skuGroupCondition: {skuGroup: ''}}
}
],
effectiveInvoiceMonth: {day: 0, month: 0, year: 0},
entitlementGranularity: {entitlement: ''},
rebillingBasis: ''
},
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","repricingConfig":{"adjustment":{"percentageAdjustment":{"percentage":{"value":""}}},"channelPartnerGranularity":{},"conditionalOverrides":[{"adjustment":{},"rebillingBasis":"","repricingCondition":{"skuGroupCondition":{"skuGroup":""}}}],"effectiveInvoiceMonth":{"day":0,"month":0,"year":0},"entitlementGranularity":{"entitlement":""},"rebillingBasis":""},"updateTime":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"name": @"",
@"repricingConfig": @{ @"adjustment": @{ @"percentageAdjustment": @{ @"percentage": @{ @"value": @"" } } }, @"channelPartnerGranularity": @{ }, @"conditionalOverrides": @[ @{ @"adjustment": @{ }, @"rebillingBasis": @"", @"repricingCondition": @{ @"skuGroupCondition": @{ @"skuGroup": @"" } } } ], @"effectiveInvoiceMonth": @{ @"day": @0, @"month": @0, @"year": @0 }, @"entitlementGranularity": @{ @"entitlement": @"" }, @"rebillingBasis": @"" },
@"updateTime": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs"]
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}}/v1/:parent/channelPartnerRepricingConfigs" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs",
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([
'name' => '',
'repricingConfig' => [
'adjustment' => [
'percentageAdjustment' => [
'percentage' => [
'value' => ''
]
]
],
'channelPartnerGranularity' => [
],
'conditionalOverrides' => [
[
'adjustment' => [
],
'rebillingBasis' => '',
'repricingCondition' => [
'skuGroupCondition' => [
'skuGroup' => ''
]
]
]
],
'effectiveInvoiceMonth' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'entitlementGranularity' => [
'entitlement' => ''
],
'rebillingBasis' => ''
],
'updateTime' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs', [
'body' => '{
"name": "",
"repricingConfig": {
"adjustment": {
"percentageAdjustment": {
"percentage": {
"value": ""
}
}
},
"channelPartnerGranularity": {},
"conditionalOverrides": [
{
"adjustment": {},
"rebillingBasis": "",
"repricingCondition": {
"skuGroupCondition": {
"skuGroup": ""
}
}
}
],
"effectiveInvoiceMonth": {
"day": 0,
"month": 0,
"year": 0
},
"entitlementGranularity": {
"entitlement": ""
},
"rebillingBasis": ""
},
"updateTime": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'name' => '',
'repricingConfig' => [
'adjustment' => [
'percentageAdjustment' => [
'percentage' => [
'value' => ''
]
]
],
'channelPartnerGranularity' => [
],
'conditionalOverrides' => [
[
'adjustment' => [
],
'rebillingBasis' => '',
'repricingCondition' => [
'skuGroupCondition' => [
'skuGroup' => ''
]
]
]
],
'effectiveInvoiceMonth' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'entitlementGranularity' => [
'entitlement' => ''
],
'rebillingBasis' => ''
],
'updateTime' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'name' => '',
'repricingConfig' => [
'adjustment' => [
'percentageAdjustment' => [
'percentage' => [
'value' => ''
]
]
],
'channelPartnerGranularity' => [
],
'conditionalOverrides' => [
[
'adjustment' => [
],
'rebillingBasis' => '',
'repricingCondition' => [
'skuGroupCondition' => [
'skuGroup' => ''
]
]
]
],
'effectiveInvoiceMonth' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'entitlementGranularity' => [
'entitlement' => ''
],
'rebillingBasis' => ''
],
'updateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"repricingConfig": {
"adjustment": {
"percentageAdjustment": {
"percentage": {
"value": ""
}
}
},
"channelPartnerGranularity": {},
"conditionalOverrides": [
{
"adjustment": {},
"rebillingBasis": "",
"repricingCondition": {
"skuGroupCondition": {
"skuGroup": ""
}
}
}
],
"effectiveInvoiceMonth": {
"day": 0,
"month": 0,
"year": 0
},
"entitlementGranularity": {
"entitlement": ""
},
"rebillingBasis": ""
},
"updateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"repricingConfig": {
"adjustment": {
"percentageAdjustment": {
"percentage": {
"value": ""
}
}
},
"channelPartnerGranularity": {},
"conditionalOverrides": [
{
"adjustment": {},
"rebillingBasis": "",
"repricingCondition": {
"skuGroupCondition": {
"skuGroup": ""
}
}
}
],
"effectiveInvoiceMonth": {
"day": 0,
"month": 0,
"year": 0
},
"entitlementGranularity": {
"entitlement": ""
},
"rebillingBasis": ""
},
"updateTime": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent/channelPartnerRepricingConfigs", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs"
payload = {
"name": "",
"repricingConfig": {
"adjustment": { "percentageAdjustment": { "percentage": { "value": "" } } },
"channelPartnerGranularity": {},
"conditionalOverrides": [
{
"adjustment": {},
"rebillingBasis": "",
"repricingCondition": { "skuGroupCondition": { "skuGroup": "" } }
}
],
"effectiveInvoiceMonth": {
"day": 0,
"month": 0,
"year": 0
},
"entitlementGranularity": { "entitlement": "" },
"rebillingBasis": ""
},
"updateTime": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs"
payload <- "{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\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/v1/:parent/channelPartnerRepricingConfigs') do |req|
req.body = "{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs";
let payload = json!({
"name": "",
"repricingConfig": json!({
"adjustment": json!({"percentageAdjustment": json!({"percentage": json!({"value": ""})})}),
"channelPartnerGranularity": json!({}),
"conditionalOverrides": (
json!({
"adjustment": json!({}),
"rebillingBasis": "",
"repricingCondition": json!({"skuGroupCondition": json!({"skuGroup": ""})})
})
),
"effectiveInvoiceMonth": json!({
"day": 0,
"month": 0,
"year": 0
}),
"entitlementGranularity": json!({"entitlement": ""}),
"rebillingBasis": ""
}),
"updateTime": ""
});
let mut headers = reqwest::header::HeaderMap::new();
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}}/v1/:parent/channelPartnerRepricingConfigs \
--header 'content-type: application/json' \
--data '{
"name": "",
"repricingConfig": {
"adjustment": {
"percentageAdjustment": {
"percentage": {
"value": ""
}
}
},
"channelPartnerGranularity": {},
"conditionalOverrides": [
{
"adjustment": {},
"rebillingBasis": "",
"repricingCondition": {
"skuGroupCondition": {
"skuGroup": ""
}
}
}
],
"effectiveInvoiceMonth": {
"day": 0,
"month": 0,
"year": 0
},
"entitlementGranularity": {
"entitlement": ""
},
"rebillingBasis": ""
},
"updateTime": ""
}'
echo '{
"name": "",
"repricingConfig": {
"adjustment": {
"percentageAdjustment": {
"percentage": {
"value": ""
}
}
},
"channelPartnerGranularity": {},
"conditionalOverrides": [
{
"adjustment": {},
"rebillingBasis": "",
"repricingCondition": {
"skuGroupCondition": {
"skuGroup": ""
}
}
}
],
"effectiveInvoiceMonth": {
"day": 0,
"month": 0,
"year": 0
},
"entitlementGranularity": {
"entitlement": ""
},
"rebillingBasis": ""
},
"updateTime": ""
}' | \
http POST {{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "name": "",\n "repricingConfig": {\n "adjustment": {\n "percentageAdjustment": {\n "percentage": {\n "value": ""\n }\n }\n },\n "channelPartnerGranularity": {},\n "conditionalOverrides": [\n {\n "adjustment": {},\n "rebillingBasis": "",\n "repricingCondition": {\n "skuGroupCondition": {\n "skuGroup": ""\n }\n }\n }\n ],\n "effectiveInvoiceMonth": {\n "day": 0,\n "month": 0,\n "year": 0\n },\n "entitlementGranularity": {\n "entitlement": ""\n },\n "rebillingBasis": ""\n },\n "updateTime": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"name": "",
"repricingConfig": [
"adjustment": ["percentageAdjustment": ["percentage": ["value": ""]]],
"channelPartnerGranularity": [],
"conditionalOverrides": [
[
"adjustment": [],
"rebillingBasis": "",
"repricingCondition": ["skuGroupCondition": ["skuGroup": ""]]
]
],
"effectiveInvoiceMonth": [
"day": 0,
"month": 0,
"year": 0
],
"entitlementGranularity": ["entitlement": ""],
"rebillingBasis": ""
],
"updateTime": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs")! 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
cloudchannel.accounts.channelPartnerLinks.channelPartnerRepricingConfigs.list
{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs")
require "http/client"
url = "{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/channelPartnerRepricingConfigs HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs"))
.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}}/v1/:parent/channelPartnerRepricingConfigs")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs")
.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}}/v1/:parent/channelPartnerRepricingConfigs');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/channelPartnerRepricingConfigs',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs');
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}}/v1/:parent/channelPartnerRepricingConfigs'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/channelPartnerRepricingConfigs")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/channelPartnerRepricingConfigs') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs
http GET {{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/channelPartnerRepricingConfigs")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
cloudchannel.accounts.channelPartnerLinks.create
{{baseUrl}}/v1/:parent/channelPartnerLinks
QUERY PARAMS
parent
BODY json
{
"channelPartnerCloudIdentityInfo": {
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": {
"instituteSize": "",
"instituteType": "",
"website": ""
},
"isDomainVerified": false,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
},
"createTime": "",
"inviteLinkUri": "",
"linkState": "",
"name": "",
"publicId": "",
"resellerCloudIdentityId": "",
"updateTime": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/channelPartnerLinks");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"channelPartnerCloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"createTime\": \"\",\n \"inviteLinkUri\": \"\",\n \"linkState\": \"\",\n \"name\": \"\",\n \"publicId\": \"\",\n \"resellerCloudIdentityId\": \"\",\n \"updateTime\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent/channelPartnerLinks" {:content-type :json
:form-params {:channelPartnerCloudIdentityInfo {:adminConsoleUri ""
:alternateEmail ""
:customerType ""
:eduData {:instituteSize ""
:instituteType ""
:website ""}
:isDomainVerified false
:languageCode ""
:phoneNumber ""
:primaryDomain ""}
:createTime ""
:inviteLinkUri ""
:linkState ""
:name ""
:publicId ""
:resellerCloudIdentityId ""
:updateTime ""}})
require "http/client"
url = "{{baseUrl}}/v1/:parent/channelPartnerLinks"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"channelPartnerCloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"createTime\": \"\",\n \"inviteLinkUri\": \"\",\n \"linkState\": \"\",\n \"name\": \"\",\n \"publicId\": \"\",\n \"resellerCloudIdentityId\": \"\",\n \"updateTime\": \"\"\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}}/v1/:parent/channelPartnerLinks"),
Content = new StringContent("{\n \"channelPartnerCloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"createTime\": \"\",\n \"inviteLinkUri\": \"\",\n \"linkState\": \"\",\n \"name\": \"\",\n \"publicId\": \"\",\n \"resellerCloudIdentityId\": \"\",\n \"updateTime\": \"\"\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}}/v1/:parent/channelPartnerLinks");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"channelPartnerCloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"createTime\": \"\",\n \"inviteLinkUri\": \"\",\n \"linkState\": \"\",\n \"name\": \"\",\n \"publicId\": \"\",\n \"resellerCloudIdentityId\": \"\",\n \"updateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/channelPartnerLinks"
payload := strings.NewReader("{\n \"channelPartnerCloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"createTime\": \"\",\n \"inviteLinkUri\": \"\",\n \"linkState\": \"\",\n \"name\": \"\",\n \"publicId\": \"\",\n \"resellerCloudIdentityId\": \"\",\n \"updateTime\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v1/:parent/channelPartnerLinks HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 470
{
"channelPartnerCloudIdentityInfo": {
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": {
"instituteSize": "",
"instituteType": "",
"website": ""
},
"isDomainVerified": false,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
},
"createTime": "",
"inviteLinkUri": "",
"linkState": "",
"name": "",
"publicId": "",
"resellerCloudIdentityId": "",
"updateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/channelPartnerLinks")
.setHeader("content-type", "application/json")
.setBody("{\n \"channelPartnerCloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"createTime\": \"\",\n \"inviteLinkUri\": \"\",\n \"linkState\": \"\",\n \"name\": \"\",\n \"publicId\": \"\",\n \"resellerCloudIdentityId\": \"\",\n \"updateTime\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/channelPartnerLinks"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"channelPartnerCloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"createTime\": \"\",\n \"inviteLinkUri\": \"\",\n \"linkState\": \"\",\n \"name\": \"\",\n \"publicId\": \"\",\n \"resellerCloudIdentityId\": \"\",\n \"updateTime\": \"\"\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 \"channelPartnerCloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"createTime\": \"\",\n \"inviteLinkUri\": \"\",\n \"linkState\": \"\",\n \"name\": \"\",\n \"publicId\": \"\",\n \"resellerCloudIdentityId\": \"\",\n \"updateTime\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/channelPartnerLinks")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/channelPartnerLinks")
.header("content-type", "application/json")
.body("{\n \"channelPartnerCloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"createTime\": \"\",\n \"inviteLinkUri\": \"\",\n \"linkState\": \"\",\n \"name\": \"\",\n \"publicId\": \"\",\n \"resellerCloudIdentityId\": \"\",\n \"updateTime\": \"\"\n}")
.asString();
const data = JSON.stringify({
channelPartnerCloudIdentityInfo: {
adminConsoleUri: '',
alternateEmail: '',
customerType: '',
eduData: {
instituteSize: '',
instituteType: '',
website: ''
},
isDomainVerified: false,
languageCode: '',
phoneNumber: '',
primaryDomain: ''
},
createTime: '',
inviteLinkUri: '',
linkState: '',
name: '',
publicId: '',
resellerCloudIdentityId: '',
updateTime: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:parent/channelPartnerLinks');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/channelPartnerLinks',
headers: {'content-type': 'application/json'},
data: {
channelPartnerCloudIdentityInfo: {
adminConsoleUri: '',
alternateEmail: '',
customerType: '',
eduData: {instituteSize: '', instituteType: '', website: ''},
isDomainVerified: false,
languageCode: '',
phoneNumber: '',
primaryDomain: ''
},
createTime: '',
inviteLinkUri: '',
linkState: '',
name: '',
publicId: '',
resellerCloudIdentityId: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/channelPartnerLinks';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"channelPartnerCloudIdentityInfo":{"adminConsoleUri":"","alternateEmail":"","customerType":"","eduData":{"instituteSize":"","instituteType":"","website":""},"isDomainVerified":false,"languageCode":"","phoneNumber":"","primaryDomain":""},"createTime":"","inviteLinkUri":"","linkState":"","name":"","publicId":"","resellerCloudIdentityId":"","updateTime":""}'
};
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}}/v1/:parent/channelPartnerLinks',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "channelPartnerCloudIdentityInfo": {\n "adminConsoleUri": "",\n "alternateEmail": "",\n "customerType": "",\n "eduData": {\n "instituteSize": "",\n "instituteType": "",\n "website": ""\n },\n "isDomainVerified": false,\n "languageCode": "",\n "phoneNumber": "",\n "primaryDomain": ""\n },\n "createTime": "",\n "inviteLinkUri": "",\n "linkState": "",\n "name": "",\n "publicId": "",\n "resellerCloudIdentityId": "",\n "updateTime": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"channelPartnerCloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"createTime\": \"\",\n \"inviteLinkUri\": \"\",\n \"linkState\": \"\",\n \"name\": \"\",\n \"publicId\": \"\",\n \"resellerCloudIdentityId\": \"\",\n \"updateTime\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/channelPartnerLinks")
.post(body)
.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/v1/:parent/channelPartnerLinks',
headers: {
'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({
channelPartnerCloudIdentityInfo: {
adminConsoleUri: '',
alternateEmail: '',
customerType: '',
eduData: {instituteSize: '', instituteType: '', website: ''},
isDomainVerified: false,
languageCode: '',
phoneNumber: '',
primaryDomain: ''
},
createTime: '',
inviteLinkUri: '',
linkState: '',
name: '',
publicId: '',
resellerCloudIdentityId: '',
updateTime: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/channelPartnerLinks',
headers: {'content-type': 'application/json'},
body: {
channelPartnerCloudIdentityInfo: {
adminConsoleUri: '',
alternateEmail: '',
customerType: '',
eduData: {instituteSize: '', instituteType: '', website: ''},
isDomainVerified: false,
languageCode: '',
phoneNumber: '',
primaryDomain: ''
},
createTime: '',
inviteLinkUri: '',
linkState: '',
name: '',
publicId: '',
resellerCloudIdentityId: '',
updateTime: ''
},
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}}/v1/:parent/channelPartnerLinks');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
channelPartnerCloudIdentityInfo: {
adminConsoleUri: '',
alternateEmail: '',
customerType: '',
eduData: {
instituteSize: '',
instituteType: '',
website: ''
},
isDomainVerified: false,
languageCode: '',
phoneNumber: '',
primaryDomain: ''
},
createTime: '',
inviteLinkUri: '',
linkState: '',
name: '',
publicId: '',
resellerCloudIdentityId: '',
updateTime: ''
});
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}}/v1/:parent/channelPartnerLinks',
headers: {'content-type': 'application/json'},
data: {
channelPartnerCloudIdentityInfo: {
adminConsoleUri: '',
alternateEmail: '',
customerType: '',
eduData: {instituteSize: '', instituteType: '', website: ''},
isDomainVerified: false,
languageCode: '',
phoneNumber: '',
primaryDomain: ''
},
createTime: '',
inviteLinkUri: '',
linkState: '',
name: '',
publicId: '',
resellerCloudIdentityId: '',
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/channelPartnerLinks';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"channelPartnerCloudIdentityInfo":{"adminConsoleUri":"","alternateEmail":"","customerType":"","eduData":{"instituteSize":"","instituteType":"","website":""},"isDomainVerified":false,"languageCode":"","phoneNumber":"","primaryDomain":""},"createTime":"","inviteLinkUri":"","linkState":"","name":"","publicId":"","resellerCloudIdentityId":"","updateTime":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"channelPartnerCloudIdentityInfo": @{ @"adminConsoleUri": @"", @"alternateEmail": @"", @"customerType": @"", @"eduData": @{ @"instituteSize": @"", @"instituteType": @"", @"website": @"" }, @"isDomainVerified": @NO, @"languageCode": @"", @"phoneNumber": @"", @"primaryDomain": @"" },
@"createTime": @"",
@"inviteLinkUri": @"",
@"linkState": @"",
@"name": @"",
@"publicId": @"",
@"resellerCloudIdentityId": @"",
@"updateTime": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/channelPartnerLinks"]
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}}/v1/:parent/channelPartnerLinks" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"channelPartnerCloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"createTime\": \"\",\n \"inviteLinkUri\": \"\",\n \"linkState\": \"\",\n \"name\": \"\",\n \"publicId\": \"\",\n \"resellerCloudIdentityId\": \"\",\n \"updateTime\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/channelPartnerLinks",
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([
'channelPartnerCloudIdentityInfo' => [
'adminConsoleUri' => '',
'alternateEmail' => '',
'customerType' => '',
'eduData' => [
'instituteSize' => '',
'instituteType' => '',
'website' => ''
],
'isDomainVerified' => null,
'languageCode' => '',
'phoneNumber' => '',
'primaryDomain' => ''
],
'createTime' => '',
'inviteLinkUri' => '',
'linkState' => '',
'name' => '',
'publicId' => '',
'resellerCloudIdentityId' => '',
'updateTime' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:parent/channelPartnerLinks', [
'body' => '{
"channelPartnerCloudIdentityInfo": {
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": {
"instituteSize": "",
"instituteType": "",
"website": ""
},
"isDomainVerified": false,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
},
"createTime": "",
"inviteLinkUri": "",
"linkState": "",
"name": "",
"publicId": "",
"resellerCloudIdentityId": "",
"updateTime": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/channelPartnerLinks');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'channelPartnerCloudIdentityInfo' => [
'adminConsoleUri' => '',
'alternateEmail' => '',
'customerType' => '',
'eduData' => [
'instituteSize' => '',
'instituteType' => '',
'website' => ''
],
'isDomainVerified' => null,
'languageCode' => '',
'phoneNumber' => '',
'primaryDomain' => ''
],
'createTime' => '',
'inviteLinkUri' => '',
'linkState' => '',
'name' => '',
'publicId' => '',
'resellerCloudIdentityId' => '',
'updateTime' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'channelPartnerCloudIdentityInfo' => [
'adminConsoleUri' => '',
'alternateEmail' => '',
'customerType' => '',
'eduData' => [
'instituteSize' => '',
'instituteType' => '',
'website' => ''
],
'isDomainVerified' => null,
'languageCode' => '',
'phoneNumber' => '',
'primaryDomain' => ''
],
'createTime' => '',
'inviteLinkUri' => '',
'linkState' => '',
'name' => '',
'publicId' => '',
'resellerCloudIdentityId' => '',
'updateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/channelPartnerLinks');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/channelPartnerLinks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"channelPartnerCloudIdentityInfo": {
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": {
"instituteSize": "",
"instituteType": "",
"website": ""
},
"isDomainVerified": false,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
},
"createTime": "",
"inviteLinkUri": "",
"linkState": "",
"name": "",
"publicId": "",
"resellerCloudIdentityId": "",
"updateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/channelPartnerLinks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"channelPartnerCloudIdentityInfo": {
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": {
"instituteSize": "",
"instituteType": "",
"website": ""
},
"isDomainVerified": false,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
},
"createTime": "",
"inviteLinkUri": "",
"linkState": "",
"name": "",
"publicId": "",
"resellerCloudIdentityId": "",
"updateTime": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"channelPartnerCloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"createTime\": \"\",\n \"inviteLinkUri\": \"\",\n \"linkState\": \"\",\n \"name\": \"\",\n \"publicId\": \"\",\n \"resellerCloudIdentityId\": \"\",\n \"updateTime\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent/channelPartnerLinks", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/channelPartnerLinks"
payload = {
"channelPartnerCloudIdentityInfo": {
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": {
"instituteSize": "",
"instituteType": "",
"website": ""
},
"isDomainVerified": False,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
},
"createTime": "",
"inviteLinkUri": "",
"linkState": "",
"name": "",
"publicId": "",
"resellerCloudIdentityId": "",
"updateTime": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/channelPartnerLinks"
payload <- "{\n \"channelPartnerCloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"createTime\": \"\",\n \"inviteLinkUri\": \"\",\n \"linkState\": \"\",\n \"name\": \"\",\n \"publicId\": \"\",\n \"resellerCloudIdentityId\": \"\",\n \"updateTime\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/channelPartnerLinks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"channelPartnerCloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"createTime\": \"\",\n \"inviteLinkUri\": \"\",\n \"linkState\": \"\",\n \"name\": \"\",\n \"publicId\": \"\",\n \"resellerCloudIdentityId\": \"\",\n \"updateTime\": \"\"\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/v1/:parent/channelPartnerLinks') do |req|
req.body = "{\n \"channelPartnerCloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"createTime\": \"\",\n \"inviteLinkUri\": \"\",\n \"linkState\": \"\",\n \"name\": \"\",\n \"publicId\": \"\",\n \"resellerCloudIdentityId\": \"\",\n \"updateTime\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/channelPartnerLinks";
let payload = json!({
"channelPartnerCloudIdentityInfo": json!({
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": json!({
"instituteSize": "",
"instituteType": "",
"website": ""
}),
"isDomainVerified": false,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
}),
"createTime": "",
"inviteLinkUri": "",
"linkState": "",
"name": "",
"publicId": "",
"resellerCloudIdentityId": "",
"updateTime": ""
});
let mut headers = reqwest::header::HeaderMap::new();
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}}/v1/:parent/channelPartnerLinks \
--header 'content-type: application/json' \
--data '{
"channelPartnerCloudIdentityInfo": {
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": {
"instituteSize": "",
"instituteType": "",
"website": ""
},
"isDomainVerified": false,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
},
"createTime": "",
"inviteLinkUri": "",
"linkState": "",
"name": "",
"publicId": "",
"resellerCloudIdentityId": "",
"updateTime": ""
}'
echo '{
"channelPartnerCloudIdentityInfo": {
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": {
"instituteSize": "",
"instituteType": "",
"website": ""
},
"isDomainVerified": false,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
},
"createTime": "",
"inviteLinkUri": "",
"linkState": "",
"name": "",
"publicId": "",
"resellerCloudIdentityId": "",
"updateTime": ""
}' | \
http POST {{baseUrl}}/v1/:parent/channelPartnerLinks \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "channelPartnerCloudIdentityInfo": {\n "adminConsoleUri": "",\n "alternateEmail": "",\n "customerType": "",\n "eduData": {\n "instituteSize": "",\n "instituteType": "",\n "website": ""\n },\n "isDomainVerified": false,\n "languageCode": "",\n "phoneNumber": "",\n "primaryDomain": ""\n },\n "createTime": "",\n "inviteLinkUri": "",\n "linkState": "",\n "name": "",\n "publicId": "",\n "resellerCloudIdentityId": "",\n "updateTime": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:parent/channelPartnerLinks
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"channelPartnerCloudIdentityInfo": [
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": [
"instituteSize": "",
"instituteType": "",
"website": ""
],
"isDomainVerified": false,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
],
"createTime": "",
"inviteLinkUri": "",
"linkState": "",
"name": "",
"publicId": "",
"resellerCloudIdentityId": "",
"updateTime": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/channelPartnerLinks")! 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
cloudchannel.accounts.channelPartnerLinks.list
{{baseUrl}}/v1/:parent/channelPartnerLinks
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/channelPartnerLinks");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/channelPartnerLinks")
require "http/client"
url = "{{baseUrl}}/v1/:parent/channelPartnerLinks"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/channelPartnerLinks"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/channelPartnerLinks");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/channelPartnerLinks"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/channelPartnerLinks HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/channelPartnerLinks")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/channelPartnerLinks"))
.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}}/v1/:parent/channelPartnerLinks")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/channelPartnerLinks")
.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}}/v1/:parent/channelPartnerLinks');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/:parent/channelPartnerLinks'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/channelPartnerLinks';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/channelPartnerLinks',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/channelPartnerLinks")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/channelPartnerLinks',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/:parent/channelPartnerLinks'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/channelPartnerLinks');
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}}/v1/:parent/channelPartnerLinks'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/channelPartnerLinks';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/channelPartnerLinks"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/channelPartnerLinks" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/channelPartnerLinks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/channelPartnerLinks');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/channelPartnerLinks');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/channelPartnerLinks');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/channelPartnerLinks' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/channelPartnerLinks' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/channelPartnerLinks")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/channelPartnerLinks"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/channelPartnerLinks"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/channelPartnerLinks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/channelPartnerLinks') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/channelPartnerLinks";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/channelPartnerLinks
http GET {{baseUrl}}/v1/:parent/channelPartnerLinks
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/channelPartnerLinks
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/channelPartnerLinks")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
cloudchannel.accounts.checkCloudIdentityAccountsExist
{{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist
QUERY PARAMS
parent
BODY json
{
"domain": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"domain\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist" {:content-type :json
:form-params {:domain ""}})
require "http/client"
url = "{{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"domain\": \"\"\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}}/v1/:parent:checkCloudIdentityAccountsExist"),
Content = new StringContent("{\n \"domain\": \"\"\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}}/v1/:parent:checkCloudIdentityAccountsExist");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"domain\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist"
payload := strings.NewReader("{\n \"domain\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v1/:parent:checkCloudIdentityAccountsExist HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 18
{
"domain": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist")
.setHeader("content-type", "application/json")
.setBody("{\n \"domain\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"domain\": \"\"\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 \"domain\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist")
.header("content-type", "application/json")
.body("{\n \"domain\": \"\"\n}")
.asString();
const data = JSON.stringify({
domain: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist',
headers: {'content-type': 'application/json'},
data: {domain: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"domain":""}'
};
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}}/v1/:parent:checkCloudIdentityAccountsExist',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "domain": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"domain\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist")
.post(body)
.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/v1/:parent:checkCloudIdentityAccountsExist',
headers: {
'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({domain: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist',
headers: {'content-type': 'application/json'},
body: {domain: ''},
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}}/v1/:parent:checkCloudIdentityAccountsExist');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
domain: ''
});
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}}/v1/:parent:checkCloudIdentityAccountsExist',
headers: {'content-type': 'application/json'},
data: {domain: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"domain":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"domain": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist"]
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}}/v1/:parent:checkCloudIdentityAccountsExist" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"domain\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist",
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([
'domain' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist', [
'body' => '{
"domain": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'domain' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'domain' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"domain": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"domain": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"domain\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent:checkCloudIdentityAccountsExist", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist"
payload = { "domain": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist"
payload <- "{\n \"domain\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"domain\": \"\"\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/v1/:parent:checkCloudIdentityAccountsExist') do |req|
req.body = "{\n \"domain\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist";
let payload = json!({"domain": ""});
let mut headers = reqwest::header::HeaderMap::new();
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}}/v1/:parent:checkCloudIdentityAccountsExist \
--header 'content-type: application/json' \
--data '{
"domain": ""
}'
echo '{
"domain": ""
}' | \
http POST {{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "domain": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["domain": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent:checkCloudIdentityAccountsExist")! 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()
POST
cloudchannel.accounts.customers.create
{{baseUrl}}/v1/:parent/customers
QUERY PARAMS
parent
BODY json
{
"alternateEmail": "",
"channelPartnerId": "",
"cloudIdentityId": "",
"cloudIdentityInfo": {
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": {
"instituteSize": "",
"instituteType": "",
"website": ""
},
"isDomainVerified": false,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
},
"correlationId": "",
"createTime": "",
"domain": "",
"languageCode": "",
"name": "",
"orgDisplayName": "",
"orgPostalAddress": {
"addressLines": [],
"administrativeArea": "",
"languageCode": "",
"locality": "",
"organization": "",
"postalCode": "",
"recipients": [],
"regionCode": "",
"revision": 0,
"sortingCode": "",
"sublocality": ""
},
"primaryContactInfo": {
"displayName": "",
"email": "",
"firstName": "",
"lastName": "",
"phone": "",
"title": ""
},
"updateTime": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/customers");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"alternateEmail\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"correlationId\": \"\",\n \"createTime\": \"\",\n \"domain\": \"\",\n \"languageCode\": \"\",\n \"name\": \"\",\n \"orgDisplayName\": \"\",\n \"orgPostalAddress\": {\n \"addressLines\": [],\n \"administrativeArea\": \"\",\n \"languageCode\": \"\",\n \"locality\": \"\",\n \"organization\": \"\",\n \"postalCode\": \"\",\n \"recipients\": [],\n \"regionCode\": \"\",\n \"revision\": 0,\n \"sortingCode\": \"\",\n \"sublocality\": \"\"\n },\n \"primaryContactInfo\": {\n \"displayName\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"phone\": \"\",\n \"title\": \"\"\n },\n \"updateTime\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent/customers" {:content-type :json
:form-params {:alternateEmail ""
:channelPartnerId ""
:cloudIdentityId ""
:cloudIdentityInfo {:adminConsoleUri ""
:alternateEmail ""
:customerType ""
:eduData {:instituteSize ""
:instituteType ""
:website ""}
:isDomainVerified false
:languageCode ""
:phoneNumber ""
:primaryDomain ""}
:correlationId ""
:createTime ""
:domain ""
:languageCode ""
:name ""
:orgDisplayName ""
:orgPostalAddress {:addressLines []
:administrativeArea ""
:languageCode ""
:locality ""
:organization ""
:postalCode ""
:recipients []
:regionCode ""
:revision 0
:sortingCode ""
:sublocality ""}
:primaryContactInfo {:displayName ""
:email ""
:firstName ""
:lastName ""
:phone ""
:title ""}
:updateTime ""}})
require "http/client"
url = "{{baseUrl}}/v1/:parent/customers"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"alternateEmail\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"correlationId\": \"\",\n \"createTime\": \"\",\n \"domain\": \"\",\n \"languageCode\": \"\",\n \"name\": \"\",\n \"orgDisplayName\": \"\",\n \"orgPostalAddress\": {\n \"addressLines\": [],\n \"administrativeArea\": \"\",\n \"languageCode\": \"\",\n \"locality\": \"\",\n \"organization\": \"\",\n \"postalCode\": \"\",\n \"recipients\": [],\n \"regionCode\": \"\",\n \"revision\": 0,\n \"sortingCode\": \"\",\n \"sublocality\": \"\"\n },\n \"primaryContactInfo\": {\n \"displayName\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"phone\": \"\",\n \"title\": \"\"\n },\n \"updateTime\": \"\"\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}}/v1/:parent/customers"),
Content = new StringContent("{\n \"alternateEmail\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"correlationId\": \"\",\n \"createTime\": \"\",\n \"domain\": \"\",\n \"languageCode\": \"\",\n \"name\": \"\",\n \"orgDisplayName\": \"\",\n \"orgPostalAddress\": {\n \"addressLines\": [],\n \"administrativeArea\": \"\",\n \"languageCode\": \"\",\n \"locality\": \"\",\n \"organization\": \"\",\n \"postalCode\": \"\",\n \"recipients\": [],\n \"regionCode\": \"\",\n \"revision\": 0,\n \"sortingCode\": \"\",\n \"sublocality\": \"\"\n },\n \"primaryContactInfo\": {\n \"displayName\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"phone\": \"\",\n \"title\": \"\"\n },\n \"updateTime\": \"\"\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}}/v1/:parent/customers");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"alternateEmail\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"correlationId\": \"\",\n \"createTime\": \"\",\n \"domain\": \"\",\n \"languageCode\": \"\",\n \"name\": \"\",\n \"orgDisplayName\": \"\",\n \"orgPostalAddress\": {\n \"addressLines\": [],\n \"administrativeArea\": \"\",\n \"languageCode\": \"\",\n \"locality\": \"\",\n \"organization\": \"\",\n \"postalCode\": \"\",\n \"recipients\": [],\n \"regionCode\": \"\",\n \"revision\": 0,\n \"sortingCode\": \"\",\n \"sublocality\": \"\"\n },\n \"primaryContactInfo\": {\n \"displayName\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"phone\": \"\",\n \"title\": \"\"\n },\n \"updateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/customers"
payload := strings.NewReader("{\n \"alternateEmail\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"correlationId\": \"\",\n \"createTime\": \"\",\n \"domain\": \"\",\n \"languageCode\": \"\",\n \"name\": \"\",\n \"orgDisplayName\": \"\",\n \"orgPostalAddress\": {\n \"addressLines\": [],\n \"administrativeArea\": \"\",\n \"languageCode\": \"\",\n \"locality\": \"\",\n \"organization\": \"\",\n \"postalCode\": \"\",\n \"recipients\": [],\n \"regionCode\": \"\",\n \"revision\": 0,\n \"sortingCode\": \"\",\n \"sublocality\": \"\"\n },\n \"primaryContactInfo\": {\n \"displayName\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"phone\": \"\",\n \"title\": \"\"\n },\n \"updateTime\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v1/:parent/customers HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 949
{
"alternateEmail": "",
"channelPartnerId": "",
"cloudIdentityId": "",
"cloudIdentityInfo": {
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": {
"instituteSize": "",
"instituteType": "",
"website": ""
},
"isDomainVerified": false,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
},
"correlationId": "",
"createTime": "",
"domain": "",
"languageCode": "",
"name": "",
"orgDisplayName": "",
"orgPostalAddress": {
"addressLines": [],
"administrativeArea": "",
"languageCode": "",
"locality": "",
"organization": "",
"postalCode": "",
"recipients": [],
"regionCode": "",
"revision": 0,
"sortingCode": "",
"sublocality": ""
},
"primaryContactInfo": {
"displayName": "",
"email": "",
"firstName": "",
"lastName": "",
"phone": "",
"title": ""
},
"updateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/customers")
.setHeader("content-type", "application/json")
.setBody("{\n \"alternateEmail\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"correlationId\": \"\",\n \"createTime\": \"\",\n \"domain\": \"\",\n \"languageCode\": \"\",\n \"name\": \"\",\n \"orgDisplayName\": \"\",\n \"orgPostalAddress\": {\n \"addressLines\": [],\n \"administrativeArea\": \"\",\n \"languageCode\": \"\",\n \"locality\": \"\",\n \"organization\": \"\",\n \"postalCode\": \"\",\n \"recipients\": [],\n \"regionCode\": \"\",\n \"revision\": 0,\n \"sortingCode\": \"\",\n \"sublocality\": \"\"\n },\n \"primaryContactInfo\": {\n \"displayName\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"phone\": \"\",\n \"title\": \"\"\n },\n \"updateTime\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/customers"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"alternateEmail\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"correlationId\": \"\",\n \"createTime\": \"\",\n \"domain\": \"\",\n \"languageCode\": \"\",\n \"name\": \"\",\n \"orgDisplayName\": \"\",\n \"orgPostalAddress\": {\n \"addressLines\": [],\n \"administrativeArea\": \"\",\n \"languageCode\": \"\",\n \"locality\": \"\",\n \"organization\": \"\",\n \"postalCode\": \"\",\n \"recipients\": [],\n \"regionCode\": \"\",\n \"revision\": 0,\n \"sortingCode\": \"\",\n \"sublocality\": \"\"\n },\n \"primaryContactInfo\": {\n \"displayName\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"phone\": \"\",\n \"title\": \"\"\n },\n \"updateTime\": \"\"\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 \"alternateEmail\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"correlationId\": \"\",\n \"createTime\": \"\",\n \"domain\": \"\",\n \"languageCode\": \"\",\n \"name\": \"\",\n \"orgDisplayName\": \"\",\n \"orgPostalAddress\": {\n \"addressLines\": [],\n \"administrativeArea\": \"\",\n \"languageCode\": \"\",\n \"locality\": \"\",\n \"organization\": \"\",\n \"postalCode\": \"\",\n \"recipients\": [],\n \"regionCode\": \"\",\n \"revision\": 0,\n \"sortingCode\": \"\",\n \"sublocality\": \"\"\n },\n \"primaryContactInfo\": {\n \"displayName\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"phone\": \"\",\n \"title\": \"\"\n },\n \"updateTime\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/customers")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/customers")
.header("content-type", "application/json")
.body("{\n \"alternateEmail\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"correlationId\": \"\",\n \"createTime\": \"\",\n \"domain\": \"\",\n \"languageCode\": \"\",\n \"name\": \"\",\n \"orgDisplayName\": \"\",\n \"orgPostalAddress\": {\n \"addressLines\": [],\n \"administrativeArea\": \"\",\n \"languageCode\": \"\",\n \"locality\": \"\",\n \"organization\": \"\",\n \"postalCode\": \"\",\n \"recipients\": [],\n \"regionCode\": \"\",\n \"revision\": 0,\n \"sortingCode\": \"\",\n \"sublocality\": \"\"\n },\n \"primaryContactInfo\": {\n \"displayName\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"phone\": \"\",\n \"title\": \"\"\n },\n \"updateTime\": \"\"\n}")
.asString();
const data = JSON.stringify({
alternateEmail: '',
channelPartnerId: '',
cloudIdentityId: '',
cloudIdentityInfo: {
adminConsoleUri: '',
alternateEmail: '',
customerType: '',
eduData: {
instituteSize: '',
instituteType: '',
website: ''
},
isDomainVerified: false,
languageCode: '',
phoneNumber: '',
primaryDomain: ''
},
correlationId: '',
createTime: '',
domain: '',
languageCode: '',
name: '',
orgDisplayName: '',
orgPostalAddress: {
addressLines: [],
administrativeArea: '',
languageCode: '',
locality: '',
organization: '',
postalCode: '',
recipients: [],
regionCode: '',
revision: 0,
sortingCode: '',
sublocality: ''
},
primaryContactInfo: {
displayName: '',
email: '',
firstName: '',
lastName: '',
phone: '',
title: ''
},
updateTime: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:parent/customers');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/customers',
headers: {'content-type': 'application/json'},
data: {
alternateEmail: '',
channelPartnerId: '',
cloudIdentityId: '',
cloudIdentityInfo: {
adminConsoleUri: '',
alternateEmail: '',
customerType: '',
eduData: {instituteSize: '', instituteType: '', website: ''},
isDomainVerified: false,
languageCode: '',
phoneNumber: '',
primaryDomain: ''
},
correlationId: '',
createTime: '',
domain: '',
languageCode: '',
name: '',
orgDisplayName: '',
orgPostalAddress: {
addressLines: [],
administrativeArea: '',
languageCode: '',
locality: '',
organization: '',
postalCode: '',
recipients: [],
regionCode: '',
revision: 0,
sortingCode: '',
sublocality: ''
},
primaryContactInfo: {displayName: '', email: '', firstName: '', lastName: '', phone: '', title: ''},
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/customers';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"alternateEmail":"","channelPartnerId":"","cloudIdentityId":"","cloudIdentityInfo":{"adminConsoleUri":"","alternateEmail":"","customerType":"","eduData":{"instituteSize":"","instituteType":"","website":""},"isDomainVerified":false,"languageCode":"","phoneNumber":"","primaryDomain":""},"correlationId":"","createTime":"","domain":"","languageCode":"","name":"","orgDisplayName":"","orgPostalAddress":{"addressLines":[],"administrativeArea":"","languageCode":"","locality":"","organization":"","postalCode":"","recipients":[],"regionCode":"","revision":0,"sortingCode":"","sublocality":""},"primaryContactInfo":{"displayName":"","email":"","firstName":"","lastName":"","phone":"","title":""},"updateTime":""}'
};
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}}/v1/:parent/customers',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "alternateEmail": "",\n "channelPartnerId": "",\n "cloudIdentityId": "",\n "cloudIdentityInfo": {\n "adminConsoleUri": "",\n "alternateEmail": "",\n "customerType": "",\n "eduData": {\n "instituteSize": "",\n "instituteType": "",\n "website": ""\n },\n "isDomainVerified": false,\n "languageCode": "",\n "phoneNumber": "",\n "primaryDomain": ""\n },\n "correlationId": "",\n "createTime": "",\n "domain": "",\n "languageCode": "",\n "name": "",\n "orgDisplayName": "",\n "orgPostalAddress": {\n "addressLines": [],\n "administrativeArea": "",\n "languageCode": "",\n "locality": "",\n "organization": "",\n "postalCode": "",\n "recipients": [],\n "regionCode": "",\n "revision": 0,\n "sortingCode": "",\n "sublocality": ""\n },\n "primaryContactInfo": {\n "displayName": "",\n "email": "",\n "firstName": "",\n "lastName": "",\n "phone": "",\n "title": ""\n },\n "updateTime": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"alternateEmail\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"correlationId\": \"\",\n \"createTime\": \"\",\n \"domain\": \"\",\n \"languageCode\": \"\",\n \"name\": \"\",\n \"orgDisplayName\": \"\",\n \"orgPostalAddress\": {\n \"addressLines\": [],\n \"administrativeArea\": \"\",\n \"languageCode\": \"\",\n \"locality\": \"\",\n \"organization\": \"\",\n \"postalCode\": \"\",\n \"recipients\": [],\n \"regionCode\": \"\",\n \"revision\": 0,\n \"sortingCode\": \"\",\n \"sublocality\": \"\"\n },\n \"primaryContactInfo\": {\n \"displayName\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"phone\": \"\",\n \"title\": \"\"\n },\n \"updateTime\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/customers")
.post(body)
.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/v1/:parent/customers',
headers: {
'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({
alternateEmail: '',
channelPartnerId: '',
cloudIdentityId: '',
cloudIdentityInfo: {
adminConsoleUri: '',
alternateEmail: '',
customerType: '',
eduData: {instituteSize: '', instituteType: '', website: ''},
isDomainVerified: false,
languageCode: '',
phoneNumber: '',
primaryDomain: ''
},
correlationId: '',
createTime: '',
domain: '',
languageCode: '',
name: '',
orgDisplayName: '',
orgPostalAddress: {
addressLines: [],
administrativeArea: '',
languageCode: '',
locality: '',
organization: '',
postalCode: '',
recipients: [],
regionCode: '',
revision: 0,
sortingCode: '',
sublocality: ''
},
primaryContactInfo: {displayName: '', email: '', firstName: '', lastName: '', phone: '', title: ''},
updateTime: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/customers',
headers: {'content-type': 'application/json'},
body: {
alternateEmail: '',
channelPartnerId: '',
cloudIdentityId: '',
cloudIdentityInfo: {
adminConsoleUri: '',
alternateEmail: '',
customerType: '',
eduData: {instituteSize: '', instituteType: '', website: ''},
isDomainVerified: false,
languageCode: '',
phoneNumber: '',
primaryDomain: ''
},
correlationId: '',
createTime: '',
domain: '',
languageCode: '',
name: '',
orgDisplayName: '',
orgPostalAddress: {
addressLines: [],
administrativeArea: '',
languageCode: '',
locality: '',
organization: '',
postalCode: '',
recipients: [],
regionCode: '',
revision: 0,
sortingCode: '',
sublocality: ''
},
primaryContactInfo: {displayName: '', email: '', firstName: '', lastName: '', phone: '', title: ''},
updateTime: ''
},
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}}/v1/:parent/customers');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
alternateEmail: '',
channelPartnerId: '',
cloudIdentityId: '',
cloudIdentityInfo: {
adminConsoleUri: '',
alternateEmail: '',
customerType: '',
eduData: {
instituteSize: '',
instituteType: '',
website: ''
},
isDomainVerified: false,
languageCode: '',
phoneNumber: '',
primaryDomain: ''
},
correlationId: '',
createTime: '',
domain: '',
languageCode: '',
name: '',
orgDisplayName: '',
orgPostalAddress: {
addressLines: [],
administrativeArea: '',
languageCode: '',
locality: '',
organization: '',
postalCode: '',
recipients: [],
regionCode: '',
revision: 0,
sortingCode: '',
sublocality: ''
},
primaryContactInfo: {
displayName: '',
email: '',
firstName: '',
lastName: '',
phone: '',
title: ''
},
updateTime: ''
});
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}}/v1/:parent/customers',
headers: {'content-type': 'application/json'},
data: {
alternateEmail: '',
channelPartnerId: '',
cloudIdentityId: '',
cloudIdentityInfo: {
adminConsoleUri: '',
alternateEmail: '',
customerType: '',
eduData: {instituteSize: '', instituteType: '', website: ''},
isDomainVerified: false,
languageCode: '',
phoneNumber: '',
primaryDomain: ''
},
correlationId: '',
createTime: '',
domain: '',
languageCode: '',
name: '',
orgDisplayName: '',
orgPostalAddress: {
addressLines: [],
administrativeArea: '',
languageCode: '',
locality: '',
organization: '',
postalCode: '',
recipients: [],
regionCode: '',
revision: 0,
sortingCode: '',
sublocality: ''
},
primaryContactInfo: {displayName: '', email: '', firstName: '', lastName: '', phone: '', title: ''},
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/customers';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"alternateEmail":"","channelPartnerId":"","cloudIdentityId":"","cloudIdentityInfo":{"adminConsoleUri":"","alternateEmail":"","customerType":"","eduData":{"instituteSize":"","instituteType":"","website":""},"isDomainVerified":false,"languageCode":"","phoneNumber":"","primaryDomain":""},"correlationId":"","createTime":"","domain":"","languageCode":"","name":"","orgDisplayName":"","orgPostalAddress":{"addressLines":[],"administrativeArea":"","languageCode":"","locality":"","organization":"","postalCode":"","recipients":[],"regionCode":"","revision":0,"sortingCode":"","sublocality":""},"primaryContactInfo":{"displayName":"","email":"","firstName":"","lastName":"","phone":"","title":""},"updateTime":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"alternateEmail": @"",
@"channelPartnerId": @"",
@"cloudIdentityId": @"",
@"cloudIdentityInfo": @{ @"adminConsoleUri": @"", @"alternateEmail": @"", @"customerType": @"", @"eduData": @{ @"instituteSize": @"", @"instituteType": @"", @"website": @"" }, @"isDomainVerified": @NO, @"languageCode": @"", @"phoneNumber": @"", @"primaryDomain": @"" },
@"correlationId": @"",
@"createTime": @"",
@"domain": @"",
@"languageCode": @"",
@"name": @"",
@"orgDisplayName": @"",
@"orgPostalAddress": @{ @"addressLines": @[ ], @"administrativeArea": @"", @"languageCode": @"", @"locality": @"", @"organization": @"", @"postalCode": @"", @"recipients": @[ ], @"regionCode": @"", @"revision": @0, @"sortingCode": @"", @"sublocality": @"" },
@"primaryContactInfo": @{ @"displayName": @"", @"email": @"", @"firstName": @"", @"lastName": @"", @"phone": @"", @"title": @"" },
@"updateTime": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/customers"]
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}}/v1/:parent/customers" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"alternateEmail\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"correlationId\": \"\",\n \"createTime\": \"\",\n \"domain\": \"\",\n \"languageCode\": \"\",\n \"name\": \"\",\n \"orgDisplayName\": \"\",\n \"orgPostalAddress\": {\n \"addressLines\": [],\n \"administrativeArea\": \"\",\n \"languageCode\": \"\",\n \"locality\": \"\",\n \"organization\": \"\",\n \"postalCode\": \"\",\n \"recipients\": [],\n \"regionCode\": \"\",\n \"revision\": 0,\n \"sortingCode\": \"\",\n \"sublocality\": \"\"\n },\n \"primaryContactInfo\": {\n \"displayName\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"phone\": \"\",\n \"title\": \"\"\n },\n \"updateTime\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/customers",
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([
'alternateEmail' => '',
'channelPartnerId' => '',
'cloudIdentityId' => '',
'cloudIdentityInfo' => [
'adminConsoleUri' => '',
'alternateEmail' => '',
'customerType' => '',
'eduData' => [
'instituteSize' => '',
'instituteType' => '',
'website' => ''
],
'isDomainVerified' => null,
'languageCode' => '',
'phoneNumber' => '',
'primaryDomain' => ''
],
'correlationId' => '',
'createTime' => '',
'domain' => '',
'languageCode' => '',
'name' => '',
'orgDisplayName' => '',
'orgPostalAddress' => [
'addressLines' => [
],
'administrativeArea' => '',
'languageCode' => '',
'locality' => '',
'organization' => '',
'postalCode' => '',
'recipients' => [
],
'regionCode' => '',
'revision' => 0,
'sortingCode' => '',
'sublocality' => ''
],
'primaryContactInfo' => [
'displayName' => '',
'email' => '',
'firstName' => '',
'lastName' => '',
'phone' => '',
'title' => ''
],
'updateTime' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:parent/customers', [
'body' => '{
"alternateEmail": "",
"channelPartnerId": "",
"cloudIdentityId": "",
"cloudIdentityInfo": {
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": {
"instituteSize": "",
"instituteType": "",
"website": ""
},
"isDomainVerified": false,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
},
"correlationId": "",
"createTime": "",
"domain": "",
"languageCode": "",
"name": "",
"orgDisplayName": "",
"orgPostalAddress": {
"addressLines": [],
"administrativeArea": "",
"languageCode": "",
"locality": "",
"organization": "",
"postalCode": "",
"recipients": [],
"regionCode": "",
"revision": 0,
"sortingCode": "",
"sublocality": ""
},
"primaryContactInfo": {
"displayName": "",
"email": "",
"firstName": "",
"lastName": "",
"phone": "",
"title": ""
},
"updateTime": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/customers');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'alternateEmail' => '',
'channelPartnerId' => '',
'cloudIdentityId' => '',
'cloudIdentityInfo' => [
'adminConsoleUri' => '',
'alternateEmail' => '',
'customerType' => '',
'eduData' => [
'instituteSize' => '',
'instituteType' => '',
'website' => ''
],
'isDomainVerified' => null,
'languageCode' => '',
'phoneNumber' => '',
'primaryDomain' => ''
],
'correlationId' => '',
'createTime' => '',
'domain' => '',
'languageCode' => '',
'name' => '',
'orgDisplayName' => '',
'orgPostalAddress' => [
'addressLines' => [
],
'administrativeArea' => '',
'languageCode' => '',
'locality' => '',
'organization' => '',
'postalCode' => '',
'recipients' => [
],
'regionCode' => '',
'revision' => 0,
'sortingCode' => '',
'sublocality' => ''
],
'primaryContactInfo' => [
'displayName' => '',
'email' => '',
'firstName' => '',
'lastName' => '',
'phone' => '',
'title' => ''
],
'updateTime' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'alternateEmail' => '',
'channelPartnerId' => '',
'cloudIdentityId' => '',
'cloudIdentityInfo' => [
'adminConsoleUri' => '',
'alternateEmail' => '',
'customerType' => '',
'eduData' => [
'instituteSize' => '',
'instituteType' => '',
'website' => ''
],
'isDomainVerified' => null,
'languageCode' => '',
'phoneNumber' => '',
'primaryDomain' => ''
],
'correlationId' => '',
'createTime' => '',
'domain' => '',
'languageCode' => '',
'name' => '',
'orgDisplayName' => '',
'orgPostalAddress' => [
'addressLines' => [
],
'administrativeArea' => '',
'languageCode' => '',
'locality' => '',
'organization' => '',
'postalCode' => '',
'recipients' => [
],
'regionCode' => '',
'revision' => 0,
'sortingCode' => '',
'sublocality' => ''
],
'primaryContactInfo' => [
'displayName' => '',
'email' => '',
'firstName' => '',
'lastName' => '',
'phone' => '',
'title' => ''
],
'updateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/customers');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/customers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"alternateEmail": "",
"channelPartnerId": "",
"cloudIdentityId": "",
"cloudIdentityInfo": {
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": {
"instituteSize": "",
"instituteType": "",
"website": ""
},
"isDomainVerified": false,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
},
"correlationId": "",
"createTime": "",
"domain": "",
"languageCode": "",
"name": "",
"orgDisplayName": "",
"orgPostalAddress": {
"addressLines": [],
"administrativeArea": "",
"languageCode": "",
"locality": "",
"organization": "",
"postalCode": "",
"recipients": [],
"regionCode": "",
"revision": 0,
"sortingCode": "",
"sublocality": ""
},
"primaryContactInfo": {
"displayName": "",
"email": "",
"firstName": "",
"lastName": "",
"phone": "",
"title": ""
},
"updateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/customers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"alternateEmail": "",
"channelPartnerId": "",
"cloudIdentityId": "",
"cloudIdentityInfo": {
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": {
"instituteSize": "",
"instituteType": "",
"website": ""
},
"isDomainVerified": false,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
},
"correlationId": "",
"createTime": "",
"domain": "",
"languageCode": "",
"name": "",
"orgDisplayName": "",
"orgPostalAddress": {
"addressLines": [],
"administrativeArea": "",
"languageCode": "",
"locality": "",
"organization": "",
"postalCode": "",
"recipients": [],
"regionCode": "",
"revision": 0,
"sortingCode": "",
"sublocality": ""
},
"primaryContactInfo": {
"displayName": "",
"email": "",
"firstName": "",
"lastName": "",
"phone": "",
"title": ""
},
"updateTime": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"alternateEmail\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"correlationId\": \"\",\n \"createTime\": \"\",\n \"domain\": \"\",\n \"languageCode\": \"\",\n \"name\": \"\",\n \"orgDisplayName\": \"\",\n \"orgPostalAddress\": {\n \"addressLines\": [],\n \"administrativeArea\": \"\",\n \"languageCode\": \"\",\n \"locality\": \"\",\n \"organization\": \"\",\n \"postalCode\": \"\",\n \"recipients\": [],\n \"regionCode\": \"\",\n \"revision\": 0,\n \"sortingCode\": \"\",\n \"sublocality\": \"\"\n },\n \"primaryContactInfo\": {\n \"displayName\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"phone\": \"\",\n \"title\": \"\"\n },\n \"updateTime\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent/customers", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/customers"
payload = {
"alternateEmail": "",
"channelPartnerId": "",
"cloudIdentityId": "",
"cloudIdentityInfo": {
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": {
"instituteSize": "",
"instituteType": "",
"website": ""
},
"isDomainVerified": False,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
},
"correlationId": "",
"createTime": "",
"domain": "",
"languageCode": "",
"name": "",
"orgDisplayName": "",
"orgPostalAddress": {
"addressLines": [],
"administrativeArea": "",
"languageCode": "",
"locality": "",
"organization": "",
"postalCode": "",
"recipients": [],
"regionCode": "",
"revision": 0,
"sortingCode": "",
"sublocality": ""
},
"primaryContactInfo": {
"displayName": "",
"email": "",
"firstName": "",
"lastName": "",
"phone": "",
"title": ""
},
"updateTime": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/customers"
payload <- "{\n \"alternateEmail\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"correlationId\": \"\",\n \"createTime\": \"\",\n \"domain\": \"\",\n \"languageCode\": \"\",\n \"name\": \"\",\n \"orgDisplayName\": \"\",\n \"orgPostalAddress\": {\n \"addressLines\": [],\n \"administrativeArea\": \"\",\n \"languageCode\": \"\",\n \"locality\": \"\",\n \"organization\": \"\",\n \"postalCode\": \"\",\n \"recipients\": [],\n \"regionCode\": \"\",\n \"revision\": 0,\n \"sortingCode\": \"\",\n \"sublocality\": \"\"\n },\n \"primaryContactInfo\": {\n \"displayName\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"phone\": \"\",\n \"title\": \"\"\n },\n \"updateTime\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"alternateEmail\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"correlationId\": \"\",\n \"createTime\": \"\",\n \"domain\": \"\",\n \"languageCode\": \"\",\n \"name\": \"\",\n \"orgDisplayName\": \"\",\n \"orgPostalAddress\": {\n \"addressLines\": [],\n \"administrativeArea\": \"\",\n \"languageCode\": \"\",\n \"locality\": \"\",\n \"organization\": \"\",\n \"postalCode\": \"\",\n \"recipients\": [],\n \"regionCode\": \"\",\n \"revision\": 0,\n \"sortingCode\": \"\",\n \"sublocality\": \"\"\n },\n \"primaryContactInfo\": {\n \"displayName\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"phone\": \"\",\n \"title\": \"\"\n },\n \"updateTime\": \"\"\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/v1/:parent/customers') do |req|
req.body = "{\n \"alternateEmail\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"correlationId\": \"\",\n \"createTime\": \"\",\n \"domain\": \"\",\n \"languageCode\": \"\",\n \"name\": \"\",\n \"orgDisplayName\": \"\",\n \"orgPostalAddress\": {\n \"addressLines\": [],\n \"administrativeArea\": \"\",\n \"languageCode\": \"\",\n \"locality\": \"\",\n \"organization\": \"\",\n \"postalCode\": \"\",\n \"recipients\": [],\n \"regionCode\": \"\",\n \"revision\": 0,\n \"sortingCode\": \"\",\n \"sublocality\": \"\"\n },\n \"primaryContactInfo\": {\n \"displayName\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"phone\": \"\",\n \"title\": \"\"\n },\n \"updateTime\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/customers";
let payload = json!({
"alternateEmail": "",
"channelPartnerId": "",
"cloudIdentityId": "",
"cloudIdentityInfo": json!({
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": json!({
"instituteSize": "",
"instituteType": "",
"website": ""
}),
"isDomainVerified": false,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
}),
"correlationId": "",
"createTime": "",
"domain": "",
"languageCode": "",
"name": "",
"orgDisplayName": "",
"orgPostalAddress": json!({
"addressLines": (),
"administrativeArea": "",
"languageCode": "",
"locality": "",
"organization": "",
"postalCode": "",
"recipients": (),
"regionCode": "",
"revision": 0,
"sortingCode": "",
"sublocality": ""
}),
"primaryContactInfo": json!({
"displayName": "",
"email": "",
"firstName": "",
"lastName": "",
"phone": "",
"title": ""
}),
"updateTime": ""
});
let mut headers = reqwest::header::HeaderMap::new();
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}}/v1/:parent/customers \
--header 'content-type: application/json' \
--data '{
"alternateEmail": "",
"channelPartnerId": "",
"cloudIdentityId": "",
"cloudIdentityInfo": {
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": {
"instituteSize": "",
"instituteType": "",
"website": ""
},
"isDomainVerified": false,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
},
"correlationId": "",
"createTime": "",
"domain": "",
"languageCode": "",
"name": "",
"orgDisplayName": "",
"orgPostalAddress": {
"addressLines": [],
"administrativeArea": "",
"languageCode": "",
"locality": "",
"organization": "",
"postalCode": "",
"recipients": [],
"regionCode": "",
"revision": 0,
"sortingCode": "",
"sublocality": ""
},
"primaryContactInfo": {
"displayName": "",
"email": "",
"firstName": "",
"lastName": "",
"phone": "",
"title": ""
},
"updateTime": ""
}'
echo '{
"alternateEmail": "",
"channelPartnerId": "",
"cloudIdentityId": "",
"cloudIdentityInfo": {
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": {
"instituteSize": "",
"instituteType": "",
"website": ""
},
"isDomainVerified": false,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
},
"correlationId": "",
"createTime": "",
"domain": "",
"languageCode": "",
"name": "",
"orgDisplayName": "",
"orgPostalAddress": {
"addressLines": [],
"administrativeArea": "",
"languageCode": "",
"locality": "",
"organization": "",
"postalCode": "",
"recipients": [],
"regionCode": "",
"revision": 0,
"sortingCode": "",
"sublocality": ""
},
"primaryContactInfo": {
"displayName": "",
"email": "",
"firstName": "",
"lastName": "",
"phone": "",
"title": ""
},
"updateTime": ""
}' | \
http POST {{baseUrl}}/v1/:parent/customers \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "alternateEmail": "",\n "channelPartnerId": "",\n "cloudIdentityId": "",\n "cloudIdentityInfo": {\n "adminConsoleUri": "",\n "alternateEmail": "",\n "customerType": "",\n "eduData": {\n "instituteSize": "",\n "instituteType": "",\n "website": ""\n },\n "isDomainVerified": false,\n "languageCode": "",\n "phoneNumber": "",\n "primaryDomain": ""\n },\n "correlationId": "",\n "createTime": "",\n "domain": "",\n "languageCode": "",\n "name": "",\n "orgDisplayName": "",\n "orgPostalAddress": {\n "addressLines": [],\n "administrativeArea": "",\n "languageCode": "",\n "locality": "",\n "organization": "",\n "postalCode": "",\n "recipients": [],\n "regionCode": "",\n "revision": 0,\n "sortingCode": "",\n "sublocality": ""\n },\n "primaryContactInfo": {\n "displayName": "",\n "email": "",\n "firstName": "",\n "lastName": "",\n "phone": "",\n "title": ""\n },\n "updateTime": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:parent/customers
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"alternateEmail": "",
"channelPartnerId": "",
"cloudIdentityId": "",
"cloudIdentityInfo": [
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": [
"instituteSize": "",
"instituteType": "",
"website": ""
],
"isDomainVerified": false,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
],
"correlationId": "",
"createTime": "",
"domain": "",
"languageCode": "",
"name": "",
"orgDisplayName": "",
"orgPostalAddress": [
"addressLines": [],
"administrativeArea": "",
"languageCode": "",
"locality": "",
"organization": "",
"postalCode": "",
"recipients": [],
"regionCode": "",
"revision": 0,
"sortingCode": "",
"sublocality": ""
],
"primaryContactInfo": [
"displayName": "",
"email": "",
"firstName": "",
"lastName": "",
"phone": "",
"title": ""
],
"updateTime": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/customers")! 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()
POST
cloudchannel.accounts.customers.customerRepricingConfigs.create
{{baseUrl}}/v1/:parent/customerRepricingConfigs
QUERY PARAMS
parent
BODY json
{
"name": "",
"repricingConfig": {
"adjustment": {
"percentageAdjustment": {
"percentage": {
"value": ""
}
}
},
"channelPartnerGranularity": {},
"conditionalOverrides": [
{
"adjustment": {},
"rebillingBasis": "",
"repricingCondition": {
"skuGroupCondition": {
"skuGroup": ""
}
}
}
],
"effectiveInvoiceMonth": {
"day": 0,
"month": 0,
"year": 0
},
"entitlementGranularity": {
"entitlement": ""
},
"rebillingBasis": ""
},
"updateTime": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/customerRepricingConfigs");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent/customerRepricingConfigs" {:content-type :json
:form-params {:name ""
:repricingConfig {:adjustment {:percentageAdjustment {:percentage {:value ""}}}
:channelPartnerGranularity {}
:conditionalOverrides [{:adjustment {}
:rebillingBasis ""
:repricingCondition {:skuGroupCondition {:skuGroup ""}}}]
:effectiveInvoiceMonth {:day 0
:month 0
:year 0}
:entitlementGranularity {:entitlement ""}
:rebillingBasis ""}
:updateTime ""}})
require "http/client"
url = "{{baseUrl}}/v1/:parent/customerRepricingConfigs"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\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}}/v1/:parent/customerRepricingConfigs"),
Content = new StringContent("{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\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}}/v1/:parent/customerRepricingConfigs");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/customerRepricingConfigs"
payload := strings.NewReader("{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v1/:parent/customerRepricingConfigs HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 623
{
"name": "",
"repricingConfig": {
"adjustment": {
"percentageAdjustment": {
"percentage": {
"value": ""
}
}
},
"channelPartnerGranularity": {},
"conditionalOverrides": [
{
"adjustment": {},
"rebillingBasis": "",
"repricingCondition": {
"skuGroupCondition": {
"skuGroup": ""
}
}
}
],
"effectiveInvoiceMonth": {
"day": 0,
"month": 0,
"year": 0
},
"entitlementGranularity": {
"entitlement": ""
},
"rebillingBasis": ""
},
"updateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/customerRepricingConfigs")
.setHeader("content-type", "application/json")
.setBody("{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/customerRepricingConfigs"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\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 \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/customerRepricingConfigs")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/customerRepricingConfigs")
.header("content-type", "application/json")
.body("{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}")
.asString();
const data = JSON.stringify({
name: '',
repricingConfig: {
adjustment: {
percentageAdjustment: {
percentage: {
value: ''
}
}
},
channelPartnerGranularity: {},
conditionalOverrides: [
{
adjustment: {},
rebillingBasis: '',
repricingCondition: {
skuGroupCondition: {
skuGroup: ''
}
}
}
],
effectiveInvoiceMonth: {
day: 0,
month: 0,
year: 0
},
entitlementGranularity: {
entitlement: ''
},
rebillingBasis: ''
},
updateTime: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:parent/customerRepricingConfigs');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/customerRepricingConfigs',
headers: {'content-type': 'application/json'},
data: {
name: '',
repricingConfig: {
adjustment: {percentageAdjustment: {percentage: {value: ''}}},
channelPartnerGranularity: {},
conditionalOverrides: [
{
adjustment: {},
rebillingBasis: '',
repricingCondition: {skuGroupCondition: {skuGroup: ''}}
}
],
effectiveInvoiceMonth: {day: 0, month: 0, year: 0},
entitlementGranularity: {entitlement: ''},
rebillingBasis: ''
},
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/customerRepricingConfigs';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","repricingConfig":{"adjustment":{"percentageAdjustment":{"percentage":{"value":""}}},"channelPartnerGranularity":{},"conditionalOverrides":[{"adjustment":{},"rebillingBasis":"","repricingCondition":{"skuGroupCondition":{"skuGroup":""}}}],"effectiveInvoiceMonth":{"day":0,"month":0,"year":0},"entitlementGranularity":{"entitlement":""},"rebillingBasis":""},"updateTime":""}'
};
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}}/v1/:parent/customerRepricingConfigs',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "name": "",\n "repricingConfig": {\n "adjustment": {\n "percentageAdjustment": {\n "percentage": {\n "value": ""\n }\n }\n },\n "channelPartnerGranularity": {},\n "conditionalOverrides": [\n {\n "adjustment": {},\n "rebillingBasis": "",\n "repricingCondition": {\n "skuGroupCondition": {\n "skuGroup": ""\n }\n }\n }\n ],\n "effectiveInvoiceMonth": {\n "day": 0,\n "month": 0,\n "year": 0\n },\n "entitlementGranularity": {\n "entitlement": ""\n },\n "rebillingBasis": ""\n },\n "updateTime": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/customerRepricingConfigs")
.post(body)
.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/v1/:parent/customerRepricingConfigs',
headers: {
'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({
name: '',
repricingConfig: {
adjustment: {percentageAdjustment: {percentage: {value: ''}}},
channelPartnerGranularity: {},
conditionalOverrides: [
{
adjustment: {},
rebillingBasis: '',
repricingCondition: {skuGroupCondition: {skuGroup: ''}}
}
],
effectiveInvoiceMonth: {day: 0, month: 0, year: 0},
entitlementGranularity: {entitlement: ''},
rebillingBasis: ''
},
updateTime: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/customerRepricingConfigs',
headers: {'content-type': 'application/json'},
body: {
name: '',
repricingConfig: {
adjustment: {percentageAdjustment: {percentage: {value: ''}}},
channelPartnerGranularity: {},
conditionalOverrides: [
{
adjustment: {},
rebillingBasis: '',
repricingCondition: {skuGroupCondition: {skuGroup: ''}}
}
],
effectiveInvoiceMonth: {day: 0, month: 0, year: 0},
entitlementGranularity: {entitlement: ''},
rebillingBasis: ''
},
updateTime: ''
},
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}}/v1/:parent/customerRepricingConfigs');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
name: '',
repricingConfig: {
adjustment: {
percentageAdjustment: {
percentage: {
value: ''
}
}
},
channelPartnerGranularity: {},
conditionalOverrides: [
{
adjustment: {},
rebillingBasis: '',
repricingCondition: {
skuGroupCondition: {
skuGroup: ''
}
}
}
],
effectiveInvoiceMonth: {
day: 0,
month: 0,
year: 0
},
entitlementGranularity: {
entitlement: ''
},
rebillingBasis: ''
},
updateTime: ''
});
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}}/v1/:parent/customerRepricingConfigs',
headers: {'content-type': 'application/json'},
data: {
name: '',
repricingConfig: {
adjustment: {percentageAdjustment: {percentage: {value: ''}}},
channelPartnerGranularity: {},
conditionalOverrides: [
{
adjustment: {},
rebillingBasis: '',
repricingCondition: {skuGroupCondition: {skuGroup: ''}}
}
],
effectiveInvoiceMonth: {day: 0, month: 0, year: 0},
entitlementGranularity: {entitlement: ''},
rebillingBasis: ''
},
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/customerRepricingConfigs';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","repricingConfig":{"adjustment":{"percentageAdjustment":{"percentage":{"value":""}}},"channelPartnerGranularity":{},"conditionalOverrides":[{"adjustment":{},"rebillingBasis":"","repricingCondition":{"skuGroupCondition":{"skuGroup":""}}}],"effectiveInvoiceMonth":{"day":0,"month":0,"year":0},"entitlementGranularity":{"entitlement":""},"rebillingBasis":""},"updateTime":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"name": @"",
@"repricingConfig": @{ @"adjustment": @{ @"percentageAdjustment": @{ @"percentage": @{ @"value": @"" } } }, @"channelPartnerGranularity": @{ }, @"conditionalOverrides": @[ @{ @"adjustment": @{ }, @"rebillingBasis": @"", @"repricingCondition": @{ @"skuGroupCondition": @{ @"skuGroup": @"" } } } ], @"effectiveInvoiceMonth": @{ @"day": @0, @"month": @0, @"year": @0 }, @"entitlementGranularity": @{ @"entitlement": @"" }, @"rebillingBasis": @"" },
@"updateTime": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/customerRepricingConfigs"]
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}}/v1/:parent/customerRepricingConfigs" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/customerRepricingConfigs",
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([
'name' => '',
'repricingConfig' => [
'adjustment' => [
'percentageAdjustment' => [
'percentage' => [
'value' => ''
]
]
],
'channelPartnerGranularity' => [
],
'conditionalOverrides' => [
[
'adjustment' => [
],
'rebillingBasis' => '',
'repricingCondition' => [
'skuGroupCondition' => [
'skuGroup' => ''
]
]
]
],
'effectiveInvoiceMonth' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'entitlementGranularity' => [
'entitlement' => ''
],
'rebillingBasis' => ''
],
'updateTime' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:parent/customerRepricingConfigs', [
'body' => '{
"name": "",
"repricingConfig": {
"adjustment": {
"percentageAdjustment": {
"percentage": {
"value": ""
}
}
},
"channelPartnerGranularity": {},
"conditionalOverrides": [
{
"adjustment": {},
"rebillingBasis": "",
"repricingCondition": {
"skuGroupCondition": {
"skuGroup": ""
}
}
}
],
"effectiveInvoiceMonth": {
"day": 0,
"month": 0,
"year": 0
},
"entitlementGranularity": {
"entitlement": ""
},
"rebillingBasis": ""
},
"updateTime": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/customerRepricingConfigs');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'name' => '',
'repricingConfig' => [
'adjustment' => [
'percentageAdjustment' => [
'percentage' => [
'value' => ''
]
]
],
'channelPartnerGranularity' => [
],
'conditionalOverrides' => [
[
'adjustment' => [
],
'rebillingBasis' => '',
'repricingCondition' => [
'skuGroupCondition' => [
'skuGroup' => ''
]
]
]
],
'effectiveInvoiceMonth' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'entitlementGranularity' => [
'entitlement' => ''
],
'rebillingBasis' => ''
],
'updateTime' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'name' => '',
'repricingConfig' => [
'adjustment' => [
'percentageAdjustment' => [
'percentage' => [
'value' => ''
]
]
],
'channelPartnerGranularity' => [
],
'conditionalOverrides' => [
[
'adjustment' => [
],
'rebillingBasis' => '',
'repricingCondition' => [
'skuGroupCondition' => [
'skuGroup' => ''
]
]
]
],
'effectiveInvoiceMonth' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'entitlementGranularity' => [
'entitlement' => ''
],
'rebillingBasis' => ''
],
'updateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/customerRepricingConfigs');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/customerRepricingConfigs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"repricingConfig": {
"adjustment": {
"percentageAdjustment": {
"percentage": {
"value": ""
}
}
},
"channelPartnerGranularity": {},
"conditionalOverrides": [
{
"adjustment": {},
"rebillingBasis": "",
"repricingCondition": {
"skuGroupCondition": {
"skuGroup": ""
}
}
}
],
"effectiveInvoiceMonth": {
"day": 0,
"month": 0,
"year": 0
},
"entitlementGranularity": {
"entitlement": ""
},
"rebillingBasis": ""
},
"updateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/customerRepricingConfigs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"repricingConfig": {
"adjustment": {
"percentageAdjustment": {
"percentage": {
"value": ""
}
}
},
"channelPartnerGranularity": {},
"conditionalOverrides": [
{
"adjustment": {},
"rebillingBasis": "",
"repricingCondition": {
"skuGroupCondition": {
"skuGroup": ""
}
}
}
],
"effectiveInvoiceMonth": {
"day": 0,
"month": 0,
"year": 0
},
"entitlementGranularity": {
"entitlement": ""
},
"rebillingBasis": ""
},
"updateTime": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent/customerRepricingConfigs", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/customerRepricingConfigs"
payload = {
"name": "",
"repricingConfig": {
"adjustment": { "percentageAdjustment": { "percentage": { "value": "" } } },
"channelPartnerGranularity": {},
"conditionalOverrides": [
{
"adjustment": {},
"rebillingBasis": "",
"repricingCondition": { "skuGroupCondition": { "skuGroup": "" } }
}
],
"effectiveInvoiceMonth": {
"day": 0,
"month": 0,
"year": 0
},
"entitlementGranularity": { "entitlement": "" },
"rebillingBasis": ""
},
"updateTime": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/customerRepricingConfigs"
payload <- "{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/customerRepricingConfigs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\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/v1/:parent/customerRepricingConfigs') do |req|
req.body = "{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/customerRepricingConfigs";
let payload = json!({
"name": "",
"repricingConfig": json!({
"adjustment": json!({"percentageAdjustment": json!({"percentage": json!({"value": ""})})}),
"channelPartnerGranularity": json!({}),
"conditionalOverrides": (
json!({
"adjustment": json!({}),
"rebillingBasis": "",
"repricingCondition": json!({"skuGroupCondition": json!({"skuGroup": ""})})
})
),
"effectiveInvoiceMonth": json!({
"day": 0,
"month": 0,
"year": 0
}),
"entitlementGranularity": json!({"entitlement": ""}),
"rebillingBasis": ""
}),
"updateTime": ""
});
let mut headers = reqwest::header::HeaderMap::new();
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}}/v1/:parent/customerRepricingConfigs \
--header 'content-type: application/json' \
--data '{
"name": "",
"repricingConfig": {
"adjustment": {
"percentageAdjustment": {
"percentage": {
"value": ""
}
}
},
"channelPartnerGranularity": {},
"conditionalOverrides": [
{
"adjustment": {},
"rebillingBasis": "",
"repricingCondition": {
"skuGroupCondition": {
"skuGroup": ""
}
}
}
],
"effectiveInvoiceMonth": {
"day": 0,
"month": 0,
"year": 0
},
"entitlementGranularity": {
"entitlement": ""
},
"rebillingBasis": ""
},
"updateTime": ""
}'
echo '{
"name": "",
"repricingConfig": {
"adjustment": {
"percentageAdjustment": {
"percentage": {
"value": ""
}
}
},
"channelPartnerGranularity": {},
"conditionalOverrides": [
{
"adjustment": {},
"rebillingBasis": "",
"repricingCondition": {
"skuGroupCondition": {
"skuGroup": ""
}
}
}
],
"effectiveInvoiceMonth": {
"day": 0,
"month": 0,
"year": 0
},
"entitlementGranularity": {
"entitlement": ""
},
"rebillingBasis": ""
},
"updateTime": ""
}' | \
http POST {{baseUrl}}/v1/:parent/customerRepricingConfigs \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "name": "",\n "repricingConfig": {\n "adjustment": {\n "percentageAdjustment": {\n "percentage": {\n "value": ""\n }\n }\n },\n "channelPartnerGranularity": {},\n "conditionalOverrides": [\n {\n "adjustment": {},\n "rebillingBasis": "",\n "repricingCondition": {\n "skuGroupCondition": {\n "skuGroup": ""\n }\n }\n }\n ],\n "effectiveInvoiceMonth": {\n "day": 0,\n "month": 0,\n "year": 0\n },\n "entitlementGranularity": {\n "entitlement": ""\n },\n "rebillingBasis": ""\n },\n "updateTime": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:parent/customerRepricingConfigs
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"name": "",
"repricingConfig": [
"adjustment": ["percentageAdjustment": ["percentage": ["value": ""]]],
"channelPartnerGranularity": [],
"conditionalOverrides": [
[
"adjustment": [],
"rebillingBasis": "",
"repricingCondition": ["skuGroupCondition": ["skuGroup": ""]]
]
],
"effectiveInvoiceMonth": [
"day": 0,
"month": 0,
"year": 0
],
"entitlementGranularity": ["entitlement": ""],
"rebillingBasis": ""
],
"updateTime": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/customerRepricingConfigs")! 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
cloudchannel.accounts.customers.customerRepricingConfigs.list
{{baseUrl}}/v1/:parent/customerRepricingConfigs
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/customerRepricingConfigs");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/customerRepricingConfigs")
require "http/client"
url = "{{baseUrl}}/v1/:parent/customerRepricingConfigs"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/customerRepricingConfigs"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/customerRepricingConfigs");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/customerRepricingConfigs"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/customerRepricingConfigs HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/customerRepricingConfigs")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/customerRepricingConfigs"))
.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}}/v1/:parent/customerRepricingConfigs")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/customerRepricingConfigs")
.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}}/v1/:parent/customerRepricingConfigs');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/:parent/customerRepricingConfigs'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/customerRepricingConfigs';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/customerRepricingConfigs',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/customerRepricingConfigs")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/customerRepricingConfigs',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/:parent/customerRepricingConfigs'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/customerRepricingConfigs');
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}}/v1/:parent/customerRepricingConfigs'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/customerRepricingConfigs';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/customerRepricingConfigs"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/customerRepricingConfigs" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/customerRepricingConfigs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/customerRepricingConfigs');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/customerRepricingConfigs');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/customerRepricingConfigs');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/customerRepricingConfigs' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/customerRepricingConfigs' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/customerRepricingConfigs")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/customerRepricingConfigs"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/customerRepricingConfigs"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/customerRepricingConfigs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/customerRepricingConfigs') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/customerRepricingConfigs";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/customerRepricingConfigs
http GET {{baseUrl}}/v1/:parent/customerRepricingConfigs
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/customerRepricingConfigs
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/customerRepricingConfigs")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
cloudchannel.accounts.customers.customerRepricingConfigs.patch
{{baseUrl}}/v1/:name
QUERY PARAMS
name
BODY json
{
"name": "",
"repricingConfig": {
"adjustment": {
"percentageAdjustment": {
"percentage": {
"value": ""
}
}
},
"channelPartnerGranularity": {},
"conditionalOverrides": [
{
"adjustment": {},
"rebillingBasis": "",
"repricingCondition": {
"skuGroupCondition": {
"skuGroup": ""
}
}
}
],
"effectiveInvoiceMonth": {
"day": 0,
"month": 0,
"year": 0
},
"entitlementGranularity": {
"entitlement": ""
},
"rebillingBasis": ""
},
"updateTime": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/v1/:name" {:content-type :json
:form-params {:name ""
:repricingConfig {:adjustment {:percentageAdjustment {:percentage {:value ""}}}
:channelPartnerGranularity {}
:conditionalOverrides [{:adjustment {}
:rebillingBasis ""
:repricingCondition {:skuGroupCondition {:skuGroup ""}}}]
:effectiveInvoiceMonth {:day 0
:month 0
:year 0}
:entitlementGranularity {:entitlement ""}
:rebillingBasis ""}
:updateTime ""}})
require "http/client"
url = "{{baseUrl}}/v1/:name"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/v1/:name"),
Content = new StringContent("{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\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}}/v1/:name");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name"
payload := strings.NewReader("{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/v1/:name HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 623
{
"name": "",
"repricingConfig": {
"adjustment": {
"percentageAdjustment": {
"percentage": {
"value": ""
}
}
},
"channelPartnerGranularity": {},
"conditionalOverrides": [
{
"adjustment": {},
"rebillingBasis": "",
"repricingCondition": {
"skuGroupCondition": {
"skuGroup": ""
}
}
}
],
"effectiveInvoiceMonth": {
"day": 0,
"month": 0,
"year": 0
},
"entitlementGranularity": {
"entitlement": ""
},
"rebillingBasis": ""
},
"updateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/v1/:name")
.setHeader("content-type", "application/json")
.setBody("{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\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 \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/v1/:name")
.header("content-type", "application/json")
.body("{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}")
.asString();
const data = JSON.stringify({
name: '',
repricingConfig: {
adjustment: {
percentageAdjustment: {
percentage: {
value: ''
}
}
},
channelPartnerGranularity: {},
conditionalOverrides: [
{
adjustment: {},
rebillingBasis: '',
repricingCondition: {
skuGroupCondition: {
skuGroup: ''
}
}
}
],
effectiveInvoiceMonth: {
day: 0,
month: 0,
year: 0
},
entitlementGranularity: {
entitlement: ''
},
rebillingBasis: ''
},
updateTime: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/v1/:name');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v1/:name',
headers: {'content-type': 'application/json'},
data: {
name: '',
repricingConfig: {
adjustment: {percentageAdjustment: {percentage: {value: ''}}},
channelPartnerGranularity: {},
conditionalOverrides: [
{
adjustment: {},
rebillingBasis: '',
repricingCondition: {skuGroupCondition: {skuGroup: ''}}
}
],
effectiveInvoiceMonth: {day: 0, month: 0, year: 0},
entitlementGranularity: {entitlement: ''},
rebillingBasis: ''
},
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"name":"","repricingConfig":{"adjustment":{"percentageAdjustment":{"percentage":{"value":""}}},"channelPartnerGranularity":{},"conditionalOverrides":[{"adjustment":{},"rebillingBasis":"","repricingCondition":{"skuGroupCondition":{"skuGroup":""}}}],"effectiveInvoiceMonth":{"day":0,"month":0,"year":0},"entitlementGranularity":{"entitlement":""},"rebillingBasis":""},"updateTime":""}'
};
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}}/v1/:name',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "name": "",\n "repricingConfig": {\n "adjustment": {\n "percentageAdjustment": {\n "percentage": {\n "value": ""\n }\n }\n },\n "channelPartnerGranularity": {},\n "conditionalOverrides": [\n {\n "adjustment": {},\n "rebillingBasis": "",\n "repricingCondition": {\n "skuGroupCondition": {\n "skuGroup": ""\n }\n }\n }\n ],\n "effectiveInvoiceMonth": {\n "day": 0,\n "month": 0,\n "year": 0\n },\n "entitlementGranularity": {\n "entitlement": ""\n },\n "rebillingBasis": ""\n },\n "updateTime": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name',
headers: {
'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({
name: '',
repricingConfig: {
adjustment: {percentageAdjustment: {percentage: {value: ''}}},
channelPartnerGranularity: {},
conditionalOverrides: [
{
adjustment: {},
rebillingBasis: '',
repricingCondition: {skuGroupCondition: {skuGroup: ''}}
}
],
effectiveInvoiceMonth: {day: 0, month: 0, year: 0},
entitlementGranularity: {entitlement: ''},
rebillingBasis: ''
},
updateTime: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v1/:name',
headers: {'content-type': 'application/json'},
body: {
name: '',
repricingConfig: {
adjustment: {percentageAdjustment: {percentage: {value: ''}}},
channelPartnerGranularity: {},
conditionalOverrides: [
{
adjustment: {},
rebillingBasis: '',
repricingCondition: {skuGroupCondition: {skuGroup: ''}}
}
],
effectiveInvoiceMonth: {day: 0, month: 0, year: 0},
entitlementGranularity: {entitlement: ''},
rebillingBasis: ''
},
updateTime: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/v1/:name');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
name: '',
repricingConfig: {
adjustment: {
percentageAdjustment: {
percentage: {
value: ''
}
}
},
channelPartnerGranularity: {},
conditionalOverrides: [
{
adjustment: {},
rebillingBasis: '',
repricingCondition: {
skuGroupCondition: {
skuGroup: ''
}
}
}
],
effectiveInvoiceMonth: {
day: 0,
month: 0,
year: 0
},
entitlementGranularity: {
entitlement: ''
},
rebillingBasis: ''
},
updateTime: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v1/:name',
headers: {'content-type': 'application/json'},
data: {
name: '',
repricingConfig: {
adjustment: {percentageAdjustment: {percentage: {value: ''}}},
channelPartnerGranularity: {},
conditionalOverrides: [
{
adjustment: {},
rebillingBasis: '',
repricingCondition: {skuGroupCondition: {skuGroup: ''}}
}
],
effectiveInvoiceMonth: {day: 0, month: 0, year: 0},
entitlementGranularity: {entitlement: ''},
rebillingBasis: ''
},
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"name":"","repricingConfig":{"adjustment":{"percentageAdjustment":{"percentage":{"value":""}}},"channelPartnerGranularity":{},"conditionalOverrides":[{"adjustment":{},"rebillingBasis":"","repricingCondition":{"skuGroupCondition":{"skuGroup":""}}}],"effectiveInvoiceMonth":{"day":0,"month":0,"year":0},"entitlementGranularity":{"entitlement":""},"rebillingBasis":""},"updateTime":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"name": @"",
@"repricingConfig": @{ @"adjustment": @{ @"percentageAdjustment": @{ @"percentage": @{ @"value": @"" } } }, @"channelPartnerGranularity": @{ }, @"conditionalOverrides": @[ @{ @"adjustment": @{ }, @"rebillingBasis": @"", @"repricingCondition": @{ @"skuGroupCondition": @{ @"skuGroup": @"" } } } ], @"effectiveInvoiceMonth": @{ @"day": @0, @"month": @0, @"year": @0 }, @"entitlementGranularity": @{ @"entitlement": @"" }, @"rebillingBasis": @"" },
@"updateTime": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '',
'repricingConfig' => [
'adjustment' => [
'percentageAdjustment' => [
'percentage' => [
'value' => ''
]
]
],
'channelPartnerGranularity' => [
],
'conditionalOverrides' => [
[
'adjustment' => [
],
'rebillingBasis' => '',
'repricingCondition' => [
'skuGroupCondition' => [
'skuGroup' => ''
]
]
]
],
'effectiveInvoiceMonth' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'entitlementGranularity' => [
'entitlement' => ''
],
'rebillingBasis' => ''
],
'updateTime' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/v1/:name', [
'body' => '{
"name": "",
"repricingConfig": {
"adjustment": {
"percentageAdjustment": {
"percentage": {
"value": ""
}
}
},
"channelPartnerGranularity": {},
"conditionalOverrides": [
{
"adjustment": {},
"rebillingBasis": "",
"repricingCondition": {
"skuGroupCondition": {
"skuGroup": ""
}
}
}
],
"effectiveInvoiceMonth": {
"day": 0,
"month": 0,
"year": 0
},
"entitlementGranularity": {
"entitlement": ""
},
"rebillingBasis": ""
},
"updateTime": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'name' => '',
'repricingConfig' => [
'adjustment' => [
'percentageAdjustment' => [
'percentage' => [
'value' => ''
]
]
],
'channelPartnerGranularity' => [
],
'conditionalOverrides' => [
[
'adjustment' => [
],
'rebillingBasis' => '',
'repricingCondition' => [
'skuGroupCondition' => [
'skuGroup' => ''
]
]
]
],
'effectiveInvoiceMonth' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'entitlementGranularity' => [
'entitlement' => ''
],
'rebillingBasis' => ''
],
'updateTime' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'name' => '',
'repricingConfig' => [
'adjustment' => [
'percentageAdjustment' => [
'percentage' => [
'value' => ''
]
]
],
'channelPartnerGranularity' => [
],
'conditionalOverrides' => [
[
'adjustment' => [
],
'rebillingBasis' => '',
'repricingCondition' => [
'skuGroupCondition' => [
'skuGroup' => ''
]
]
]
],
'effectiveInvoiceMonth' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'entitlementGranularity' => [
'entitlement' => ''
],
'rebillingBasis' => ''
],
'updateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"repricingConfig": {
"adjustment": {
"percentageAdjustment": {
"percentage": {
"value": ""
}
}
},
"channelPartnerGranularity": {},
"conditionalOverrides": [
{
"adjustment": {},
"rebillingBasis": "",
"repricingCondition": {
"skuGroupCondition": {
"skuGroup": ""
}
}
}
],
"effectiveInvoiceMonth": {
"day": 0,
"month": 0,
"year": 0
},
"entitlementGranularity": {
"entitlement": ""
},
"rebillingBasis": ""
},
"updateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"repricingConfig": {
"adjustment": {
"percentageAdjustment": {
"percentage": {
"value": ""
}
}
},
"channelPartnerGranularity": {},
"conditionalOverrides": [
{
"adjustment": {},
"rebillingBasis": "",
"repricingCondition": {
"skuGroupCondition": {
"skuGroup": ""
}
}
}
],
"effectiveInvoiceMonth": {
"day": 0,
"month": 0,
"year": 0
},
"entitlementGranularity": {
"entitlement": ""
},
"rebillingBasis": ""
},
"updateTime": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/v1/:name", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name"
payload = {
"name": "",
"repricingConfig": {
"adjustment": { "percentageAdjustment": { "percentage": { "value": "" } } },
"channelPartnerGranularity": {},
"conditionalOverrides": [
{
"adjustment": {},
"rebillingBasis": "",
"repricingCondition": { "skuGroupCondition": { "skuGroup": "" } }
}
],
"effectiveInvoiceMonth": {
"day": 0,
"month": 0,
"year": 0
},
"entitlementGranularity": { "entitlement": "" },
"rebillingBasis": ""
},
"updateTime": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name"
payload <- "{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/v1/:name') do |req|
req.body = "{\n \"name\": \"\",\n \"repricingConfig\": {\n \"adjustment\": {\n \"percentageAdjustment\": {\n \"percentage\": {\n \"value\": \"\"\n }\n }\n },\n \"channelPartnerGranularity\": {},\n \"conditionalOverrides\": [\n {\n \"adjustment\": {},\n \"rebillingBasis\": \"\",\n \"repricingCondition\": {\n \"skuGroupCondition\": {\n \"skuGroup\": \"\"\n }\n }\n }\n ],\n \"effectiveInvoiceMonth\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"entitlementGranularity\": {\n \"entitlement\": \"\"\n },\n \"rebillingBasis\": \"\"\n },\n \"updateTime\": \"\"\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}}/v1/:name";
let payload = json!({
"name": "",
"repricingConfig": json!({
"adjustment": json!({"percentageAdjustment": json!({"percentage": json!({"value": ""})})}),
"channelPartnerGranularity": json!({}),
"conditionalOverrides": (
json!({
"adjustment": json!({}),
"rebillingBasis": "",
"repricingCondition": json!({"skuGroupCondition": json!({"skuGroup": ""})})
})
),
"effectiveInvoiceMonth": json!({
"day": 0,
"month": 0,
"year": 0
}),
"entitlementGranularity": json!({"entitlement": ""}),
"rebillingBasis": ""
}),
"updateTime": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/v1/:name \
--header 'content-type: application/json' \
--data '{
"name": "",
"repricingConfig": {
"adjustment": {
"percentageAdjustment": {
"percentage": {
"value": ""
}
}
},
"channelPartnerGranularity": {},
"conditionalOverrides": [
{
"adjustment": {},
"rebillingBasis": "",
"repricingCondition": {
"skuGroupCondition": {
"skuGroup": ""
}
}
}
],
"effectiveInvoiceMonth": {
"day": 0,
"month": 0,
"year": 0
},
"entitlementGranularity": {
"entitlement": ""
},
"rebillingBasis": ""
},
"updateTime": ""
}'
echo '{
"name": "",
"repricingConfig": {
"adjustment": {
"percentageAdjustment": {
"percentage": {
"value": ""
}
}
},
"channelPartnerGranularity": {},
"conditionalOverrides": [
{
"adjustment": {},
"rebillingBasis": "",
"repricingCondition": {
"skuGroupCondition": {
"skuGroup": ""
}
}
}
],
"effectiveInvoiceMonth": {
"day": 0,
"month": 0,
"year": 0
},
"entitlementGranularity": {
"entitlement": ""
},
"rebillingBasis": ""
},
"updateTime": ""
}' | \
http PATCH {{baseUrl}}/v1/:name \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "name": "",\n "repricingConfig": {\n "adjustment": {\n "percentageAdjustment": {\n "percentage": {\n "value": ""\n }\n }\n },\n "channelPartnerGranularity": {},\n "conditionalOverrides": [\n {\n "adjustment": {},\n "rebillingBasis": "",\n "repricingCondition": {\n "skuGroupCondition": {\n "skuGroup": ""\n }\n }\n }\n ],\n "effectiveInvoiceMonth": {\n "day": 0,\n "month": 0,\n "year": 0\n },\n "entitlementGranularity": {\n "entitlement": ""\n },\n "rebillingBasis": ""\n },\n "updateTime": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:name
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"name": "",
"repricingConfig": [
"adjustment": ["percentageAdjustment": ["percentage": ["value": ""]]],
"channelPartnerGranularity": [],
"conditionalOverrides": [
[
"adjustment": [],
"rebillingBasis": "",
"repricingCondition": ["skuGroupCondition": ["skuGroup": ""]]
]
],
"effectiveInvoiceMonth": [
"day": 0,
"month": 0,
"year": 0
],
"entitlementGranularity": ["entitlement": ""],
"rebillingBasis": ""
],
"updateTime": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
cloudchannel.accounts.customers.entitlements.activate
{{baseUrl}}/v1/:name:activate
QUERY PARAMS
name
BODY json
{
"requestId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name:activate");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"requestId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:name:activate" {:content-type :json
:form-params {:requestId ""}})
require "http/client"
url = "{{baseUrl}}/v1/:name:activate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"requestId\": \"\"\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}}/v1/:name:activate"),
Content = new StringContent("{\n \"requestId\": \"\"\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}}/v1/:name:activate");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"requestId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name:activate"
payload := strings.NewReader("{\n \"requestId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v1/:name:activate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 21
{
"requestId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:name:activate")
.setHeader("content-type", "application/json")
.setBody("{\n \"requestId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name:activate"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"requestId\": \"\"\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 \"requestId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name:activate")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:name:activate")
.header("content-type", "application/json")
.body("{\n \"requestId\": \"\"\n}")
.asString();
const data = JSON.stringify({
requestId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:name:activate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:activate',
headers: {'content-type': 'application/json'},
data: {requestId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name:activate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"requestId":""}'
};
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}}/v1/:name:activate',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "requestId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"requestId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name:activate")
.post(body)
.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/v1/:name:activate',
headers: {
'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({requestId: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:activate',
headers: {'content-type': 'application/json'},
body: {requestId: ''},
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}}/v1/:name:activate');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
requestId: ''
});
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}}/v1/:name:activate',
headers: {'content-type': 'application/json'},
data: {requestId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name:activate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"requestId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"requestId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name:activate"]
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}}/v1/:name:activate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"requestId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name:activate",
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([
'requestId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:name:activate', [
'body' => '{
"requestId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name:activate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'requestId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'requestId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name:activate');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name:activate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"requestId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name:activate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"requestId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"requestId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:name:activate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name:activate"
payload = { "requestId": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name:activate"
payload <- "{\n \"requestId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name:activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"requestId\": \"\"\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/v1/:name:activate') do |req|
req.body = "{\n \"requestId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name:activate";
let payload = json!({"requestId": ""});
let mut headers = reqwest::header::HeaderMap::new();
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}}/v1/:name:activate \
--header 'content-type: application/json' \
--data '{
"requestId": ""
}'
echo '{
"requestId": ""
}' | \
http POST {{baseUrl}}/v1/:name:activate \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "requestId": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:name:activate
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["requestId": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name:activate")! 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()
POST
cloudchannel.accounts.customers.entitlements.changeOffer
{{baseUrl}}/v1/:name:changeOffer
QUERY PARAMS
name
BODY json
{
"offer": "",
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"purchaseOrderId": "",
"requestId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name:changeOffer");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:name:changeOffer" {:content-type :json
:form-params {:offer ""
:parameters [{:editable false
:name ""
:value {:boolValue false
:doubleValue ""
:int64Value ""
:protoValue {}
:stringValue ""}}]
:purchaseOrderId ""
:requestId ""}})
require "http/client"
url = "{{baseUrl}}/v1/:name:changeOffer"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\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}}/v1/:name:changeOffer"),
Content = new StringContent("{\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\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}}/v1/:name:changeOffer");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name:changeOffer"
payload := strings.NewReader("{\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v1/:name:changeOffer HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 297
{
"offer": "",
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"purchaseOrderId": "",
"requestId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:name:changeOffer")
.setHeader("content-type", "application/json")
.setBody("{\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name:changeOffer"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\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 \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name:changeOffer")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:name:changeOffer")
.header("content-type", "application/json")
.body("{\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\n}")
.asString();
const data = JSON.stringify({
offer: '',
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
purchaseOrderId: '',
requestId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:name:changeOffer');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:changeOffer',
headers: {'content-type': 'application/json'},
data: {
offer: '',
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
purchaseOrderId: '',
requestId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name:changeOffer';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"offer":"","parameters":[{"editable":false,"name":"","value":{"boolValue":false,"doubleValue":"","int64Value":"","protoValue":{},"stringValue":""}}],"purchaseOrderId":"","requestId":""}'
};
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}}/v1/:name:changeOffer',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "offer": "",\n "parameters": [\n {\n "editable": false,\n "name": "",\n "value": {\n "boolValue": false,\n "doubleValue": "",\n "int64Value": "",\n "protoValue": {},\n "stringValue": ""\n }\n }\n ],\n "purchaseOrderId": "",\n "requestId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name:changeOffer")
.post(body)
.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/v1/:name:changeOffer',
headers: {
'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({
offer: '',
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
purchaseOrderId: '',
requestId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:changeOffer',
headers: {'content-type': 'application/json'},
body: {
offer: '',
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
purchaseOrderId: '',
requestId: ''
},
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}}/v1/:name:changeOffer');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
offer: '',
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
purchaseOrderId: '',
requestId: ''
});
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}}/v1/:name:changeOffer',
headers: {'content-type': 'application/json'},
data: {
offer: '',
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
purchaseOrderId: '',
requestId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name:changeOffer';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"offer":"","parameters":[{"editable":false,"name":"","value":{"boolValue":false,"doubleValue":"","int64Value":"","protoValue":{},"stringValue":""}}],"purchaseOrderId":"","requestId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"offer": @"",
@"parameters": @[ @{ @"editable": @NO, @"name": @"", @"value": @{ @"boolValue": @NO, @"doubleValue": @"", @"int64Value": @"", @"protoValue": @{ }, @"stringValue": @"" } } ],
@"purchaseOrderId": @"",
@"requestId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name:changeOffer"]
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}}/v1/:name:changeOffer" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name:changeOffer",
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([
'offer' => '',
'parameters' => [
[
'editable' => null,
'name' => '',
'value' => [
'boolValue' => null,
'doubleValue' => '',
'int64Value' => '',
'protoValue' => [
],
'stringValue' => ''
]
]
],
'purchaseOrderId' => '',
'requestId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:name:changeOffer', [
'body' => '{
"offer": "",
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"purchaseOrderId": "",
"requestId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name:changeOffer');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'offer' => '',
'parameters' => [
[
'editable' => null,
'name' => '',
'value' => [
'boolValue' => null,
'doubleValue' => '',
'int64Value' => '',
'protoValue' => [
],
'stringValue' => ''
]
]
],
'purchaseOrderId' => '',
'requestId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'offer' => '',
'parameters' => [
[
'editable' => null,
'name' => '',
'value' => [
'boolValue' => null,
'doubleValue' => '',
'int64Value' => '',
'protoValue' => [
],
'stringValue' => ''
]
]
],
'purchaseOrderId' => '',
'requestId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name:changeOffer');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name:changeOffer' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"offer": "",
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"purchaseOrderId": "",
"requestId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name:changeOffer' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"offer": "",
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"purchaseOrderId": "",
"requestId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:name:changeOffer", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name:changeOffer"
payload = {
"offer": "",
"parameters": [
{
"editable": False,
"name": "",
"value": {
"boolValue": False,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"purchaseOrderId": "",
"requestId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name:changeOffer"
payload <- "{\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name:changeOffer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\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/v1/:name:changeOffer') do |req|
req.body = "{\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name:changeOffer";
let payload = json!({
"offer": "",
"parameters": (
json!({
"editable": false,
"name": "",
"value": json!({
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": json!({}),
"stringValue": ""
})
})
),
"purchaseOrderId": "",
"requestId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
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}}/v1/:name:changeOffer \
--header 'content-type: application/json' \
--data '{
"offer": "",
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"purchaseOrderId": "",
"requestId": ""
}'
echo '{
"offer": "",
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"purchaseOrderId": "",
"requestId": ""
}' | \
http POST {{baseUrl}}/v1/:name:changeOffer \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "offer": "",\n "parameters": [\n {\n "editable": false,\n "name": "",\n "value": {\n "boolValue": false,\n "doubleValue": "",\n "int64Value": "",\n "protoValue": {},\n "stringValue": ""\n }\n }\n ],\n "purchaseOrderId": "",\n "requestId": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:name:changeOffer
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"offer": "",
"parameters": [
[
"editable": false,
"name": "",
"value": [
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": [],
"stringValue": ""
]
]
],
"purchaseOrderId": "",
"requestId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name:changeOffer")! 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()
POST
cloudchannel.accounts.customers.entitlements.changeParameters
{{baseUrl}}/v1/:name:changeParameters
QUERY PARAMS
name
BODY json
{
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"purchaseOrderId": "",
"requestId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name:changeParameters");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:name:changeParameters" {:content-type :json
:form-params {:parameters [{:editable false
:name ""
:value {:boolValue false
:doubleValue ""
:int64Value ""
:protoValue {}
:stringValue ""}}]
:purchaseOrderId ""
:requestId ""}})
require "http/client"
url = "{{baseUrl}}/v1/:name:changeParameters"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\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}}/v1/:name:changeParameters"),
Content = new StringContent("{\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\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}}/v1/:name:changeParameters");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name:changeParameters"
payload := strings.NewReader("{\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v1/:name:changeParameters HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 282
{
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"purchaseOrderId": "",
"requestId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:name:changeParameters")
.setHeader("content-type", "application/json")
.setBody("{\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name:changeParameters"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\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 \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name:changeParameters")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:name:changeParameters")
.header("content-type", "application/json")
.body("{\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\n}")
.asString();
const data = JSON.stringify({
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
purchaseOrderId: '',
requestId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:name:changeParameters');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:changeParameters',
headers: {'content-type': 'application/json'},
data: {
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
purchaseOrderId: '',
requestId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name:changeParameters';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"parameters":[{"editable":false,"name":"","value":{"boolValue":false,"doubleValue":"","int64Value":"","protoValue":{},"stringValue":""}}],"purchaseOrderId":"","requestId":""}'
};
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}}/v1/:name:changeParameters',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "parameters": [\n {\n "editable": false,\n "name": "",\n "value": {\n "boolValue": false,\n "doubleValue": "",\n "int64Value": "",\n "protoValue": {},\n "stringValue": ""\n }\n }\n ],\n "purchaseOrderId": "",\n "requestId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name:changeParameters")
.post(body)
.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/v1/:name:changeParameters',
headers: {
'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({
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
purchaseOrderId: '',
requestId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:changeParameters',
headers: {'content-type': 'application/json'},
body: {
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
purchaseOrderId: '',
requestId: ''
},
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}}/v1/:name:changeParameters');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
purchaseOrderId: '',
requestId: ''
});
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}}/v1/:name:changeParameters',
headers: {'content-type': 'application/json'},
data: {
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
purchaseOrderId: '',
requestId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name:changeParameters';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"parameters":[{"editable":false,"name":"","value":{"boolValue":false,"doubleValue":"","int64Value":"","protoValue":{},"stringValue":""}}],"purchaseOrderId":"","requestId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"parameters": @[ @{ @"editable": @NO, @"name": @"", @"value": @{ @"boolValue": @NO, @"doubleValue": @"", @"int64Value": @"", @"protoValue": @{ }, @"stringValue": @"" } } ],
@"purchaseOrderId": @"",
@"requestId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name:changeParameters"]
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}}/v1/:name:changeParameters" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name:changeParameters",
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([
'parameters' => [
[
'editable' => null,
'name' => '',
'value' => [
'boolValue' => null,
'doubleValue' => '',
'int64Value' => '',
'protoValue' => [
],
'stringValue' => ''
]
]
],
'purchaseOrderId' => '',
'requestId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:name:changeParameters', [
'body' => '{
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"purchaseOrderId": "",
"requestId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name:changeParameters');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'parameters' => [
[
'editable' => null,
'name' => '',
'value' => [
'boolValue' => null,
'doubleValue' => '',
'int64Value' => '',
'protoValue' => [
],
'stringValue' => ''
]
]
],
'purchaseOrderId' => '',
'requestId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'parameters' => [
[
'editable' => null,
'name' => '',
'value' => [
'boolValue' => null,
'doubleValue' => '',
'int64Value' => '',
'protoValue' => [
],
'stringValue' => ''
]
]
],
'purchaseOrderId' => '',
'requestId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name:changeParameters');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name:changeParameters' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"purchaseOrderId": "",
"requestId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name:changeParameters' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"purchaseOrderId": "",
"requestId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:name:changeParameters", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name:changeParameters"
payload = {
"parameters": [
{
"editable": False,
"name": "",
"value": {
"boolValue": False,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"purchaseOrderId": "",
"requestId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name:changeParameters"
payload <- "{\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name:changeParameters")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\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/v1/:name:changeParameters') do |req|
req.body = "{\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"purchaseOrderId\": \"\",\n \"requestId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name:changeParameters";
let payload = json!({
"parameters": (
json!({
"editable": false,
"name": "",
"value": json!({
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": json!({}),
"stringValue": ""
})
})
),
"purchaseOrderId": "",
"requestId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
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}}/v1/:name:changeParameters \
--header 'content-type: application/json' \
--data '{
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"purchaseOrderId": "",
"requestId": ""
}'
echo '{
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"purchaseOrderId": "",
"requestId": ""
}' | \
http POST {{baseUrl}}/v1/:name:changeParameters \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "parameters": [\n {\n "editable": false,\n "name": "",\n "value": {\n "boolValue": false,\n "doubleValue": "",\n "int64Value": "",\n "protoValue": {},\n "stringValue": ""\n }\n }\n ],\n "purchaseOrderId": "",\n "requestId": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:name:changeParameters
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"parameters": [
[
"editable": false,
"name": "",
"value": [
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": [],
"stringValue": ""
]
]
],
"purchaseOrderId": "",
"requestId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name:changeParameters")! 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()
POST
cloudchannel.accounts.customers.entitlements.changeRenewalSettings
{{baseUrl}}/v1/:name:changeRenewalSettings
QUERY PARAMS
name
BODY json
{
"renewalSettings": {
"enableRenewal": false,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": false
},
"requestId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name:changeRenewalSettings");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"requestId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:name:changeRenewalSettings" {:content-type :json
:form-params {:renewalSettings {:enableRenewal false
:paymentCycle {:duration 0
:periodType ""}
:paymentPlan ""
:resizeUnitCount false}
:requestId ""}})
require "http/client"
url = "{{baseUrl}}/v1/:name:changeRenewalSettings"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"requestId\": \"\"\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}}/v1/:name:changeRenewalSettings"),
Content = new StringContent("{\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"requestId\": \"\"\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}}/v1/:name:changeRenewalSettings");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"requestId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name:changeRenewalSettings"
payload := strings.NewReader("{\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"requestId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v1/:name:changeRenewalSettings HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 202
{
"renewalSettings": {
"enableRenewal": false,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": false
},
"requestId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:name:changeRenewalSettings")
.setHeader("content-type", "application/json")
.setBody("{\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"requestId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name:changeRenewalSettings"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"requestId\": \"\"\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 \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"requestId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name:changeRenewalSettings")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:name:changeRenewalSettings")
.header("content-type", "application/json")
.body("{\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"requestId\": \"\"\n}")
.asString();
const data = JSON.stringify({
renewalSettings: {
enableRenewal: false,
paymentCycle: {
duration: 0,
periodType: ''
},
paymentPlan: '',
resizeUnitCount: false
},
requestId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:name:changeRenewalSettings');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:changeRenewalSettings',
headers: {'content-type': 'application/json'},
data: {
renewalSettings: {
enableRenewal: false,
paymentCycle: {duration: 0, periodType: ''},
paymentPlan: '',
resizeUnitCount: false
},
requestId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name:changeRenewalSettings';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"renewalSettings":{"enableRenewal":false,"paymentCycle":{"duration":0,"periodType":""},"paymentPlan":"","resizeUnitCount":false},"requestId":""}'
};
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}}/v1/:name:changeRenewalSettings',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "renewalSettings": {\n "enableRenewal": false,\n "paymentCycle": {\n "duration": 0,\n "periodType": ""\n },\n "paymentPlan": "",\n "resizeUnitCount": false\n },\n "requestId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"requestId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name:changeRenewalSettings")
.post(body)
.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/v1/:name:changeRenewalSettings',
headers: {
'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({
renewalSettings: {
enableRenewal: false,
paymentCycle: {duration: 0, periodType: ''},
paymentPlan: '',
resizeUnitCount: false
},
requestId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:changeRenewalSettings',
headers: {'content-type': 'application/json'},
body: {
renewalSettings: {
enableRenewal: false,
paymentCycle: {duration: 0, periodType: ''},
paymentPlan: '',
resizeUnitCount: false
},
requestId: ''
},
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}}/v1/:name:changeRenewalSettings');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
renewalSettings: {
enableRenewal: false,
paymentCycle: {
duration: 0,
periodType: ''
},
paymentPlan: '',
resizeUnitCount: false
},
requestId: ''
});
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}}/v1/:name:changeRenewalSettings',
headers: {'content-type': 'application/json'},
data: {
renewalSettings: {
enableRenewal: false,
paymentCycle: {duration: 0, periodType: ''},
paymentPlan: '',
resizeUnitCount: false
},
requestId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name:changeRenewalSettings';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"renewalSettings":{"enableRenewal":false,"paymentCycle":{"duration":0,"periodType":""},"paymentPlan":"","resizeUnitCount":false},"requestId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"renewalSettings": @{ @"enableRenewal": @NO, @"paymentCycle": @{ @"duration": @0, @"periodType": @"" }, @"paymentPlan": @"", @"resizeUnitCount": @NO },
@"requestId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name:changeRenewalSettings"]
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}}/v1/:name:changeRenewalSettings" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"requestId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name:changeRenewalSettings",
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([
'renewalSettings' => [
'enableRenewal' => null,
'paymentCycle' => [
'duration' => 0,
'periodType' => ''
],
'paymentPlan' => '',
'resizeUnitCount' => null
],
'requestId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:name:changeRenewalSettings', [
'body' => '{
"renewalSettings": {
"enableRenewal": false,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": false
},
"requestId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name:changeRenewalSettings');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'renewalSettings' => [
'enableRenewal' => null,
'paymentCycle' => [
'duration' => 0,
'periodType' => ''
],
'paymentPlan' => '',
'resizeUnitCount' => null
],
'requestId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'renewalSettings' => [
'enableRenewal' => null,
'paymentCycle' => [
'duration' => 0,
'periodType' => ''
],
'paymentPlan' => '',
'resizeUnitCount' => null
],
'requestId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name:changeRenewalSettings');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name:changeRenewalSettings' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"renewalSettings": {
"enableRenewal": false,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": false
},
"requestId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name:changeRenewalSettings' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"renewalSettings": {
"enableRenewal": false,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": false
},
"requestId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"requestId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:name:changeRenewalSettings", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name:changeRenewalSettings"
payload = {
"renewalSettings": {
"enableRenewal": False,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": False
},
"requestId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name:changeRenewalSettings"
payload <- "{\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"requestId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name:changeRenewalSettings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"requestId\": \"\"\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/v1/:name:changeRenewalSettings') do |req|
req.body = "{\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"requestId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name:changeRenewalSettings";
let payload = json!({
"renewalSettings": json!({
"enableRenewal": false,
"paymentCycle": json!({
"duration": 0,
"periodType": ""
}),
"paymentPlan": "",
"resizeUnitCount": false
}),
"requestId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
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}}/v1/:name:changeRenewalSettings \
--header 'content-type: application/json' \
--data '{
"renewalSettings": {
"enableRenewal": false,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": false
},
"requestId": ""
}'
echo '{
"renewalSettings": {
"enableRenewal": false,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": false
},
"requestId": ""
}' | \
http POST {{baseUrl}}/v1/:name:changeRenewalSettings \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "renewalSettings": {\n "enableRenewal": false,\n "paymentCycle": {\n "duration": 0,\n "periodType": ""\n },\n "paymentPlan": "",\n "resizeUnitCount": false\n },\n "requestId": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:name:changeRenewalSettings
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"renewalSettings": [
"enableRenewal": false,
"paymentCycle": [
"duration": 0,
"periodType": ""
],
"paymentPlan": "",
"resizeUnitCount": false
],
"requestId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name:changeRenewalSettings")! 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()
POST
cloudchannel.accounts.customers.entitlements.create
{{baseUrl}}/v1/:parent/entitlements
QUERY PARAMS
parent
BODY json
{
"entitlement": {
"associationInfo": {
"baseEntitlement": ""
},
"commitmentSettings": {
"endTime": "",
"renewalSettings": {
"enableRenewal": false,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": false
},
"startTime": ""
},
"createTime": "",
"name": "",
"offer": "",
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"provisionedService": {
"productId": "",
"provisioningId": "",
"skuId": ""
},
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": [],
"trialSettings": {
"endTime": "",
"trial": false
},
"updateTime": ""
},
"requestId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/entitlements");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"entitlement\": {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n },\n \"requestId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent/entitlements" {:content-type :json
:form-params {:entitlement {:associationInfo {:baseEntitlement ""}
:commitmentSettings {:endTime ""
:renewalSettings {:enableRenewal false
:paymentCycle {:duration 0
:periodType ""}
:paymentPlan ""
:resizeUnitCount false}
:startTime ""}
:createTime ""
:name ""
:offer ""
:parameters [{:editable false
:name ""
:value {:boolValue false
:doubleValue ""
:int64Value ""
:protoValue {}
:stringValue ""}}]
:provisionedService {:productId ""
:provisioningId ""
:skuId ""}
:provisioningState ""
:purchaseOrderId ""
:suspensionReasons []
:trialSettings {:endTime ""
:trial false}
:updateTime ""}
:requestId ""}})
require "http/client"
url = "{{baseUrl}}/v1/:parent/entitlements"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"entitlement\": {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n },\n \"requestId\": \"\"\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}}/v1/:parent/entitlements"),
Content = new StringContent("{\n \"entitlement\": {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n },\n \"requestId\": \"\"\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}}/v1/:parent/entitlements");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"entitlement\": {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n },\n \"requestId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/entitlements"
payload := strings.NewReader("{\n \"entitlement\": {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n },\n \"requestId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v1/:parent/entitlements HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 999
{
"entitlement": {
"associationInfo": {
"baseEntitlement": ""
},
"commitmentSettings": {
"endTime": "",
"renewalSettings": {
"enableRenewal": false,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": false
},
"startTime": ""
},
"createTime": "",
"name": "",
"offer": "",
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"provisionedService": {
"productId": "",
"provisioningId": "",
"skuId": ""
},
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": [],
"trialSettings": {
"endTime": "",
"trial": false
},
"updateTime": ""
},
"requestId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/entitlements")
.setHeader("content-type", "application/json")
.setBody("{\n \"entitlement\": {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n },\n \"requestId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/entitlements"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"entitlement\": {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n },\n \"requestId\": \"\"\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 \"entitlement\": {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n },\n \"requestId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/entitlements")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/entitlements")
.header("content-type", "application/json")
.body("{\n \"entitlement\": {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n },\n \"requestId\": \"\"\n}")
.asString();
const data = JSON.stringify({
entitlement: {
associationInfo: {
baseEntitlement: ''
},
commitmentSettings: {
endTime: '',
renewalSettings: {
enableRenewal: false,
paymentCycle: {
duration: 0,
periodType: ''
},
paymentPlan: '',
resizeUnitCount: false
},
startTime: ''
},
createTime: '',
name: '',
offer: '',
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
provisionedService: {
productId: '',
provisioningId: '',
skuId: ''
},
provisioningState: '',
purchaseOrderId: '',
suspensionReasons: [],
trialSettings: {
endTime: '',
trial: false
},
updateTime: ''
},
requestId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:parent/entitlements');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/entitlements',
headers: {'content-type': 'application/json'},
data: {
entitlement: {
associationInfo: {baseEntitlement: ''},
commitmentSettings: {
endTime: '',
renewalSettings: {
enableRenewal: false,
paymentCycle: {duration: 0, periodType: ''},
paymentPlan: '',
resizeUnitCount: false
},
startTime: ''
},
createTime: '',
name: '',
offer: '',
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
provisionedService: {productId: '', provisioningId: '', skuId: ''},
provisioningState: '',
purchaseOrderId: '',
suspensionReasons: [],
trialSettings: {endTime: '', trial: false},
updateTime: ''
},
requestId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/entitlements';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"entitlement":{"associationInfo":{"baseEntitlement":""},"commitmentSettings":{"endTime":"","renewalSettings":{"enableRenewal":false,"paymentCycle":{"duration":0,"periodType":""},"paymentPlan":"","resizeUnitCount":false},"startTime":""},"createTime":"","name":"","offer":"","parameters":[{"editable":false,"name":"","value":{"boolValue":false,"doubleValue":"","int64Value":"","protoValue":{},"stringValue":""}}],"provisionedService":{"productId":"","provisioningId":"","skuId":""},"provisioningState":"","purchaseOrderId":"","suspensionReasons":[],"trialSettings":{"endTime":"","trial":false},"updateTime":""},"requestId":""}'
};
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}}/v1/:parent/entitlements',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "entitlement": {\n "associationInfo": {\n "baseEntitlement": ""\n },\n "commitmentSettings": {\n "endTime": "",\n "renewalSettings": {\n "enableRenewal": false,\n "paymentCycle": {\n "duration": 0,\n "periodType": ""\n },\n "paymentPlan": "",\n "resizeUnitCount": false\n },\n "startTime": ""\n },\n "createTime": "",\n "name": "",\n "offer": "",\n "parameters": [\n {\n "editable": false,\n "name": "",\n "value": {\n "boolValue": false,\n "doubleValue": "",\n "int64Value": "",\n "protoValue": {},\n "stringValue": ""\n }\n }\n ],\n "provisionedService": {\n "productId": "",\n "provisioningId": "",\n "skuId": ""\n },\n "provisioningState": "",\n "purchaseOrderId": "",\n "suspensionReasons": [],\n "trialSettings": {\n "endTime": "",\n "trial": false\n },\n "updateTime": ""\n },\n "requestId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"entitlement\": {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n },\n \"requestId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/entitlements")
.post(body)
.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/v1/:parent/entitlements',
headers: {
'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({
entitlement: {
associationInfo: {baseEntitlement: ''},
commitmentSettings: {
endTime: '',
renewalSettings: {
enableRenewal: false,
paymentCycle: {duration: 0, periodType: ''},
paymentPlan: '',
resizeUnitCount: false
},
startTime: ''
},
createTime: '',
name: '',
offer: '',
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
provisionedService: {productId: '', provisioningId: '', skuId: ''},
provisioningState: '',
purchaseOrderId: '',
suspensionReasons: [],
trialSettings: {endTime: '', trial: false},
updateTime: ''
},
requestId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/entitlements',
headers: {'content-type': 'application/json'},
body: {
entitlement: {
associationInfo: {baseEntitlement: ''},
commitmentSettings: {
endTime: '',
renewalSettings: {
enableRenewal: false,
paymentCycle: {duration: 0, periodType: ''},
paymentPlan: '',
resizeUnitCount: false
},
startTime: ''
},
createTime: '',
name: '',
offer: '',
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
provisionedService: {productId: '', provisioningId: '', skuId: ''},
provisioningState: '',
purchaseOrderId: '',
suspensionReasons: [],
trialSettings: {endTime: '', trial: false},
updateTime: ''
},
requestId: ''
},
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}}/v1/:parent/entitlements');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
entitlement: {
associationInfo: {
baseEntitlement: ''
},
commitmentSettings: {
endTime: '',
renewalSettings: {
enableRenewal: false,
paymentCycle: {
duration: 0,
periodType: ''
},
paymentPlan: '',
resizeUnitCount: false
},
startTime: ''
},
createTime: '',
name: '',
offer: '',
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
provisionedService: {
productId: '',
provisioningId: '',
skuId: ''
},
provisioningState: '',
purchaseOrderId: '',
suspensionReasons: [],
trialSettings: {
endTime: '',
trial: false
},
updateTime: ''
},
requestId: ''
});
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}}/v1/:parent/entitlements',
headers: {'content-type': 'application/json'},
data: {
entitlement: {
associationInfo: {baseEntitlement: ''},
commitmentSettings: {
endTime: '',
renewalSettings: {
enableRenewal: false,
paymentCycle: {duration: 0, periodType: ''},
paymentPlan: '',
resizeUnitCount: false
},
startTime: ''
},
createTime: '',
name: '',
offer: '',
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
provisionedService: {productId: '', provisioningId: '', skuId: ''},
provisioningState: '',
purchaseOrderId: '',
suspensionReasons: [],
trialSettings: {endTime: '', trial: false},
updateTime: ''
},
requestId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/entitlements';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"entitlement":{"associationInfo":{"baseEntitlement":""},"commitmentSettings":{"endTime":"","renewalSettings":{"enableRenewal":false,"paymentCycle":{"duration":0,"periodType":""},"paymentPlan":"","resizeUnitCount":false},"startTime":""},"createTime":"","name":"","offer":"","parameters":[{"editable":false,"name":"","value":{"boolValue":false,"doubleValue":"","int64Value":"","protoValue":{},"stringValue":""}}],"provisionedService":{"productId":"","provisioningId":"","skuId":""},"provisioningState":"","purchaseOrderId":"","suspensionReasons":[],"trialSettings":{"endTime":"","trial":false},"updateTime":""},"requestId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"entitlement": @{ @"associationInfo": @{ @"baseEntitlement": @"" }, @"commitmentSettings": @{ @"endTime": @"", @"renewalSettings": @{ @"enableRenewal": @NO, @"paymentCycle": @{ @"duration": @0, @"periodType": @"" }, @"paymentPlan": @"", @"resizeUnitCount": @NO }, @"startTime": @"" }, @"createTime": @"", @"name": @"", @"offer": @"", @"parameters": @[ @{ @"editable": @NO, @"name": @"", @"value": @{ @"boolValue": @NO, @"doubleValue": @"", @"int64Value": @"", @"protoValue": @{ }, @"stringValue": @"" } } ], @"provisionedService": @{ @"productId": @"", @"provisioningId": @"", @"skuId": @"" }, @"provisioningState": @"", @"purchaseOrderId": @"", @"suspensionReasons": @[ ], @"trialSettings": @{ @"endTime": @"", @"trial": @NO }, @"updateTime": @"" },
@"requestId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/entitlements"]
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}}/v1/:parent/entitlements" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"entitlement\": {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n },\n \"requestId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/entitlements",
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([
'entitlement' => [
'associationInfo' => [
'baseEntitlement' => ''
],
'commitmentSettings' => [
'endTime' => '',
'renewalSettings' => [
'enableRenewal' => null,
'paymentCycle' => [
'duration' => 0,
'periodType' => ''
],
'paymentPlan' => '',
'resizeUnitCount' => null
],
'startTime' => ''
],
'createTime' => '',
'name' => '',
'offer' => '',
'parameters' => [
[
'editable' => null,
'name' => '',
'value' => [
'boolValue' => null,
'doubleValue' => '',
'int64Value' => '',
'protoValue' => [
],
'stringValue' => ''
]
]
],
'provisionedService' => [
'productId' => '',
'provisioningId' => '',
'skuId' => ''
],
'provisioningState' => '',
'purchaseOrderId' => '',
'suspensionReasons' => [
],
'trialSettings' => [
'endTime' => '',
'trial' => null
],
'updateTime' => ''
],
'requestId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:parent/entitlements', [
'body' => '{
"entitlement": {
"associationInfo": {
"baseEntitlement": ""
},
"commitmentSettings": {
"endTime": "",
"renewalSettings": {
"enableRenewal": false,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": false
},
"startTime": ""
},
"createTime": "",
"name": "",
"offer": "",
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"provisionedService": {
"productId": "",
"provisioningId": "",
"skuId": ""
},
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": [],
"trialSettings": {
"endTime": "",
"trial": false
},
"updateTime": ""
},
"requestId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/entitlements');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'entitlement' => [
'associationInfo' => [
'baseEntitlement' => ''
],
'commitmentSettings' => [
'endTime' => '',
'renewalSettings' => [
'enableRenewal' => null,
'paymentCycle' => [
'duration' => 0,
'periodType' => ''
],
'paymentPlan' => '',
'resizeUnitCount' => null
],
'startTime' => ''
],
'createTime' => '',
'name' => '',
'offer' => '',
'parameters' => [
[
'editable' => null,
'name' => '',
'value' => [
'boolValue' => null,
'doubleValue' => '',
'int64Value' => '',
'protoValue' => [
],
'stringValue' => ''
]
]
],
'provisionedService' => [
'productId' => '',
'provisioningId' => '',
'skuId' => ''
],
'provisioningState' => '',
'purchaseOrderId' => '',
'suspensionReasons' => [
],
'trialSettings' => [
'endTime' => '',
'trial' => null
],
'updateTime' => ''
],
'requestId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'entitlement' => [
'associationInfo' => [
'baseEntitlement' => ''
],
'commitmentSettings' => [
'endTime' => '',
'renewalSettings' => [
'enableRenewal' => null,
'paymentCycle' => [
'duration' => 0,
'periodType' => ''
],
'paymentPlan' => '',
'resizeUnitCount' => null
],
'startTime' => ''
],
'createTime' => '',
'name' => '',
'offer' => '',
'parameters' => [
[
'editable' => null,
'name' => '',
'value' => [
'boolValue' => null,
'doubleValue' => '',
'int64Value' => '',
'protoValue' => [
],
'stringValue' => ''
]
]
],
'provisionedService' => [
'productId' => '',
'provisioningId' => '',
'skuId' => ''
],
'provisioningState' => '',
'purchaseOrderId' => '',
'suspensionReasons' => [
],
'trialSettings' => [
'endTime' => '',
'trial' => null
],
'updateTime' => ''
],
'requestId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/entitlements');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/entitlements' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"entitlement": {
"associationInfo": {
"baseEntitlement": ""
},
"commitmentSettings": {
"endTime": "",
"renewalSettings": {
"enableRenewal": false,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": false
},
"startTime": ""
},
"createTime": "",
"name": "",
"offer": "",
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"provisionedService": {
"productId": "",
"provisioningId": "",
"skuId": ""
},
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": [],
"trialSettings": {
"endTime": "",
"trial": false
},
"updateTime": ""
},
"requestId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/entitlements' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"entitlement": {
"associationInfo": {
"baseEntitlement": ""
},
"commitmentSettings": {
"endTime": "",
"renewalSettings": {
"enableRenewal": false,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": false
},
"startTime": ""
},
"createTime": "",
"name": "",
"offer": "",
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"provisionedService": {
"productId": "",
"provisioningId": "",
"skuId": ""
},
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": [],
"trialSettings": {
"endTime": "",
"trial": false
},
"updateTime": ""
},
"requestId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"entitlement\": {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n },\n \"requestId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent/entitlements", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/entitlements"
payload = {
"entitlement": {
"associationInfo": { "baseEntitlement": "" },
"commitmentSettings": {
"endTime": "",
"renewalSettings": {
"enableRenewal": False,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": False
},
"startTime": ""
},
"createTime": "",
"name": "",
"offer": "",
"parameters": [
{
"editable": False,
"name": "",
"value": {
"boolValue": False,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"provisionedService": {
"productId": "",
"provisioningId": "",
"skuId": ""
},
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": [],
"trialSettings": {
"endTime": "",
"trial": False
},
"updateTime": ""
},
"requestId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/entitlements"
payload <- "{\n \"entitlement\": {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n },\n \"requestId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/entitlements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"entitlement\": {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n },\n \"requestId\": \"\"\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/v1/:parent/entitlements') do |req|
req.body = "{\n \"entitlement\": {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n },\n \"requestId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/entitlements";
let payload = json!({
"entitlement": json!({
"associationInfo": json!({"baseEntitlement": ""}),
"commitmentSettings": json!({
"endTime": "",
"renewalSettings": json!({
"enableRenewal": false,
"paymentCycle": json!({
"duration": 0,
"periodType": ""
}),
"paymentPlan": "",
"resizeUnitCount": false
}),
"startTime": ""
}),
"createTime": "",
"name": "",
"offer": "",
"parameters": (
json!({
"editable": false,
"name": "",
"value": json!({
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": json!({}),
"stringValue": ""
})
})
),
"provisionedService": json!({
"productId": "",
"provisioningId": "",
"skuId": ""
}),
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": (),
"trialSettings": json!({
"endTime": "",
"trial": false
}),
"updateTime": ""
}),
"requestId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
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}}/v1/:parent/entitlements \
--header 'content-type: application/json' \
--data '{
"entitlement": {
"associationInfo": {
"baseEntitlement": ""
},
"commitmentSettings": {
"endTime": "",
"renewalSettings": {
"enableRenewal": false,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": false
},
"startTime": ""
},
"createTime": "",
"name": "",
"offer": "",
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"provisionedService": {
"productId": "",
"provisioningId": "",
"skuId": ""
},
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": [],
"trialSettings": {
"endTime": "",
"trial": false
},
"updateTime": ""
},
"requestId": ""
}'
echo '{
"entitlement": {
"associationInfo": {
"baseEntitlement": ""
},
"commitmentSettings": {
"endTime": "",
"renewalSettings": {
"enableRenewal": false,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": false
},
"startTime": ""
},
"createTime": "",
"name": "",
"offer": "",
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"provisionedService": {
"productId": "",
"provisioningId": "",
"skuId": ""
},
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": [],
"trialSettings": {
"endTime": "",
"trial": false
},
"updateTime": ""
},
"requestId": ""
}' | \
http POST {{baseUrl}}/v1/:parent/entitlements \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "entitlement": {\n "associationInfo": {\n "baseEntitlement": ""\n },\n "commitmentSettings": {\n "endTime": "",\n "renewalSettings": {\n "enableRenewal": false,\n "paymentCycle": {\n "duration": 0,\n "periodType": ""\n },\n "paymentPlan": "",\n "resizeUnitCount": false\n },\n "startTime": ""\n },\n "createTime": "",\n "name": "",\n "offer": "",\n "parameters": [\n {\n "editable": false,\n "name": "",\n "value": {\n "boolValue": false,\n "doubleValue": "",\n "int64Value": "",\n "protoValue": {},\n "stringValue": ""\n }\n }\n ],\n "provisionedService": {\n "productId": "",\n "provisioningId": "",\n "skuId": ""\n },\n "provisioningState": "",\n "purchaseOrderId": "",\n "suspensionReasons": [],\n "trialSettings": {\n "endTime": "",\n "trial": false\n },\n "updateTime": ""\n },\n "requestId": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:parent/entitlements
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"entitlement": [
"associationInfo": ["baseEntitlement": ""],
"commitmentSettings": [
"endTime": "",
"renewalSettings": [
"enableRenewal": false,
"paymentCycle": [
"duration": 0,
"periodType": ""
],
"paymentPlan": "",
"resizeUnitCount": false
],
"startTime": ""
],
"createTime": "",
"name": "",
"offer": "",
"parameters": [
[
"editable": false,
"name": "",
"value": [
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": [],
"stringValue": ""
]
]
],
"provisionedService": [
"productId": "",
"provisioningId": "",
"skuId": ""
],
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": [],
"trialSettings": [
"endTime": "",
"trial": false
],
"updateTime": ""
],
"requestId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/entitlements")! 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
cloudchannel.accounts.customers.entitlements.list
{{baseUrl}}/v1/:parent/entitlements
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/entitlements");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/entitlements")
require "http/client"
url = "{{baseUrl}}/v1/:parent/entitlements"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/entitlements"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/entitlements");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/entitlements"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/entitlements HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/entitlements")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/entitlements"))
.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}}/v1/:parent/entitlements")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/entitlements")
.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}}/v1/:parent/entitlements');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/entitlements'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/entitlements';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/entitlements',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/entitlements")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/entitlements',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/entitlements'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/entitlements');
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}}/v1/:parent/entitlements'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/entitlements';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/entitlements"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/entitlements" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/entitlements",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/entitlements');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/entitlements');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/entitlements');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/entitlements' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/entitlements' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/entitlements")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/entitlements"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/entitlements"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/entitlements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/entitlements') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/entitlements";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/entitlements
http GET {{baseUrl}}/v1/:parent/entitlements
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/entitlements
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/entitlements")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
cloudchannel.accounts.customers.entitlements.listEntitlementChanges
{{baseUrl}}/v1/:parent:listEntitlementChanges
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent:listEntitlementChanges");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent:listEntitlementChanges")
require "http/client"
url = "{{baseUrl}}/v1/:parent:listEntitlementChanges"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent:listEntitlementChanges"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent:listEntitlementChanges");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent:listEntitlementChanges"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent:listEntitlementChanges HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent:listEntitlementChanges")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent:listEntitlementChanges"))
.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}}/v1/:parent:listEntitlementChanges")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent:listEntitlementChanges")
.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}}/v1/:parent:listEntitlementChanges');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/:parent:listEntitlementChanges'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent:listEntitlementChanges';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent:listEntitlementChanges',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent:listEntitlementChanges")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent:listEntitlementChanges',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/:parent:listEntitlementChanges'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent:listEntitlementChanges');
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}}/v1/:parent:listEntitlementChanges'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent:listEntitlementChanges';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent:listEntitlementChanges"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent:listEntitlementChanges" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent:listEntitlementChanges",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent:listEntitlementChanges');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent:listEntitlementChanges');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent:listEntitlementChanges');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent:listEntitlementChanges' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent:listEntitlementChanges' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent:listEntitlementChanges")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent:listEntitlementChanges"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent:listEntitlementChanges"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent:listEntitlementChanges")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent:listEntitlementChanges') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent:listEntitlementChanges";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent:listEntitlementChanges
http GET {{baseUrl}}/v1/:parent:listEntitlementChanges
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent:listEntitlementChanges
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent:listEntitlementChanges")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
cloudchannel.accounts.customers.entitlements.lookupOffer
{{baseUrl}}/v1/:entitlement:lookupOffer
QUERY PARAMS
entitlement
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:entitlement:lookupOffer");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:entitlement:lookupOffer")
require "http/client"
url = "{{baseUrl}}/v1/:entitlement:lookupOffer"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:entitlement:lookupOffer"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:entitlement:lookupOffer");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:entitlement:lookupOffer"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:entitlement:lookupOffer HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:entitlement:lookupOffer")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:entitlement:lookupOffer"))
.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}}/v1/:entitlement:lookupOffer")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:entitlement:lookupOffer")
.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}}/v1/:entitlement:lookupOffer');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:entitlement:lookupOffer'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:entitlement:lookupOffer';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:entitlement:lookupOffer',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:entitlement:lookupOffer")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:entitlement:lookupOffer',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:entitlement:lookupOffer'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:entitlement:lookupOffer');
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}}/v1/:entitlement:lookupOffer'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:entitlement:lookupOffer';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:entitlement:lookupOffer"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:entitlement:lookupOffer" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:entitlement:lookupOffer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:entitlement:lookupOffer');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:entitlement:lookupOffer');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:entitlement:lookupOffer');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:entitlement:lookupOffer' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:entitlement:lookupOffer' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:entitlement:lookupOffer")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:entitlement:lookupOffer"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:entitlement:lookupOffer"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:entitlement:lookupOffer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:entitlement:lookupOffer') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:entitlement:lookupOffer";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:entitlement:lookupOffer
http GET {{baseUrl}}/v1/:entitlement:lookupOffer
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:entitlement:lookupOffer
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:entitlement:lookupOffer")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
cloudchannel.accounts.customers.entitlements.startPaidService
{{baseUrl}}/v1/:name:startPaidService
QUERY PARAMS
name
BODY json
{
"requestId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name:startPaidService");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"requestId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:name:startPaidService" {:content-type :json
:form-params {:requestId ""}})
require "http/client"
url = "{{baseUrl}}/v1/:name:startPaidService"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"requestId\": \"\"\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}}/v1/:name:startPaidService"),
Content = new StringContent("{\n \"requestId\": \"\"\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}}/v1/:name:startPaidService");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"requestId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name:startPaidService"
payload := strings.NewReader("{\n \"requestId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v1/:name:startPaidService HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 21
{
"requestId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:name:startPaidService")
.setHeader("content-type", "application/json")
.setBody("{\n \"requestId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name:startPaidService"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"requestId\": \"\"\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 \"requestId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name:startPaidService")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:name:startPaidService")
.header("content-type", "application/json")
.body("{\n \"requestId\": \"\"\n}")
.asString();
const data = JSON.stringify({
requestId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:name:startPaidService');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:startPaidService',
headers: {'content-type': 'application/json'},
data: {requestId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name:startPaidService';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"requestId":""}'
};
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}}/v1/:name:startPaidService',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "requestId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"requestId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name:startPaidService")
.post(body)
.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/v1/:name:startPaidService',
headers: {
'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({requestId: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:startPaidService',
headers: {'content-type': 'application/json'},
body: {requestId: ''},
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}}/v1/:name:startPaidService');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
requestId: ''
});
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}}/v1/:name:startPaidService',
headers: {'content-type': 'application/json'},
data: {requestId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name:startPaidService';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"requestId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"requestId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name:startPaidService"]
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}}/v1/:name:startPaidService" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"requestId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name:startPaidService",
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([
'requestId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:name:startPaidService', [
'body' => '{
"requestId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name:startPaidService');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'requestId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'requestId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name:startPaidService');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name:startPaidService' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"requestId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name:startPaidService' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"requestId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"requestId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:name:startPaidService", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name:startPaidService"
payload = { "requestId": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name:startPaidService"
payload <- "{\n \"requestId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name:startPaidService")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"requestId\": \"\"\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/v1/:name:startPaidService') do |req|
req.body = "{\n \"requestId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name:startPaidService";
let payload = json!({"requestId": ""});
let mut headers = reqwest::header::HeaderMap::new();
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}}/v1/:name:startPaidService \
--header 'content-type: application/json' \
--data '{
"requestId": ""
}'
echo '{
"requestId": ""
}' | \
http POST {{baseUrl}}/v1/:name:startPaidService \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "requestId": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:name:startPaidService
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["requestId": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name:startPaidService")! 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()
POST
cloudchannel.accounts.customers.entitlements.suspend
{{baseUrl}}/v1/:name:suspend
QUERY PARAMS
name
BODY json
{
"requestId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name:suspend");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"requestId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:name:suspend" {:content-type :json
:form-params {:requestId ""}})
require "http/client"
url = "{{baseUrl}}/v1/:name:suspend"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"requestId\": \"\"\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}}/v1/:name:suspend"),
Content = new StringContent("{\n \"requestId\": \"\"\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}}/v1/:name:suspend");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"requestId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name:suspend"
payload := strings.NewReader("{\n \"requestId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v1/:name:suspend HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 21
{
"requestId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:name:suspend")
.setHeader("content-type", "application/json")
.setBody("{\n \"requestId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name:suspend"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"requestId\": \"\"\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 \"requestId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name:suspend")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:name:suspend")
.header("content-type", "application/json")
.body("{\n \"requestId\": \"\"\n}")
.asString();
const data = JSON.stringify({
requestId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:name:suspend');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:suspend',
headers: {'content-type': 'application/json'},
data: {requestId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name:suspend';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"requestId":""}'
};
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}}/v1/:name:suspend',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "requestId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"requestId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name:suspend")
.post(body)
.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/v1/:name:suspend',
headers: {
'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({requestId: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:suspend',
headers: {'content-type': 'application/json'},
body: {requestId: ''},
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}}/v1/:name:suspend');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
requestId: ''
});
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}}/v1/:name:suspend',
headers: {'content-type': 'application/json'},
data: {requestId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name:suspend';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"requestId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"requestId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name:suspend"]
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}}/v1/:name:suspend" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"requestId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name:suspend",
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([
'requestId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:name:suspend', [
'body' => '{
"requestId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name:suspend');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'requestId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'requestId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name:suspend');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name:suspend' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"requestId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name:suspend' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"requestId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"requestId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:name:suspend", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name:suspend"
payload = { "requestId": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name:suspend"
payload <- "{\n \"requestId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name:suspend")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"requestId\": \"\"\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/v1/:name:suspend') do |req|
req.body = "{\n \"requestId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name:suspend";
let payload = json!({"requestId": ""});
let mut headers = reqwest::header::HeaderMap::new();
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}}/v1/:name:suspend \
--header 'content-type: application/json' \
--data '{
"requestId": ""
}'
echo '{
"requestId": ""
}' | \
http POST {{baseUrl}}/v1/:name:suspend \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "requestId": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:name:suspend
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["requestId": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name:suspend")! 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()
POST
cloudchannel.accounts.customers.import
{{baseUrl}}/v1/:parent/customers:import
QUERY PARAMS
parent
BODY json
{
"authToken": "",
"channelPartnerId": "",
"cloudIdentityId": "",
"customer": "",
"domain": "",
"overwriteIfExists": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/customers:import");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"authToken\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"customer\": \"\",\n \"domain\": \"\",\n \"overwriteIfExists\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent/customers:import" {:content-type :json
:form-params {:authToken ""
:channelPartnerId ""
:cloudIdentityId ""
:customer ""
:domain ""
:overwriteIfExists false}})
require "http/client"
url = "{{baseUrl}}/v1/:parent/customers:import"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"authToken\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"customer\": \"\",\n \"domain\": \"\",\n \"overwriteIfExists\": false\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}}/v1/:parent/customers:import"),
Content = new StringContent("{\n \"authToken\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"customer\": \"\",\n \"domain\": \"\",\n \"overwriteIfExists\": false\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}}/v1/:parent/customers:import");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"authToken\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"customer\": \"\",\n \"domain\": \"\",\n \"overwriteIfExists\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/customers:import"
payload := strings.NewReader("{\n \"authToken\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"customer\": \"\",\n \"domain\": \"\",\n \"overwriteIfExists\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v1/:parent/customers:import HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 136
{
"authToken": "",
"channelPartnerId": "",
"cloudIdentityId": "",
"customer": "",
"domain": "",
"overwriteIfExists": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/customers:import")
.setHeader("content-type", "application/json")
.setBody("{\n \"authToken\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"customer\": \"\",\n \"domain\": \"\",\n \"overwriteIfExists\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/customers:import"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"authToken\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"customer\": \"\",\n \"domain\": \"\",\n \"overwriteIfExists\": false\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 \"authToken\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"customer\": \"\",\n \"domain\": \"\",\n \"overwriteIfExists\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/customers:import")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/customers:import")
.header("content-type", "application/json")
.body("{\n \"authToken\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"customer\": \"\",\n \"domain\": \"\",\n \"overwriteIfExists\": false\n}")
.asString();
const data = JSON.stringify({
authToken: '',
channelPartnerId: '',
cloudIdentityId: '',
customer: '',
domain: '',
overwriteIfExists: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:parent/customers:import');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/customers:import',
headers: {'content-type': 'application/json'},
data: {
authToken: '',
channelPartnerId: '',
cloudIdentityId: '',
customer: '',
domain: '',
overwriteIfExists: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/customers:import';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"authToken":"","channelPartnerId":"","cloudIdentityId":"","customer":"","domain":"","overwriteIfExists":false}'
};
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}}/v1/:parent/customers:import',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "authToken": "",\n "channelPartnerId": "",\n "cloudIdentityId": "",\n "customer": "",\n "domain": "",\n "overwriteIfExists": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"authToken\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"customer\": \"\",\n \"domain\": \"\",\n \"overwriteIfExists\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/customers:import")
.post(body)
.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/v1/:parent/customers:import',
headers: {
'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({
authToken: '',
channelPartnerId: '',
cloudIdentityId: '',
customer: '',
domain: '',
overwriteIfExists: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/customers:import',
headers: {'content-type': 'application/json'},
body: {
authToken: '',
channelPartnerId: '',
cloudIdentityId: '',
customer: '',
domain: '',
overwriteIfExists: false
},
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}}/v1/:parent/customers:import');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
authToken: '',
channelPartnerId: '',
cloudIdentityId: '',
customer: '',
domain: '',
overwriteIfExists: false
});
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}}/v1/:parent/customers:import',
headers: {'content-type': 'application/json'},
data: {
authToken: '',
channelPartnerId: '',
cloudIdentityId: '',
customer: '',
domain: '',
overwriteIfExists: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/customers:import';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"authToken":"","channelPartnerId":"","cloudIdentityId":"","customer":"","domain":"","overwriteIfExists":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"authToken": @"",
@"channelPartnerId": @"",
@"cloudIdentityId": @"",
@"customer": @"",
@"domain": @"",
@"overwriteIfExists": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/customers:import"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/customers:import" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"authToken\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"customer\": \"\",\n \"domain\": \"\",\n \"overwriteIfExists\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/customers:import",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'authToken' => '',
'channelPartnerId' => '',
'cloudIdentityId' => '',
'customer' => '',
'domain' => '',
'overwriteIfExists' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:parent/customers:import', [
'body' => '{
"authToken": "",
"channelPartnerId": "",
"cloudIdentityId": "",
"customer": "",
"domain": "",
"overwriteIfExists": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/customers:import');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'authToken' => '',
'channelPartnerId' => '',
'cloudIdentityId' => '',
'customer' => '',
'domain' => '',
'overwriteIfExists' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'authToken' => '',
'channelPartnerId' => '',
'cloudIdentityId' => '',
'customer' => '',
'domain' => '',
'overwriteIfExists' => null
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/customers:import');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/customers:import' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"authToken": "",
"channelPartnerId": "",
"cloudIdentityId": "",
"customer": "",
"domain": "",
"overwriteIfExists": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/customers:import' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"authToken": "",
"channelPartnerId": "",
"cloudIdentityId": "",
"customer": "",
"domain": "",
"overwriteIfExists": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"authToken\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"customer\": \"\",\n \"domain\": \"\",\n \"overwriteIfExists\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent/customers:import", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/customers:import"
payload = {
"authToken": "",
"channelPartnerId": "",
"cloudIdentityId": "",
"customer": "",
"domain": "",
"overwriteIfExists": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/customers:import"
payload <- "{\n \"authToken\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"customer\": \"\",\n \"domain\": \"\",\n \"overwriteIfExists\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/customers:import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"authToken\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"customer\": \"\",\n \"domain\": \"\",\n \"overwriteIfExists\": false\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/v1/:parent/customers:import') do |req|
req.body = "{\n \"authToken\": \"\",\n \"channelPartnerId\": \"\",\n \"cloudIdentityId\": \"\",\n \"customer\": \"\",\n \"domain\": \"\",\n \"overwriteIfExists\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/customers:import";
let payload = json!({
"authToken": "",
"channelPartnerId": "",
"cloudIdentityId": "",
"customer": "",
"domain": "",
"overwriteIfExists": false
});
let mut headers = reqwest::header::HeaderMap::new();
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}}/v1/:parent/customers:import \
--header 'content-type: application/json' \
--data '{
"authToken": "",
"channelPartnerId": "",
"cloudIdentityId": "",
"customer": "",
"domain": "",
"overwriteIfExists": false
}'
echo '{
"authToken": "",
"channelPartnerId": "",
"cloudIdentityId": "",
"customer": "",
"domain": "",
"overwriteIfExists": false
}' | \
http POST {{baseUrl}}/v1/:parent/customers:import \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "authToken": "",\n "channelPartnerId": "",\n "cloudIdentityId": "",\n "customer": "",\n "domain": "",\n "overwriteIfExists": false\n}' \
--output-document \
- {{baseUrl}}/v1/:parent/customers:import
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"authToken": "",
"channelPartnerId": "",
"cloudIdentityId": "",
"customer": "",
"domain": "",
"overwriteIfExists": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/customers:import")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
cloudchannel.accounts.customers.list
{{baseUrl}}/v1/:parent/customers
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/customers");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/customers")
require "http/client"
url = "{{baseUrl}}/v1/:parent/customers"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/customers"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/customers");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/customers"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/customers HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/customers")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/customers"))
.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}}/v1/:parent/customers")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/customers")
.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}}/v1/:parent/customers');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/customers'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/customers';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/customers',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/customers")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/customers',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/customers'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/customers');
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}}/v1/:parent/customers'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/customers';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/customers"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/customers" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/customers');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/customers');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/customers');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/customers' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/customers' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/customers")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/customers"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/customers"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/customers') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/customers";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/customers
http GET {{baseUrl}}/v1/:parent/customers
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/customers
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/customers")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
cloudchannel.accounts.customers.listPurchasableOffers
{{baseUrl}}/v1/:customer:listPurchasableOffers
QUERY PARAMS
customer
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:customer:listPurchasableOffers");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:customer:listPurchasableOffers")
require "http/client"
url = "{{baseUrl}}/v1/:customer:listPurchasableOffers"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:customer:listPurchasableOffers"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:customer:listPurchasableOffers");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:customer:listPurchasableOffers"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:customer:listPurchasableOffers HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:customer:listPurchasableOffers")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:customer:listPurchasableOffers"))
.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}}/v1/:customer:listPurchasableOffers")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:customer:listPurchasableOffers")
.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}}/v1/:customer:listPurchasableOffers');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/:customer:listPurchasableOffers'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:customer:listPurchasableOffers';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:customer:listPurchasableOffers',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:customer:listPurchasableOffers")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:customer:listPurchasableOffers',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/:customer:listPurchasableOffers'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:customer:listPurchasableOffers');
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}}/v1/:customer:listPurchasableOffers'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:customer:listPurchasableOffers';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:customer:listPurchasableOffers"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:customer:listPurchasableOffers" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:customer:listPurchasableOffers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:customer:listPurchasableOffers');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:customer:listPurchasableOffers');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:customer:listPurchasableOffers');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:customer:listPurchasableOffers' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:customer:listPurchasableOffers' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:customer:listPurchasableOffers")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:customer:listPurchasableOffers"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:customer:listPurchasableOffers"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:customer:listPurchasableOffers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:customer:listPurchasableOffers') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:customer:listPurchasableOffers";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:customer:listPurchasableOffers
http GET {{baseUrl}}/v1/:customer:listPurchasableOffers
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:customer:listPurchasableOffers
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:customer:listPurchasableOffers")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
cloudchannel.accounts.customers.listPurchasableSkus
{{baseUrl}}/v1/:customer:listPurchasableSkus
QUERY PARAMS
customer
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:customer:listPurchasableSkus");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:customer:listPurchasableSkus")
require "http/client"
url = "{{baseUrl}}/v1/:customer:listPurchasableSkus"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:customer:listPurchasableSkus"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:customer:listPurchasableSkus");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:customer:listPurchasableSkus"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:customer:listPurchasableSkus HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:customer:listPurchasableSkus")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:customer:listPurchasableSkus"))
.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}}/v1/:customer:listPurchasableSkus")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:customer:listPurchasableSkus")
.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}}/v1/:customer:listPurchasableSkus');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/:customer:listPurchasableSkus'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:customer:listPurchasableSkus';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:customer:listPurchasableSkus',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:customer:listPurchasableSkus")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:customer:listPurchasableSkus',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/:customer:listPurchasableSkus'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:customer:listPurchasableSkus');
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}}/v1/:customer:listPurchasableSkus'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:customer:listPurchasableSkus';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:customer:listPurchasableSkus"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:customer:listPurchasableSkus" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:customer:listPurchasableSkus",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:customer:listPurchasableSkus');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:customer:listPurchasableSkus');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:customer:listPurchasableSkus');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:customer:listPurchasableSkus' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:customer:listPurchasableSkus' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:customer:listPurchasableSkus")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:customer:listPurchasableSkus"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:customer:listPurchasableSkus"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:customer:listPurchasableSkus")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:customer:listPurchasableSkus') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:customer:listPurchasableSkus";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:customer:listPurchasableSkus
http GET {{baseUrl}}/v1/:customer:listPurchasableSkus
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:customer:listPurchasableSkus
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:customer:listPurchasableSkus")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
cloudchannel.accounts.customers.provisionCloudIdentity
{{baseUrl}}/v1/:customer:provisionCloudIdentity
QUERY PARAMS
customer
BODY json
{
"cloudIdentityInfo": {
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": {
"instituteSize": "",
"instituteType": "",
"website": ""
},
"isDomainVerified": false,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
},
"user": {
"email": "",
"familyName": "",
"givenName": ""
},
"validateOnly": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:customer:provisionCloudIdentity");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"user\": {\n \"email\": \"\",\n \"familyName\": \"\",\n \"givenName\": \"\"\n },\n \"validateOnly\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:customer:provisionCloudIdentity" {:content-type :json
:form-params {:cloudIdentityInfo {:adminConsoleUri ""
:alternateEmail ""
:customerType ""
:eduData {:instituteSize ""
:instituteType ""
:website ""}
:isDomainVerified false
:languageCode ""
:phoneNumber ""
:primaryDomain ""}
:user {:email ""
:familyName ""
:givenName ""}
:validateOnly false}})
require "http/client"
url = "{{baseUrl}}/v1/:customer:provisionCloudIdentity"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"user\": {\n \"email\": \"\",\n \"familyName\": \"\",\n \"givenName\": \"\"\n },\n \"validateOnly\": false\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}}/v1/:customer:provisionCloudIdentity"),
Content = new StringContent("{\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"user\": {\n \"email\": \"\",\n \"familyName\": \"\",\n \"givenName\": \"\"\n },\n \"validateOnly\": false\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}}/v1/:customer:provisionCloudIdentity");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"user\": {\n \"email\": \"\",\n \"familyName\": \"\",\n \"givenName\": \"\"\n },\n \"validateOnly\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:customer:provisionCloudIdentity"
payload := strings.NewReader("{\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"user\": {\n \"email\": \"\",\n \"familyName\": \"\",\n \"givenName\": \"\"\n },\n \"validateOnly\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v1/:customer:provisionCloudIdentity HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 410
{
"cloudIdentityInfo": {
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": {
"instituteSize": "",
"instituteType": "",
"website": ""
},
"isDomainVerified": false,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
},
"user": {
"email": "",
"familyName": "",
"givenName": ""
},
"validateOnly": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:customer:provisionCloudIdentity")
.setHeader("content-type", "application/json")
.setBody("{\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"user\": {\n \"email\": \"\",\n \"familyName\": \"\",\n \"givenName\": \"\"\n },\n \"validateOnly\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:customer:provisionCloudIdentity"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"user\": {\n \"email\": \"\",\n \"familyName\": \"\",\n \"givenName\": \"\"\n },\n \"validateOnly\": false\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 \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"user\": {\n \"email\": \"\",\n \"familyName\": \"\",\n \"givenName\": \"\"\n },\n \"validateOnly\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:customer:provisionCloudIdentity")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:customer:provisionCloudIdentity")
.header("content-type", "application/json")
.body("{\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"user\": {\n \"email\": \"\",\n \"familyName\": \"\",\n \"givenName\": \"\"\n },\n \"validateOnly\": false\n}")
.asString();
const data = JSON.stringify({
cloudIdentityInfo: {
adminConsoleUri: '',
alternateEmail: '',
customerType: '',
eduData: {
instituteSize: '',
instituteType: '',
website: ''
},
isDomainVerified: false,
languageCode: '',
phoneNumber: '',
primaryDomain: ''
},
user: {
email: '',
familyName: '',
givenName: ''
},
validateOnly: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:customer:provisionCloudIdentity');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:customer:provisionCloudIdentity',
headers: {'content-type': 'application/json'},
data: {
cloudIdentityInfo: {
adminConsoleUri: '',
alternateEmail: '',
customerType: '',
eduData: {instituteSize: '', instituteType: '', website: ''},
isDomainVerified: false,
languageCode: '',
phoneNumber: '',
primaryDomain: ''
},
user: {email: '', familyName: '', givenName: ''},
validateOnly: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:customer:provisionCloudIdentity';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"cloudIdentityInfo":{"adminConsoleUri":"","alternateEmail":"","customerType":"","eduData":{"instituteSize":"","instituteType":"","website":""},"isDomainVerified":false,"languageCode":"","phoneNumber":"","primaryDomain":""},"user":{"email":"","familyName":"","givenName":""},"validateOnly":false}'
};
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}}/v1/:customer:provisionCloudIdentity',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "cloudIdentityInfo": {\n "adminConsoleUri": "",\n "alternateEmail": "",\n "customerType": "",\n "eduData": {\n "instituteSize": "",\n "instituteType": "",\n "website": ""\n },\n "isDomainVerified": false,\n "languageCode": "",\n "phoneNumber": "",\n "primaryDomain": ""\n },\n "user": {\n "email": "",\n "familyName": "",\n "givenName": ""\n },\n "validateOnly": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"user\": {\n \"email\": \"\",\n \"familyName\": \"\",\n \"givenName\": \"\"\n },\n \"validateOnly\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:customer:provisionCloudIdentity")
.post(body)
.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/v1/:customer:provisionCloudIdentity',
headers: {
'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({
cloudIdentityInfo: {
adminConsoleUri: '',
alternateEmail: '',
customerType: '',
eduData: {instituteSize: '', instituteType: '', website: ''},
isDomainVerified: false,
languageCode: '',
phoneNumber: '',
primaryDomain: ''
},
user: {email: '', familyName: '', givenName: ''},
validateOnly: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:customer:provisionCloudIdentity',
headers: {'content-type': 'application/json'},
body: {
cloudIdentityInfo: {
adminConsoleUri: '',
alternateEmail: '',
customerType: '',
eduData: {instituteSize: '', instituteType: '', website: ''},
isDomainVerified: false,
languageCode: '',
phoneNumber: '',
primaryDomain: ''
},
user: {email: '', familyName: '', givenName: ''},
validateOnly: false
},
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}}/v1/:customer:provisionCloudIdentity');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
cloudIdentityInfo: {
adminConsoleUri: '',
alternateEmail: '',
customerType: '',
eduData: {
instituteSize: '',
instituteType: '',
website: ''
},
isDomainVerified: false,
languageCode: '',
phoneNumber: '',
primaryDomain: ''
},
user: {
email: '',
familyName: '',
givenName: ''
},
validateOnly: false
});
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}}/v1/:customer:provisionCloudIdentity',
headers: {'content-type': 'application/json'},
data: {
cloudIdentityInfo: {
adminConsoleUri: '',
alternateEmail: '',
customerType: '',
eduData: {instituteSize: '', instituteType: '', website: ''},
isDomainVerified: false,
languageCode: '',
phoneNumber: '',
primaryDomain: ''
},
user: {email: '', familyName: '', givenName: ''},
validateOnly: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:customer:provisionCloudIdentity';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"cloudIdentityInfo":{"adminConsoleUri":"","alternateEmail":"","customerType":"","eduData":{"instituteSize":"","instituteType":"","website":""},"isDomainVerified":false,"languageCode":"","phoneNumber":"","primaryDomain":""},"user":{"email":"","familyName":"","givenName":""},"validateOnly":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"cloudIdentityInfo": @{ @"adminConsoleUri": @"", @"alternateEmail": @"", @"customerType": @"", @"eduData": @{ @"instituteSize": @"", @"instituteType": @"", @"website": @"" }, @"isDomainVerified": @NO, @"languageCode": @"", @"phoneNumber": @"", @"primaryDomain": @"" },
@"user": @{ @"email": @"", @"familyName": @"", @"givenName": @"" },
@"validateOnly": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:customer:provisionCloudIdentity"]
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}}/v1/:customer:provisionCloudIdentity" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"user\": {\n \"email\": \"\",\n \"familyName\": \"\",\n \"givenName\": \"\"\n },\n \"validateOnly\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:customer:provisionCloudIdentity",
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([
'cloudIdentityInfo' => [
'adminConsoleUri' => '',
'alternateEmail' => '',
'customerType' => '',
'eduData' => [
'instituteSize' => '',
'instituteType' => '',
'website' => ''
],
'isDomainVerified' => null,
'languageCode' => '',
'phoneNumber' => '',
'primaryDomain' => ''
],
'user' => [
'email' => '',
'familyName' => '',
'givenName' => ''
],
'validateOnly' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:customer:provisionCloudIdentity', [
'body' => '{
"cloudIdentityInfo": {
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": {
"instituteSize": "",
"instituteType": "",
"website": ""
},
"isDomainVerified": false,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
},
"user": {
"email": "",
"familyName": "",
"givenName": ""
},
"validateOnly": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:customer:provisionCloudIdentity');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'cloudIdentityInfo' => [
'adminConsoleUri' => '',
'alternateEmail' => '',
'customerType' => '',
'eduData' => [
'instituteSize' => '',
'instituteType' => '',
'website' => ''
],
'isDomainVerified' => null,
'languageCode' => '',
'phoneNumber' => '',
'primaryDomain' => ''
],
'user' => [
'email' => '',
'familyName' => '',
'givenName' => ''
],
'validateOnly' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'cloudIdentityInfo' => [
'adminConsoleUri' => '',
'alternateEmail' => '',
'customerType' => '',
'eduData' => [
'instituteSize' => '',
'instituteType' => '',
'website' => ''
],
'isDomainVerified' => null,
'languageCode' => '',
'phoneNumber' => '',
'primaryDomain' => ''
],
'user' => [
'email' => '',
'familyName' => '',
'givenName' => ''
],
'validateOnly' => null
]));
$request->setRequestUrl('{{baseUrl}}/v1/:customer:provisionCloudIdentity');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:customer:provisionCloudIdentity' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"cloudIdentityInfo": {
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": {
"instituteSize": "",
"instituteType": "",
"website": ""
},
"isDomainVerified": false,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
},
"user": {
"email": "",
"familyName": "",
"givenName": ""
},
"validateOnly": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:customer:provisionCloudIdentity' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"cloudIdentityInfo": {
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": {
"instituteSize": "",
"instituteType": "",
"website": ""
},
"isDomainVerified": false,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
},
"user": {
"email": "",
"familyName": "",
"givenName": ""
},
"validateOnly": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"user\": {\n \"email\": \"\",\n \"familyName\": \"\",\n \"givenName\": \"\"\n },\n \"validateOnly\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:customer:provisionCloudIdentity", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:customer:provisionCloudIdentity"
payload = {
"cloudIdentityInfo": {
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": {
"instituteSize": "",
"instituteType": "",
"website": ""
},
"isDomainVerified": False,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
},
"user": {
"email": "",
"familyName": "",
"givenName": ""
},
"validateOnly": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:customer:provisionCloudIdentity"
payload <- "{\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"user\": {\n \"email\": \"\",\n \"familyName\": \"\",\n \"givenName\": \"\"\n },\n \"validateOnly\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:customer:provisionCloudIdentity")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"user\": {\n \"email\": \"\",\n \"familyName\": \"\",\n \"givenName\": \"\"\n },\n \"validateOnly\": false\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/v1/:customer:provisionCloudIdentity') do |req|
req.body = "{\n \"cloudIdentityInfo\": {\n \"adminConsoleUri\": \"\",\n \"alternateEmail\": \"\",\n \"customerType\": \"\",\n \"eduData\": {\n \"instituteSize\": \"\",\n \"instituteType\": \"\",\n \"website\": \"\"\n },\n \"isDomainVerified\": false,\n \"languageCode\": \"\",\n \"phoneNumber\": \"\",\n \"primaryDomain\": \"\"\n },\n \"user\": {\n \"email\": \"\",\n \"familyName\": \"\",\n \"givenName\": \"\"\n },\n \"validateOnly\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:customer:provisionCloudIdentity";
let payload = json!({
"cloudIdentityInfo": json!({
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": json!({
"instituteSize": "",
"instituteType": "",
"website": ""
}),
"isDomainVerified": false,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
}),
"user": json!({
"email": "",
"familyName": "",
"givenName": ""
}),
"validateOnly": false
});
let mut headers = reqwest::header::HeaderMap::new();
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}}/v1/:customer:provisionCloudIdentity \
--header 'content-type: application/json' \
--data '{
"cloudIdentityInfo": {
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": {
"instituteSize": "",
"instituteType": "",
"website": ""
},
"isDomainVerified": false,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
},
"user": {
"email": "",
"familyName": "",
"givenName": ""
},
"validateOnly": false
}'
echo '{
"cloudIdentityInfo": {
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": {
"instituteSize": "",
"instituteType": "",
"website": ""
},
"isDomainVerified": false,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
},
"user": {
"email": "",
"familyName": "",
"givenName": ""
},
"validateOnly": false
}' | \
http POST {{baseUrl}}/v1/:customer:provisionCloudIdentity \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "cloudIdentityInfo": {\n "adminConsoleUri": "",\n "alternateEmail": "",\n "customerType": "",\n "eduData": {\n "instituteSize": "",\n "instituteType": "",\n "website": ""\n },\n "isDomainVerified": false,\n "languageCode": "",\n "phoneNumber": "",\n "primaryDomain": ""\n },\n "user": {\n "email": "",\n "familyName": "",\n "givenName": ""\n },\n "validateOnly": false\n}' \
--output-document \
- {{baseUrl}}/v1/:customer:provisionCloudIdentity
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"cloudIdentityInfo": [
"adminConsoleUri": "",
"alternateEmail": "",
"customerType": "",
"eduData": [
"instituteSize": "",
"instituteType": "",
"website": ""
],
"isDomainVerified": false,
"languageCode": "",
"phoneNumber": "",
"primaryDomain": ""
],
"user": [
"email": "",
"familyName": "",
"givenName": ""
],
"validateOnly": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:customer:provisionCloudIdentity")! 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()
POST
cloudchannel.accounts.customers.transferEntitlements
{{baseUrl}}/v1/:parent:transferEntitlements
QUERY PARAMS
parent
BODY json
{
"authToken": "",
"entitlements": [
{
"associationInfo": {
"baseEntitlement": ""
},
"commitmentSettings": {
"endTime": "",
"renewalSettings": {
"enableRenewal": false,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": false
},
"startTime": ""
},
"createTime": "",
"name": "",
"offer": "",
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"provisionedService": {
"productId": "",
"provisioningId": "",
"skuId": ""
},
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": [],
"trialSettings": {
"endTime": "",
"trial": false
},
"updateTime": ""
}
],
"requestId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent:transferEntitlements");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"authToken\": \"\",\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent:transferEntitlements" {:content-type :json
:form-params {:authToken ""
:entitlements [{:associationInfo {:baseEntitlement ""}
:commitmentSettings {:endTime ""
:renewalSettings {:enableRenewal false
:paymentCycle {:duration 0
:periodType ""}
:paymentPlan ""
:resizeUnitCount false}
:startTime ""}
:createTime ""
:name ""
:offer ""
:parameters [{:editable false
:name ""
:value {:boolValue false
:doubleValue ""
:int64Value ""
:protoValue {}
:stringValue ""}}]
:provisionedService {:productId ""
:provisioningId ""
:skuId ""}
:provisioningState ""
:purchaseOrderId ""
:suspensionReasons []
:trialSettings {:endTime ""
:trial false}
:updateTime ""}]
:requestId ""}})
require "http/client"
url = "{{baseUrl}}/v1/:parent:transferEntitlements"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"authToken\": \"\",\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\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}}/v1/:parent:transferEntitlements"),
Content = new StringContent("{\n \"authToken\": \"\",\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\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}}/v1/:parent:transferEntitlements");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"authToken\": \"\",\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent:transferEntitlements"
payload := strings.NewReader("{\n \"authToken\": \"\",\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v1/:parent:transferEntitlements HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1121
{
"authToken": "",
"entitlements": [
{
"associationInfo": {
"baseEntitlement": ""
},
"commitmentSettings": {
"endTime": "",
"renewalSettings": {
"enableRenewal": false,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": false
},
"startTime": ""
},
"createTime": "",
"name": "",
"offer": "",
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"provisionedService": {
"productId": "",
"provisioningId": "",
"skuId": ""
},
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": [],
"trialSettings": {
"endTime": "",
"trial": false
},
"updateTime": ""
}
],
"requestId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent:transferEntitlements")
.setHeader("content-type", "application/json")
.setBody("{\n \"authToken\": \"\",\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent:transferEntitlements"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"authToken\": \"\",\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\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 \"authToken\": \"\",\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent:transferEntitlements")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent:transferEntitlements")
.header("content-type", "application/json")
.body("{\n \"authToken\": \"\",\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\n}")
.asString();
const data = JSON.stringify({
authToken: '',
entitlements: [
{
associationInfo: {
baseEntitlement: ''
},
commitmentSettings: {
endTime: '',
renewalSettings: {
enableRenewal: false,
paymentCycle: {
duration: 0,
periodType: ''
},
paymentPlan: '',
resizeUnitCount: false
},
startTime: ''
},
createTime: '',
name: '',
offer: '',
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
provisionedService: {
productId: '',
provisioningId: '',
skuId: ''
},
provisioningState: '',
purchaseOrderId: '',
suspensionReasons: [],
trialSettings: {
endTime: '',
trial: false
},
updateTime: ''
}
],
requestId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:parent:transferEntitlements');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent:transferEntitlements',
headers: {'content-type': 'application/json'},
data: {
authToken: '',
entitlements: [
{
associationInfo: {baseEntitlement: ''},
commitmentSettings: {
endTime: '',
renewalSettings: {
enableRenewal: false,
paymentCycle: {duration: 0, periodType: ''},
paymentPlan: '',
resizeUnitCount: false
},
startTime: ''
},
createTime: '',
name: '',
offer: '',
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
provisionedService: {productId: '', provisioningId: '', skuId: ''},
provisioningState: '',
purchaseOrderId: '',
suspensionReasons: [],
trialSettings: {endTime: '', trial: false},
updateTime: ''
}
],
requestId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent:transferEntitlements';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"authToken":"","entitlements":[{"associationInfo":{"baseEntitlement":""},"commitmentSettings":{"endTime":"","renewalSettings":{"enableRenewal":false,"paymentCycle":{"duration":0,"periodType":""},"paymentPlan":"","resizeUnitCount":false},"startTime":""},"createTime":"","name":"","offer":"","parameters":[{"editable":false,"name":"","value":{"boolValue":false,"doubleValue":"","int64Value":"","protoValue":{},"stringValue":""}}],"provisionedService":{"productId":"","provisioningId":"","skuId":""},"provisioningState":"","purchaseOrderId":"","suspensionReasons":[],"trialSettings":{"endTime":"","trial":false},"updateTime":""}],"requestId":""}'
};
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}}/v1/:parent:transferEntitlements',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "authToken": "",\n "entitlements": [\n {\n "associationInfo": {\n "baseEntitlement": ""\n },\n "commitmentSettings": {\n "endTime": "",\n "renewalSettings": {\n "enableRenewal": false,\n "paymentCycle": {\n "duration": 0,\n "periodType": ""\n },\n "paymentPlan": "",\n "resizeUnitCount": false\n },\n "startTime": ""\n },\n "createTime": "",\n "name": "",\n "offer": "",\n "parameters": [\n {\n "editable": false,\n "name": "",\n "value": {\n "boolValue": false,\n "doubleValue": "",\n "int64Value": "",\n "protoValue": {},\n "stringValue": ""\n }\n }\n ],\n "provisionedService": {\n "productId": "",\n "provisioningId": "",\n "skuId": ""\n },\n "provisioningState": "",\n "purchaseOrderId": "",\n "suspensionReasons": [],\n "trialSettings": {\n "endTime": "",\n "trial": false\n },\n "updateTime": ""\n }\n ],\n "requestId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"authToken\": \"\",\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent:transferEntitlements")
.post(body)
.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/v1/:parent:transferEntitlements',
headers: {
'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({
authToken: '',
entitlements: [
{
associationInfo: {baseEntitlement: ''},
commitmentSettings: {
endTime: '',
renewalSettings: {
enableRenewal: false,
paymentCycle: {duration: 0, periodType: ''},
paymentPlan: '',
resizeUnitCount: false
},
startTime: ''
},
createTime: '',
name: '',
offer: '',
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
provisionedService: {productId: '', provisioningId: '', skuId: ''},
provisioningState: '',
purchaseOrderId: '',
suspensionReasons: [],
trialSettings: {endTime: '', trial: false},
updateTime: ''
}
],
requestId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent:transferEntitlements',
headers: {'content-type': 'application/json'},
body: {
authToken: '',
entitlements: [
{
associationInfo: {baseEntitlement: ''},
commitmentSettings: {
endTime: '',
renewalSettings: {
enableRenewal: false,
paymentCycle: {duration: 0, periodType: ''},
paymentPlan: '',
resizeUnitCount: false
},
startTime: ''
},
createTime: '',
name: '',
offer: '',
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
provisionedService: {productId: '', provisioningId: '', skuId: ''},
provisioningState: '',
purchaseOrderId: '',
suspensionReasons: [],
trialSettings: {endTime: '', trial: false},
updateTime: ''
}
],
requestId: ''
},
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}}/v1/:parent:transferEntitlements');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
authToken: '',
entitlements: [
{
associationInfo: {
baseEntitlement: ''
},
commitmentSettings: {
endTime: '',
renewalSettings: {
enableRenewal: false,
paymentCycle: {
duration: 0,
periodType: ''
},
paymentPlan: '',
resizeUnitCount: false
},
startTime: ''
},
createTime: '',
name: '',
offer: '',
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
provisionedService: {
productId: '',
provisioningId: '',
skuId: ''
},
provisioningState: '',
purchaseOrderId: '',
suspensionReasons: [],
trialSettings: {
endTime: '',
trial: false
},
updateTime: ''
}
],
requestId: ''
});
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}}/v1/:parent:transferEntitlements',
headers: {'content-type': 'application/json'},
data: {
authToken: '',
entitlements: [
{
associationInfo: {baseEntitlement: ''},
commitmentSettings: {
endTime: '',
renewalSettings: {
enableRenewal: false,
paymentCycle: {duration: 0, periodType: ''},
paymentPlan: '',
resizeUnitCount: false
},
startTime: ''
},
createTime: '',
name: '',
offer: '',
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
provisionedService: {productId: '', provisioningId: '', skuId: ''},
provisioningState: '',
purchaseOrderId: '',
suspensionReasons: [],
trialSettings: {endTime: '', trial: false},
updateTime: ''
}
],
requestId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent:transferEntitlements';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"authToken":"","entitlements":[{"associationInfo":{"baseEntitlement":""},"commitmentSettings":{"endTime":"","renewalSettings":{"enableRenewal":false,"paymentCycle":{"duration":0,"periodType":""},"paymentPlan":"","resizeUnitCount":false},"startTime":""},"createTime":"","name":"","offer":"","parameters":[{"editable":false,"name":"","value":{"boolValue":false,"doubleValue":"","int64Value":"","protoValue":{},"stringValue":""}}],"provisionedService":{"productId":"","provisioningId":"","skuId":""},"provisioningState":"","purchaseOrderId":"","suspensionReasons":[],"trialSettings":{"endTime":"","trial":false},"updateTime":""}],"requestId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"authToken": @"",
@"entitlements": @[ @{ @"associationInfo": @{ @"baseEntitlement": @"" }, @"commitmentSettings": @{ @"endTime": @"", @"renewalSettings": @{ @"enableRenewal": @NO, @"paymentCycle": @{ @"duration": @0, @"periodType": @"" }, @"paymentPlan": @"", @"resizeUnitCount": @NO }, @"startTime": @"" }, @"createTime": @"", @"name": @"", @"offer": @"", @"parameters": @[ @{ @"editable": @NO, @"name": @"", @"value": @{ @"boolValue": @NO, @"doubleValue": @"", @"int64Value": @"", @"protoValue": @{ }, @"stringValue": @"" } } ], @"provisionedService": @{ @"productId": @"", @"provisioningId": @"", @"skuId": @"" }, @"provisioningState": @"", @"purchaseOrderId": @"", @"suspensionReasons": @[ ], @"trialSettings": @{ @"endTime": @"", @"trial": @NO }, @"updateTime": @"" } ],
@"requestId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent:transferEntitlements"]
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}}/v1/:parent:transferEntitlements" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"authToken\": \"\",\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent:transferEntitlements",
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([
'authToken' => '',
'entitlements' => [
[
'associationInfo' => [
'baseEntitlement' => ''
],
'commitmentSettings' => [
'endTime' => '',
'renewalSettings' => [
'enableRenewal' => null,
'paymentCycle' => [
'duration' => 0,
'periodType' => ''
],
'paymentPlan' => '',
'resizeUnitCount' => null
],
'startTime' => ''
],
'createTime' => '',
'name' => '',
'offer' => '',
'parameters' => [
[
'editable' => null,
'name' => '',
'value' => [
'boolValue' => null,
'doubleValue' => '',
'int64Value' => '',
'protoValue' => [
],
'stringValue' => ''
]
]
],
'provisionedService' => [
'productId' => '',
'provisioningId' => '',
'skuId' => ''
],
'provisioningState' => '',
'purchaseOrderId' => '',
'suspensionReasons' => [
],
'trialSettings' => [
'endTime' => '',
'trial' => null
],
'updateTime' => ''
]
],
'requestId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:parent:transferEntitlements', [
'body' => '{
"authToken": "",
"entitlements": [
{
"associationInfo": {
"baseEntitlement": ""
},
"commitmentSettings": {
"endTime": "",
"renewalSettings": {
"enableRenewal": false,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": false
},
"startTime": ""
},
"createTime": "",
"name": "",
"offer": "",
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"provisionedService": {
"productId": "",
"provisioningId": "",
"skuId": ""
},
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": [],
"trialSettings": {
"endTime": "",
"trial": false
},
"updateTime": ""
}
],
"requestId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent:transferEntitlements');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'authToken' => '',
'entitlements' => [
[
'associationInfo' => [
'baseEntitlement' => ''
],
'commitmentSettings' => [
'endTime' => '',
'renewalSettings' => [
'enableRenewal' => null,
'paymentCycle' => [
'duration' => 0,
'periodType' => ''
],
'paymentPlan' => '',
'resizeUnitCount' => null
],
'startTime' => ''
],
'createTime' => '',
'name' => '',
'offer' => '',
'parameters' => [
[
'editable' => null,
'name' => '',
'value' => [
'boolValue' => null,
'doubleValue' => '',
'int64Value' => '',
'protoValue' => [
],
'stringValue' => ''
]
]
],
'provisionedService' => [
'productId' => '',
'provisioningId' => '',
'skuId' => ''
],
'provisioningState' => '',
'purchaseOrderId' => '',
'suspensionReasons' => [
],
'trialSettings' => [
'endTime' => '',
'trial' => null
],
'updateTime' => ''
]
],
'requestId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'authToken' => '',
'entitlements' => [
[
'associationInfo' => [
'baseEntitlement' => ''
],
'commitmentSettings' => [
'endTime' => '',
'renewalSettings' => [
'enableRenewal' => null,
'paymentCycle' => [
'duration' => 0,
'periodType' => ''
],
'paymentPlan' => '',
'resizeUnitCount' => null
],
'startTime' => ''
],
'createTime' => '',
'name' => '',
'offer' => '',
'parameters' => [
[
'editable' => null,
'name' => '',
'value' => [
'boolValue' => null,
'doubleValue' => '',
'int64Value' => '',
'protoValue' => [
],
'stringValue' => ''
]
]
],
'provisionedService' => [
'productId' => '',
'provisioningId' => '',
'skuId' => ''
],
'provisioningState' => '',
'purchaseOrderId' => '',
'suspensionReasons' => [
],
'trialSettings' => [
'endTime' => '',
'trial' => null
],
'updateTime' => ''
]
],
'requestId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent:transferEntitlements');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent:transferEntitlements' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"authToken": "",
"entitlements": [
{
"associationInfo": {
"baseEntitlement": ""
},
"commitmentSettings": {
"endTime": "",
"renewalSettings": {
"enableRenewal": false,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": false
},
"startTime": ""
},
"createTime": "",
"name": "",
"offer": "",
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"provisionedService": {
"productId": "",
"provisioningId": "",
"skuId": ""
},
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": [],
"trialSettings": {
"endTime": "",
"trial": false
},
"updateTime": ""
}
],
"requestId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent:transferEntitlements' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"authToken": "",
"entitlements": [
{
"associationInfo": {
"baseEntitlement": ""
},
"commitmentSettings": {
"endTime": "",
"renewalSettings": {
"enableRenewal": false,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": false
},
"startTime": ""
},
"createTime": "",
"name": "",
"offer": "",
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"provisionedService": {
"productId": "",
"provisioningId": "",
"skuId": ""
},
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": [],
"trialSettings": {
"endTime": "",
"trial": false
},
"updateTime": ""
}
],
"requestId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"authToken\": \"\",\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent:transferEntitlements", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent:transferEntitlements"
payload = {
"authToken": "",
"entitlements": [
{
"associationInfo": { "baseEntitlement": "" },
"commitmentSettings": {
"endTime": "",
"renewalSettings": {
"enableRenewal": False,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": False
},
"startTime": ""
},
"createTime": "",
"name": "",
"offer": "",
"parameters": [
{
"editable": False,
"name": "",
"value": {
"boolValue": False,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"provisionedService": {
"productId": "",
"provisioningId": "",
"skuId": ""
},
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": [],
"trialSettings": {
"endTime": "",
"trial": False
},
"updateTime": ""
}
],
"requestId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent:transferEntitlements"
payload <- "{\n \"authToken\": \"\",\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent:transferEntitlements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"authToken\": \"\",\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\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/v1/:parent:transferEntitlements') do |req|
req.body = "{\n \"authToken\": \"\",\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent:transferEntitlements";
let payload = json!({
"authToken": "",
"entitlements": (
json!({
"associationInfo": json!({"baseEntitlement": ""}),
"commitmentSettings": json!({
"endTime": "",
"renewalSettings": json!({
"enableRenewal": false,
"paymentCycle": json!({
"duration": 0,
"periodType": ""
}),
"paymentPlan": "",
"resizeUnitCount": false
}),
"startTime": ""
}),
"createTime": "",
"name": "",
"offer": "",
"parameters": (
json!({
"editable": false,
"name": "",
"value": json!({
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": json!({}),
"stringValue": ""
})
})
),
"provisionedService": json!({
"productId": "",
"provisioningId": "",
"skuId": ""
}),
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": (),
"trialSettings": json!({
"endTime": "",
"trial": false
}),
"updateTime": ""
})
),
"requestId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
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}}/v1/:parent:transferEntitlements \
--header 'content-type: application/json' \
--data '{
"authToken": "",
"entitlements": [
{
"associationInfo": {
"baseEntitlement": ""
},
"commitmentSettings": {
"endTime": "",
"renewalSettings": {
"enableRenewal": false,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": false
},
"startTime": ""
},
"createTime": "",
"name": "",
"offer": "",
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"provisionedService": {
"productId": "",
"provisioningId": "",
"skuId": ""
},
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": [],
"trialSettings": {
"endTime": "",
"trial": false
},
"updateTime": ""
}
],
"requestId": ""
}'
echo '{
"authToken": "",
"entitlements": [
{
"associationInfo": {
"baseEntitlement": ""
},
"commitmentSettings": {
"endTime": "",
"renewalSettings": {
"enableRenewal": false,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": false
},
"startTime": ""
},
"createTime": "",
"name": "",
"offer": "",
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"provisionedService": {
"productId": "",
"provisioningId": "",
"skuId": ""
},
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": [],
"trialSettings": {
"endTime": "",
"trial": false
},
"updateTime": ""
}
],
"requestId": ""
}' | \
http POST {{baseUrl}}/v1/:parent:transferEntitlements \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "authToken": "",\n "entitlements": [\n {\n "associationInfo": {\n "baseEntitlement": ""\n },\n "commitmentSettings": {\n "endTime": "",\n "renewalSettings": {\n "enableRenewal": false,\n "paymentCycle": {\n "duration": 0,\n "periodType": ""\n },\n "paymentPlan": "",\n "resizeUnitCount": false\n },\n "startTime": ""\n },\n "createTime": "",\n "name": "",\n "offer": "",\n "parameters": [\n {\n "editable": false,\n "name": "",\n "value": {\n "boolValue": false,\n "doubleValue": "",\n "int64Value": "",\n "protoValue": {},\n "stringValue": ""\n }\n }\n ],\n "provisionedService": {\n "productId": "",\n "provisioningId": "",\n "skuId": ""\n },\n "provisioningState": "",\n "purchaseOrderId": "",\n "suspensionReasons": [],\n "trialSettings": {\n "endTime": "",\n "trial": false\n },\n "updateTime": ""\n }\n ],\n "requestId": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:parent:transferEntitlements
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"authToken": "",
"entitlements": [
[
"associationInfo": ["baseEntitlement": ""],
"commitmentSettings": [
"endTime": "",
"renewalSettings": [
"enableRenewal": false,
"paymentCycle": [
"duration": 0,
"periodType": ""
],
"paymentPlan": "",
"resizeUnitCount": false
],
"startTime": ""
],
"createTime": "",
"name": "",
"offer": "",
"parameters": [
[
"editable": false,
"name": "",
"value": [
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": [],
"stringValue": ""
]
]
],
"provisionedService": [
"productId": "",
"provisioningId": "",
"skuId": ""
],
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": [],
"trialSettings": [
"endTime": "",
"trial": false
],
"updateTime": ""
]
],
"requestId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent:transferEntitlements")! 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()
POST
cloudchannel.accounts.customers.transferEntitlementsToGoogle
{{baseUrl}}/v1/:parent:transferEntitlementsToGoogle
QUERY PARAMS
parent
BODY json
{
"entitlements": [
{
"associationInfo": {
"baseEntitlement": ""
},
"commitmentSettings": {
"endTime": "",
"renewalSettings": {
"enableRenewal": false,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": false
},
"startTime": ""
},
"createTime": "",
"name": "",
"offer": "",
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"provisionedService": {
"productId": "",
"provisioningId": "",
"skuId": ""
},
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": [],
"trialSettings": {
"endTime": "",
"trial": false
},
"updateTime": ""
}
],
"requestId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent:transferEntitlementsToGoogle");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent:transferEntitlementsToGoogle" {:content-type :json
:form-params {:entitlements [{:associationInfo {:baseEntitlement ""}
:commitmentSettings {:endTime ""
:renewalSettings {:enableRenewal false
:paymentCycle {:duration 0
:periodType ""}
:paymentPlan ""
:resizeUnitCount false}
:startTime ""}
:createTime ""
:name ""
:offer ""
:parameters [{:editable false
:name ""
:value {:boolValue false
:doubleValue ""
:int64Value ""
:protoValue {}
:stringValue ""}}]
:provisionedService {:productId ""
:provisioningId ""
:skuId ""}
:provisioningState ""
:purchaseOrderId ""
:suspensionReasons []
:trialSettings {:endTime ""
:trial false}
:updateTime ""}]
:requestId ""}})
require "http/client"
url = "{{baseUrl}}/v1/:parent:transferEntitlementsToGoogle"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\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}}/v1/:parent:transferEntitlementsToGoogle"),
Content = new StringContent("{\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\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}}/v1/:parent:transferEntitlementsToGoogle");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent:transferEntitlementsToGoogle"
payload := strings.NewReader("{\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v1/:parent:transferEntitlementsToGoogle HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1102
{
"entitlements": [
{
"associationInfo": {
"baseEntitlement": ""
},
"commitmentSettings": {
"endTime": "",
"renewalSettings": {
"enableRenewal": false,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": false
},
"startTime": ""
},
"createTime": "",
"name": "",
"offer": "",
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"provisionedService": {
"productId": "",
"provisioningId": "",
"skuId": ""
},
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": [],
"trialSettings": {
"endTime": "",
"trial": false
},
"updateTime": ""
}
],
"requestId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent:transferEntitlementsToGoogle")
.setHeader("content-type", "application/json")
.setBody("{\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent:transferEntitlementsToGoogle"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\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 \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent:transferEntitlementsToGoogle")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent:transferEntitlementsToGoogle")
.header("content-type", "application/json")
.body("{\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\n}")
.asString();
const data = JSON.stringify({
entitlements: [
{
associationInfo: {
baseEntitlement: ''
},
commitmentSettings: {
endTime: '',
renewalSettings: {
enableRenewal: false,
paymentCycle: {
duration: 0,
periodType: ''
},
paymentPlan: '',
resizeUnitCount: false
},
startTime: ''
},
createTime: '',
name: '',
offer: '',
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
provisionedService: {
productId: '',
provisioningId: '',
skuId: ''
},
provisioningState: '',
purchaseOrderId: '',
suspensionReasons: [],
trialSettings: {
endTime: '',
trial: false
},
updateTime: ''
}
],
requestId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:parent:transferEntitlementsToGoogle');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent:transferEntitlementsToGoogle',
headers: {'content-type': 'application/json'},
data: {
entitlements: [
{
associationInfo: {baseEntitlement: ''},
commitmentSettings: {
endTime: '',
renewalSettings: {
enableRenewal: false,
paymentCycle: {duration: 0, periodType: ''},
paymentPlan: '',
resizeUnitCount: false
},
startTime: ''
},
createTime: '',
name: '',
offer: '',
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
provisionedService: {productId: '', provisioningId: '', skuId: ''},
provisioningState: '',
purchaseOrderId: '',
suspensionReasons: [],
trialSettings: {endTime: '', trial: false},
updateTime: ''
}
],
requestId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent:transferEntitlementsToGoogle';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"entitlements":[{"associationInfo":{"baseEntitlement":""},"commitmentSettings":{"endTime":"","renewalSettings":{"enableRenewal":false,"paymentCycle":{"duration":0,"periodType":""},"paymentPlan":"","resizeUnitCount":false},"startTime":""},"createTime":"","name":"","offer":"","parameters":[{"editable":false,"name":"","value":{"boolValue":false,"doubleValue":"","int64Value":"","protoValue":{},"stringValue":""}}],"provisionedService":{"productId":"","provisioningId":"","skuId":""},"provisioningState":"","purchaseOrderId":"","suspensionReasons":[],"trialSettings":{"endTime":"","trial":false},"updateTime":""}],"requestId":""}'
};
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}}/v1/:parent:transferEntitlementsToGoogle',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "entitlements": [\n {\n "associationInfo": {\n "baseEntitlement": ""\n },\n "commitmentSettings": {\n "endTime": "",\n "renewalSettings": {\n "enableRenewal": false,\n "paymentCycle": {\n "duration": 0,\n "periodType": ""\n },\n "paymentPlan": "",\n "resizeUnitCount": false\n },\n "startTime": ""\n },\n "createTime": "",\n "name": "",\n "offer": "",\n "parameters": [\n {\n "editable": false,\n "name": "",\n "value": {\n "boolValue": false,\n "doubleValue": "",\n "int64Value": "",\n "protoValue": {},\n "stringValue": ""\n }\n }\n ],\n "provisionedService": {\n "productId": "",\n "provisioningId": "",\n "skuId": ""\n },\n "provisioningState": "",\n "purchaseOrderId": "",\n "suspensionReasons": [],\n "trialSettings": {\n "endTime": "",\n "trial": false\n },\n "updateTime": ""\n }\n ],\n "requestId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent:transferEntitlementsToGoogle")
.post(body)
.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/v1/:parent:transferEntitlementsToGoogle',
headers: {
'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({
entitlements: [
{
associationInfo: {baseEntitlement: ''},
commitmentSettings: {
endTime: '',
renewalSettings: {
enableRenewal: false,
paymentCycle: {duration: 0, periodType: ''},
paymentPlan: '',
resizeUnitCount: false
},
startTime: ''
},
createTime: '',
name: '',
offer: '',
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
provisionedService: {productId: '', provisioningId: '', skuId: ''},
provisioningState: '',
purchaseOrderId: '',
suspensionReasons: [],
trialSettings: {endTime: '', trial: false},
updateTime: ''
}
],
requestId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent:transferEntitlementsToGoogle',
headers: {'content-type': 'application/json'},
body: {
entitlements: [
{
associationInfo: {baseEntitlement: ''},
commitmentSettings: {
endTime: '',
renewalSettings: {
enableRenewal: false,
paymentCycle: {duration: 0, periodType: ''},
paymentPlan: '',
resizeUnitCount: false
},
startTime: ''
},
createTime: '',
name: '',
offer: '',
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
provisionedService: {productId: '', provisioningId: '', skuId: ''},
provisioningState: '',
purchaseOrderId: '',
suspensionReasons: [],
trialSettings: {endTime: '', trial: false},
updateTime: ''
}
],
requestId: ''
},
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}}/v1/:parent:transferEntitlementsToGoogle');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
entitlements: [
{
associationInfo: {
baseEntitlement: ''
},
commitmentSettings: {
endTime: '',
renewalSettings: {
enableRenewal: false,
paymentCycle: {
duration: 0,
periodType: ''
},
paymentPlan: '',
resizeUnitCount: false
},
startTime: ''
},
createTime: '',
name: '',
offer: '',
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
provisionedService: {
productId: '',
provisioningId: '',
skuId: ''
},
provisioningState: '',
purchaseOrderId: '',
suspensionReasons: [],
trialSettings: {
endTime: '',
trial: false
},
updateTime: ''
}
],
requestId: ''
});
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}}/v1/:parent:transferEntitlementsToGoogle',
headers: {'content-type': 'application/json'},
data: {
entitlements: [
{
associationInfo: {baseEntitlement: ''},
commitmentSettings: {
endTime: '',
renewalSettings: {
enableRenewal: false,
paymentCycle: {duration: 0, periodType: ''},
paymentPlan: '',
resizeUnitCount: false
},
startTime: ''
},
createTime: '',
name: '',
offer: '',
parameters: [
{
editable: false,
name: '',
value: {
boolValue: false,
doubleValue: '',
int64Value: '',
protoValue: {},
stringValue: ''
}
}
],
provisionedService: {productId: '', provisioningId: '', skuId: ''},
provisioningState: '',
purchaseOrderId: '',
suspensionReasons: [],
trialSettings: {endTime: '', trial: false},
updateTime: ''
}
],
requestId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent:transferEntitlementsToGoogle';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"entitlements":[{"associationInfo":{"baseEntitlement":""},"commitmentSettings":{"endTime":"","renewalSettings":{"enableRenewal":false,"paymentCycle":{"duration":0,"periodType":""},"paymentPlan":"","resizeUnitCount":false},"startTime":""},"createTime":"","name":"","offer":"","parameters":[{"editable":false,"name":"","value":{"boolValue":false,"doubleValue":"","int64Value":"","protoValue":{},"stringValue":""}}],"provisionedService":{"productId":"","provisioningId":"","skuId":""},"provisioningState":"","purchaseOrderId":"","suspensionReasons":[],"trialSettings":{"endTime":"","trial":false},"updateTime":""}],"requestId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"entitlements": @[ @{ @"associationInfo": @{ @"baseEntitlement": @"" }, @"commitmentSettings": @{ @"endTime": @"", @"renewalSettings": @{ @"enableRenewal": @NO, @"paymentCycle": @{ @"duration": @0, @"periodType": @"" }, @"paymentPlan": @"", @"resizeUnitCount": @NO }, @"startTime": @"" }, @"createTime": @"", @"name": @"", @"offer": @"", @"parameters": @[ @{ @"editable": @NO, @"name": @"", @"value": @{ @"boolValue": @NO, @"doubleValue": @"", @"int64Value": @"", @"protoValue": @{ }, @"stringValue": @"" } } ], @"provisionedService": @{ @"productId": @"", @"provisioningId": @"", @"skuId": @"" }, @"provisioningState": @"", @"purchaseOrderId": @"", @"suspensionReasons": @[ ], @"trialSettings": @{ @"endTime": @"", @"trial": @NO }, @"updateTime": @"" } ],
@"requestId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent:transferEntitlementsToGoogle"]
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}}/v1/:parent:transferEntitlementsToGoogle" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent:transferEntitlementsToGoogle",
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([
'entitlements' => [
[
'associationInfo' => [
'baseEntitlement' => ''
],
'commitmentSettings' => [
'endTime' => '',
'renewalSettings' => [
'enableRenewal' => null,
'paymentCycle' => [
'duration' => 0,
'periodType' => ''
],
'paymentPlan' => '',
'resizeUnitCount' => null
],
'startTime' => ''
],
'createTime' => '',
'name' => '',
'offer' => '',
'parameters' => [
[
'editable' => null,
'name' => '',
'value' => [
'boolValue' => null,
'doubleValue' => '',
'int64Value' => '',
'protoValue' => [
],
'stringValue' => ''
]
]
],
'provisionedService' => [
'productId' => '',
'provisioningId' => '',
'skuId' => ''
],
'provisioningState' => '',
'purchaseOrderId' => '',
'suspensionReasons' => [
],
'trialSettings' => [
'endTime' => '',
'trial' => null
],
'updateTime' => ''
]
],
'requestId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:parent:transferEntitlementsToGoogle', [
'body' => '{
"entitlements": [
{
"associationInfo": {
"baseEntitlement": ""
},
"commitmentSettings": {
"endTime": "",
"renewalSettings": {
"enableRenewal": false,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": false
},
"startTime": ""
},
"createTime": "",
"name": "",
"offer": "",
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"provisionedService": {
"productId": "",
"provisioningId": "",
"skuId": ""
},
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": [],
"trialSettings": {
"endTime": "",
"trial": false
},
"updateTime": ""
}
],
"requestId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent:transferEntitlementsToGoogle');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'entitlements' => [
[
'associationInfo' => [
'baseEntitlement' => ''
],
'commitmentSettings' => [
'endTime' => '',
'renewalSettings' => [
'enableRenewal' => null,
'paymentCycle' => [
'duration' => 0,
'periodType' => ''
],
'paymentPlan' => '',
'resizeUnitCount' => null
],
'startTime' => ''
],
'createTime' => '',
'name' => '',
'offer' => '',
'parameters' => [
[
'editable' => null,
'name' => '',
'value' => [
'boolValue' => null,
'doubleValue' => '',
'int64Value' => '',
'protoValue' => [
],
'stringValue' => ''
]
]
],
'provisionedService' => [
'productId' => '',
'provisioningId' => '',
'skuId' => ''
],
'provisioningState' => '',
'purchaseOrderId' => '',
'suspensionReasons' => [
],
'trialSettings' => [
'endTime' => '',
'trial' => null
],
'updateTime' => ''
]
],
'requestId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'entitlements' => [
[
'associationInfo' => [
'baseEntitlement' => ''
],
'commitmentSettings' => [
'endTime' => '',
'renewalSettings' => [
'enableRenewal' => null,
'paymentCycle' => [
'duration' => 0,
'periodType' => ''
],
'paymentPlan' => '',
'resizeUnitCount' => null
],
'startTime' => ''
],
'createTime' => '',
'name' => '',
'offer' => '',
'parameters' => [
[
'editable' => null,
'name' => '',
'value' => [
'boolValue' => null,
'doubleValue' => '',
'int64Value' => '',
'protoValue' => [
],
'stringValue' => ''
]
]
],
'provisionedService' => [
'productId' => '',
'provisioningId' => '',
'skuId' => ''
],
'provisioningState' => '',
'purchaseOrderId' => '',
'suspensionReasons' => [
],
'trialSettings' => [
'endTime' => '',
'trial' => null
],
'updateTime' => ''
]
],
'requestId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent:transferEntitlementsToGoogle');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent:transferEntitlementsToGoogle' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"entitlements": [
{
"associationInfo": {
"baseEntitlement": ""
},
"commitmentSettings": {
"endTime": "",
"renewalSettings": {
"enableRenewal": false,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": false
},
"startTime": ""
},
"createTime": "",
"name": "",
"offer": "",
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"provisionedService": {
"productId": "",
"provisioningId": "",
"skuId": ""
},
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": [],
"trialSettings": {
"endTime": "",
"trial": false
},
"updateTime": ""
}
],
"requestId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent:transferEntitlementsToGoogle' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"entitlements": [
{
"associationInfo": {
"baseEntitlement": ""
},
"commitmentSettings": {
"endTime": "",
"renewalSettings": {
"enableRenewal": false,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": false
},
"startTime": ""
},
"createTime": "",
"name": "",
"offer": "",
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"provisionedService": {
"productId": "",
"provisioningId": "",
"skuId": ""
},
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": [],
"trialSettings": {
"endTime": "",
"trial": false
},
"updateTime": ""
}
],
"requestId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent:transferEntitlementsToGoogle", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent:transferEntitlementsToGoogle"
payload = {
"entitlements": [
{
"associationInfo": { "baseEntitlement": "" },
"commitmentSettings": {
"endTime": "",
"renewalSettings": {
"enableRenewal": False,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": False
},
"startTime": ""
},
"createTime": "",
"name": "",
"offer": "",
"parameters": [
{
"editable": False,
"name": "",
"value": {
"boolValue": False,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"provisionedService": {
"productId": "",
"provisioningId": "",
"skuId": ""
},
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": [],
"trialSettings": {
"endTime": "",
"trial": False
},
"updateTime": ""
}
],
"requestId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent:transferEntitlementsToGoogle"
payload <- "{\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent:transferEntitlementsToGoogle")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\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/v1/:parent:transferEntitlementsToGoogle') do |req|
req.body = "{\n \"entitlements\": [\n {\n \"associationInfo\": {\n \"baseEntitlement\": \"\"\n },\n \"commitmentSettings\": {\n \"endTime\": \"\",\n \"renewalSettings\": {\n \"enableRenewal\": false,\n \"paymentCycle\": {\n \"duration\": 0,\n \"periodType\": \"\"\n },\n \"paymentPlan\": \"\",\n \"resizeUnitCount\": false\n },\n \"startTime\": \"\"\n },\n \"createTime\": \"\",\n \"name\": \"\",\n \"offer\": \"\",\n \"parameters\": [\n {\n \"editable\": false,\n \"name\": \"\",\n \"value\": {\n \"boolValue\": false,\n \"doubleValue\": \"\",\n \"int64Value\": \"\",\n \"protoValue\": {},\n \"stringValue\": \"\"\n }\n }\n ],\n \"provisionedService\": {\n \"productId\": \"\",\n \"provisioningId\": \"\",\n \"skuId\": \"\"\n },\n \"provisioningState\": \"\",\n \"purchaseOrderId\": \"\",\n \"suspensionReasons\": [],\n \"trialSettings\": {\n \"endTime\": \"\",\n \"trial\": false\n },\n \"updateTime\": \"\"\n }\n ],\n \"requestId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent:transferEntitlementsToGoogle";
let payload = json!({
"entitlements": (
json!({
"associationInfo": json!({"baseEntitlement": ""}),
"commitmentSettings": json!({
"endTime": "",
"renewalSettings": json!({
"enableRenewal": false,
"paymentCycle": json!({
"duration": 0,
"periodType": ""
}),
"paymentPlan": "",
"resizeUnitCount": false
}),
"startTime": ""
}),
"createTime": "",
"name": "",
"offer": "",
"parameters": (
json!({
"editable": false,
"name": "",
"value": json!({
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": json!({}),
"stringValue": ""
})
})
),
"provisionedService": json!({
"productId": "",
"provisioningId": "",
"skuId": ""
}),
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": (),
"trialSettings": json!({
"endTime": "",
"trial": false
}),
"updateTime": ""
})
),
"requestId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
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}}/v1/:parent:transferEntitlementsToGoogle \
--header 'content-type: application/json' \
--data '{
"entitlements": [
{
"associationInfo": {
"baseEntitlement": ""
},
"commitmentSettings": {
"endTime": "",
"renewalSettings": {
"enableRenewal": false,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": false
},
"startTime": ""
},
"createTime": "",
"name": "",
"offer": "",
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"provisionedService": {
"productId": "",
"provisioningId": "",
"skuId": ""
},
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": [],
"trialSettings": {
"endTime": "",
"trial": false
},
"updateTime": ""
}
],
"requestId": ""
}'
echo '{
"entitlements": [
{
"associationInfo": {
"baseEntitlement": ""
},
"commitmentSettings": {
"endTime": "",
"renewalSettings": {
"enableRenewal": false,
"paymentCycle": {
"duration": 0,
"periodType": ""
},
"paymentPlan": "",
"resizeUnitCount": false
},
"startTime": ""
},
"createTime": "",
"name": "",
"offer": "",
"parameters": [
{
"editable": false,
"name": "",
"value": {
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": {},
"stringValue": ""
}
}
],
"provisionedService": {
"productId": "",
"provisioningId": "",
"skuId": ""
},
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": [],
"trialSettings": {
"endTime": "",
"trial": false
},
"updateTime": ""
}
],
"requestId": ""
}' | \
http POST {{baseUrl}}/v1/:parent:transferEntitlementsToGoogle \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "entitlements": [\n {\n "associationInfo": {\n "baseEntitlement": ""\n },\n "commitmentSettings": {\n "endTime": "",\n "renewalSettings": {\n "enableRenewal": false,\n "paymentCycle": {\n "duration": 0,\n "periodType": ""\n },\n "paymentPlan": "",\n "resizeUnitCount": false\n },\n "startTime": ""\n },\n "createTime": "",\n "name": "",\n "offer": "",\n "parameters": [\n {\n "editable": false,\n "name": "",\n "value": {\n "boolValue": false,\n "doubleValue": "",\n "int64Value": "",\n "protoValue": {},\n "stringValue": ""\n }\n }\n ],\n "provisionedService": {\n "productId": "",\n "provisioningId": "",\n "skuId": ""\n },\n "provisioningState": "",\n "purchaseOrderId": "",\n "suspensionReasons": [],\n "trialSettings": {\n "endTime": "",\n "trial": false\n },\n "updateTime": ""\n }\n ],\n "requestId": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:parent:transferEntitlementsToGoogle
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"entitlements": [
[
"associationInfo": ["baseEntitlement": ""],
"commitmentSettings": [
"endTime": "",
"renewalSettings": [
"enableRenewal": false,
"paymentCycle": [
"duration": 0,
"periodType": ""
],
"paymentPlan": "",
"resizeUnitCount": false
],
"startTime": ""
],
"createTime": "",
"name": "",
"offer": "",
"parameters": [
[
"editable": false,
"name": "",
"value": [
"boolValue": false,
"doubleValue": "",
"int64Value": "",
"protoValue": [],
"stringValue": ""
]
]
],
"provisionedService": [
"productId": "",
"provisioningId": "",
"skuId": ""
],
"provisioningState": "",
"purchaseOrderId": "",
"suspensionReasons": [],
"trialSettings": [
"endTime": "",
"trial": false
],
"updateTime": ""
]
],
"requestId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent:transferEntitlementsToGoogle")! 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
cloudchannel.accounts.listSubscribers
{{baseUrl}}/v1/:account:listSubscribers
QUERY PARAMS
account
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:account:listSubscribers");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:account:listSubscribers")
require "http/client"
url = "{{baseUrl}}/v1/:account:listSubscribers"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:account:listSubscribers"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:account:listSubscribers");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:account:listSubscribers"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:account:listSubscribers HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:account:listSubscribers")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:account:listSubscribers"))
.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}}/v1/:account:listSubscribers")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:account:listSubscribers")
.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}}/v1/:account:listSubscribers');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:account:listSubscribers'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:account:listSubscribers';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:account:listSubscribers',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:account:listSubscribers")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:account:listSubscribers',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:account:listSubscribers'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:account:listSubscribers');
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}}/v1/:account:listSubscribers'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:account:listSubscribers';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:account:listSubscribers"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:account:listSubscribers" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:account:listSubscribers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:account:listSubscribers');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:account:listSubscribers');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:account:listSubscribers');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:account:listSubscribers' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:account:listSubscribers' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:account:listSubscribers")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:account:listSubscribers"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:account:listSubscribers"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:account:listSubscribers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:account:listSubscribers') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:account:listSubscribers";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:account:listSubscribers
http GET {{baseUrl}}/v1/:account:listSubscribers
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:account:listSubscribers
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:account:listSubscribers")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
cloudchannel.accounts.listTransferableOffers
{{baseUrl}}/v1/:parent:listTransferableOffers
QUERY PARAMS
parent
BODY json
{
"cloudIdentityId": "",
"customerName": "",
"languageCode": "",
"pageSize": 0,
"pageToken": "",
"sku": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent:listTransferableOffers");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"sku\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent:listTransferableOffers" {:content-type :json
:form-params {:cloudIdentityId ""
:customerName ""
:languageCode ""
:pageSize 0
:pageToken ""
:sku ""}})
require "http/client"
url = "{{baseUrl}}/v1/:parent:listTransferableOffers"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"sku\": \"\"\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}}/v1/:parent:listTransferableOffers"),
Content = new StringContent("{\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"sku\": \"\"\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}}/v1/:parent:listTransferableOffers");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"sku\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent:listTransferableOffers"
payload := strings.NewReader("{\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"sku\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v1/:parent:listTransferableOffers HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 120
{
"cloudIdentityId": "",
"customerName": "",
"languageCode": "",
"pageSize": 0,
"pageToken": "",
"sku": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent:listTransferableOffers")
.setHeader("content-type", "application/json")
.setBody("{\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"sku\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent:listTransferableOffers"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"sku\": \"\"\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 \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"sku\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent:listTransferableOffers")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent:listTransferableOffers")
.header("content-type", "application/json")
.body("{\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"sku\": \"\"\n}")
.asString();
const data = JSON.stringify({
cloudIdentityId: '',
customerName: '',
languageCode: '',
pageSize: 0,
pageToken: '',
sku: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:parent:listTransferableOffers');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent:listTransferableOffers',
headers: {'content-type': 'application/json'},
data: {
cloudIdentityId: '',
customerName: '',
languageCode: '',
pageSize: 0,
pageToken: '',
sku: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent:listTransferableOffers';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"cloudIdentityId":"","customerName":"","languageCode":"","pageSize":0,"pageToken":"","sku":""}'
};
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}}/v1/:parent:listTransferableOffers',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "cloudIdentityId": "",\n "customerName": "",\n "languageCode": "",\n "pageSize": 0,\n "pageToken": "",\n "sku": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"sku\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent:listTransferableOffers")
.post(body)
.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/v1/:parent:listTransferableOffers',
headers: {
'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({
cloudIdentityId: '',
customerName: '',
languageCode: '',
pageSize: 0,
pageToken: '',
sku: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent:listTransferableOffers',
headers: {'content-type': 'application/json'},
body: {
cloudIdentityId: '',
customerName: '',
languageCode: '',
pageSize: 0,
pageToken: '',
sku: ''
},
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}}/v1/:parent:listTransferableOffers');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
cloudIdentityId: '',
customerName: '',
languageCode: '',
pageSize: 0,
pageToken: '',
sku: ''
});
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}}/v1/:parent:listTransferableOffers',
headers: {'content-type': 'application/json'},
data: {
cloudIdentityId: '',
customerName: '',
languageCode: '',
pageSize: 0,
pageToken: '',
sku: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent:listTransferableOffers';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"cloudIdentityId":"","customerName":"","languageCode":"","pageSize":0,"pageToken":"","sku":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"cloudIdentityId": @"",
@"customerName": @"",
@"languageCode": @"",
@"pageSize": @0,
@"pageToken": @"",
@"sku": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent:listTransferableOffers"]
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}}/v1/:parent:listTransferableOffers" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"sku\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent:listTransferableOffers",
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([
'cloudIdentityId' => '',
'customerName' => '',
'languageCode' => '',
'pageSize' => 0,
'pageToken' => '',
'sku' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:parent:listTransferableOffers', [
'body' => '{
"cloudIdentityId": "",
"customerName": "",
"languageCode": "",
"pageSize": 0,
"pageToken": "",
"sku": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent:listTransferableOffers');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'cloudIdentityId' => '',
'customerName' => '',
'languageCode' => '',
'pageSize' => 0,
'pageToken' => '',
'sku' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'cloudIdentityId' => '',
'customerName' => '',
'languageCode' => '',
'pageSize' => 0,
'pageToken' => '',
'sku' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent:listTransferableOffers');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent:listTransferableOffers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"cloudIdentityId": "",
"customerName": "",
"languageCode": "",
"pageSize": 0,
"pageToken": "",
"sku": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent:listTransferableOffers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"cloudIdentityId": "",
"customerName": "",
"languageCode": "",
"pageSize": 0,
"pageToken": "",
"sku": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"sku\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent:listTransferableOffers", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent:listTransferableOffers"
payload = {
"cloudIdentityId": "",
"customerName": "",
"languageCode": "",
"pageSize": 0,
"pageToken": "",
"sku": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent:listTransferableOffers"
payload <- "{\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"sku\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent:listTransferableOffers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"sku\": \"\"\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/v1/:parent:listTransferableOffers') do |req|
req.body = "{\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\",\n \"sku\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent:listTransferableOffers";
let payload = json!({
"cloudIdentityId": "",
"customerName": "",
"languageCode": "",
"pageSize": 0,
"pageToken": "",
"sku": ""
});
let mut headers = reqwest::header::HeaderMap::new();
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}}/v1/:parent:listTransferableOffers \
--header 'content-type: application/json' \
--data '{
"cloudIdentityId": "",
"customerName": "",
"languageCode": "",
"pageSize": 0,
"pageToken": "",
"sku": ""
}'
echo '{
"cloudIdentityId": "",
"customerName": "",
"languageCode": "",
"pageSize": 0,
"pageToken": "",
"sku": ""
}' | \
http POST {{baseUrl}}/v1/:parent:listTransferableOffers \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "cloudIdentityId": "",\n "customerName": "",\n "languageCode": "",\n "pageSize": 0,\n "pageToken": "",\n "sku": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:parent:listTransferableOffers
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"cloudIdentityId": "",
"customerName": "",
"languageCode": "",
"pageSize": 0,
"pageToken": "",
"sku": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent:listTransferableOffers")! 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()
POST
cloudchannel.accounts.listTransferableSkus
{{baseUrl}}/v1/:parent:listTransferableSkus
QUERY PARAMS
parent
BODY json
{
"authToken": "",
"cloudIdentityId": "",
"customerName": "",
"languageCode": "",
"pageSize": 0,
"pageToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent:listTransferableSkus");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"authToken\": \"\",\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent:listTransferableSkus" {:content-type :json
:form-params {:authToken ""
:cloudIdentityId ""
:customerName ""
:languageCode ""
:pageSize 0
:pageToken ""}})
require "http/client"
url = "{{baseUrl}}/v1/:parent:listTransferableSkus"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"authToken\": \"\",\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\"\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}}/v1/:parent:listTransferableSkus"),
Content = new StringContent("{\n \"authToken\": \"\",\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\"\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}}/v1/:parent:listTransferableSkus");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"authToken\": \"\",\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent:listTransferableSkus"
payload := strings.NewReader("{\n \"authToken\": \"\",\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v1/:parent:listTransferableSkus HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 126
{
"authToken": "",
"cloudIdentityId": "",
"customerName": "",
"languageCode": "",
"pageSize": 0,
"pageToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent:listTransferableSkus")
.setHeader("content-type", "application/json")
.setBody("{\n \"authToken\": \"\",\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent:listTransferableSkus"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"authToken\": \"\",\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\"\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 \"authToken\": \"\",\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent:listTransferableSkus")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent:listTransferableSkus")
.header("content-type", "application/json")
.body("{\n \"authToken\": \"\",\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
authToken: '',
cloudIdentityId: '',
customerName: '',
languageCode: '',
pageSize: 0,
pageToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:parent:listTransferableSkus');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent:listTransferableSkus',
headers: {'content-type': 'application/json'},
data: {
authToken: '',
cloudIdentityId: '',
customerName: '',
languageCode: '',
pageSize: 0,
pageToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent:listTransferableSkus';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"authToken":"","cloudIdentityId":"","customerName":"","languageCode":"","pageSize":0,"pageToken":""}'
};
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}}/v1/:parent:listTransferableSkus',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "authToken": "",\n "cloudIdentityId": "",\n "customerName": "",\n "languageCode": "",\n "pageSize": 0,\n "pageToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"authToken\": \"\",\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent:listTransferableSkus")
.post(body)
.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/v1/:parent:listTransferableSkus',
headers: {
'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({
authToken: '',
cloudIdentityId: '',
customerName: '',
languageCode: '',
pageSize: 0,
pageToken: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent:listTransferableSkus',
headers: {'content-type': 'application/json'},
body: {
authToken: '',
cloudIdentityId: '',
customerName: '',
languageCode: '',
pageSize: 0,
pageToken: ''
},
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}}/v1/:parent:listTransferableSkus');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
authToken: '',
cloudIdentityId: '',
customerName: '',
languageCode: '',
pageSize: 0,
pageToken: ''
});
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}}/v1/:parent:listTransferableSkus',
headers: {'content-type': 'application/json'},
data: {
authToken: '',
cloudIdentityId: '',
customerName: '',
languageCode: '',
pageSize: 0,
pageToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent:listTransferableSkus';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"authToken":"","cloudIdentityId":"","customerName":"","languageCode":"","pageSize":0,"pageToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"authToken": @"",
@"cloudIdentityId": @"",
@"customerName": @"",
@"languageCode": @"",
@"pageSize": @0,
@"pageToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent:listTransferableSkus"]
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}}/v1/:parent:listTransferableSkus" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"authToken\": \"\",\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent:listTransferableSkus",
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([
'authToken' => '',
'cloudIdentityId' => '',
'customerName' => '',
'languageCode' => '',
'pageSize' => 0,
'pageToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:parent:listTransferableSkus', [
'body' => '{
"authToken": "",
"cloudIdentityId": "",
"customerName": "",
"languageCode": "",
"pageSize": 0,
"pageToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent:listTransferableSkus');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'authToken' => '',
'cloudIdentityId' => '',
'customerName' => '',
'languageCode' => '',
'pageSize' => 0,
'pageToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'authToken' => '',
'cloudIdentityId' => '',
'customerName' => '',
'languageCode' => '',
'pageSize' => 0,
'pageToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent:listTransferableSkus');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent:listTransferableSkus' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"authToken": "",
"cloudIdentityId": "",
"customerName": "",
"languageCode": "",
"pageSize": 0,
"pageToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent:listTransferableSkus' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"authToken": "",
"cloudIdentityId": "",
"customerName": "",
"languageCode": "",
"pageSize": 0,
"pageToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"authToken\": \"\",\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent:listTransferableSkus", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent:listTransferableSkus"
payload = {
"authToken": "",
"cloudIdentityId": "",
"customerName": "",
"languageCode": "",
"pageSize": 0,
"pageToken": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent:listTransferableSkus"
payload <- "{\n \"authToken\": \"\",\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent:listTransferableSkus")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"authToken\": \"\",\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\"\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/v1/:parent:listTransferableSkus') do |req|
req.body = "{\n \"authToken\": \"\",\n \"cloudIdentityId\": \"\",\n \"customerName\": \"\",\n \"languageCode\": \"\",\n \"pageSize\": 0,\n \"pageToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent:listTransferableSkus";
let payload = json!({
"authToken": "",
"cloudIdentityId": "",
"customerName": "",
"languageCode": "",
"pageSize": 0,
"pageToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
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}}/v1/:parent:listTransferableSkus \
--header 'content-type: application/json' \
--data '{
"authToken": "",
"cloudIdentityId": "",
"customerName": "",
"languageCode": "",
"pageSize": 0,
"pageToken": ""
}'
echo '{
"authToken": "",
"cloudIdentityId": "",
"customerName": "",
"languageCode": "",
"pageSize": 0,
"pageToken": ""
}' | \
http POST {{baseUrl}}/v1/:parent:listTransferableSkus \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "authToken": "",\n "cloudIdentityId": "",\n "customerName": "",\n "languageCode": "",\n "pageSize": 0,\n "pageToken": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:parent:listTransferableSkus
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"authToken": "",
"cloudIdentityId": "",
"customerName": "",
"languageCode": "",
"pageSize": 0,
"pageToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent:listTransferableSkus")! 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
cloudchannel.accounts.offers.list
{{baseUrl}}/v1/:parent/offers
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/offers");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/offers")
require "http/client"
url = "{{baseUrl}}/v1/:parent/offers"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/offers"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/offers");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/offers"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/offers HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/offers")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/offers"))
.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}}/v1/:parent/offers")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/offers")
.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}}/v1/:parent/offers');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/offers'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/offers';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/offers',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/offers")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/offers',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/offers'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/offers');
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}}/v1/:parent/offers'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/offers';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/offers"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/offers" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/offers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/offers');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/offers');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/offers');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/offers' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/offers' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/offers")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/offers"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/offers"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/offers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/offers') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/offers";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/offers
http GET {{baseUrl}}/v1/:parent/offers
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/offers
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/offers")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
cloudchannel.accounts.register
{{baseUrl}}/v1/:account:register
QUERY PARAMS
account
BODY json
{
"serviceAccount": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:account:register");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"serviceAccount\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:account:register" {:content-type :json
:form-params {:serviceAccount ""}})
require "http/client"
url = "{{baseUrl}}/v1/:account:register"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"serviceAccount\": \"\"\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}}/v1/:account:register"),
Content = new StringContent("{\n \"serviceAccount\": \"\"\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}}/v1/:account:register");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"serviceAccount\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:account:register"
payload := strings.NewReader("{\n \"serviceAccount\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v1/:account:register HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 26
{
"serviceAccount": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:account:register")
.setHeader("content-type", "application/json")
.setBody("{\n \"serviceAccount\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:account:register"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"serviceAccount\": \"\"\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 \"serviceAccount\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:account:register")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:account:register")
.header("content-type", "application/json")
.body("{\n \"serviceAccount\": \"\"\n}")
.asString();
const data = JSON.stringify({
serviceAccount: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:account:register');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:account:register',
headers: {'content-type': 'application/json'},
data: {serviceAccount: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:account:register';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"serviceAccount":""}'
};
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}}/v1/:account:register',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "serviceAccount": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"serviceAccount\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:account:register")
.post(body)
.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/v1/:account:register',
headers: {
'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({serviceAccount: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:account:register',
headers: {'content-type': 'application/json'},
body: {serviceAccount: ''},
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}}/v1/:account:register');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
serviceAccount: ''
});
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}}/v1/:account:register',
headers: {'content-type': 'application/json'},
data: {serviceAccount: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:account:register';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"serviceAccount":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"serviceAccount": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:account:register"]
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}}/v1/:account:register" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"serviceAccount\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:account:register",
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([
'serviceAccount' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:account:register', [
'body' => '{
"serviceAccount": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:account:register');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'serviceAccount' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'serviceAccount' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:account:register');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:account:register' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"serviceAccount": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:account:register' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"serviceAccount": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"serviceAccount\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:account:register", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:account:register"
payload = { "serviceAccount": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:account:register"
payload <- "{\n \"serviceAccount\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:account:register")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"serviceAccount\": \"\"\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/v1/:account:register') do |req|
req.body = "{\n \"serviceAccount\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:account:register";
let payload = json!({"serviceAccount": ""});
let mut headers = reqwest::header::HeaderMap::new();
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}}/v1/:account:register \
--header 'content-type: application/json' \
--data '{
"serviceAccount": ""
}'
echo '{
"serviceAccount": ""
}' | \
http POST {{baseUrl}}/v1/:account:register \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "serviceAccount": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:account:register
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["serviceAccount": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:account:register")! 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()
POST
cloudchannel.accounts.reportJobs.fetchReportResults
{{baseUrl}}/v1/:reportJob:fetchReportResults
QUERY PARAMS
reportJob
BODY json
{
"pageSize": 0,
"pageToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:reportJob:fetchReportResults");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"pageSize\": 0,\n \"pageToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:reportJob:fetchReportResults" {:content-type :json
:form-params {:pageSize 0
:pageToken ""}})
require "http/client"
url = "{{baseUrl}}/v1/:reportJob:fetchReportResults"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"pageSize\": 0,\n \"pageToken\": \"\"\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}}/v1/:reportJob:fetchReportResults"),
Content = new StringContent("{\n \"pageSize\": 0,\n \"pageToken\": \"\"\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}}/v1/:reportJob:fetchReportResults");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"pageSize\": 0,\n \"pageToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:reportJob:fetchReportResults"
payload := strings.NewReader("{\n \"pageSize\": 0,\n \"pageToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v1/:reportJob:fetchReportResults HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 38
{
"pageSize": 0,
"pageToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:reportJob:fetchReportResults")
.setHeader("content-type", "application/json")
.setBody("{\n \"pageSize\": 0,\n \"pageToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:reportJob:fetchReportResults"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"pageSize\": 0,\n \"pageToken\": \"\"\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 \"pageSize\": 0,\n \"pageToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:reportJob:fetchReportResults")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:reportJob:fetchReportResults")
.header("content-type", "application/json")
.body("{\n \"pageSize\": 0,\n \"pageToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
pageSize: 0,
pageToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:reportJob:fetchReportResults');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:reportJob:fetchReportResults',
headers: {'content-type': 'application/json'},
data: {pageSize: 0, pageToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:reportJob:fetchReportResults';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"pageSize":0,"pageToken":""}'
};
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}}/v1/:reportJob:fetchReportResults',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "pageSize": 0,\n "pageToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"pageSize\": 0,\n \"pageToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:reportJob:fetchReportResults")
.post(body)
.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/v1/:reportJob:fetchReportResults',
headers: {
'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({pageSize: 0, pageToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:reportJob:fetchReportResults',
headers: {'content-type': 'application/json'},
body: {pageSize: 0, pageToken: ''},
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}}/v1/:reportJob:fetchReportResults');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
pageSize: 0,
pageToken: ''
});
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}}/v1/:reportJob:fetchReportResults',
headers: {'content-type': 'application/json'},
data: {pageSize: 0, pageToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:reportJob:fetchReportResults';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"pageSize":0,"pageToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"pageSize": @0,
@"pageToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:reportJob:fetchReportResults"]
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}}/v1/:reportJob:fetchReportResults" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"pageSize\": 0,\n \"pageToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:reportJob:fetchReportResults",
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([
'pageSize' => 0,
'pageToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:reportJob:fetchReportResults', [
'body' => '{
"pageSize": 0,
"pageToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:reportJob:fetchReportResults');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'pageSize' => 0,
'pageToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'pageSize' => 0,
'pageToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:reportJob:fetchReportResults');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:reportJob:fetchReportResults' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"pageSize": 0,
"pageToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:reportJob:fetchReportResults' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"pageSize": 0,
"pageToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"pageSize\": 0,\n \"pageToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:reportJob:fetchReportResults", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:reportJob:fetchReportResults"
payload = {
"pageSize": 0,
"pageToken": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:reportJob:fetchReportResults"
payload <- "{\n \"pageSize\": 0,\n \"pageToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:reportJob:fetchReportResults")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"pageSize\": 0,\n \"pageToken\": \"\"\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/v1/:reportJob:fetchReportResults') do |req|
req.body = "{\n \"pageSize\": 0,\n \"pageToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:reportJob:fetchReportResults";
let payload = json!({
"pageSize": 0,
"pageToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
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}}/v1/:reportJob:fetchReportResults \
--header 'content-type: application/json' \
--data '{
"pageSize": 0,
"pageToken": ""
}'
echo '{
"pageSize": 0,
"pageToken": ""
}' | \
http POST {{baseUrl}}/v1/:reportJob:fetchReportResults \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "pageSize": 0,\n "pageToken": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:reportJob:fetchReportResults
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"pageSize": 0,
"pageToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:reportJob:fetchReportResults")! 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
cloudchannel.accounts.reports.list
{{baseUrl}}/v1/:parent/reports
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/reports");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/reports")
require "http/client"
url = "{{baseUrl}}/v1/:parent/reports"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/reports"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/reports");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/reports"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/reports HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/reports")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/reports"))
.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}}/v1/:parent/reports")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/reports")
.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}}/v1/:parent/reports');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/reports'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/reports';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/reports',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/reports")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/reports',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/reports'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/reports');
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}}/v1/:parent/reports'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/reports';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/reports"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/reports" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/reports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/reports');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/reports');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/reports');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/reports' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/reports' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/reports")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/reports"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/reports"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/reports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/reports') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/reports";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/reports
http GET {{baseUrl}}/v1/:parent/reports
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/reports
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/reports")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
cloudchannel.accounts.reports.run
{{baseUrl}}/v1/:name:run
QUERY PARAMS
name
BODY json
{
"dateRange": {
"invoiceEndDate": {
"day": 0,
"month": 0,
"year": 0
},
"invoiceStartDate": {},
"usageEndDateTime": {
"day": 0,
"hours": 0,
"minutes": 0,
"month": 0,
"nanos": 0,
"seconds": 0,
"timeZone": {
"id": "",
"version": ""
},
"utcOffset": "",
"year": 0
},
"usageStartDateTime": {}
},
"filter": "",
"languageCode": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name:run");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"dateRange\": {\n \"invoiceEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"invoiceStartDate\": {},\n \"usageEndDateTime\": {\n \"day\": 0,\n \"hours\": 0,\n \"minutes\": 0,\n \"month\": 0,\n \"nanos\": 0,\n \"seconds\": 0,\n \"timeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"utcOffset\": \"\",\n \"year\": 0\n },\n \"usageStartDateTime\": {}\n },\n \"filter\": \"\",\n \"languageCode\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:name:run" {:content-type :json
:form-params {:dateRange {:invoiceEndDate {:day 0
:month 0
:year 0}
:invoiceStartDate {}
:usageEndDateTime {:day 0
:hours 0
:minutes 0
:month 0
:nanos 0
:seconds 0
:timeZone {:id ""
:version ""}
:utcOffset ""
:year 0}
:usageStartDateTime {}}
:filter ""
:languageCode ""}})
require "http/client"
url = "{{baseUrl}}/v1/:name:run"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"dateRange\": {\n \"invoiceEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"invoiceStartDate\": {},\n \"usageEndDateTime\": {\n \"day\": 0,\n \"hours\": 0,\n \"minutes\": 0,\n \"month\": 0,\n \"nanos\": 0,\n \"seconds\": 0,\n \"timeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"utcOffset\": \"\",\n \"year\": 0\n },\n \"usageStartDateTime\": {}\n },\n \"filter\": \"\",\n \"languageCode\": \"\"\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}}/v1/:name:run"),
Content = new StringContent("{\n \"dateRange\": {\n \"invoiceEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"invoiceStartDate\": {},\n \"usageEndDateTime\": {\n \"day\": 0,\n \"hours\": 0,\n \"minutes\": 0,\n \"month\": 0,\n \"nanos\": 0,\n \"seconds\": 0,\n \"timeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"utcOffset\": \"\",\n \"year\": 0\n },\n \"usageStartDateTime\": {}\n },\n \"filter\": \"\",\n \"languageCode\": \"\"\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}}/v1/:name:run");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"dateRange\": {\n \"invoiceEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"invoiceStartDate\": {},\n \"usageEndDateTime\": {\n \"day\": 0,\n \"hours\": 0,\n \"minutes\": 0,\n \"month\": 0,\n \"nanos\": 0,\n \"seconds\": 0,\n \"timeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"utcOffset\": \"\",\n \"year\": 0\n },\n \"usageStartDateTime\": {}\n },\n \"filter\": \"\",\n \"languageCode\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name:run"
payload := strings.NewReader("{\n \"dateRange\": {\n \"invoiceEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"invoiceStartDate\": {},\n \"usageEndDateTime\": {\n \"day\": 0,\n \"hours\": 0,\n \"minutes\": 0,\n \"month\": 0,\n \"nanos\": 0,\n \"seconds\": 0,\n \"timeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"utcOffset\": \"\",\n \"year\": 0\n },\n \"usageStartDateTime\": {}\n },\n \"filter\": \"\",\n \"languageCode\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v1/:name:run HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 451
{
"dateRange": {
"invoiceEndDate": {
"day": 0,
"month": 0,
"year": 0
},
"invoiceStartDate": {},
"usageEndDateTime": {
"day": 0,
"hours": 0,
"minutes": 0,
"month": 0,
"nanos": 0,
"seconds": 0,
"timeZone": {
"id": "",
"version": ""
},
"utcOffset": "",
"year": 0
},
"usageStartDateTime": {}
},
"filter": "",
"languageCode": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:name:run")
.setHeader("content-type", "application/json")
.setBody("{\n \"dateRange\": {\n \"invoiceEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"invoiceStartDate\": {},\n \"usageEndDateTime\": {\n \"day\": 0,\n \"hours\": 0,\n \"minutes\": 0,\n \"month\": 0,\n \"nanos\": 0,\n \"seconds\": 0,\n \"timeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"utcOffset\": \"\",\n \"year\": 0\n },\n \"usageStartDateTime\": {}\n },\n \"filter\": \"\",\n \"languageCode\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name:run"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"dateRange\": {\n \"invoiceEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"invoiceStartDate\": {},\n \"usageEndDateTime\": {\n \"day\": 0,\n \"hours\": 0,\n \"minutes\": 0,\n \"month\": 0,\n \"nanos\": 0,\n \"seconds\": 0,\n \"timeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"utcOffset\": \"\",\n \"year\": 0\n },\n \"usageStartDateTime\": {}\n },\n \"filter\": \"\",\n \"languageCode\": \"\"\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 \"dateRange\": {\n \"invoiceEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"invoiceStartDate\": {},\n \"usageEndDateTime\": {\n \"day\": 0,\n \"hours\": 0,\n \"minutes\": 0,\n \"month\": 0,\n \"nanos\": 0,\n \"seconds\": 0,\n \"timeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"utcOffset\": \"\",\n \"year\": 0\n },\n \"usageStartDateTime\": {}\n },\n \"filter\": \"\",\n \"languageCode\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name:run")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:name:run")
.header("content-type", "application/json")
.body("{\n \"dateRange\": {\n \"invoiceEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"invoiceStartDate\": {},\n \"usageEndDateTime\": {\n \"day\": 0,\n \"hours\": 0,\n \"minutes\": 0,\n \"month\": 0,\n \"nanos\": 0,\n \"seconds\": 0,\n \"timeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"utcOffset\": \"\",\n \"year\": 0\n },\n \"usageStartDateTime\": {}\n },\n \"filter\": \"\",\n \"languageCode\": \"\"\n}")
.asString();
const data = JSON.stringify({
dateRange: {
invoiceEndDate: {
day: 0,
month: 0,
year: 0
},
invoiceStartDate: {},
usageEndDateTime: {
day: 0,
hours: 0,
minutes: 0,
month: 0,
nanos: 0,
seconds: 0,
timeZone: {
id: '',
version: ''
},
utcOffset: '',
year: 0
},
usageStartDateTime: {}
},
filter: '',
languageCode: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:name:run');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:run',
headers: {'content-type': 'application/json'},
data: {
dateRange: {
invoiceEndDate: {day: 0, month: 0, year: 0},
invoiceStartDate: {},
usageEndDateTime: {
day: 0,
hours: 0,
minutes: 0,
month: 0,
nanos: 0,
seconds: 0,
timeZone: {id: '', version: ''},
utcOffset: '',
year: 0
},
usageStartDateTime: {}
},
filter: '',
languageCode: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name:run';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"dateRange":{"invoiceEndDate":{"day":0,"month":0,"year":0},"invoiceStartDate":{},"usageEndDateTime":{"day":0,"hours":0,"minutes":0,"month":0,"nanos":0,"seconds":0,"timeZone":{"id":"","version":""},"utcOffset":"","year":0},"usageStartDateTime":{}},"filter":"","languageCode":""}'
};
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}}/v1/:name:run',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "dateRange": {\n "invoiceEndDate": {\n "day": 0,\n "month": 0,\n "year": 0\n },\n "invoiceStartDate": {},\n "usageEndDateTime": {\n "day": 0,\n "hours": 0,\n "minutes": 0,\n "month": 0,\n "nanos": 0,\n "seconds": 0,\n "timeZone": {\n "id": "",\n "version": ""\n },\n "utcOffset": "",\n "year": 0\n },\n "usageStartDateTime": {}\n },\n "filter": "",\n "languageCode": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"dateRange\": {\n \"invoiceEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"invoiceStartDate\": {},\n \"usageEndDateTime\": {\n \"day\": 0,\n \"hours\": 0,\n \"minutes\": 0,\n \"month\": 0,\n \"nanos\": 0,\n \"seconds\": 0,\n \"timeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"utcOffset\": \"\",\n \"year\": 0\n },\n \"usageStartDateTime\": {}\n },\n \"filter\": \"\",\n \"languageCode\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name:run")
.post(body)
.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/v1/:name:run',
headers: {
'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({
dateRange: {
invoiceEndDate: {day: 0, month: 0, year: 0},
invoiceStartDate: {},
usageEndDateTime: {
day: 0,
hours: 0,
minutes: 0,
month: 0,
nanos: 0,
seconds: 0,
timeZone: {id: '', version: ''},
utcOffset: '',
year: 0
},
usageStartDateTime: {}
},
filter: '',
languageCode: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:run',
headers: {'content-type': 'application/json'},
body: {
dateRange: {
invoiceEndDate: {day: 0, month: 0, year: 0},
invoiceStartDate: {},
usageEndDateTime: {
day: 0,
hours: 0,
minutes: 0,
month: 0,
nanos: 0,
seconds: 0,
timeZone: {id: '', version: ''},
utcOffset: '',
year: 0
},
usageStartDateTime: {}
},
filter: '',
languageCode: ''
},
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}}/v1/:name:run');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
dateRange: {
invoiceEndDate: {
day: 0,
month: 0,
year: 0
},
invoiceStartDate: {},
usageEndDateTime: {
day: 0,
hours: 0,
minutes: 0,
month: 0,
nanos: 0,
seconds: 0,
timeZone: {
id: '',
version: ''
},
utcOffset: '',
year: 0
},
usageStartDateTime: {}
},
filter: '',
languageCode: ''
});
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}}/v1/:name:run',
headers: {'content-type': 'application/json'},
data: {
dateRange: {
invoiceEndDate: {day: 0, month: 0, year: 0},
invoiceStartDate: {},
usageEndDateTime: {
day: 0,
hours: 0,
minutes: 0,
month: 0,
nanos: 0,
seconds: 0,
timeZone: {id: '', version: ''},
utcOffset: '',
year: 0
},
usageStartDateTime: {}
},
filter: '',
languageCode: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name:run';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"dateRange":{"invoiceEndDate":{"day":0,"month":0,"year":0},"invoiceStartDate":{},"usageEndDateTime":{"day":0,"hours":0,"minutes":0,"month":0,"nanos":0,"seconds":0,"timeZone":{"id":"","version":""},"utcOffset":"","year":0},"usageStartDateTime":{}},"filter":"","languageCode":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"dateRange": @{ @"invoiceEndDate": @{ @"day": @0, @"month": @0, @"year": @0 }, @"invoiceStartDate": @{ }, @"usageEndDateTime": @{ @"day": @0, @"hours": @0, @"minutes": @0, @"month": @0, @"nanos": @0, @"seconds": @0, @"timeZone": @{ @"id": @"", @"version": @"" }, @"utcOffset": @"", @"year": @0 }, @"usageStartDateTime": @{ } },
@"filter": @"",
@"languageCode": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name:run"]
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}}/v1/:name:run" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"dateRange\": {\n \"invoiceEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"invoiceStartDate\": {},\n \"usageEndDateTime\": {\n \"day\": 0,\n \"hours\": 0,\n \"minutes\": 0,\n \"month\": 0,\n \"nanos\": 0,\n \"seconds\": 0,\n \"timeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"utcOffset\": \"\",\n \"year\": 0\n },\n \"usageStartDateTime\": {}\n },\n \"filter\": \"\",\n \"languageCode\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name:run",
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([
'dateRange' => [
'invoiceEndDate' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'invoiceStartDate' => [
],
'usageEndDateTime' => [
'day' => 0,
'hours' => 0,
'minutes' => 0,
'month' => 0,
'nanos' => 0,
'seconds' => 0,
'timeZone' => [
'id' => '',
'version' => ''
],
'utcOffset' => '',
'year' => 0
],
'usageStartDateTime' => [
]
],
'filter' => '',
'languageCode' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:name:run', [
'body' => '{
"dateRange": {
"invoiceEndDate": {
"day": 0,
"month": 0,
"year": 0
},
"invoiceStartDate": {},
"usageEndDateTime": {
"day": 0,
"hours": 0,
"minutes": 0,
"month": 0,
"nanos": 0,
"seconds": 0,
"timeZone": {
"id": "",
"version": ""
},
"utcOffset": "",
"year": 0
},
"usageStartDateTime": {}
},
"filter": "",
"languageCode": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name:run');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'dateRange' => [
'invoiceEndDate' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'invoiceStartDate' => [
],
'usageEndDateTime' => [
'day' => 0,
'hours' => 0,
'minutes' => 0,
'month' => 0,
'nanos' => 0,
'seconds' => 0,
'timeZone' => [
'id' => '',
'version' => ''
],
'utcOffset' => '',
'year' => 0
],
'usageStartDateTime' => [
]
],
'filter' => '',
'languageCode' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'dateRange' => [
'invoiceEndDate' => [
'day' => 0,
'month' => 0,
'year' => 0
],
'invoiceStartDate' => [
],
'usageEndDateTime' => [
'day' => 0,
'hours' => 0,
'minutes' => 0,
'month' => 0,
'nanos' => 0,
'seconds' => 0,
'timeZone' => [
'id' => '',
'version' => ''
],
'utcOffset' => '',
'year' => 0
],
'usageStartDateTime' => [
]
],
'filter' => '',
'languageCode' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name:run');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name:run' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"dateRange": {
"invoiceEndDate": {
"day": 0,
"month": 0,
"year": 0
},
"invoiceStartDate": {},
"usageEndDateTime": {
"day": 0,
"hours": 0,
"minutes": 0,
"month": 0,
"nanos": 0,
"seconds": 0,
"timeZone": {
"id": "",
"version": ""
},
"utcOffset": "",
"year": 0
},
"usageStartDateTime": {}
},
"filter": "",
"languageCode": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name:run' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"dateRange": {
"invoiceEndDate": {
"day": 0,
"month": 0,
"year": 0
},
"invoiceStartDate": {},
"usageEndDateTime": {
"day": 0,
"hours": 0,
"minutes": 0,
"month": 0,
"nanos": 0,
"seconds": 0,
"timeZone": {
"id": "",
"version": ""
},
"utcOffset": "",
"year": 0
},
"usageStartDateTime": {}
},
"filter": "",
"languageCode": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"dateRange\": {\n \"invoiceEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"invoiceStartDate\": {},\n \"usageEndDateTime\": {\n \"day\": 0,\n \"hours\": 0,\n \"minutes\": 0,\n \"month\": 0,\n \"nanos\": 0,\n \"seconds\": 0,\n \"timeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"utcOffset\": \"\",\n \"year\": 0\n },\n \"usageStartDateTime\": {}\n },\n \"filter\": \"\",\n \"languageCode\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:name:run", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name:run"
payload = {
"dateRange": {
"invoiceEndDate": {
"day": 0,
"month": 0,
"year": 0
},
"invoiceStartDate": {},
"usageEndDateTime": {
"day": 0,
"hours": 0,
"minutes": 0,
"month": 0,
"nanos": 0,
"seconds": 0,
"timeZone": {
"id": "",
"version": ""
},
"utcOffset": "",
"year": 0
},
"usageStartDateTime": {}
},
"filter": "",
"languageCode": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name:run"
payload <- "{\n \"dateRange\": {\n \"invoiceEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"invoiceStartDate\": {},\n \"usageEndDateTime\": {\n \"day\": 0,\n \"hours\": 0,\n \"minutes\": 0,\n \"month\": 0,\n \"nanos\": 0,\n \"seconds\": 0,\n \"timeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"utcOffset\": \"\",\n \"year\": 0\n },\n \"usageStartDateTime\": {}\n },\n \"filter\": \"\",\n \"languageCode\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name:run")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"dateRange\": {\n \"invoiceEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"invoiceStartDate\": {},\n \"usageEndDateTime\": {\n \"day\": 0,\n \"hours\": 0,\n \"minutes\": 0,\n \"month\": 0,\n \"nanos\": 0,\n \"seconds\": 0,\n \"timeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"utcOffset\": \"\",\n \"year\": 0\n },\n \"usageStartDateTime\": {}\n },\n \"filter\": \"\",\n \"languageCode\": \"\"\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/v1/:name:run') do |req|
req.body = "{\n \"dateRange\": {\n \"invoiceEndDate\": {\n \"day\": 0,\n \"month\": 0,\n \"year\": 0\n },\n \"invoiceStartDate\": {},\n \"usageEndDateTime\": {\n \"day\": 0,\n \"hours\": 0,\n \"minutes\": 0,\n \"month\": 0,\n \"nanos\": 0,\n \"seconds\": 0,\n \"timeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"utcOffset\": \"\",\n \"year\": 0\n },\n \"usageStartDateTime\": {}\n },\n \"filter\": \"\",\n \"languageCode\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name:run";
let payload = json!({
"dateRange": json!({
"invoiceEndDate": json!({
"day": 0,
"month": 0,
"year": 0
}),
"invoiceStartDate": json!({}),
"usageEndDateTime": json!({
"day": 0,
"hours": 0,
"minutes": 0,
"month": 0,
"nanos": 0,
"seconds": 0,
"timeZone": json!({
"id": "",
"version": ""
}),
"utcOffset": "",
"year": 0
}),
"usageStartDateTime": json!({})
}),
"filter": "",
"languageCode": ""
});
let mut headers = reqwest::header::HeaderMap::new();
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}}/v1/:name:run \
--header 'content-type: application/json' \
--data '{
"dateRange": {
"invoiceEndDate": {
"day": 0,
"month": 0,
"year": 0
},
"invoiceStartDate": {},
"usageEndDateTime": {
"day": 0,
"hours": 0,
"minutes": 0,
"month": 0,
"nanos": 0,
"seconds": 0,
"timeZone": {
"id": "",
"version": ""
},
"utcOffset": "",
"year": 0
},
"usageStartDateTime": {}
},
"filter": "",
"languageCode": ""
}'
echo '{
"dateRange": {
"invoiceEndDate": {
"day": 0,
"month": 0,
"year": 0
},
"invoiceStartDate": {},
"usageEndDateTime": {
"day": 0,
"hours": 0,
"minutes": 0,
"month": 0,
"nanos": 0,
"seconds": 0,
"timeZone": {
"id": "",
"version": ""
},
"utcOffset": "",
"year": 0
},
"usageStartDateTime": {}
},
"filter": "",
"languageCode": ""
}' | \
http POST {{baseUrl}}/v1/:name:run \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "dateRange": {\n "invoiceEndDate": {\n "day": 0,\n "month": 0,\n "year": 0\n },\n "invoiceStartDate": {},\n "usageEndDateTime": {\n "day": 0,\n "hours": 0,\n "minutes": 0,\n "month": 0,\n "nanos": 0,\n "seconds": 0,\n "timeZone": {\n "id": "",\n "version": ""\n },\n "utcOffset": "",\n "year": 0\n },\n "usageStartDateTime": {}\n },\n "filter": "",\n "languageCode": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:name:run
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"dateRange": [
"invoiceEndDate": [
"day": 0,
"month": 0,
"year": 0
],
"invoiceStartDate": [],
"usageEndDateTime": [
"day": 0,
"hours": 0,
"minutes": 0,
"month": 0,
"nanos": 0,
"seconds": 0,
"timeZone": [
"id": "",
"version": ""
],
"utcOffset": "",
"year": 0
],
"usageStartDateTime": []
],
"filter": "",
"languageCode": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name:run")! 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()
POST
cloudchannel.accounts.unregister
{{baseUrl}}/v1/:account:unregister
QUERY PARAMS
account
BODY json
{
"serviceAccount": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:account:unregister");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"serviceAccount\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:account:unregister" {:content-type :json
:form-params {:serviceAccount ""}})
require "http/client"
url = "{{baseUrl}}/v1/:account:unregister"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"serviceAccount\": \"\"\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}}/v1/:account:unregister"),
Content = new StringContent("{\n \"serviceAccount\": \"\"\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}}/v1/:account:unregister");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"serviceAccount\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:account:unregister"
payload := strings.NewReader("{\n \"serviceAccount\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/v1/:account:unregister HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 26
{
"serviceAccount": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:account:unregister")
.setHeader("content-type", "application/json")
.setBody("{\n \"serviceAccount\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:account:unregister"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"serviceAccount\": \"\"\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 \"serviceAccount\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:account:unregister")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:account:unregister")
.header("content-type", "application/json")
.body("{\n \"serviceAccount\": \"\"\n}")
.asString();
const data = JSON.stringify({
serviceAccount: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:account:unregister');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:account:unregister',
headers: {'content-type': 'application/json'},
data: {serviceAccount: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:account:unregister';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"serviceAccount":""}'
};
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}}/v1/:account:unregister',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "serviceAccount": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"serviceAccount\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:account:unregister")
.post(body)
.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/v1/:account:unregister',
headers: {
'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({serviceAccount: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:account:unregister',
headers: {'content-type': 'application/json'},
body: {serviceAccount: ''},
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}}/v1/:account:unregister');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
serviceAccount: ''
});
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}}/v1/:account:unregister',
headers: {'content-type': 'application/json'},
data: {serviceAccount: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:account:unregister';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"serviceAccount":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"serviceAccount": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:account:unregister"]
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}}/v1/:account:unregister" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"serviceAccount\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:account:unregister",
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([
'serviceAccount' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:account:unregister', [
'body' => '{
"serviceAccount": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:account:unregister');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'serviceAccount' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'serviceAccount' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:account:unregister');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:account:unregister' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"serviceAccount": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:account:unregister' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"serviceAccount": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"serviceAccount\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:account:unregister", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:account:unregister"
payload = { "serviceAccount": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:account:unregister"
payload <- "{\n \"serviceAccount\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:account:unregister")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"serviceAccount\": \"\"\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/v1/:account:unregister') do |req|
req.body = "{\n \"serviceAccount\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:account:unregister";
let payload = json!({"serviceAccount": ""});
let mut headers = reqwest::header::HeaderMap::new();
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}}/v1/:account:unregister \
--header 'content-type: application/json' \
--data '{
"serviceAccount": ""
}'
echo '{
"serviceAccount": ""
}' | \
http POST {{baseUrl}}/v1/:account:unregister \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "serviceAccount": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:account:unregister
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["serviceAccount": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:account:unregister")! 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()
POST
cloudchannel.operations.cancel
{{baseUrl}}/v1/:name:cancel
QUERY PARAMS
name
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name:cancel");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:name:cancel" {:content-type :json})
require "http/client"
url = "{{baseUrl}}/v1/:name:cancel"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:name:cancel"),
Content = new StringContent("{}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name:cancel");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name:cancel"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
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/v1/:name:cancel HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:name:cancel")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name:cancel"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name:cancel")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:name:cancel")
.header("content-type", "application/json")
.body("{}")
.asString();
const data = JSON.stringify({});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:name:cancel');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:cancel',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name:cancel';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name:cancel',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name:cancel")
.post(body)
.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/v1/:name:cancel',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:cancel',
headers: {'content-type': 'application/json'},
body: {},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:name:cancel');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:cancel',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name:cancel';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name:cancel"]
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}}/v1/:name:cancel" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name:cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:name:cancel', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name:cancel');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name:cancel');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name:cancel' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name:cancel' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:name:cancel", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name:cancel"
payload = {}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name:cancel"
payload <- "{}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name:cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:name:cancel') do |req|
req.body = "{}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name:cancel";
let payload = json!({});
let mut headers = reqwest::header::HeaderMap::new();
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}}/v1/:name:cancel \
--header 'content-type: application/json' \
--data '{}'
echo '{}' | \
http POST {{baseUrl}}/v1/:name:cancel \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/v1/:name:cancel
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name:cancel")! 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()
DELETE
cloudchannel.operations.delete
{{baseUrl}}/v1/:name
QUERY PARAMS
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/:name")
require "http/client"
url = "{{baseUrl}}/v1/:name"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/v1/:name"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/v1/:name HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/:name")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/:name")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/v1/:name');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/v1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name';
const options = {method: 'DELETE'};
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}}/v1/:name',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'DELETE', url: '{{baseUrl}}/v1/:name'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1/:name');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'DELETE', url: '{{baseUrl}}/v1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
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}}/v1/:name" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/v1/:name');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:name');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/:name")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/v1/:name') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/v1/:name
http DELETE {{baseUrl}}/v1/:name
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1/:name
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
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
cloudchannel.operations.list
{{baseUrl}}/v1/:name
QUERY PARAMS
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:name")
require "http/client"
url = "{{baseUrl}}/v1/:name"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:name"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:name HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:name")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name"))
.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}}/v1/:name")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:name")
.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}}/v1/:name');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:name'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:name');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:name');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:name');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:name")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:name') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:name
http GET {{baseUrl}}/v1/:name
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:name
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
cloudchannel.products.list
{{baseUrl}}/v1/products
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/products");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/products")
require "http/client"
url = "{{baseUrl}}/v1/products"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/products"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/products");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/products"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/products HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/products")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/products"))
.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}}/v1/products")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/products")
.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}}/v1/products');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/products'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/products';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/products',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/products")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/products',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/products'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/products');
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}}/v1/products'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/products';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/products"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/products" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/products');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/products');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/products');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/products' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/products' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/products")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/products"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/products"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/products') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/products";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/products
http GET {{baseUrl}}/v1/products
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/products
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/products")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
cloudchannel.products.skus.list
{{baseUrl}}/v1/:parent/skus
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/skus");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/skus")
require "http/client"
url = "{{baseUrl}}/v1/:parent/skus"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/skus"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/skus");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/skus"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/skus HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/skus")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/skus"))
.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}}/v1/:parent/skus")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/skus")
.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}}/v1/:parent/skus');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/skus'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/skus';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/skus',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/skus")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/skus',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/skus'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/skus');
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}}/v1/:parent/skus'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/skus';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/skus"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/skus" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/skus",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/skus');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/skus');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/skus');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/skus' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/skus' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/skus")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/skus"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/skus"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/skus")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/skus') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/skus";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/skus
http GET {{baseUrl}}/v1/:parent/skus
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/skus
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/skus")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()