Google Play EMM API
POST
androidenterprise.devices.forceReportUpload
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload
QUERY PARAMS
enterpriseId
userId
deviceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload';
const options = {method: 'POST'};
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload',
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: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload');
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload';
const options = {method: 'POST'};
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload
http POST {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/forceReportUpload")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
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
androidenterprise.devices.get
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId
QUERY PARAMS
enterpriseId
userId
deviceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId"
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId"
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId',
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId');
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId",
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId")
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId";
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId")! 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
androidenterprise.devices.getState
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state
QUERY PARAMS
enterpriseId
userId
deviceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state"
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state"
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state',
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state');
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state",
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state")
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state";
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state")! 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
androidenterprise.devices.list
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices
QUERY PARAMS
enterpriseId
userId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices"
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices"
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices',
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices');
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices",
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices")
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices";
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices")! 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()
PUT
androidenterprise.devices.setState
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state
QUERY PARAMS
enterpriseId
userId
deviceId
BODY json
{
"accountState": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state");
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 \"accountState\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state" {:content-type :json
:form-params {:accountState ""}})
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountState\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state"),
Content = new StringContent("{\n \"accountState\": \"\"\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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountState\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state"
payload := strings.NewReader("{\n \"accountState\": \"\"\n}")
req, _ := http.NewRequest("PUT", 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))
}
PUT /baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 24
{
"accountState": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountState\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"accountState\": \"\"\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 \"accountState\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state")
.header("content-type", "application/json")
.body("{\n \"accountState\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountState: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state',
headers: {'content-type': 'application/json'},
data: {accountState: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accountState":""}'
};
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountState": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountState\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state',
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({accountState: ''}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state',
headers: {'content-type': 'application/json'},
body: {accountState: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountState: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state',
headers: {'content-type': 'application/json'},
data: {accountState: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accountState":""}'
};
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 = @{ @"accountState": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountState\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'accountState' => ''
]),
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('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state', [
'body' => '{
"accountState": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountState' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountState' => ''
]));
$request->setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state');
$request->setRequestMethod('PUT');
$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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accountState": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accountState": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountState\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state"
payload = { "accountState": "" }
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state"
payload <- "{\n \"accountState\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountState\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state') do |req|
req.body = "{\n \"accountState\": \"\"\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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state";
let payload = json!({"accountState": ""});
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("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state \
--header 'content-type: application/json' \
--data '{
"accountState": ""
}'
echo '{
"accountState": ""
}' | \
http PUT {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "accountState": ""\n}' \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["accountState": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/state")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
androidenterprise.devices.update
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId
QUERY PARAMS
enterpriseId
userId
deviceId
BODY json
{
"androidId": "",
"device": "",
"latestBuildFingerprint": "",
"maker": "",
"managementType": "",
"model": "",
"policy": {
"autoUpdatePolicy": "",
"deviceReportPolicy": "",
"maintenanceWindow": {
"durationMs": "",
"startTimeAfterMidnightMs": ""
},
"productAvailabilityPolicy": "",
"productPolicy": [
{
"autoInstallPolicy": {
"autoInstallConstraint": [
{
"chargingStateConstraint": "",
"deviceIdleStateConstraint": "",
"networkTypeConstraint": ""
}
],
"autoInstallMode": "",
"autoInstallPriority": 0,
"minimumVersionCode": 0
},
"autoUpdateMode": "",
"enterpriseAuthenticationAppLinkConfigs": [
{
"uri": ""
}
],
"managedConfiguration": {
"configurationVariables": {
"mcmId": "",
"variableSet": [
{
"placeholder": "",
"userValue": ""
}
]
},
"kind": "",
"managedProperty": [
{
"key": "",
"valueBool": false,
"valueBundle": {
"managedProperty": []
},
"valueBundleArray": [
{}
],
"valueInteger": 0,
"valueString": "",
"valueStringArray": []
}
],
"productId": ""
},
"productId": "",
"trackIds": [],
"tracks": []
}
]
},
"product": "",
"report": {
"appState": [
{
"keyedAppState": [
{
"data": "",
"key": "",
"message": "",
"severity": "",
"stateTimestampMillis": ""
}
],
"packageName": ""
}
],
"lastUpdatedTimestampMillis": ""
},
"retailBrand": "",
"sdkVersion": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId");
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 \"androidId\": \"\",\n \"device\": \"\",\n \"latestBuildFingerprint\": \"\",\n \"maker\": \"\",\n \"managementType\": \"\",\n \"model\": \"\",\n \"policy\": {\n \"autoUpdatePolicy\": \"\",\n \"deviceReportPolicy\": \"\",\n \"maintenanceWindow\": {\n \"durationMs\": \"\",\n \"startTimeAfterMidnightMs\": \"\"\n },\n \"productAvailabilityPolicy\": \"\",\n \"productPolicy\": [\n {\n \"autoInstallPolicy\": {\n \"autoInstallConstraint\": [\n {\n \"chargingStateConstraint\": \"\",\n \"deviceIdleStateConstraint\": \"\",\n \"networkTypeConstraint\": \"\"\n }\n ],\n \"autoInstallMode\": \"\",\n \"autoInstallPriority\": 0,\n \"minimumVersionCode\": 0\n },\n \"autoUpdateMode\": \"\",\n \"enterpriseAuthenticationAppLinkConfigs\": [\n {\n \"uri\": \"\"\n }\n ],\n \"managedConfiguration\": {\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n },\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n },\n \"product\": \"\",\n \"report\": {\n \"appState\": [\n {\n \"keyedAppState\": [\n {\n \"data\": \"\",\n \"key\": \"\",\n \"message\": \"\",\n \"severity\": \"\",\n \"stateTimestampMillis\": \"\"\n }\n ],\n \"packageName\": \"\"\n }\n ],\n \"lastUpdatedTimestampMillis\": \"\"\n },\n \"retailBrand\": \"\",\n \"sdkVersion\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId" {:content-type :json
:form-params {:androidId ""
:device ""
:latestBuildFingerprint ""
:maker ""
:managementType ""
:model ""
:policy {:autoUpdatePolicy ""
:deviceReportPolicy ""
:maintenanceWindow {:durationMs ""
:startTimeAfterMidnightMs ""}
:productAvailabilityPolicy ""
:productPolicy [{:autoInstallPolicy {:autoInstallConstraint [{:chargingStateConstraint ""
:deviceIdleStateConstraint ""
:networkTypeConstraint ""}]
:autoInstallMode ""
:autoInstallPriority 0
:minimumVersionCode 0}
:autoUpdateMode ""
:enterpriseAuthenticationAppLinkConfigs [{:uri ""}]
:managedConfiguration {:configurationVariables {:mcmId ""
:variableSet [{:placeholder ""
:userValue ""}]}
:kind ""
:managedProperty [{:key ""
:valueBool false
:valueBundle {:managedProperty []}
:valueBundleArray [{}]
:valueInteger 0
:valueString ""
:valueStringArray []}]
:productId ""}
:productId ""
:trackIds []
:tracks []}]}
:product ""
:report {:appState [{:keyedAppState [{:data ""
:key ""
:message ""
:severity ""
:stateTimestampMillis ""}]
:packageName ""}]
:lastUpdatedTimestampMillis ""}
:retailBrand ""
:sdkVersion 0}})
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"androidId\": \"\",\n \"device\": \"\",\n \"latestBuildFingerprint\": \"\",\n \"maker\": \"\",\n \"managementType\": \"\",\n \"model\": \"\",\n \"policy\": {\n \"autoUpdatePolicy\": \"\",\n \"deviceReportPolicy\": \"\",\n \"maintenanceWindow\": {\n \"durationMs\": \"\",\n \"startTimeAfterMidnightMs\": \"\"\n },\n \"productAvailabilityPolicy\": \"\",\n \"productPolicy\": [\n {\n \"autoInstallPolicy\": {\n \"autoInstallConstraint\": [\n {\n \"chargingStateConstraint\": \"\",\n \"deviceIdleStateConstraint\": \"\",\n \"networkTypeConstraint\": \"\"\n }\n ],\n \"autoInstallMode\": \"\",\n \"autoInstallPriority\": 0,\n \"minimumVersionCode\": 0\n },\n \"autoUpdateMode\": \"\",\n \"enterpriseAuthenticationAppLinkConfigs\": [\n {\n \"uri\": \"\"\n }\n ],\n \"managedConfiguration\": {\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n },\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n },\n \"product\": \"\",\n \"report\": {\n \"appState\": [\n {\n \"keyedAppState\": [\n {\n \"data\": \"\",\n \"key\": \"\",\n \"message\": \"\",\n \"severity\": \"\",\n \"stateTimestampMillis\": \"\"\n }\n ],\n \"packageName\": \"\"\n }\n ],\n \"lastUpdatedTimestampMillis\": \"\"\n },\n \"retailBrand\": \"\",\n \"sdkVersion\": 0\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId"),
Content = new StringContent("{\n \"androidId\": \"\",\n \"device\": \"\",\n \"latestBuildFingerprint\": \"\",\n \"maker\": \"\",\n \"managementType\": \"\",\n \"model\": \"\",\n \"policy\": {\n \"autoUpdatePolicy\": \"\",\n \"deviceReportPolicy\": \"\",\n \"maintenanceWindow\": {\n \"durationMs\": \"\",\n \"startTimeAfterMidnightMs\": \"\"\n },\n \"productAvailabilityPolicy\": \"\",\n \"productPolicy\": [\n {\n \"autoInstallPolicy\": {\n \"autoInstallConstraint\": [\n {\n \"chargingStateConstraint\": \"\",\n \"deviceIdleStateConstraint\": \"\",\n \"networkTypeConstraint\": \"\"\n }\n ],\n \"autoInstallMode\": \"\",\n \"autoInstallPriority\": 0,\n \"minimumVersionCode\": 0\n },\n \"autoUpdateMode\": \"\",\n \"enterpriseAuthenticationAppLinkConfigs\": [\n {\n \"uri\": \"\"\n }\n ],\n \"managedConfiguration\": {\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n },\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n },\n \"product\": \"\",\n \"report\": {\n \"appState\": [\n {\n \"keyedAppState\": [\n {\n \"data\": \"\",\n \"key\": \"\",\n \"message\": \"\",\n \"severity\": \"\",\n \"stateTimestampMillis\": \"\"\n }\n ],\n \"packageName\": \"\"\n }\n ],\n \"lastUpdatedTimestampMillis\": \"\"\n },\n \"retailBrand\": \"\",\n \"sdkVersion\": 0\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"androidId\": \"\",\n \"device\": \"\",\n \"latestBuildFingerprint\": \"\",\n \"maker\": \"\",\n \"managementType\": \"\",\n \"model\": \"\",\n \"policy\": {\n \"autoUpdatePolicy\": \"\",\n \"deviceReportPolicy\": \"\",\n \"maintenanceWindow\": {\n \"durationMs\": \"\",\n \"startTimeAfterMidnightMs\": \"\"\n },\n \"productAvailabilityPolicy\": \"\",\n \"productPolicy\": [\n {\n \"autoInstallPolicy\": {\n \"autoInstallConstraint\": [\n {\n \"chargingStateConstraint\": \"\",\n \"deviceIdleStateConstraint\": \"\",\n \"networkTypeConstraint\": \"\"\n }\n ],\n \"autoInstallMode\": \"\",\n \"autoInstallPriority\": 0,\n \"minimumVersionCode\": 0\n },\n \"autoUpdateMode\": \"\",\n \"enterpriseAuthenticationAppLinkConfigs\": [\n {\n \"uri\": \"\"\n }\n ],\n \"managedConfiguration\": {\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n },\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n },\n \"product\": \"\",\n \"report\": {\n \"appState\": [\n {\n \"keyedAppState\": [\n {\n \"data\": \"\",\n \"key\": \"\",\n \"message\": \"\",\n \"severity\": \"\",\n \"stateTimestampMillis\": \"\"\n }\n ],\n \"packageName\": \"\"\n }\n ],\n \"lastUpdatedTimestampMillis\": \"\"\n },\n \"retailBrand\": \"\",\n \"sdkVersion\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId"
payload := strings.NewReader("{\n \"androidId\": \"\",\n \"device\": \"\",\n \"latestBuildFingerprint\": \"\",\n \"maker\": \"\",\n \"managementType\": \"\",\n \"model\": \"\",\n \"policy\": {\n \"autoUpdatePolicy\": \"\",\n \"deviceReportPolicy\": \"\",\n \"maintenanceWindow\": {\n \"durationMs\": \"\",\n \"startTimeAfterMidnightMs\": \"\"\n },\n \"productAvailabilityPolicy\": \"\",\n \"productPolicy\": [\n {\n \"autoInstallPolicy\": {\n \"autoInstallConstraint\": [\n {\n \"chargingStateConstraint\": \"\",\n \"deviceIdleStateConstraint\": \"\",\n \"networkTypeConstraint\": \"\"\n }\n ],\n \"autoInstallMode\": \"\",\n \"autoInstallPriority\": 0,\n \"minimumVersionCode\": 0\n },\n \"autoUpdateMode\": \"\",\n \"enterpriseAuthenticationAppLinkConfigs\": [\n {\n \"uri\": \"\"\n }\n ],\n \"managedConfiguration\": {\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n },\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n },\n \"product\": \"\",\n \"report\": {\n \"appState\": [\n {\n \"keyedAppState\": [\n {\n \"data\": \"\",\n \"key\": \"\",\n \"message\": \"\",\n \"severity\": \"\",\n \"stateTimestampMillis\": \"\"\n }\n ],\n \"packageName\": \"\"\n }\n ],\n \"lastUpdatedTimestampMillis\": \"\"\n },\n \"retailBrand\": \"\",\n \"sdkVersion\": 0\n}")
req, _ := http.NewRequest("PUT", 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))
}
PUT /baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2029
{
"androidId": "",
"device": "",
"latestBuildFingerprint": "",
"maker": "",
"managementType": "",
"model": "",
"policy": {
"autoUpdatePolicy": "",
"deviceReportPolicy": "",
"maintenanceWindow": {
"durationMs": "",
"startTimeAfterMidnightMs": ""
},
"productAvailabilityPolicy": "",
"productPolicy": [
{
"autoInstallPolicy": {
"autoInstallConstraint": [
{
"chargingStateConstraint": "",
"deviceIdleStateConstraint": "",
"networkTypeConstraint": ""
}
],
"autoInstallMode": "",
"autoInstallPriority": 0,
"minimumVersionCode": 0
},
"autoUpdateMode": "",
"enterpriseAuthenticationAppLinkConfigs": [
{
"uri": ""
}
],
"managedConfiguration": {
"configurationVariables": {
"mcmId": "",
"variableSet": [
{
"placeholder": "",
"userValue": ""
}
]
},
"kind": "",
"managedProperty": [
{
"key": "",
"valueBool": false,
"valueBundle": {
"managedProperty": []
},
"valueBundleArray": [
{}
],
"valueInteger": 0,
"valueString": "",
"valueStringArray": []
}
],
"productId": ""
},
"productId": "",
"trackIds": [],
"tracks": []
}
]
},
"product": "",
"report": {
"appState": [
{
"keyedAppState": [
{
"data": "",
"key": "",
"message": "",
"severity": "",
"stateTimestampMillis": ""
}
],
"packageName": ""
}
],
"lastUpdatedTimestampMillis": ""
},
"retailBrand": "",
"sdkVersion": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"androidId\": \"\",\n \"device\": \"\",\n \"latestBuildFingerprint\": \"\",\n \"maker\": \"\",\n \"managementType\": \"\",\n \"model\": \"\",\n \"policy\": {\n \"autoUpdatePolicy\": \"\",\n \"deviceReportPolicy\": \"\",\n \"maintenanceWindow\": {\n \"durationMs\": \"\",\n \"startTimeAfterMidnightMs\": \"\"\n },\n \"productAvailabilityPolicy\": \"\",\n \"productPolicy\": [\n {\n \"autoInstallPolicy\": {\n \"autoInstallConstraint\": [\n {\n \"chargingStateConstraint\": \"\",\n \"deviceIdleStateConstraint\": \"\",\n \"networkTypeConstraint\": \"\"\n }\n ],\n \"autoInstallMode\": \"\",\n \"autoInstallPriority\": 0,\n \"minimumVersionCode\": 0\n },\n \"autoUpdateMode\": \"\",\n \"enterpriseAuthenticationAppLinkConfigs\": [\n {\n \"uri\": \"\"\n }\n ],\n \"managedConfiguration\": {\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n },\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n },\n \"product\": \"\",\n \"report\": {\n \"appState\": [\n {\n \"keyedAppState\": [\n {\n \"data\": \"\",\n \"key\": \"\",\n \"message\": \"\",\n \"severity\": \"\",\n \"stateTimestampMillis\": \"\"\n }\n ],\n \"packageName\": \"\"\n }\n ],\n \"lastUpdatedTimestampMillis\": \"\"\n },\n \"retailBrand\": \"\",\n \"sdkVersion\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"androidId\": \"\",\n \"device\": \"\",\n \"latestBuildFingerprint\": \"\",\n \"maker\": \"\",\n \"managementType\": \"\",\n \"model\": \"\",\n \"policy\": {\n \"autoUpdatePolicy\": \"\",\n \"deviceReportPolicy\": \"\",\n \"maintenanceWindow\": {\n \"durationMs\": \"\",\n \"startTimeAfterMidnightMs\": \"\"\n },\n \"productAvailabilityPolicy\": \"\",\n \"productPolicy\": [\n {\n \"autoInstallPolicy\": {\n \"autoInstallConstraint\": [\n {\n \"chargingStateConstraint\": \"\",\n \"deviceIdleStateConstraint\": \"\",\n \"networkTypeConstraint\": \"\"\n }\n ],\n \"autoInstallMode\": \"\",\n \"autoInstallPriority\": 0,\n \"minimumVersionCode\": 0\n },\n \"autoUpdateMode\": \"\",\n \"enterpriseAuthenticationAppLinkConfigs\": [\n {\n \"uri\": \"\"\n }\n ],\n \"managedConfiguration\": {\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n },\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n },\n \"product\": \"\",\n \"report\": {\n \"appState\": [\n {\n \"keyedAppState\": [\n {\n \"data\": \"\",\n \"key\": \"\",\n \"message\": \"\",\n \"severity\": \"\",\n \"stateTimestampMillis\": \"\"\n }\n ],\n \"packageName\": \"\"\n }\n ],\n \"lastUpdatedTimestampMillis\": \"\"\n },\n \"retailBrand\": \"\",\n \"sdkVersion\": 0\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"androidId\": \"\",\n \"device\": \"\",\n \"latestBuildFingerprint\": \"\",\n \"maker\": \"\",\n \"managementType\": \"\",\n \"model\": \"\",\n \"policy\": {\n \"autoUpdatePolicy\": \"\",\n \"deviceReportPolicy\": \"\",\n \"maintenanceWindow\": {\n \"durationMs\": \"\",\n \"startTimeAfterMidnightMs\": \"\"\n },\n \"productAvailabilityPolicy\": \"\",\n \"productPolicy\": [\n {\n \"autoInstallPolicy\": {\n \"autoInstallConstraint\": [\n {\n \"chargingStateConstraint\": \"\",\n \"deviceIdleStateConstraint\": \"\",\n \"networkTypeConstraint\": \"\"\n }\n ],\n \"autoInstallMode\": \"\",\n \"autoInstallPriority\": 0,\n \"minimumVersionCode\": 0\n },\n \"autoUpdateMode\": \"\",\n \"enterpriseAuthenticationAppLinkConfigs\": [\n {\n \"uri\": \"\"\n }\n ],\n \"managedConfiguration\": {\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n },\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n },\n \"product\": \"\",\n \"report\": {\n \"appState\": [\n {\n \"keyedAppState\": [\n {\n \"data\": \"\",\n \"key\": \"\",\n \"message\": \"\",\n \"severity\": \"\",\n \"stateTimestampMillis\": \"\"\n }\n ],\n \"packageName\": \"\"\n }\n ],\n \"lastUpdatedTimestampMillis\": \"\"\n },\n \"retailBrand\": \"\",\n \"sdkVersion\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId")
.header("content-type", "application/json")
.body("{\n \"androidId\": \"\",\n \"device\": \"\",\n \"latestBuildFingerprint\": \"\",\n \"maker\": \"\",\n \"managementType\": \"\",\n \"model\": \"\",\n \"policy\": {\n \"autoUpdatePolicy\": \"\",\n \"deviceReportPolicy\": \"\",\n \"maintenanceWindow\": {\n \"durationMs\": \"\",\n \"startTimeAfterMidnightMs\": \"\"\n },\n \"productAvailabilityPolicy\": \"\",\n \"productPolicy\": [\n {\n \"autoInstallPolicy\": {\n \"autoInstallConstraint\": [\n {\n \"chargingStateConstraint\": \"\",\n \"deviceIdleStateConstraint\": \"\",\n \"networkTypeConstraint\": \"\"\n }\n ],\n \"autoInstallMode\": \"\",\n \"autoInstallPriority\": 0,\n \"minimumVersionCode\": 0\n },\n \"autoUpdateMode\": \"\",\n \"enterpriseAuthenticationAppLinkConfigs\": [\n {\n \"uri\": \"\"\n }\n ],\n \"managedConfiguration\": {\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n },\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n },\n \"product\": \"\",\n \"report\": {\n \"appState\": [\n {\n \"keyedAppState\": [\n {\n \"data\": \"\",\n \"key\": \"\",\n \"message\": \"\",\n \"severity\": \"\",\n \"stateTimestampMillis\": \"\"\n }\n ],\n \"packageName\": \"\"\n }\n ],\n \"lastUpdatedTimestampMillis\": \"\"\n },\n \"retailBrand\": \"\",\n \"sdkVersion\": 0\n}")
.asString();
const data = JSON.stringify({
androidId: '',
device: '',
latestBuildFingerprint: '',
maker: '',
managementType: '',
model: '',
policy: {
autoUpdatePolicy: '',
deviceReportPolicy: '',
maintenanceWindow: {
durationMs: '',
startTimeAfterMidnightMs: ''
},
productAvailabilityPolicy: '',
productPolicy: [
{
autoInstallPolicy: {
autoInstallConstraint: [
{
chargingStateConstraint: '',
deviceIdleStateConstraint: '',
networkTypeConstraint: ''
}
],
autoInstallMode: '',
autoInstallPriority: 0,
minimumVersionCode: 0
},
autoUpdateMode: '',
enterpriseAuthenticationAppLinkConfigs: [
{
uri: ''
}
],
managedConfiguration: {
configurationVariables: {
mcmId: '',
variableSet: [
{
placeholder: '',
userValue: ''
}
]
},
kind: '',
managedProperty: [
{
key: '',
valueBool: false,
valueBundle: {
managedProperty: []
},
valueBundleArray: [
{}
],
valueInteger: 0,
valueString: '',
valueStringArray: []
}
],
productId: ''
},
productId: '',
trackIds: [],
tracks: []
}
]
},
product: '',
report: {
appState: [
{
keyedAppState: [
{
data: '',
key: '',
message: '',
severity: '',
stateTimestampMillis: ''
}
],
packageName: ''
}
],
lastUpdatedTimestampMillis: ''
},
retailBrand: '',
sdkVersion: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId',
headers: {'content-type': 'application/json'},
data: {
androidId: '',
device: '',
latestBuildFingerprint: '',
maker: '',
managementType: '',
model: '',
policy: {
autoUpdatePolicy: '',
deviceReportPolicy: '',
maintenanceWindow: {durationMs: '', startTimeAfterMidnightMs: ''},
productAvailabilityPolicy: '',
productPolicy: [
{
autoInstallPolicy: {
autoInstallConstraint: [
{
chargingStateConstraint: '',
deviceIdleStateConstraint: '',
networkTypeConstraint: ''
}
],
autoInstallMode: '',
autoInstallPriority: 0,
minimumVersionCode: 0
},
autoUpdateMode: '',
enterpriseAuthenticationAppLinkConfigs: [{uri: ''}],
managedConfiguration: {
configurationVariables: {mcmId: '', variableSet: [{placeholder: '', userValue: ''}]},
kind: '',
managedProperty: [
{
key: '',
valueBool: false,
valueBundle: {managedProperty: []},
valueBundleArray: [{}],
valueInteger: 0,
valueString: '',
valueStringArray: []
}
],
productId: ''
},
productId: '',
trackIds: [],
tracks: []
}
]
},
product: '',
report: {
appState: [
{
keyedAppState: [{data: '', key: '', message: '', severity: '', stateTimestampMillis: ''}],
packageName: ''
}
],
lastUpdatedTimestampMillis: ''
},
retailBrand: '',
sdkVersion: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"androidId":"","device":"","latestBuildFingerprint":"","maker":"","managementType":"","model":"","policy":{"autoUpdatePolicy":"","deviceReportPolicy":"","maintenanceWindow":{"durationMs":"","startTimeAfterMidnightMs":""},"productAvailabilityPolicy":"","productPolicy":[{"autoInstallPolicy":{"autoInstallConstraint":[{"chargingStateConstraint":"","deviceIdleStateConstraint":"","networkTypeConstraint":""}],"autoInstallMode":"","autoInstallPriority":0,"minimumVersionCode":0},"autoUpdateMode":"","enterpriseAuthenticationAppLinkConfigs":[{"uri":""}],"managedConfiguration":{"configurationVariables":{"mcmId":"","variableSet":[{"placeholder":"","userValue":""}]},"kind":"","managedProperty":[{"key":"","valueBool":false,"valueBundle":{"managedProperty":[]},"valueBundleArray":[{}],"valueInteger":0,"valueString":"","valueStringArray":[]}],"productId":""},"productId":"","trackIds":[],"tracks":[]}]},"product":"","report":{"appState":[{"keyedAppState":[{"data":"","key":"","message":"","severity":"","stateTimestampMillis":""}],"packageName":""}],"lastUpdatedTimestampMillis":""},"retailBrand":"","sdkVersion":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "androidId": "",\n "device": "",\n "latestBuildFingerprint": "",\n "maker": "",\n "managementType": "",\n "model": "",\n "policy": {\n "autoUpdatePolicy": "",\n "deviceReportPolicy": "",\n "maintenanceWindow": {\n "durationMs": "",\n "startTimeAfterMidnightMs": ""\n },\n "productAvailabilityPolicy": "",\n "productPolicy": [\n {\n "autoInstallPolicy": {\n "autoInstallConstraint": [\n {\n "chargingStateConstraint": "",\n "deviceIdleStateConstraint": "",\n "networkTypeConstraint": ""\n }\n ],\n "autoInstallMode": "",\n "autoInstallPriority": 0,\n "minimumVersionCode": 0\n },\n "autoUpdateMode": "",\n "enterpriseAuthenticationAppLinkConfigs": [\n {\n "uri": ""\n }\n ],\n "managedConfiguration": {\n "configurationVariables": {\n "mcmId": "",\n "variableSet": [\n {\n "placeholder": "",\n "userValue": ""\n }\n ]\n },\n "kind": "",\n "managedProperty": [\n {\n "key": "",\n "valueBool": false,\n "valueBundle": {\n "managedProperty": []\n },\n "valueBundleArray": [\n {}\n ],\n "valueInteger": 0,\n "valueString": "",\n "valueStringArray": []\n }\n ],\n "productId": ""\n },\n "productId": "",\n "trackIds": [],\n "tracks": []\n }\n ]\n },\n "product": "",\n "report": {\n "appState": [\n {\n "keyedAppState": [\n {\n "data": "",\n "key": "",\n "message": "",\n "severity": "",\n "stateTimestampMillis": ""\n }\n ],\n "packageName": ""\n }\n ],\n "lastUpdatedTimestampMillis": ""\n },\n "retailBrand": "",\n "sdkVersion": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"androidId\": \"\",\n \"device\": \"\",\n \"latestBuildFingerprint\": \"\",\n \"maker\": \"\",\n \"managementType\": \"\",\n \"model\": \"\",\n \"policy\": {\n \"autoUpdatePolicy\": \"\",\n \"deviceReportPolicy\": \"\",\n \"maintenanceWindow\": {\n \"durationMs\": \"\",\n \"startTimeAfterMidnightMs\": \"\"\n },\n \"productAvailabilityPolicy\": \"\",\n \"productPolicy\": [\n {\n \"autoInstallPolicy\": {\n \"autoInstallConstraint\": [\n {\n \"chargingStateConstraint\": \"\",\n \"deviceIdleStateConstraint\": \"\",\n \"networkTypeConstraint\": \"\"\n }\n ],\n \"autoInstallMode\": \"\",\n \"autoInstallPriority\": 0,\n \"minimumVersionCode\": 0\n },\n \"autoUpdateMode\": \"\",\n \"enterpriseAuthenticationAppLinkConfigs\": [\n {\n \"uri\": \"\"\n }\n ],\n \"managedConfiguration\": {\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n },\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n },\n \"product\": \"\",\n \"report\": {\n \"appState\": [\n {\n \"keyedAppState\": [\n {\n \"data\": \"\",\n \"key\": \"\",\n \"message\": \"\",\n \"severity\": \"\",\n \"stateTimestampMillis\": \"\"\n }\n ],\n \"packageName\": \"\"\n }\n ],\n \"lastUpdatedTimestampMillis\": \"\"\n },\n \"retailBrand\": \"\",\n \"sdkVersion\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId',
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({
androidId: '',
device: '',
latestBuildFingerprint: '',
maker: '',
managementType: '',
model: '',
policy: {
autoUpdatePolicy: '',
deviceReportPolicy: '',
maintenanceWindow: {durationMs: '', startTimeAfterMidnightMs: ''},
productAvailabilityPolicy: '',
productPolicy: [
{
autoInstallPolicy: {
autoInstallConstraint: [
{
chargingStateConstraint: '',
deviceIdleStateConstraint: '',
networkTypeConstraint: ''
}
],
autoInstallMode: '',
autoInstallPriority: 0,
minimumVersionCode: 0
},
autoUpdateMode: '',
enterpriseAuthenticationAppLinkConfigs: [{uri: ''}],
managedConfiguration: {
configurationVariables: {mcmId: '', variableSet: [{placeholder: '', userValue: ''}]},
kind: '',
managedProperty: [
{
key: '',
valueBool: false,
valueBundle: {managedProperty: []},
valueBundleArray: [{}],
valueInteger: 0,
valueString: '',
valueStringArray: []
}
],
productId: ''
},
productId: '',
trackIds: [],
tracks: []
}
]
},
product: '',
report: {
appState: [
{
keyedAppState: [{data: '', key: '', message: '', severity: '', stateTimestampMillis: ''}],
packageName: ''
}
],
lastUpdatedTimestampMillis: ''
},
retailBrand: '',
sdkVersion: 0
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId',
headers: {'content-type': 'application/json'},
body: {
androidId: '',
device: '',
latestBuildFingerprint: '',
maker: '',
managementType: '',
model: '',
policy: {
autoUpdatePolicy: '',
deviceReportPolicy: '',
maintenanceWindow: {durationMs: '', startTimeAfterMidnightMs: ''},
productAvailabilityPolicy: '',
productPolicy: [
{
autoInstallPolicy: {
autoInstallConstraint: [
{
chargingStateConstraint: '',
deviceIdleStateConstraint: '',
networkTypeConstraint: ''
}
],
autoInstallMode: '',
autoInstallPriority: 0,
minimumVersionCode: 0
},
autoUpdateMode: '',
enterpriseAuthenticationAppLinkConfigs: [{uri: ''}],
managedConfiguration: {
configurationVariables: {mcmId: '', variableSet: [{placeholder: '', userValue: ''}]},
kind: '',
managedProperty: [
{
key: '',
valueBool: false,
valueBundle: {managedProperty: []},
valueBundleArray: [{}],
valueInteger: 0,
valueString: '',
valueStringArray: []
}
],
productId: ''
},
productId: '',
trackIds: [],
tracks: []
}
]
},
product: '',
report: {
appState: [
{
keyedAppState: [{data: '', key: '', message: '', severity: '', stateTimestampMillis: ''}],
packageName: ''
}
],
lastUpdatedTimestampMillis: ''
},
retailBrand: '',
sdkVersion: 0
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
androidId: '',
device: '',
latestBuildFingerprint: '',
maker: '',
managementType: '',
model: '',
policy: {
autoUpdatePolicy: '',
deviceReportPolicy: '',
maintenanceWindow: {
durationMs: '',
startTimeAfterMidnightMs: ''
},
productAvailabilityPolicy: '',
productPolicy: [
{
autoInstallPolicy: {
autoInstallConstraint: [
{
chargingStateConstraint: '',
deviceIdleStateConstraint: '',
networkTypeConstraint: ''
}
],
autoInstallMode: '',
autoInstallPriority: 0,
minimumVersionCode: 0
},
autoUpdateMode: '',
enterpriseAuthenticationAppLinkConfigs: [
{
uri: ''
}
],
managedConfiguration: {
configurationVariables: {
mcmId: '',
variableSet: [
{
placeholder: '',
userValue: ''
}
]
},
kind: '',
managedProperty: [
{
key: '',
valueBool: false,
valueBundle: {
managedProperty: []
},
valueBundleArray: [
{}
],
valueInteger: 0,
valueString: '',
valueStringArray: []
}
],
productId: ''
},
productId: '',
trackIds: [],
tracks: []
}
]
},
product: '',
report: {
appState: [
{
keyedAppState: [
{
data: '',
key: '',
message: '',
severity: '',
stateTimestampMillis: ''
}
],
packageName: ''
}
],
lastUpdatedTimestampMillis: ''
},
retailBrand: '',
sdkVersion: 0
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId',
headers: {'content-type': 'application/json'},
data: {
androidId: '',
device: '',
latestBuildFingerprint: '',
maker: '',
managementType: '',
model: '',
policy: {
autoUpdatePolicy: '',
deviceReportPolicy: '',
maintenanceWindow: {durationMs: '', startTimeAfterMidnightMs: ''},
productAvailabilityPolicy: '',
productPolicy: [
{
autoInstallPolicy: {
autoInstallConstraint: [
{
chargingStateConstraint: '',
deviceIdleStateConstraint: '',
networkTypeConstraint: ''
}
],
autoInstallMode: '',
autoInstallPriority: 0,
minimumVersionCode: 0
},
autoUpdateMode: '',
enterpriseAuthenticationAppLinkConfigs: [{uri: ''}],
managedConfiguration: {
configurationVariables: {mcmId: '', variableSet: [{placeholder: '', userValue: ''}]},
kind: '',
managedProperty: [
{
key: '',
valueBool: false,
valueBundle: {managedProperty: []},
valueBundleArray: [{}],
valueInteger: 0,
valueString: '',
valueStringArray: []
}
],
productId: ''
},
productId: '',
trackIds: [],
tracks: []
}
]
},
product: '',
report: {
appState: [
{
keyedAppState: [{data: '', key: '', message: '', severity: '', stateTimestampMillis: ''}],
packageName: ''
}
],
lastUpdatedTimestampMillis: ''
},
retailBrand: '',
sdkVersion: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"androidId":"","device":"","latestBuildFingerprint":"","maker":"","managementType":"","model":"","policy":{"autoUpdatePolicy":"","deviceReportPolicy":"","maintenanceWindow":{"durationMs":"","startTimeAfterMidnightMs":""},"productAvailabilityPolicy":"","productPolicy":[{"autoInstallPolicy":{"autoInstallConstraint":[{"chargingStateConstraint":"","deviceIdleStateConstraint":"","networkTypeConstraint":""}],"autoInstallMode":"","autoInstallPriority":0,"minimumVersionCode":0},"autoUpdateMode":"","enterpriseAuthenticationAppLinkConfigs":[{"uri":""}],"managedConfiguration":{"configurationVariables":{"mcmId":"","variableSet":[{"placeholder":"","userValue":""}]},"kind":"","managedProperty":[{"key":"","valueBool":false,"valueBundle":{"managedProperty":[]},"valueBundleArray":[{}],"valueInteger":0,"valueString":"","valueStringArray":[]}],"productId":""},"productId":"","trackIds":[],"tracks":[]}]},"product":"","report":{"appState":[{"keyedAppState":[{"data":"","key":"","message":"","severity":"","stateTimestampMillis":""}],"packageName":""}],"lastUpdatedTimestampMillis":""},"retailBrand":"","sdkVersion":0}'
};
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 = @{ @"androidId": @"",
@"device": @"",
@"latestBuildFingerprint": @"",
@"maker": @"",
@"managementType": @"",
@"model": @"",
@"policy": @{ @"autoUpdatePolicy": @"", @"deviceReportPolicy": @"", @"maintenanceWindow": @{ @"durationMs": @"", @"startTimeAfterMidnightMs": @"" }, @"productAvailabilityPolicy": @"", @"productPolicy": @[ @{ @"autoInstallPolicy": @{ @"autoInstallConstraint": @[ @{ @"chargingStateConstraint": @"", @"deviceIdleStateConstraint": @"", @"networkTypeConstraint": @"" } ], @"autoInstallMode": @"", @"autoInstallPriority": @0, @"minimumVersionCode": @0 }, @"autoUpdateMode": @"", @"enterpriseAuthenticationAppLinkConfigs": @[ @{ @"uri": @"" } ], @"managedConfiguration": @{ @"configurationVariables": @{ @"mcmId": @"", @"variableSet": @[ @{ @"placeholder": @"", @"userValue": @"" } ] }, @"kind": @"", @"managedProperty": @[ @{ @"key": @"", @"valueBool": @NO, @"valueBundle": @{ @"managedProperty": @[ ] }, @"valueBundleArray": @[ @{ } ], @"valueInteger": @0, @"valueString": @"", @"valueStringArray": @[ ] } ], @"productId": @"" }, @"productId": @"", @"trackIds": @[ ], @"tracks": @[ ] } ] },
@"product": @"",
@"report": @{ @"appState": @[ @{ @"keyedAppState": @[ @{ @"data": @"", @"key": @"", @"message": @"", @"severity": @"", @"stateTimestampMillis": @"" } ], @"packageName": @"" } ], @"lastUpdatedTimestampMillis": @"" },
@"retailBrand": @"",
@"sdkVersion": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"androidId\": \"\",\n \"device\": \"\",\n \"latestBuildFingerprint\": \"\",\n \"maker\": \"\",\n \"managementType\": \"\",\n \"model\": \"\",\n \"policy\": {\n \"autoUpdatePolicy\": \"\",\n \"deviceReportPolicy\": \"\",\n \"maintenanceWindow\": {\n \"durationMs\": \"\",\n \"startTimeAfterMidnightMs\": \"\"\n },\n \"productAvailabilityPolicy\": \"\",\n \"productPolicy\": [\n {\n \"autoInstallPolicy\": {\n \"autoInstallConstraint\": [\n {\n \"chargingStateConstraint\": \"\",\n \"deviceIdleStateConstraint\": \"\",\n \"networkTypeConstraint\": \"\"\n }\n ],\n \"autoInstallMode\": \"\",\n \"autoInstallPriority\": 0,\n \"minimumVersionCode\": 0\n },\n \"autoUpdateMode\": \"\",\n \"enterpriseAuthenticationAppLinkConfigs\": [\n {\n \"uri\": \"\"\n }\n ],\n \"managedConfiguration\": {\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n },\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n },\n \"product\": \"\",\n \"report\": {\n \"appState\": [\n {\n \"keyedAppState\": [\n {\n \"data\": \"\",\n \"key\": \"\",\n \"message\": \"\",\n \"severity\": \"\",\n \"stateTimestampMillis\": \"\"\n }\n ],\n \"packageName\": \"\"\n }\n ],\n \"lastUpdatedTimestampMillis\": \"\"\n },\n \"retailBrand\": \"\",\n \"sdkVersion\": 0\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'androidId' => '',
'device' => '',
'latestBuildFingerprint' => '',
'maker' => '',
'managementType' => '',
'model' => '',
'policy' => [
'autoUpdatePolicy' => '',
'deviceReportPolicy' => '',
'maintenanceWindow' => [
'durationMs' => '',
'startTimeAfterMidnightMs' => ''
],
'productAvailabilityPolicy' => '',
'productPolicy' => [
[
'autoInstallPolicy' => [
'autoInstallConstraint' => [
[
'chargingStateConstraint' => '',
'deviceIdleStateConstraint' => '',
'networkTypeConstraint' => ''
]
],
'autoInstallMode' => '',
'autoInstallPriority' => 0,
'minimumVersionCode' => 0
],
'autoUpdateMode' => '',
'enterpriseAuthenticationAppLinkConfigs' => [
[
'uri' => ''
]
],
'managedConfiguration' => [
'configurationVariables' => [
'mcmId' => '',
'variableSet' => [
[
'placeholder' => '',
'userValue' => ''
]
]
],
'kind' => '',
'managedProperty' => [
[
'key' => '',
'valueBool' => null,
'valueBundle' => [
'managedProperty' => [
]
],
'valueBundleArray' => [
[
]
],
'valueInteger' => 0,
'valueString' => '',
'valueStringArray' => [
]
]
],
'productId' => ''
],
'productId' => '',
'trackIds' => [
],
'tracks' => [
]
]
]
],
'product' => '',
'report' => [
'appState' => [
[
'keyedAppState' => [
[
'data' => '',
'key' => '',
'message' => '',
'severity' => '',
'stateTimestampMillis' => ''
]
],
'packageName' => ''
]
],
'lastUpdatedTimestampMillis' => ''
],
'retailBrand' => '',
'sdkVersion' => 0
]),
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('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId', [
'body' => '{
"androidId": "",
"device": "",
"latestBuildFingerprint": "",
"maker": "",
"managementType": "",
"model": "",
"policy": {
"autoUpdatePolicy": "",
"deviceReportPolicy": "",
"maintenanceWindow": {
"durationMs": "",
"startTimeAfterMidnightMs": ""
},
"productAvailabilityPolicy": "",
"productPolicy": [
{
"autoInstallPolicy": {
"autoInstallConstraint": [
{
"chargingStateConstraint": "",
"deviceIdleStateConstraint": "",
"networkTypeConstraint": ""
}
],
"autoInstallMode": "",
"autoInstallPriority": 0,
"minimumVersionCode": 0
},
"autoUpdateMode": "",
"enterpriseAuthenticationAppLinkConfigs": [
{
"uri": ""
}
],
"managedConfiguration": {
"configurationVariables": {
"mcmId": "",
"variableSet": [
{
"placeholder": "",
"userValue": ""
}
]
},
"kind": "",
"managedProperty": [
{
"key": "",
"valueBool": false,
"valueBundle": {
"managedProperty": []
},
"valueBundleArray": [
{}
],
"valueInteger": 0,
"valueString": "",
"valueStringArray": []
}
],
"productId": ""
},
"productId": "",
"trackIds": [],
"tracks": []
}
]
},
"product": "",
"report": {
"appState": [
{
"keyedAppState": [
{
"data": "",
"key": "",
"message": "",
"severity": "",
"stateTimestampMillis": ""
}
],
"packageName": ""
}
],
"lastUpdatedTimestampMillis": ""
},
"retailBrand": "",
"sdkVersion": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'androidId' => '',
'device' => '',
'latestBuildFingerprint' => '',
'maker' => '',
'managementType' => '',
'model' => '',
'policy' => [
'autoUpdatePolicy' => '',
'deviceReportPolicy' => '',
'maintenanceWindow' => [
'durationMs' => '',
'startTimeAfterMidnightMs' => ''
],
'productAvailabilityPolicy' => '',
'productPolicy' => [
[
'autoInstallPolicy' => [
'autoInstallConstraint' => [
[
'chargingStateConstraint' => '',
'deviceIdleStateConstraint' => '',
'networkTypeConstraint' => ''
]
],
'autoInstallMode' => '',
'autoInstallPriority' => 0,
'minimumVersionCode' => 0
],
'autoUpdateMode' => '',
'enterpriseAuthenticationAppLinkConfigs' => [
[
'uri' => ''
]
],
'managedConfiguration' => [
'configurationVariables' => [
'mcmId' => '',
'variableSet' => [
[
'placeholder' => '',
'userValue' => ''
]
]
],
'kind' => '',
'managedProperty' => [
[
'key' => '',
'valueBool' => null,
'valueBundle' => [
'managedProperty' => [
]
],
'valueBundleArray' => [
[
]
],
'valueInteger' => 0,
'valueString' => '',
'valueStringArray' => [
]
]
],
'productId' => ''
],
'productId' => '',
'trackIds' => [
],
'tracks' => [
]
]
]
],
'product' => '',
'report' => [
'appState' => [
[
'keyedAppState' => [
[
'data' => '',
'key' => '',
'message' => '',
'severity' => '',
'stateTimestampMillis' => ''
]
],
'packageName' => ''
]
],
'lastUpdatedTimestampMillis' => ''
],
'retailBrand' => '',
'sdkVersion' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'androidId' => '',
'device' => '',
'latestBuildFingerprint' => '',
'maker' => '',
'managementType' => '',
'model' => '',
'policy' => [
'autoUpdatePolicy' => '',
'deviceReportPolicy' => '',
'maintenanceWindow' => [
'durationMs' => '',
'startTimeAfterMidnightMs' => ''
],
'productAvailabilityPolicy' => '',
'productPolicy' => [
[
'autoInstallPolicy' => [
'autoInstallConstraint' => [
[
'chargingStateConstraint' => '',
'deviceIdleStateConstraint' => '',
'networkTypeConstraint' => ''
]
],
'autoInstallMode' => '',
'autoInstallPriority' => 0,
'minimumVersionCode' => 0
],
'autoUpdateMode' => '',
'enterpriseAuthenticationAppLinkConfigs' => [
[
'uri' => ''
]
],
'managedConfiguration' => [
'configurationVariables' => [
'mcmId' => '',
'variableSet' => [
[
'placeholder' => '',
'userValue' => ''
]
]
],
'kind' => '',
'managedProperty' => [
[
'key' => '',
'valueBool' => null,
'valueBundle' => [
'managedProperty' => [
]
],
'valueBundleArray' => [
[
]
],
'valueInteger' => 0,
'valueString' => '',
'valueStringArray' => [
]
]
],
'productId' => ''
],
'productId' => '',
'trackIds' => [
],
'tracks' => [
]
]
]
],
'product' => '',
'report' => [
'appState' => [
[
'keyedAppState' => [
[
'data' => '',
'key' => '',
'message' => '',
'severity' => '',
'stateTimestampMillis' => ''
]
],
'packageName' => ''
]
],
'lastUpdatedTimestampMillis' => ''
],
'retailBrand' => '',
'sdkVersion' => 0
]));
$request->setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId');
$request->setRequestMethod('PUT');
$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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"androidId": "",
"device": "",
"latestBuildFingerprint": "",
"maker": "",
"managementType": "",
"model": "",
"policy": {
"autoUpdatePolicy": "",
"deviceReportPolicy": "",
"maintenanceWindow": {
"durationMs": "",
"startTimeAfterMidnightMs": ""
},
"productAvailabilityPolicy": "",
"productPolicy": [
{
"autoInstallPolicy": {
"autoInstallConstraint": [
{
"chargingStateConstraint": "",
"deviceIdleStateConstraint": "",
"networkTypeConstraint": ""
}
],
"autoInstallMode": "",
"autoInstallPriority": 0,
"minimumVersionCode": 0
},
"autoUpdateMode": "",
"enterpriseAuthenticationAppLinkConfigs": [
{
"uri": ""
}
],
"managedConfiguration": {
"configurationVariables": {
"mcmId": "",
"variableSet": [
{
"placeholder": "",
"userValue": ""
}
]
},
"kind": "",
"managedProperty": [
{
"key": "",
"valueBool": false,
"valueBundle": {
"managedProperty": []
},
"valueBundleArray": [
{}
],
"valueInteger": 0,
"valueString": "",
"valueStringArray": []
}
],
"productId": ""
},
"productId": "",
"trackIds": [],
"tracks": []
}
]
},
"product": "",
"report": {
"appState": [
{
"keyedAppState": [
{
"data": "",
"key": "",
"message": "",
"severity": "",
"stateTimestampMillis": ""
}
],
"packageName": ""
}
],
"lastUpdatedTimestampMillis": ""
},
"retailBrand": "",
"sdkVersion": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"androidId": "",
"device": "",
"latestBuildFingerprint": "",
"maker": "",
"managementType": "",
"model": "",
"policy": {
"autoUpdatePolicy": "",
"deviceReportPolicy": "",
"maintenanceWindow": {
"durationMs": "",
"startTimeAfterMidnightMs": ""
},
"productAvailabilityPolicy": "",
"productPolicy": [
{
"autoInstallPolicy": {
"autoInstallConstraint": [
{
"chargingStateConstraint": "",
"deviceIdleStateConstraint": "",
"networkTypeConstraint": ""
}
],
"autoInstallMode": "",
"autoInstallPriority": 0,
"minimumVersionCode": 0
},
"autoUpdateMode": "",
"enterpriseAuthenticationAppLinkConfigs": [
{
"uri": ""
}
],
"managedConfiguration": {
"configurationVariables": {
"mcmId": "",
"variableSet": [
{
"placeholder": "",
"userValue": ""
}
]
},
"kind": "",
"managedProperty": [
{
"key": "",
"valueBool": false,
"valueBundle": {
"managedProperty": []
},
"valueBundleArray": [
{}
],
"valueInteger": 0,
"valueString": "",
"valueStringArray": []
}
],
"productId": ""
},
"productId": "",
"trackIds": [],
"tracks": []
}
]
},
"product": "",
"report": {
"appState": [
{
"keyedAppState": [
{
"data": "",
"key": "",
"message": "",
"severity": "",
"stateTimestampMillis": ""
}
],
"packageName": ""
}
],
"lastUpdatedTimestampMillis": ""
},
"retailBrand": "",
"sdkVersion": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"androidId\": \"\",\n \"device\": \"\",\n \"latestBuildFingerprint\": \"\",\n \"maker\": \"\",\n \"managementType\": \"\",\n \"model\": \"\",\n \"policy\": {\n \"autoUpdatePolicy\": \"\",\n \"deviceReportPolicy\": \"\",\n \"maintenanceWindow\": {\n \"durationMs\": \"\",\n \"startTimeAfterMidnightMs\": \"\"\n },\n \"productAvailabilityPolicy\": \"\",\n \"productPolicy\": [\n {\n \"autoInstallPolicy\": {\n \"autoInstallConstraint\": [\n {\n \"chargingStateConstraint\": \"\",\n \"deviceIdleStateConstraint\": \"\",\n \"networkTypeConstraint\": \"\"\n }\n ],\n \"autoInstallMode\": \"\",\n \"autoInstallPriority\": 0,\n \"minimumVersionCode\": 0\n },\n \"autoUpdateMode\": \"\",\n \"enterpriseAuthenticationAppLinkConfigs\": [\n {\n \"uri\": \"\"\n }\n ],\n \"managedConfiguration\": {\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n },\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n },\n \"product\": \"\",\n \"report\": {\n \"appState\": [\n {\n \"keyedAppState\": [\n {\n \"data\": \"\",\n \"key\": \"\",\n \"message\": \"\",\n \"severity\": \"\",\n \"stateTimestampMillis\": \"\"\n }\n ],\n \"packageName\": \"\"\n }\n ],\n \"lastUpdatedTimestampMillis\": \"\"\n },\n \"retailBrand\": \"\",\n \"sdkVersion\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId"
payload = {
"androidId": "",
"device": "",
"latestBuildFingerprint": "",
"maker": "",
"managementType": "",
"model": "",
"policy": {
"autoUpdatePolicy": "",
"deviceReportPolicy": "",
"maintenanceWindow": {
"durationMs": "",
"startTimeAfterMidnightMs": ""
},
"productAvailabilityPolicy": "",
"productPolicy": [
{
"autoInstallPolicy": {
"autoInstallConstraint": [
{
"chargingStateConstraint": "",
"deviceIdleStateConstraint": "",
"networkTypeConstraint": ""
}
],
"autoInstallMode": "",
"autoInstallPriority": 0,
"minimumVersionCode": 0
},
"autoUpdateMode": "",
"enterpriseAuthenticationAppLinkConfigs": [{ "uri": "" }],
"managedConfiguration": {
"configurationVariables": {
"mcmId": "",
"variableSet": [
{
"placeholder": "",
"userValue": ""
}
]
},
"kind": "",
"managedProperty": [
{
"key": "",
"valueBool": False,
"valueBundle": { "managedProperty": [] },
"valueBundleArray": [{}],
"valueInteger": 0,
"valueString": "",
"valueStringArray": []
}
],
"productId": ""
},
"productId": "",
"trackIds": [],
"tracks": []
}
]
},
"product": "",
"report": {
"appState": [
{
"keyedAppState": [
{
"data": "",
"key": "",
"message": "",
"severity": "",
"stateTimestampMillis": ""
}
],
"packageName": ""
}
],
"lastUpdatedTimestampMillis": ""
},
"retailBrand": "",
"sdkVersion": 0
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId"
payload <- "{\n \"androidId\": \"\",\n \"device\": \"\",\n \"latestBuildFingerprint\": \"\",\n \"maker\": \"\",\n \"managementType\": \"\",\n \"model\": \"\",\n \"policy\": {\n \"autoUpdatePolicy\": \"\",\n \"deviceReportPolicy\": \"\",\n \"maintenanceWindow\": {\n \"durationMs\": \"\",\n \"startTimeAfterMidnightMs\": \"\"\n },\n \"productAvailabilityPolicy\": \"\",\n \"productPolicy\": [\n {\n \"autoInstallPolicy\": {\n \"autoInstallConstraint\": [\n {\n \"chargingStateConstraint\": \"\",\n \"deviceIdleStateConstraint\": \"\",\n \"networkTypeConstraint\": \"\"\n }\n ],\n \"autoInstallMode\": \"\",\n \"autoInstallPriority\": 0,\n \"minimumVersionCode\": 0\n },\n \"autoUpdateMode\": \"\",\n \"enterpriseAuthenticationAppLinkConfigs\": [\n {\n \"uri\": \"\"\n }\n ],\n \"managedConfiguration\": {\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n },\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n },\n \"product\": \"\",\n \"report\": {\n \"appState\": [\n {\n \"keyedAppState\": [\n {\n \"data\": \"\",\n \"key\": \"\",\n \"message\": \"\",\n \"severity\": \"\",\n \"stateTimestampMillis\": \"\"\n }\n ],\n \"packageName\": \"\"\n }\n ],\n \"lastUpdatedTimestampMillis\": \"\"\n },\n \"retailBrand\": \"\",\n \"sdkVersion\": 0\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"androidId\": \"\",\n \"device\": \"\",\n \"latestBuildFingerprint\": \"\",\n \"maker\": \"\",\n \"managementType\": \"\",\n \"model\": \"\",\n \"policy\": {\n \"autoUpdatePolicy\": \"\",\n \"deviceReportPolicy\": \"\",\n \"maintenanceWindow\": {\n \"durationMs\": \"\",\n \"startTimeAfterMidnightMs\": \"\"\n },\n \"productAvailabilityPolicy\": \"\",\n \"productPolicy\": [\n {\n \"autoInstallPolicy\": {\n \"autoInstallConstraint\": [\n {\n \"chargingStateConstraint\": \"\",\n \"deviceIdleStateConstraint\": \"\",\n \"networkTypeConstraint\": \"\"\n }\n ],\n \"autoInstallMode\": \"\",\n \"autoInstallPriority\": 0,\n \"minimumVersionCode\": 0\n },\n \"autoUpdateMode\": \"\",\n \"enterpriseAuthenticationAppLinkConfigs\": [\n {\n \"uri\": \"\"\n }\n ],\n \"managedConfiguration\": {\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n },\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n },\n \"product\": \"\",\n \"report\": {\n \"appState\": [\n {\n \"keyedAppState\": [\n {\n \"data\": \"\",\n \"key\": \"\",\n \"message\": \"\",\n \"severity\": \"\",\n \"stateTimestampMillis\": \"\"\n }\n ],\n \"packageName\": \"\"\n }\n ],\n \"lastUpdatedTimestampMillis\": \"\"\n },\n \"retailBrand\": \"\",\n \"sdkVersion\": 0\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId') do |req|
req.body = "{\n \"androidId\": \"\",\n \"device\": \"\",\n \"latestBuildFingerprint\": \"\",\n \"maker\": \"\",\n \"managementType\": \"\",\n \"model\": \"\",\n \"policy\": {\n \"autoUpdatePolicy\": \"\",\n \"deviceReportPolicy\": \"\",\n \"maintenanceWindow\": {\n \"durationMs\": \"\",\n \"startTimeAfterMidnightMs\": \"\"\n },\n \"productAvailabilityPolicy\": \"\",\n \"productPolicy\": [\n {\n \"autoInstallPolicy\": {\n \"autoInstallConstraint\": [\n {\n \"chargingStateConstraint\": \"\",\n \"deviceIdleStateConstraint\": \"\",\n \"networkTypeConstraint\": \"\"\n }\n ],\n \"autoInstallMode\": \"\",\n \"autoInstallPriority\": 0,\n \"minimumVersionCode\": 0\n },\n \"autoUpdateMode\": \"\",\n \"enterpriseAuthenticationAppLinkConfigs\": [\n {\n \"uri\": \"\"\n }\n ],\n \"managedConfiguration\": {\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n },\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n },\n \"product\": \"\",\n \"report\": {\n \"appState\": [\n {\n \"keyedAppState\": [\n {\n \"data\": \"\",\n \"key\": \"\",\n \"message\": \"\",\n \"severity\": \"\",\n \"stateTimestampMillis\": \"\"\n }\n ],\n \"packageName\": \"\"\n }\n ],\n \"lastUpdatedTimestampMillis\": \"\"\n },\n \"retailBrand\": \"\",\n \"sdkVersion\": 0\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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId";
let payload = json!({
"androidId": "",
"device": "",
"latestBuildFingerprint": "",
"maker": "",
"managementType": "",
"model": "",
"policy": json!({
"autoUpdatePolicy": "",
"deviceReportPolicy": "",
"maintenanceWindow": json!({
"durationMs": "",
"startTimeAfterMidnightMs": ""
}),
"productAvailabilityPolicy": "",
"productPolicy": (
json!({
"autoInstallPolicy": json!({
"autoInstallConstraint": (
json!({
"chargingStateConstraint": "",
"deviceIdleStateConstraint": "",
"networkTypeConstraint": ""
})
),
"autoInstallMode": "",
"autoInstallPriority": 0,
"minimumVersionCode": 0
}),
"autoUpdateMode": "",
"enterpriseAuthenticationAppLinkConfigs": (json!({"uri": ""})),
"managedConfiguration": json!({
"configurationVariables": json!({
"mcmId": "",
"variableSet": (
json!({
"placeholder": "",
"userValue": ""
})
)
}),
"kind": "",
"managedProperty": (
json!({
"key": "",
"valueBool": false,
"valueBundle": json!({"managedProperty": ()}),
"valueBundleArray": (json!({})),
"valueInteger": 0,
"valueString": "",
"valueStringArray": ()
})
),
"productId": ""
}),
"productId": "",
"trackIds": (),
"tracks": ()
})
)
}),
"product": "",
"report": json!({
"appState": (
json!({
"keyedAppState": (
json!({
"data": "",
"key": "",
"message": "",
"severity": "",
"stateTimestampMillis": ""
})
),
"packageName": ""
})
),
"lastUpdatedTimestampMillis": ""
}),
"retailBrand": "",
"sdkVersion": 0
});
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("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId \
--header 'content-type: application/json' \
--data '{
"androidId": "",
"device": "",
"latestBuildFingerprint": "",
"maker": "",
"managementType": "",
"model": "",
"policy": {
"autoUpdatePolicy": "",
"deviceReportPolicy": "",
"maintenanceWindow": {
"durationMs": "",
"startTimeAfterMidnightMs": ""
},
"productAvailabilityPolicy": "",
"productPolicy": [
{
"autoInstallPolicy": {
"autoInstallConstraint": [
{
"chargingStateConstraint": "",
"deviceIdleStateConstraint": "",
"networkTypeConstraint": ""
}
],
"autoInstallMode": "",
"autoInstallPriority": 0,
"minimumVersionCode": 0
},
"autoUpdateMode": "",
"enterpriseAuthenticationAppLinkConfigs": [
{
"uri": ""
}
],
"managedConfiguration": {
"configurationVariables": {
"mcmId": "",
"variableSet": [
{
"placeholder": "",
"userValue": ""
}
]
},
"kind": "",
"managedProperty": [
{
"key": "",
"valueBool": false,
"valueBundle": {
"managedProperty": []
},
"valueBundleArray": [
{}
],
"valueInteger": 0,
"valueString": "",
"valueStringArray": []
}
],
"productId": ""
},
"productId": "",
"trackIds": [],
"tracks": []
}
]
},
"product": "",
"report": {
"appState": [
{
"keyedAppState": [
{
"data": "",
"key": "",
"message": "",
"severity": "",
"stateTimestampMillis": ""
}
],
"packageName": ""
}
],
"lastUpdatedTimestampMillis": ""
},
"retailBrand": "",
"sdkVersion": 0
}'
echo '{
"androidId": "",
"device": "",
"latestBuildFingerprint": "",
"maker": "",
"managementType": "",
"model": "",
"policy": {
"autoUpdatePolicy": "",
"deviceReportPolicy": "",
"maintenanceWindow": {
"durationMs": "",
"startTimeAfterMidnightMs": ""
},
"productAvailabilityPolicy": "",
"productPolicy": [
{
"autoInstallPolicy": {
"autoInstallConstraint": [
{
"chargingStateConstraint": "",
"deviceIdleStateConstraint": "",
"networkTypeConstraint": ""
}
],
"autoInstallMode": "",
"autoInstallPriority": 0,
"minimumVersionCode": 0
},
"autoUpdateMode": "",
"enterpriseAuthenticationAppLinkConfigs": [
{
"uri": ""
}
],
"managedConfiguration": {
"configurationVariables": {
"mcmId": "",
"variableSet": [
{
"placeholder": "",
"userValue": ""
}
]
},
"kind": "",
"managedProperty": [
{
"key": "",
"valueBool": false,
"valueBundle": {
"managedProperty": []
},
"valueBundleArray": [
{}
],
"valueInteger": 0,
"valueString": "",
"valueStringArray": []
}
],
"productId": ""
},
"productId": "",
"trackIds": [],
"tracks": []
}
]
},
"product": "",
"report": {
"appState": [
{
"keyedAppState": [
{
"data": "",
"key": "",
"message": "",
"severity": "",
"stateTimestampMillis": ""
}
],
"packageName": ""
}
],
"lastUpdatedTimestampMillis": ""
},
"retailBrand": "",
"sdkVersion": 0
}' | \
http PUT {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "androidId": "",\n "device": "",\n "latestBuildFingerprint": "",\n "maker": "",\n "managementType": "",\n "model": "",\n "policy": {\n "autoUpdatePolicy": "",\n "deviceReportPolicy": "",\n "maintenanceWindow": {\n "durationMs": "",\n "startTimeAfterMidnightMs": ""\n },\n "productAvailabilityPolicy": "",\n "productPolicy": [\n {\n "autoInstallPolicy": {\n "autoInstallConstraint": [\n {\n "chargingStateConstraint": "",\n "deviceIdleStateConstraint": "",\n "networkTypeConstraint": ""\n }\n ],\n "autoInstallMode": "",\n "autoInstallPriority": 0,\n "minimumVersionCode": 0\n },\n "autoUpdateMode": "",\n "enterpriseAuthenticationAppLinkConfigs": [\n {\n "uri": ""\n }\n ],\n "managedConfiguration": {\n "configurationVariables": {\n "mcmId": "",\n "variableSet": [\n {\n "placeholder": "",\n "userValue": ""\n }\n ]\n },\n "kind": "",\n "managedProperty": [\n {\n "key": "",\n "valueBool": false,\n "valueBundle": {\n "managedProperty": []\n },\n "valueBundleArray": [\n {}\n ],\n "valueInteger": 0,\n "valueString": "",\n "valueStringArray": []\n }\n ],\n "productId": ""\n },\n "productId": "",\n "trackIds": [],\n "tracks": []\n }\n ]\n },\n "product": "",\n "report": {\n "appState": [\n {\n "keyedAppState": [\n {\n "data": "",\n "key": "",\n "message": "",\n "severity": "",\n "stateTimestampMillis": ""\n }\n ],\n "packageName": ""\n }\n ],\n "lastUpdatedTimestampMillis": ""\n },\n "retailBrand": "",\n "sdkVersion": 0\n}' \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"androidId": "",
"device": "",
"latestBuildFingerprint": "",
"maker": "",
"managementType": "",
"model": "",
"policy": [
"autoUpdatePolicy": "",
"deviceReportPolicy": "",
"maintenanceWindow": [
"durationMs": "",
"startTimeAfterMidnightMs": ""
],
"productAvailabilityPolicy": "",
"productPolicy": [
[
"autoInstallPolicy": [
"autoInstallConstraint": [
[
"chargingStateConstraint": "",
"deviceIdleStateConstraint": "",
"networkTypeConstraint": ""
]
],
"autoInstallMode": "",
"autoInstallPriority": 0,
"minimumVersionCode": 0
],
"autoUpdateMode": "",
"enterpriseAuthenticationAppLinkConfigs": [["uri": ""]],
"managedConfiguration": [
"configurationVariables": [
"mcmId": "",
"variableSet": [
[
"placeholder": "",
"userValue": ""
]
]
],
"kind": "",
"managedProperty": [
[
"key": "",
"valueBool": false,
"valueBundle": ["managedProperty": []],
"valueBundleArray": [[]],
"valueInteger": 0,
"valueString": "",
"valueStringArray": []
]
],
"productId": ""
],
"productId": "",
"trackIds": [],
"tracks": []
]
]
],
"product": "",
"report": [
"appState": [
[
"keyedAppState": [
[
"data": "",
"key": "",
"message": "",
"severity": "",
"stateTimestampMillis": ""
]
],
"packageName": ""
]
],
"lastUpdatedTimestampMillis": ""
],
"retailBrand": "",
"sdkVersion": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
androidenterprise.enterprises.acknowledgeNotificationSet
{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/androidenterprise/v1/enterprises/acknowledgeNotificationSet HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet';
const options = {method: 'POST'};
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}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/acknowledgeNotificationSet',
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: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet');
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}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet';
const options = {method: 'POST'};
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}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
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}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/androidenterprise/v1/enterprises/acknowledgeNotificationSet")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/androidenterprise/v1/enterprises/acknowledgeNotificationSet') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet
http POST {{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/acknowledgeNotificationSet")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
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
androidenterprise.enterprises.completeSignup
{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/androidenterprise/v1/enterprises/completeSignup HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup';
const options = {method: 'POST'};
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}}/androidenterprise/v1/enterprises/completeSignup',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/completeSignup',
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: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup');
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}}/androidenterprise/v1/enterprises/completeSignup'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup';
const options = {method: 'POST'};
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}}/androidenterprise/v1/enterprises/completeSignup"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
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}}/androidenterprise/v1/enterprises/completeSignup" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/androidenterprise/v1/enterprises/completeSignup")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/androidenterprise/v1/enterprises/completeSignup') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/androidenterprise/v1/enterprises/completeSignup
http POST {{baseUrl}}/androidenterprise/v1/enterprises/completeSignup
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/completeSignup
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/completeSignup")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
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
androidenterprise.enterprises.createEnrollmentToken
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken
QUERY PARAMS
enterpriseId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken';
const options = {method: 'POST'};
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}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken',
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: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken');
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}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken';
const options = {method: 'POST'};
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}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
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}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken
http POST {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createEnrollmentToken")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
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
androidenterprise.enterprises.createWebToken
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken
QUERY PARAMS
enterpriseId
BODY json
{
"managedConfigurations": {
"enabled": false
},
"parent": "",
"permission": [],
"playSearch": {
"approveApps": false,
"enabled": false
},
"privateApps": {
"enabled": false
},
"storeBuilder": {
"enabled": false
},
"webApps": {
"enabled": false
},
"zeroTouch": {
"enabled": false
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken");
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 \"managedConfigurations\": {\n \"enabled\": false\n },\n \"parent\": \"\",\n \"permission\": [],\n \"playSearch\": {\n \"approveApps\": false,\n \"enabled\": false\n },\n \"privateApps\": {\n \"enabled\": false\n },\n \"storeBuilder\": {\n \"enabled\": false\n },\n \"webApps\": {\n \"enabled\": false\n },\n \"zeroTouch\": {\n \"enabled\": false\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken" {:content-type :json
:form-params {:managedConfigurations {:enabled false}
:parent ""
:permission []
:playSearch {:approveApps false
:enabled false}
:privateApps {:enabled false}
:storeBuilder {:enabled false}
:webApps {:enabled false}
:zeroTouch {:enabled false}}})
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"managedConfigurations\": {\n \"enabled\": false\n },\n \"parent\": \"\",\n \"permission\": [],\n \"playSearch\": {\n \"approveApps\": false,\n \"enabled\": false\n },\n \"privateApps\": {\n \"enabled\": false\n },\n \"storeBuilder\": {\n \"enabled\": false\n },\n \"webApps\": {\n \"enabled\": false\n },\n \"zeroTouch\": {\n \"enabled\": false\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken"),
Content = new StringContent("{\n \"managedConfigurations\": {\n \"enabled\": false\n },\n \"parent\": \"\",\n \"permission\": [],\n \"playSearch\": {\n \"approveApps\": false,\n \"enabled\": false\n },\n \"privateApps\": {\n \"enabled\": false\n },\n \"storeBuilder\": {\n \"enabled\": false\n },\n \"webApps\": {\n \"enabled\": false\n },\n \"zeroTouch\": {\n \"enabled\": false\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"managedConfigurations\": {\n \"enabled\": false\n },\n \"parent\": \"\",\n \"permission\": [],\n \"playSearch\": {\n \"approveApps\": false,\n \"enabled\": false\n },\n \"privateApps\": {\n \"enabled\": false\n },\n \"storeBuilder\": {\n \"enabled\": false\n },\n \"webApps\": {\n \"enabled\": false\n },\n \"zeroTouch\": {\n \"enabled\": false\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken"
payload := strings.NewReader("{\n \"managedConfigurations\": {\n \"enabled\": false\n },\n \"parent\": \"\",\n \"permission\": [],\n \"playSearch\": {\n \"approveApps\": false,\n \"enabled\": false\n },\n \"privateApps\": {\n \"enabled\": false\n },\n \"storeBuilder\": {\n \"enabled\": false\n },\n \"webApps\": {\n \"enabled\": false\n },\n \"zeroTouch\": {\n \"enabled\": false\n }\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/androidenterprise/v1/enterprises/:enterpriseId/createWebToken HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 338
{
"managedConfigurations": {
"enabled": false
},
"parent": "",
"permission": [],
"playSearch": {
"approveApps": false,
"enabled": false
},
"privateApps": {
"enabled": false
},
"storeBuilder": {
"enabled": false
},
"webApps": {
"enabled": false
},
"zeroTouch": {
"enabled": false
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken")
.setHeader("content-type", "application/json")
.setBody("{\n \"managedConfigurations\": {\n \"enabled\": false\n },\n \"parent\": \"\",\n \"permission\": [],\n \"playSearch\": {\n \"approveApps\": false,\n \"enabled\": false\n },\n \"privateApps\": {\n \"enabled\": false\n },\n \"storeBuilder\": {\n \"enabled\": false\n },\n \"webApps\": {\n \"enabled\": false\n },\n \"zeroTouch\": {\n \"enabled\": false\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"managedConfigurations\": {\n \"enabled\": false\n },\n \"parent\": \"\",\n \"permission\": [],\n \"playSearch\": {\n \"approveApps\": false,\n \"enabled\": false\n },\n \"privateApps\": {\n \"enabled\": false\n },\n \"storeBuilder\": {\n \"enabled\": false\n },\n \"webApps\": {\n \"enabled\": false\n },\n \"zeroTouch\": {\n \"enabled\": false\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"managedConfigurations\": {\n \"enabled\": false\n },\n \"parent\": \"\",\n \"permission\": [],\n \"playSearch\": {\n \"approveApps\": false,\n \"enabled\": false\n },\n \"privateApps\": {\n \"enabled\": false\n },\n \"storeBuilder\": {\n \"enabled\": false\n },\n \"webApps\": {\n \"enabled\": false\n },\n \"zeroTouch\": {\n \"enabled\": false\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken")
.header("content-type", "application/json")
.body("{\n \"managedConfigurations\": {\n \"enabled\": false\n },\n \"parent\": \"\",\n \"permission\": [],\n \"playSearch\": {\n \"approveApps\": false,\n \"enabled\": false\n },\n \"privateApps\": {\n \"enabled\": false\n },\n \"storeBuilder\": {\n \"enabled\": false\n },\n \"webApps\": {\n \"enabled\": false\n },\n \"zeroTouch\": {\n \"enabled\": false\n }\n}")
.asString();
const data = JSON.stringify({
managedConfigurations: {
enabled: false
},
parent: '',
permission: [],
playSearch: {
approveApps: false,
enabled: false
},
privateApps: {
enabled: false
},
storeBuilder: {
enabled: false
},
webApps: {
enabled: false
},
zeroTouch: {
enabled: 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}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken',
headers: {'content-type': 'application/json'},
data: {
managedConfigurations: {enabled: false},
parent: '',
permission: [],
playSearch: {approveApps: false, enabled: false},
privateApps: {enabled: false},
storeBuilder: {enabled: false},
webApps: {enabled: false},
zeroTouch: {enabled: false}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"managedConfigurations":{"enabled":false},"parent":"","permission":[],"playSearch":{"approveApps":false,"enabled":false},"privateApps":{"enabled":false},"storeBuilder":{"enabled":false},"webApps":{"enabled":false},"zeroTouch":{"enabled":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}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "managedConfigurations": {\n "enabled": false\n },\n "parent": "",\n "permission": [],\n "playSearch": {\n "approveApps": false,\n "enabled": false\n },\n "privateApps": {\n "enabled": false\n },\n "storeBuilder": {\n "enabled": false\n },\n "webApps": {\n "enabled": false\n },\n "zeroTouch": {\n "enabled": false\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"managedConfigurations\": {\n \"enabled\": false\n },\n \"parent\": \"\",\n \"permission\": [],\n \"playSearch\": {\n \"approveApps\": false,\n \"enabled\": false\n },\n \"privateApps\": {\n \"enabled\": false\n },\n \"storeBuilder\": {\n \"enabled\": false\n },\n \"webApps\": {\n \"enabled\": false\n },\n \"zeroTouch\": {\n \"enabled\": false\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken")
.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/androidenterprise/v1/enterprises/:enterpriseId/createWebToken',
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({
managedConfigurations: {enabled: false},
parent: '',
permission: [],
playSearch: {approveApps: false, enabled: false},
privateApps: {enabled: false},
storeBuilder: {enabled: false},
webApps: {enabled: false},
zeroTouch: {enabled: false}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken',
headers: {'content-type': 'application/json'},
body: {
managedConfigurations: {enabled: false},
parent: '',
permission: [],
playSearch: {approveApps: false, enabled: false},
privateApps: {enabled: false},
storeBuilder: {enabled: false},
webApps: {enabled: false},
zeroTouch: {enabled: 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}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
managedConfigurations: {
enabled: false
},
parent: '',
permission: [],
playSearch: {
approveApps: false,
enabled: false
},
privateApps: {
enabled: false
},
storeBuilder: {
enabled: false
},
webApps: {
enabled: false
},
zeroTouch: {
enabled: 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}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken',
headers: {'content-type': 'application/json'},
data: {
managedConfigurations: {enabled: false},
parent: '',
permission: [],
playSearch: {approveApps: false, enabled: false},
privateApps: {enabled: false},
storeBuilder: {enabled: false},
webApps: {enabled: false},
zeroTouch: {enabled: false}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"managedConfigurations":{"enabled":false},"parent":"","permission":[],"playSearch":{"approveApps":false,"enabled":false},"privateApps":{"enabled":false},"storeBuilder":{"enabled":false},"webApps":{"enabled":false},"zeroTouch":{"enabled":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 = @{ @"managedConfigurations": @{ @"enabled": @NO },
@"parent": @"",
@"permission": @[ ],
@"playSearch": @{ @"approveApps": @NO, @"enabled": @NO },
@"privateApps": @{ @"enabled": @NO },
@"storeBuilder": @{ @"enabled": @NO },
@"webApps": @{ @"enabled": @NO },
@"zeroTouch": @{ @"enabled": @NO } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"managedConfigurations\": {\n \"enabled\": false\n },\n \"parent\": \"\",\n \"permission\": [],\n \"playSearch\": {\n \"approveApps\": false,\n \"enabled\": false\n },\n \"privateApps\": {\n \"enabled\": false\n },\n \"storeBuilder\": {\n \"enabled\": false\n },\n \"webApps\": {\n \"enabled\": false\n },\n \"zeroTouch\": {\n \"enabled\": false\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken",
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([
'managedConfigurations' => [
'enabled' => null
],
'parent' => '',
'permission' => [
],
'playSearch' => [
'approveApps' => null,
'enabled' => null
],
'privateApps' => [
'enabled' => null
],
'storeBuilder' => [
'enabled' => null
],
'webApps' => [
'enabled' => null
],
'zeroTouch' => [
'enabled' => 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}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken', [
'body' => '{
"managedConfigurations": {
"enabled": false
},
"parent": "",
"permission": [],
"playSearch": {
"approveApps": false,
"enabled": false
},
"privateApps": {
"enabled": false
},
"storeBuilder": {
"enabled": false
},
"webApps": {
"enabled": false
},
"zeroTouch": {
"enabled": false
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'managedConfigurations' => [
'enabled' => null
],
'parent' => '',
'permission' => [
],
'playSearch' => [
'approveApps' => null,
'enabled' => null
],
'privateApps' => [
'enabled' => null
],
'storeBuilder' => [
'enabled' => null
],
'webApps' => [
'enabled' => null
],
'zeroTouch' => [
'enabled' => null
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'managedConfigurations' => [
'enabled' => null
],
'parent' => '',
'permission' => [
],
'playSearch' => [
'approveApps' => null,
'enabled' => null
],
'privateApps' => [
'enabled' => null
],
'storeBuilder' => [
'enabled' => null
],
'webApps' => [
'enabled' => null
],
'zeroTouch' => [
'enabled' => null
]
]));
$request->setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken');
$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}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"managedConfigurations": {
"enabled": false
},
"parent": "",
"permission": [],
"playSearch": {
"approveApps": false,
"enabled": false
},
"privateApps": {
"enabled": false
},
"storeBuilder": {
"enabled": false
},
"webApps": {
"enabled": false
},
"zeroTouch": {
"enabled": false
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"managedConfigurations": {
"enabled": false
},
"parent": "",
"permission": [],
"playSearch": {
"approveApps": false,
"enabled": false
},
"privateApps": {
"enabled": false
},
"storeBuilder": {
"enabled": false
},
"webApps": {
"enabled": false
},
"zeroTouch": {
"enabled": false
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"managedConfigurations\": {\n \"enabled\": false\n },\n \"parent\": \"\",\n \"permission\": [],\n \"playSearch\": {\n \"approveApps\": false,\n \"enabled\": false\n },\n \"privateApps\": {\n \"enabled\": false\n },\n \"storeBuilder\": {\n \"enabled\": false\n },\n \"webApps\": {\n \"enabled\": false\n },\n \"zeroTouch\": {\n \"enabled\": false\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/createWebToken", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken"
payload = {
"managedConfigurations": { "enabled": False },
"parent": "",
"permission": [],
"playSearch": {
"approveApps": False,
"enabled": False
},
"privateApps": { "enabled": False },
"storeBuilder": { "enabled": False },
"webApps": { "enabled": False },
"zeroTouch": { "enabled": False }
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken"
payload <- "{\n \"managedConfigurations\": {\n \"enabled\": false\n },\n \"parent\": \"\",\n \"permission\": [],\n \"playSearch\": {\n \"approveApps\": false,\n \"enabled\": false\n },\n \"privateApps\": {\n \"enabled\": false\n },\n \"storeBuilder\": {\n \"enabled\": false\n },\n \"webApps\": {\n \"enabled\": false\n },\n \"zeroTouch\": {\n \"enabled\": false\n }\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}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken")
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 \"managedConfigurations\": {\n \"enabled\": false\n },\n \"parent\": \"\",\n \"permission\": [],\n \"playSearch\": {\n \"approveApps\": false,\n \"enabled\": false\n },\n \"privateApps\": {\n \"enabled\": false\n },\n \"storeBuilder\": {\n \"enabled\": false\n },\n \"webApps\": {\n \"enabled\": false\n },\n \"zeroTouch\": {\n \"enabled\": false\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/createWebToken') do |req|
req.body = "{\n \"managedConfigurations\": {\n \"enabled\": false\n },\n \"parent\": \"\",\n \"permission\": [],\n \"playSearch\": {\n \"approveApps\": false,\n \"enabled\": false\n },\n \"privateApps\": {\n \"enabled\": false\n },\n \"storeBuilder\": {\n \"enabled\": false\n },\n \"webApps\": {\n \"enabled\": false\n },\n \"zeroTouch\": {\n \"enabled\": false\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken";
let payload = json!({
"managedConfigurations": json!({"enabled": false}),
"parent": "",
"permission": (),
"playSearch": json!({
"approveApps": false,
"enabled": false
}),
"privateApps": json!({"enabled": false}),
"storeBuilder": json!({"enabled": false}),
"webApps": json!({"enabled": false}),
"zeroTouch": json!({"enabled": 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}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken \
--header 'content-type: application/json' \
--data '{
"managedConfigurations": {
"enabled": false
},
"parent": "",
"permission": [],
"playSearch": {
"approveApps": false,
"enabled": false
},
"privateApps": {
"enabled": false
},
"storeBuilder": {
"enabled": false
},
"webApps": {
"enabled": false
},
"zeroTouch": {
"enabled": false
}
}'
echo '{
"managedConfigurations": {
"enabled": false
},
"parent": "",
"permission": [],
"playSearch": {
"approveApps": false,
"enabled": false
},
"privateApps": {
"enabled": false
},
"storeBuilder": {
"enabled": false
},
"webApps": {
"enabled": false
},
"zeroTouch": {
"enabled": false
}
}' | \
http POST {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "managedConfigurations": {\n "enabled": false\n },\n "parent": "",\n "permission": [],\n "playSearch": {\n "approveApps": false,\n "enabled": false\n },\n "privateApps": {\n "enabled": false\n },\n "storeBuilder": {\n "enabled": false\n },\n "webApps": {\n "enabled": false\n },\n "zeroTouch": {\n "enabled": false\n }\n}' \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"managedConfigurations": ["enabled": false],
"parent": "",
"permission": [],
"playSearch": [
"approveApps": false,
"enabled": false
],
"privateApps": ["enabled": false],
"storeBuilder": ["enabled": false],
"webApps": ["enabled": false],
"zeroTouch": ["enabled": false]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/createWebToken")! 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
androidenterprise.enterprises.enroll
{{baseUrl}}/androidenterprise/v1/enterprises/enroll
QUERY PARAMS
token
BODY json
{
"administrator": [
{
"email": ""
}
],
"googleAuthenticationSettings": {
"dedicatedDevicesAllowed": "",
"googleAuthenticationRequired": ""
},
"id": "",
"name": "",
"primaryDomain": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/enroll?token=");
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 \"administrator\": [\n {\n \"email\": \"\"\n }\n ],\n \"googleAuthenticationSettings\": {\n \"dedicatedDevicesAllowed\": \"\",\n \"googleAuthenticationRequired\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"primaryDomain\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/androidenterprise/v1/enterprises/enroll" {:query-params {:token ""}
:content-type :json
:form-params {:administrator [{:email ""}]
:googleAuthenticationSettings {:dedicatedDevicesAllowed ""
:googleAuthenticationRequired ""}
:id ""
:name ""
:primaryDomain ""}})
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/enroll?token="
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"administrator\": [\n {\n \"email\": \"\"\n }\n ],\n \"googleAuthenticationSettings\": {\n \"dedicatedDevicesAllowed\": \"\",\n \"googleAuthenticationRequired\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"primaryDomain\": \"\"\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}}/androidenterprise/v1/enterprises/enroll?token="),
Content = new StringContent("{\n \"administrator\": [\n {\n \"email\": \"\"\n }\n ],\n \"googleAuthenticationSettings\": {\n \"dedicatedDevicesAllowed\": \"\",\n \"googleAuthenticationRequired\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"primaryDomain\": \"\"\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}}/androidenterprise/v1/enterprises/enroll?token=");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"administrator\": [\n {\n \"email\": \"\"\n }\n ],\n \"googleAuthenticationSettings\": {\n \"dedicatedDevicesAllowed\": \"\",\n \"googleAuthenticationRequired\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"primaryDomain\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/enroll?token="
payload := strings.NewReader("{\n \"administrator\": [\n {\n \"email\": \"\"\n }\n ],\n \"googleAuthenticationSettings\": {\n \"dedicatedDevicesAllowed\": \"\",\n \"googleAuthenticationRequired\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"primaryDomain\": \"\"\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/androidenterprise/v1/enterprises/enroll?token= HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 222
{
"administrator": [
{
"email": ""
}
],
"googleAuthenticationSettings": {
"dedicatedDevicesAllowed": "",
"googleAuthenticationRequired": ""
},
"id": "",
"name": "",
"primaryDomain": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/androidenterprise/v1/enterprises/enroll?token=")
.setHeader("content-type", "application/json")
.setBody("{\n \"administrator\": [\n {\n \"email\": \"\"\n }\n ],\n \"googleAuthenticationSettings\": {\n \"dedicatedDevicesAllowed\": \"\",\n \"googleAuthenticationRequired\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"primaryDomain\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/enroll?token="))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"administrator\": [\n {\n \"email\": \"\"\n }\n ],\n \"googleAuthenticationSettings\": {\n \"dedicatedDevicesAllowed\": \"\",\n \"googleAuthenticationRequired\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"primaryDomain\": \"\"\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 \"administrator\": [\n {\n \"email\": \"\"\n }\n ],\n \"googleAuthenticationSettings\": {\n \"dedicatedDevicesAllowed\": \"\",\n \"googleAuthenticationRequired\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"primaryDomain\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/enroll?token=")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/androidenterprise/v1/enterprises/enroll?token=")
.header("content-type", "application/json")
.body("{\n \"administrator\": [\n {\n \"email\": \"\"\n }\n ],\n \"googleAuthenticationSettings\": {\n \"dedicatedDevicesAllowed\": \"\",\n \"googleAuthenticationRequired\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"primaryDomain\": \"\"\n}")
.asString();
const data = JSON.stringify({
administrator: [
{
email: ''
}
],
googleAuthenticationSettings: {
dedicatedDevicesAllowed: '',
googleAuthenticationRequired: ''
},
id: '',
name: '',
primaryDomain: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/enroll?token=');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/enroll',
params: {token: ''},
headers: {'content-type': 'application/json'},
data: {
administrator: [{email: ''}],
googleAuthenticationSettings: {dedicatedDevicesAllowed: '', googleAuthenticationRequired: ''},
id: '',
name: '',
primaryDomain: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/enroll?token=';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"administrator":[{"email":""}],"googleAuthenticationSettings":{"dedicatedDevicesAllowed":"","googleAuthenticationRequired":""},"id":"","name":"","primaryDomain":""}'
};
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}}/androidenterprise/v1/enterprises/enroll?token=',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "administrator": [\n {\n "email": ""\n }\n ],\n "googleAuthenticationSettings": {\n "dedicatedDevicesAllowed": "",\n "googleAuthenticationRequired": ""\n },\n "id": "",\n "name": "",\n "primaryDomain": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"administrator\": [\n {\n \"email\": \"\"\n }\n ],\n \"googleAuthenticationSettings\": {\n \"dedicatedDevicesAllowed\": \"\",\n \"googleAuthenticationRequired\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"primaryDomain\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/enroll?token=")
.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/androidenterprise/v1/enterprises/enroll?token=',
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({
administrator: [{email: ''}],
googleAuthenticationSettings: {dedicatedDevicesAllowed: '', googleAuthenticationRequired: ''},
id: '',
name: '',
primaryDomain: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/enroll',
qs: {token: ''},
headers: {'content-type': 'application/json'},
body: {
administrator: [{email: ''}],
googleAuthenticationSettings: {dedicatedDevicesAllowed: '', googleAuthenticationRequired: ''},
id: '',
name: '',
primaryDomain: ''
},
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}}/androidenterprise/v1/enterprises/enroll');
req.query({
token: ''
});
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
administrator: [
{
email: ''
}
],
googleAuthenticationSettings: {
dedicatedDevicesAllowed: '',
googleAuthenticationRequired: ''
},
id: '',
name: '',
primaryDomain: ''
});
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}}/androidenterprise/v1/enterprises/enroll',
params: {token: ''},
headers: {'content-type': 'application/json'},
data: {
administrator: [{email: ''}],
googleAuthenticationSettings: {dedicatedDevicesAllowed: '', googleAuthenticationRequired: ''},
id: '',
name: '',
primaryDomain: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/enroll?token=';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"administrator":[{"email":""}],"googleAuthenticationSettings":{"dedicatedDevicesAllowed":"","googleAuthenticationRequired":""},"id":"","name":"","primaryDomain":""}'
};
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 = @{ @"administrator": @[ @{ @"email": @"" } ],
@"googleAuthenticationSettings": @{ @"dedicatedDevicesAllowed": @"", @"googleAuthenticationRequired": @"" },
@"id": @"",
@"name": @"",
@"primaryDomain": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/androidenterprise/v1/enterprises/enroll?token="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/androidenterprise/v1/enterprises/enroll?token=" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"administrator\": [\n {\n \"email\": \"\"\n }\n ],\n \"googleAuthenticationSettings\": {\n \"dedicatedDevicesAllowed\": \"\",\n \"googleAuthenticationRequired\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"primaryDomain\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/enroll?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'administrator' => [
[
'email' => ''
]
],
'googleAuthenticationSettings' => [
'dedicatedDevicesAllowed' => '',
'googleAuthenticationRequired' => ''
],
'id' => '',
'name' => '',
'primaryDomain' => ''
]),
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}}/androidenterprise/v1/enterprises/enroll?token=', [
'body' => '{
"administrator": [
{
"email": ""
}
],
"googleAuthenticationSettings": {
"dedicatedDevicesAllowed": "",
"googleAuthenticationRequired": ""
},
"id": "",
"name": "",
"primaryDomain": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/enroll');
$request->setMethod(HTTP_METH_POST);
$request->setQueryData([
'token' => ''
]);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'administrator' => [
[
'email' => ''
]
],
'googleAuthenticationSettings' => [
'dedicatedDevicesAllowed' => '',
'googleAuthenticationRequired' => ''
],
'id' => '',
'name' => '',
'primaryDomain' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'administrator' => [
[
'email' => ''
]
],
'googleAuthenticationSettings' => [
'dedicatedDevicesAllowed' => '',
'googleAuthenticationRequired' => ''
],
'id' => '',
'name' => '',
'primaryDomain' => ''
]));
$request->setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/enroll');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setQuery(new http\QueryString([
'token' => ''
]));
$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}}/androidenterprise/v1/enterprises/enroll?token=' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"administrator": [
{
"email": ""
}
],
"googleAuthenticationSettings": {
"dedicatedDevicesAllowed": "",
"googleAuthenticationRequired": ""
},
"id": "",
"name": "",
"primaryDomain": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/enroll?token=' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"administrator": [
{
"email": ""
}
],
"googleAuthenticationSettings": {
"dedicatedDevicesAllowed": "",
"googleAuthenticationRequired": ""
},
"id": "",
"name": "",
"primaryDomain": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"administrator\": [\n {\n \"email\": \"\"\n }\n ],\n \"googleAuthenticationSettings\": {\n \"dedicatedDevicesAllowed\": \"\",\n \"googleAuthenticationRequired\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"primaryDomain\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/androidenterprise/v1/enterprises/enroll?token=", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/enroll"
querystring = {"token":""}
payload = {
"administrator": [{ "email": "" }],
"googleAuthenticationSettings": {
"dedicatedDevicesAllowed": "",
"googleAuthenticationRequired": ""
},
"id": "",
"name": "",
"primaryDomain": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/enroll"
queryString <- list(token = "")
payload <- "{\n \"administrator\": [\n {\n \"email\": \"\"\n }\n ],\n \"googleAuthenticationSettings\": {\n \"dedicatedDevicesAllowed\": \"\",\n \"googleAuthenticationRequired\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"primaryDomain\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, query = queryString, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/enroll?token=")
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 \"administrator\": [\n {\n \"email\": \"\"\n }\n ],\n \"googleAuthenticationSettings\": {\n \"dedicatedDevicesAllowed\": \"\",\n \"googleAuthenticationRequired\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"primaryDomain\": \"\"\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/androidenterprise/v1/enterprises/enroll') do |req|
req.params['token'] = ''
req.body = "{\n \"administrator\": [\n {\n \"email\": \"\"\n }\n ],\n \"googleAuthenticationSettings\": {\n \"dedicatedDevicesAllowed\": \"\",\n \"googleAuthenticationRequired\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\",\n \"primaryDomain\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/enroll";
let querystring = [
("token", ""),
];
let payload = json!({
"administrator": (json!({"email": ""})),
"googleAuthenticationSettings": json!({
"dedicatedDevicesAllowed": "",
"googleAuthenticationRequired": ""
}),
"id": "",
"name": "",
"primaryDomain": ""
});
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)
.query(&querystring)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/androidenterprise/v1/enterprises/enroll?token=' \
--header 'content-type: application/json' \
--data '{
"administrator": [
{
"email": ""
}
],
"googleAuthenticationSettings": {
"dedicatedDevicesAllowed": "",
"googleAuthenticationRequired": ""
},
"id": "",
"name": "",
"primaryDomain": ""
}'
echo '{
"administrator": [
{
"email": ""
}
],
"googleAuthenticationSettings": {
"dedicatedDevicesAllowed": "",
"googleAuthenticationRequired": ""
},
"id": "",
"name": "",
"primaryDomain": ""
}' | \
http POST '{{baseUrl}}/androidenterprise/v1/enterprises/enroll?token=' \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "administrator": [\n {\n "email": ""\n }\n ],\n "googleAuthenticationSettings": {\n "dedicatedDevicesAllowed": "",\n "googleAuthenticationRequired": ""\n },\n "id": "",\n "name": "",\n "primaryDomain": ""\n}' \
--output-document \
- '{{baseUrl}}/androidenterprise/v1/enterprises/enroll?token='
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"administrator": [["email": ""]],
"googleAuthenticationSettings": [
"dedicatedDevicesAllowed": "",
"googleAuthenticationRequired": ""
],
"id": "",
"name": "",
"primaryDomain": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/enroll?token=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
androidenterprise.enterprises.generateSignupUrl
{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/androidenterprise/v1/enterprises/signupUrl HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl';
const options = {method: 'POST'};
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}}/androidenterprise/v1/enterprises/signupUrl',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/signupUrl',
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: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl');
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}}/androidenterprise/v1/enterprises/signupUrl'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl';
const options = {method: 'POST'};
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}}/androidenterprise/v1/enterprises/signupUrl"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
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}}/androidenterprise/v1/enterprises/signupUrl" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/androidenterprise/v1/enterprises/signupUrl")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/androidenterprise/v1/enterprises/signupUrl') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/androidenterprise/v1/enterprises/signupUrl
http POST {{baseUrl}}/androidenterprise/v1/enterprises/signupUrl
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/signupUrl
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/signupUrl")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
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
androidenterprise.enterprises.get
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId
QUERY PARAMS
enterpriseId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId"
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}}/androidenterprise/v1/enterprises/:enterpriseId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId"
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/androidenterprise/v1/enterprises/:enterpriseId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId")
.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}}/androidenterprise/v1/enterprises/:enterpriseId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId';
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}}/androidenterprise/v1/enterprises/:enterpriseId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId',
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}}/androidenterprise/v1/enterprises/:enterpriseId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId');
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}}/androidenterprise/v1/enterprises/:enterpriseId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId';
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}}/androidenterprise/v1/enterprises/:enterpriseId"]
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}}/androidenterprise/v1/enterprises/:enterpriseId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId",
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}}/androidenterprise/v1/enterprises/:enterpriseId');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId")
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/androidenterprise/v1/enterprises/:enterpriseId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId";
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}}/androidenterprise/v1/enterprises/:enterpriseId
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId")! 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
androidenterprise.enterprises.getServiceAccount
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount
QUERY PARAMS
enterpriseId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount"
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount"
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/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount';
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount',
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/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: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount';
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount",
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount")
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/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount";
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccount")! 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
androidenterprise.enterprises.getStoreLayout
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout
QUERY PARAMS
enterpriseId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout"
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout"
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/androidenterprise/v1/enterprises/:enterpriseId/storeLayout HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout';
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout',
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout');
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout';
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout",
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout")
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/androidenterprise/v1/enterprises/:enterpriseId/storeLayout') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout";
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout")! 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
androidenterprise.enterprises.list
{{baseUrl}}/androidenterprise/v1/enterprises
QUERY PARAMS
domain
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises?domain=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises" {:query-params {:domain ""}})
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises?domain="
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}}/androidenterprise/v1/enterprises?domain="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises?domain=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises?domain="
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/androidenterprise/v1/enterprises?domain= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises?domain=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises?domain="))
.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}}/androidenterprise/v1/enterprises?domain=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises?domain=")
.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}}/androidenterprise/v1/enterprises?domain=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises',
params: {domain: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises?domain=';
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}}/androidenterprise/v1/enterprises?domain=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises?domain=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises?domain=',
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}}/androidenterprise/v1/enterprises',
qs: {domain: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises');
req.query({
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: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises',
params: {domain: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises?domain=';
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}}/androidenterprise/v1/enterprises?domain="]
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}}/androidenterprise/v1/enterprises?domain=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises?domain=",
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}}/androidenterprise/v1/enterprises?domain=');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'domain' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'domain' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises?domain=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises?domain=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises?domain=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises"
querystring = {"domain":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises"
queryString <- list(domain = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises?domain=")
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/androidenterprise/v1/enterprises') do |req|
req.params['domain'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises";
let querystring = [
("domain", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/androidenterprise/v1/enterprises?domain='
http GET '{{baseUrl}}/androidenterprise/v1/enterprises?domain='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/androidenterprise/v1/enterprises?domain='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises?domain=")! 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
androidenterprise.enterprises.pullNotificationSet
{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/androidenterprise/v1/enterprises/pullNotificationSet HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet';
const options = {method: 'POST'};
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}}/androidenterprise/v1/enterprises/pullNotificationSet',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/pullNotificationSet',
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: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet');
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}}/androidenterprise/v1/enterprises/pullNotificationSet'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet';
const options = {method: 'POST'};
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}}/androidenterprise/v1/enterprises/pullNotificationSet"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
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}}/androidenterprise/v1/enterprises/pullNotificationSet" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/androidenterprise/v1/enterprises/pullNotificationSet")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/androidenterprise/v1/enterprises/pullNotificationSet') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet
http POST {{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/pullNotificationSet")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
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
androidenterprise.enterprises.sendTestPushNotification
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification
QUERY PARAMS
enterpriseId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification';
const options = {method: 'POST'};
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}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification',
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: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification');
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}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification';
const options = {method: 'POST'};
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}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
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}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification
http POST {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/sendTestPushNotification")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
androidenterprise.enterprises.setAccount
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account
QUERY PARAMS
enterpriseId
BODY json
{
"accountEmail": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account");
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 \"accountEmail\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account" {:content-type :json
:form-params {:accountEmail ""}})
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountEmail\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account"),
Content = new StringContent("{\n \"accountEmail\": \"\"\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}}/androidenterprise/v1/enterprises/:enterpriseId/account");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountEmail\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account"
payload := strings.NewReader("{\n \"accountEmail\": \"\"\n}")
req, _ := http.NewRequest("PUT", 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))
}
PUT /baseUrl/androidenterprise/v1/enterprises/:enterpriseId/account HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 24
{
"accountEmail": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountEmail\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"accountEmail\": \"\"\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 \"accountEmail\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account")
.header("content-type", "application/json")
.body("{\n \"accountEmail\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountEmail: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account',
headers: {'content-type': 'application/json'},
data: {accountEmail: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accountEmail":""}'
};
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}}/androidenterprise/v1/enterprises/:enterpriseId/account',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountEmail": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountEmail\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/account',
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({accountEmail: ''}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account',
headers: {'content-type': 'application/json'},
body: {accountEmail: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountEmail: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account',
headers: {'content-type': 'application/json'},
data: {accountEmail: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accountEmail":""}'
};
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 = @{ @"accountEmail": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountEmail\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'accountEmail' => ''
]),
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('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account', [
'body' => '{
"accountEmail": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountEmail' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountEmail' => ''
]));
$request->setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account');
$request->setRequestMethod('PUT');
$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}}/androidenterprise/v1/enterprises/:enterpriseId/account' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accountEmail": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accountEmail": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountEmail\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/account", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account"
payload = { "accountEmail": "" }
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account"
payload <- "{\n \"accountEmail\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountEmail\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/account') do |req|
req.body = "{\n \"accountEmail\": \"\"\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}}/androidenterprise/v1/enterprises/:enterpriseId/account";
let payload = json!({"accountEmail": ""});
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("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account \
--header 'content-type: application/json' \
--data '{
"accountEmail": ""
}'
echo '{
"accountEmail": ""
}' | \
http PUT {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "accountEmail": ""\n}' \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["accountEmail": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/account")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
androidenterprise.enterprises.setStoreLayout
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout
QUERY PARAMS
enterpriseId
BODY json
{
"homepageId": "",
"storeLayoutType": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout");
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 \"homepageId\": \"\",\n \"storeLayoutType\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout" {:content-type :json
:form-params {:homepageId ""
:storeLayoutType ""}})
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"homepageId\": \"\",\n \"storeLayoutType\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout"),
Content = new StringContent("{\n \"homepageId\": \"\",\n \"storeLayoutType\": \"\"\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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"homepageId\": \"\",\n \"storeLayoutType\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout"
payload := strings.NewReader("{\n \"homepageId\": \"\",\n \"storeLayoutType\": \"\"\n}")
req, _ := http.NewRequest("PUT", 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))
}
PUT /baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 47
{
"homepageId": "",
"storeLayoutType": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout")
.setHeader("content-type", "application/json")
.setBody("{\n \"homepageId\": \"\",\n \"storeLayoutType\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"homepageId\": \"\",\n \"storeLayoutType\": \"\"\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 \"homepageId\": \"\",\n \"storeLayoutType\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout")
.header("content-type", "application/json")
.body("{\n \"homepageId\": \"\",\n \"storeLayoutType\": \"\"\n}")
.asString();
const data = JSON.stringify({
homepageId: '',
storeLayoutType: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout',
headers: {'content-type': 'application/json'},
data: {homepageId: '', storeLayoutType: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"homepageId":"","storeLayoutType":""}'
};
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "homepageId": "",\n "storeLayoutType": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"homepageId\": \"\",\n \"storeLayoutType\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout',
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({homepageId: '', storeLayoutType: ''}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout',
headers: {'content-type': 'application/json'},
body: {homepageId: '', storeLayoutType: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
homepageId: '',
storeLayoutType: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout',
headers: {'content-type': 'application/json'},
data: {homepageId: '', storeLayoutType: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"homepageId":"","storeLayoutType":""}'
};
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 = @{ @"homepageId": @"",
@"storeLayoutType": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"homepageId\": \"\",\n \"storeLayoutType\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'homepageId' => '',
'storeLayoutType' => ''
]),
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('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout', [
'body' => '{
"homepageId": "",
"storeLayoutType": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'homepageId' => '',
'storeLayoutType' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'homepageId' => '',
'storeLayoutType' => ''
]));
$request->setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout');
$request->setRequestMethod('PUT');
$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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"homepageId": "",
"storeLayoutType": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"homepageId": "",
"storeLayoutType": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"homepageId\": \"\",\n \"storeLayoutType\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout"
payload = {
"homepageId": "",
"storeLayoutType": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout"
payload <- "{\n \"homepageId\": \"\",\n \"storeLayoutType\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"homepageId\": \"\",\n \"storeLayoutType\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout') do |req|
req.body = "{\n \"homepageId\": \"\",\n \"storeLayoutType\": \"\"\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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout";
let payload = json!({
"homepageId": "",
"storeLayoutType": ""
});
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("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout \
--header 'content-type: application/json' \
--data '{
"homepageId": "",
"storeLayoutType": ""
}'
echo '{
"homepageId": "",
"storeLayoutType": ""
}' | \
http PUT {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "homepageId": "",\n "storeLayoutType": ""\n}' \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"homepageId": "",
"storeLayoutType": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
androidenterprise.enterprises.unenroll
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll
QUERY PARAMS
enterpriseId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/androidenterprise/v1/enterprises/:enterpriseId/unenroll HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll';
const options = {method: 'POST'};
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}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/unenroll',
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: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll');
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}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll';
const options = {method: 'POST'};
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}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
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}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/unenroll")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/unenroll') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll
http POST {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/unenroll")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
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
androidenterprise.entitlements.delete
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId
QUERY PARAMS
enterpriseId
userId
entitlementId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId"
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId"
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId',
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId');
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId",
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId")
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId";
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId
http DELETE {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId")! 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
androidenterprise.entitlements.get
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId
QUERY PARAMS
enterpriseId
userId
entitlementId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId"
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId"
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId',
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId');
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId",
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId")
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId";
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId")! 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
androidenterprise.entitlements.list
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements
QUERY PARAMS
enterpriseId
userId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/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()
PUT
androidenterprise.entitlements.update
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId
QUERY PARAMS
enterpriseId
userId
entitlementId
BODY json
{
"productId": "",
"reason": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId");
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 \"productId\": \"\",\n \"reason\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId" {:content-type :json
:form-params {:productId ""
:reason ""}})
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"productId\": \"\",\n \"reason\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId"),
Content = new StringContent("{\n \"productId\": \"\",\n \"reason\": \"\"\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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"productId\": \"\",\n \"reason\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId"
payload := strings.NewReader("{\n \"productId\": \"\",\n \"reason\": \"\"\n}")
req, _ := http.NewRequest("PUT", 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))
}
PUT /baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 37
{
"productId": "",
"reason": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId")
.setHeader("content-type", "application/json")
.setBody("{\n \"productId\": \"\",\n \"reason\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"productId\": \"\",\n \"reason\": \"\"\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 \"productId\": \"\",\n \"reason\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId")
.header("content-type", "application/json")
.body("{\n \"productId\": \"\",\n \"reason\": \"\"\n}")
.asString();
const data = JSON.stringify({
productId: '',
reason: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId',
headers: {'content-type': 'application/json'},
data: {productId: '', reason: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"productId":"","reason":""}'
};
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "productId": "",\n "reason": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"productId\": \"\",\n \"reason\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId',
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({productId: '', reason: ''}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId',
headers: {'content-type': 'application/json'},
body: {productId: '', reason: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
productId: '',
reason: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId',
headers: {'content-type': 'application/json'},
data: {productId: '', reason: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"productId":"","reason":""}'
};
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 = @{ @"productId": @"",
@"reason": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"productId\": \"\",\n \"reason\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'productId' => '',
'reason' => ''
]),
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('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId', [
'body' => '{
"productId": "",
"reason": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'productId' => '',
'reason' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'productId' => '',
'reason' => ''
]));
$request->setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId');
$request->setRequestMethod('PUT');
$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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"productId": "",
"reason": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"productId": "",
"reason": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"productId\": \"\",\n \"reason\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId"
payload = {
"productId": "",
"reason": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId"
payload <- "{\n \"productId\": \"\",\n \"reason\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"productId\": \"\",\n \"reason\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId') do |req|
req.body = "{\n \"productId\": \"\",\n \"reason\": \"\"\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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId";
let payload = json!({
"productId": "",
"reason": ""
});
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("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId \
--header 'content-type: application/json' \
--data '{
"productId": "",
"reason": ""
}'
echo '{
"productId": "",
"reason": ""
}' | \
http PUT {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "productId": "",\n "reason": ""\n}' \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"productId": "",
"reason": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/entitlements/:entitlementId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
androidenterprise.grouplicenses.get
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId
QUERY PARAMS
enterpriseId
groupLicenseId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId"
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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId"
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/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId',
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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId');
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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId",
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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId")
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/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId";
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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId")! 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
androidenterprise.grouplicenses.list
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses
QUERY PARAMS
enterpriseId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses"
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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses"
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/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses';
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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses',
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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses');
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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses';
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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses",
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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses")
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/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses";
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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses")! 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
androidenterprise.grouplicenseusers.list
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users
QUERY PARAMS
enterpriseId
groupLicenseId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users"
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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users"
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/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users';
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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users',
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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users');
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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users';
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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users",
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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users")
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/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users";
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}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/groupLicenses/:groupLicenseId/users")! 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()
DELETE
androidenterprise.installs.delete
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId
QUERY PARAMS
enterpriseId
userId
deviceId
installId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId"
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId"
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId',
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId');
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId",
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId")
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId";
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId
http DELETE {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId")! 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
androidenterprise.installs.get
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId
QUERY PARAMS
enterpriseId
userId
deviceId
installId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId"
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId"
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId',
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId');
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId",
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId")
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId";
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId")! 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
androidenterprise.installs.list
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs
QUERY PARAMS
enterpriseId
userId
deviceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs"
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs"
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs',
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs');
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs",
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs")
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs";
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs")! 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()
PUT
androidenterprise.installs.update
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId
QUERY PARAMS
enterpriseId
userId
deviceId
installId
BODY json
{
"installState": "",
"productId": "",
"versionCode": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId");
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 \"installState\": \"\",\n \"productId\": \"\",\n \"versionCode\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId" {:content-type :json
:form-params {:installState ""
:productId ""
:versionCode 0}})
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"installState\": \"\",\n \"productId\": \"\",\n \"versionCode\": 0\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId"),
Content = new StringContent("{\n \"installState\": \"\",\n \"productId\": \"\",\n \"versionCode\": 0\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"installState\": \"\",\n \"productId\": \"\",\n \"versionCode\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId"
payload := strings.NewReader("{\n \"installState\": \"\",\n \"productId\": \"\",\n \"versionCode\": 0\n}")
req, _ := http.NewRequest("PUT", 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))
}
PUT /baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 63
{
"installState": "",
"productId": "",
"versionCode": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId")
.setHeader("content-type", "application/json")
.setBody("{\n \"installState\": \"\",\n \"productId\": \"\",\n \"versionCode\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"installState\": \"\",\n \"productId\": \"\",\n \"versionCode\": 0\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"installState\": \"\",\n \"productId\": \"\",\n \"versionCode\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId")
.header("content-type", "application/json")
.body("{\n \"installState\": \"\",\n \"productId\": \"\",\n \"versionCode\": 0\n}")
.asString();
const data = JSON.stringify({
installState: '',
productId: '',
versionCode: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId',
headers: {'content-type': 'application/json'},
data: {installState: '', productId: '', versionCode: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"installState":"","productId":"","versionCode":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "installState": "",\n "productId": "",\n "versionCode": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"installState\": \"\",\n \"productId\": \"\",\n \"versionCode\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId',
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({installState: '', productId: '', versionCode: 0}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId',
headers: {'content-type': 'application/json'},
body: {installState: '', productId: '', versionCode: 0},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
installState: '',
productId: '',
versionCode: 0
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId',
headers: {'content-type': 'application/json'},
data: {installState: '', productId: '', versionCode: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"installState":"","productId":"","versionCode":0}'
};
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 = @{ @"installState": @"",
@"productId": @"",
@"versionCode": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"installState\": \"\",\n \"productId\": \"\",\n \"versionCode\": 0\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'installState' => '',
'productId' => '',
'versionCode' => 0
]),
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('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId', [
'body' => '{
"installState": "",
"productId": "",
"versionCode": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'installState' => '',
'productId' => '',
'versionCode' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'installState' => '',
'productId' => '',
'versionCode' => 0
]));
$request->setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId');
$request->setRequestMethod('PUT');
$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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"installState": "",
"productId": "",
"versionCode": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"installState": "",
"productId": "",
"versionCode": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"installState\": \"\",\n \"productId\": \"\",\n \"versionCode\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId"
payload = {
"installState": "",
"productId": "",
"versionCode": 0
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId"
payload <- "{\n \"installState\": \"\",\n \"productId\": \"\",\n \"versionCode\": 0\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"installState\": \"\",\n \"productId\": \"\",\n \"versionCode\": 0\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId') do |req|
req.body = "{\n \"installState\": \"\",\n \"productId\": \"\",\n \"versionCode\": 0\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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId";
let payload = json!({
"installState": "",
"productId": "",
"versionCode": 0
});
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("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId \
--header 'content-type: application/json' \
--data '{
"installState": "",
"productId": "",
"versionCode": 0
}'
echo '{
"installState": "",
"productId": "",
"versionCode": 0
}' | \
http PUT {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "installState": "",\n "productId": "",\n "versionCode": 0\n}' \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"installState": "",
"productId": "",
"versionCode": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/installs/:installId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
androidenterprise.managedconfigurationsfordevice.delete
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId
QUERY PARAMS
enterpriseId
userId
deviceId
managedConfigurationForDeviceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId"
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId"
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId',
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId');
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId",
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId")
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId";
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId
http DELETE {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId")! 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
androidenterprise.managedconfigurationsfordevice.get
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId
QUERY PARAMS
enterpriseId
userId
deviceId
managedConfigurationForDeviceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId"
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId"
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId',
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId');
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId",
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId")
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId";
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId")! 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
androidenterprise.managedconfigurationsfordevice.list
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice
QUERY PARAMS
enterpriseId
userId
deviceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice"
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice"
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice',
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice');
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice",
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice")
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice";
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice")! 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()
PUT
androidenterprise.managedconfigurationsfordevice.update
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId
QUERY PARAMS
enterpriseId
userId
deviceId
managedConfigurationForDeviceId
BODY json
{
"configurationVariables": {
"mcmId": "",
"variableSet": [
{
"placeholder": "",
"userValue": ""
}
]
},
"kind": "",
"managedProperty": [
{
"key": "",
"valueBool": false,
"valueBundle": {
"managedProperty": []
},
"valueBundleArray": [
{}
],
"valueInteger": 0,
"valueString": "",
"valueStringArray": []
}
],
"productId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId");
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 \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId" {:content-type :json
:form-params {:configurationVariables {:mcmId ""
:variableSet [{:placeholder ""
:userValue ""}]}
:kind ""
:managedProperty [{:key ""
:valueBool false
:valueBundle {:managedProperty []}
:valueBundleArray [{}]
:valueInteger 0
:valueString ""
:valueStringArray []}]
:productId ""}})
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId"),
Content = new StringContent("{\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId"
payload := strings.NewReader("{\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n}")
req, _ := http.NewRequest("PUT", 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))
}
PUT /baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 453
{
"configurationVariables": {
"mcmId": "",
"variableSet": [
{
"placeholder": "",
"userValue": ""
}
]
},
"kind": "",
"managedProperty": [
{
"key": "",
"valueBool": false,
"valueBundle": {
"managedProperty": []
},
"valueBundleArray": [
{}
],
"valueInteger": 0,
"valueString": "",
"valueStringArray": []
}
],
"productId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId")
.setHeader("content-type", "application/json")
.setBody("{\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\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 \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId")
.header("content-type", "application/json")
.body("{\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n}")
.asString();
const data = JSON.stringify({
configurationVariables: {
mcmId: '',
variableSet: [
{
placeholder: '',
userValue: ''
}
]
},
kind: '',
managedProperty: [
{
key: '',
valueBool: false,
valueBundle: {
managedProperty: []
},
valueBundleArray: [
{}
],
valueInteger: 0,
valueString: '',
valueStringArray: []
}
],
productId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId',
headers: {'content-type': 'application/json'},
data: {
configurationVariables: {mcmId: '', variableSet: [{placeholder: '', userValue: ''}]},
kind: '',
managedProperty: [
{
key: '',
valueBool: false,
valueBundle: {managedProperty: []},
valueBundleArray: [{}],
valueInteger: 0,
valueString: '',
valueStringArray: []
}
],
productId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"configurationVariables":{"mcmId":"","variableSet":[{"placeholder":"","userValue":""}]},"kind":"","managedProperty":[{"key":"","valueBool":false,"valueBundle":{"managedProperty":[]},"valueBundleArray":[{}],"valueInteger":0,"valueString":"","valueStringArray":[]}],"productId":""}'
};
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "configurationVariables": {\n "mcmId": "",\n "variableSet": [\n {\n "placeholder": "",\n "userValue": ""\n }\n ]\n },\n "kind": "",\n "managedProperty": [\n {\n "key": "",\n "valueBool": false,\n "valueBundle": {\n "managedProperty": []\n },\n "valueBundleArray": [\n {}\n ],\n "valueInteger": 0,\n "valueString": "",\n "valueStringArray": []\n }\n ],\n "productId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId',
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({
configurationVariables: {mcmId: '', variableSet: [{placeholder: '', userValue: ''}]},
kind: '',
managedProperty: [
{
key: '',
valueBool: false,
valueBundle: {managedProperty: []},
valueBundleArray: [{}],
valueInteger: 0,
valueString: '',
valueStringArray: []
}
],
productId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId',
headers: {'content-type': 'application/json'},
body: {
configurationVariables: {mcmId: '', variableSet: [{placeholder: '', userValue: ''}]},
kind: '',
managedProperty: [
{
key: '',
valueBool: false,
valueBundle: {managedProperty: []},
valueBundleArray: [{}],
valueInteger: 0,
valueString: '',
valueStringArray: []
}
],
productId: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
configurationVariables: {
mcmId: '',
variableSet: [
{
placeholder: '',
userValue: ''
}
]
},
kind: '',
managedProperty: [
{
key: '',
valueBool: false,
valueBundle: {
managedProperty: []
},
valueBundleArray: [
{}
],
valueInteger: 0,
valueString: '',
valueStringArray: []
}
],
productId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId',
headers: {'content-type': 'application/json'},
data: {
configurationVariables: {mcmId: '', variableSet: [{placeholder: '', userValue: ''}]},
kind: '',
managedProperty: [
{
key: '',
valueBool: false,
valueBundle: {managedProperty: []},
valueBundleArray: [{}],
valueInteger: 0,
valueString: '',
valueStringArray: []
}
],
productId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"configurationVariables":{"mcmId":"","variableSet":[{"placeholder":"","userValue":""}]},"kind":"","managedProperty":[{"key":"","valueBool":false,"valueBundle":{"managedProperty":[]},"valueBundleArray":[{}],"valueInteger":0,"valueString":"","valueStringArray":[]}],"productId":""}'
};
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 = @{ @"configurationVariables": @{ @"mcmId": @"", @"variableSet": @[ @{ @"placeholder": @"", @"userValue": @"" } ] },
@"kind": @"",
@"managedProperty": @[ @{ @"key": @"", @"valueBool": @NO, @"valueBundle": @{ @"managedProperty": @[ ] }, @"valueBundleArray": @[ @{ } ], @"valueInteger": @0, @"valueString": @"", @"valueStringArray": @[ ] } ],
@"productId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'configurationVariables' => [
'mcmId' => '',
'variableSet' => [
[
'placeholder' => '',
'userValue' => ''
]
]
],
'kind' => '',
'managedProperty' => [
[
'key' => '',
'valueBool' => null,
'valueBundle' => [
'managedProperty' => [
]
],
'valueBundleArray' => [
[
]
],
'valueInteger' => 0,
'valueString' => '',
'valueStringArray' => [
]
]
],
'productId' => ''
]),
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('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId', [
'body' => '{
"configurationVariables": {
"mcmId": "",
"variableSet": [
{
"placeholder": "",
"userValue": ""
}
]
},
"kind": "",
"managedProperty": [
{
"key": "",
"valueBool": false,
"valueBundle": {
"managedProperty": []
},
"valueBundleArray": [
{}
],
"valueInteger": 0,
"valueString": "",
"valueStringArray": []
}
],
"productId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'configurationVariables' => [
'mcmId' => '',
'variableSet' => [
[
'placeholder' => '',
'userValue' => ''
]
]
],
'kind' => '',
'managedProperty' => [
[
'key' => '',
'valueBool' => null,
'valueBundle' => [
'managedProperty' => [
]
],
'valueBundleArray' => [
[
]
],
'valueInteger' => 0,
'valueString' => '',
'valueStringArray' => [
]
]
],
'productId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'configurationVariables' => [
'mcmId' => '',
'variableSet' => [
[
'placeholder' => '',
'userValue' => ''
]
]
],
'kind' => '',
'managedProperty' => [
[
'key' => '',
'valueBool' => null,
'valueBundle' => [
'managedProperty' => [
]
],
'valueBundleArray' => [
[
]
],
'valueInteger' => 0,
'valueString' => '',
'valueStringArray' => [
]
]
],
'productId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId');
$request->setRequestMethod('PUT');
$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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"configurationVariables": {
"mcmId": "",
"variableSet": [
{
"placeholder": "",
"userValue": ""
}
]
},
"kind": "",
"managedProperty": [
{
"key": "",
"valueBool": false,
"valueBundle": {
"managedProperty": []
},
"valueBundleArray": [
{}
],
"valueInteger": 0,
"valueString": "",
"valueStringArray": []
}
],
"productId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"configurationVariables": {
"mcmId": "",
"variableSet": [
{
"placeholder": "",
"userValue": ""
}
]
},
"kind": "",
"managedProperty": [
{
"key": "",
"valueBool": false,
"valueBundle": {
"managedProperty": []
},
"valueBundleArray": [
{}
],
"valueInteger": 0,
"valueString": "",
"valueStringArray": []
}
],
"productId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId"
payload = {
"configurationVariables": {
"mcmId": "",
"variableSet": [
{
"placeholder": "",
"userValue": ""
}
]
},
"kind": "",
"managedProperty": [
{
"key": "",
"valueBool": False,
"valueBundle": { "managedProperty": [] },
"valueBundleArray": [{}],
"valueInteger": 0,
"valueString": "",
"valueStringArray": []
}
],
"productId": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId"
payload <- "{\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId') do |req|
req.body = "{\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId";
let payload = json!({
"configurationVariables": json!({
"mcmId": "",
"variableSet": (
json!({
"placeholder": "",
"userValue": ""
})
)
}),
"kind": "",
"managedProperty": (
json!({
"key": "",
"valueBool": false,
"valueBundle": json!({"managedProperty": ()}),
"valueBundleArray": (json!({})),
"valueInteger": 0,
"valueString": "",
"valueStringArray": ()
})
),
"productId": ""
});
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("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId \
--header 'content-type: application/json' \
--data '{
"configurationVariables": {
"mcmId": "",
"variableSet": [
{
"placeholder": "",
"userValue": ""
}
]
},
"kind": "",
"managedProperty": [
{
"key": "",
"valueBool": false,
"valueBundle": {
"managedProperty": []
},
"valueBundleArray": [
{}
],
"valueInteger": 0,
"valueString": "",
"valueStringArray": []
}
],
"productId": ""
}'
echo '{
"configurationVariables": {
"mcmId": "",
"variableSet": [
{
"placeholder": "",
"userValue": ""
}
]
},
"kind": "",
"managedProperty": [
{
"key": "",
"valueBool": false,
"valueBundle": {
"managedProperty": []
},
"valueBundleArray": [
{}
],
"valueInteger": 0,
"valueString": "",
"valueStringArray": []
}
],
"productId": ""
}' | \
http PUT {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "configurationVariables": {\n "mcmId": "",\n "variableSet": [\n {\n "placeholder": "",\n "userValue": ""\n }\n ]\n },\n "kind": "",\n "managedProperty": [\n {\n "key": "",\n "valueBool": false,\n "valueBundle": {\n "managedProperty": []\n },\n "valueBundleArray": [\n {}\n ],\n "valueInteger": 0,\n "valueString": "",\n "valueStringArray": []\n }\n ],\n "productId": ""\n}' \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"configurationVariables": [
"mcmId": "",
"variableSet": [
[
"placeholder": "",
"userValue": ""
]
]
],
"kind": "",
"managedProperty": [
[
"key": "",
"valueBool": false,
"valueBundle": ["managedProperty": []],
"valueBundleArray": [[]],
"valueInteger": 0,
"valueString": "",
"valueStringArray": []
]
],
"productId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/devices/:deviceId/managedConfigurationsForDevice/:managedConfigurationForDeviceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
androidenterprise.managedconfigurationsforuser.delete
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId
QUERY PARAMS
enterpriseId
userId
managedConfigurationForUserId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId"
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId"
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId',
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId');
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId",
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId")
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId";
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId
http DELETE {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId")! 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
androidenterprise.managedconfigurationsforuser.get
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId
QUERY PARAMS
enterpriseId
userId
managedConfigurationForUserId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId"
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId"
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId',
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId');
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId",
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId")
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId";
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId")! 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
androidenterprise.managedconfigurationsforuser.list
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser
QUERY PARAMS
enterpriseId
userId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser"
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser"
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser',
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser');
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser",
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser")
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser";
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser")! 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()
PUT
androidenterprise.managedconfigurationsforuser.update
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId
QUERY PARAMS
enterpriseId
userId
managedConfigurationForUserId
BODY json
{
"configurationVariables": {
"mcmId": "",
"variableSet": [
{
"placeholder": "",
"userValue": ""
}
]
},
"kind": "",
"managedProperty": [
{
"key": "",
"valueBool": false,
"valueBundle": {
"managedProperty": []
},
"valueBundleArray": [
{}
],
"valueInteger": 0,
"valueString": "",
"valueStringArray": []
}
],
"productId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId");
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 \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId" {:content-type :json
:form-params {:configurationVariables {:mcmId ""
:variableSet [{:placeholder ""
:userValue ""}]}
:kind ""
:managedProperty [{:key ""
:valueBool false
:valueBundle {:managedProperty []}
:valueBundleArray [{}]
:valueInteger 0
:valueString ""
:valueStringArray []}]
:productId ""}})
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId"),
Content = new StringContent("{\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId"
payload := strings.NewReader("{\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n}")
req, _ := http.NewRequest("PUT", 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))
}
PUT /baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 453
{
"configurationVariables": {
"mcmId": "",
"variableSet": [
{
"placeholder": "",
"userValue": ""
}
]
},
"kind": "",
"managedProperty": [
{
"key": "",
"valueBool": false,
"valueBundle": {
"managedProperty": []
},
"valueBundleArray": [
{}
],
"valueInteger": 0,
"valueString": "",
"valueStringArray": []
}
],
"productId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId")
.setHeader("content-type", "application/json")
.setBody("{\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\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 \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId")
.header("content-type", "application/json")
.body("{\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n}")
.asString();
const data = JSON.stringify({
configurationVariables: {
mcmId: '',
variableSet: [
{
placeholder: '',
userValue: ''
}
]
},
kind: '',
managedProperty: [
{
key: '',
valueBool: false,
valueBundle: {
managedProperty: []
},
valueBundleArray: [
{}
],
valueInteger: 0,
valueString: '',
valueStringArray: []
}
],
productId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId',
headers: {'content-type': 'application/json'},
data: {
configurationVariables: {mcmId: '', variableSet: [{placeholder: '', userValue: ''}]},
kind: '',
managedProperty: [
{
key: '',
valueBool: false,
valueBundle: {managedProperty: []},
valueBundleArray: [{}],
valueInteger: 0,
valueString: '',
valueStringArray: []
}
],
productId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"configurationVariables":{"mcmId":"","variableSet":[{"placeholder":"","userValue":""}]},"kind":"","managedProperty":[{"key":"","valueBool":false,"valueBundle":{"managedProperty":[]},"valueBundleArray":[{}],"valueInteger":0,"valueString":"","valueStringArray":[]}],"productId":""}'
};
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "configurationVariables": {\n "mcmId": "",\n "variableSet": [\n {\n "placeholder": "",\n "userValue": ""\n }\n ]\n },\n "kind": "",\n "managedProperty": [\n {\n "key": "",\n "valueBool": false,\n "valueBundle": {\n "managedProperty": []\n },\n "valueBundleArray": [\n {}\n ],\n "valueInteger": 0,\n "valueString": "",\n "valueStringArray": []\n }\n ],\n "productId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId',
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({
configurationVariables: {mcmId: '', variableSet: [{placeholder: '', userValue: ''}]},
kind: '',
managedProperty: [
{
key: '',
valueBool: false,
valueBundle: {managedProperty: []},
valueBundleArray: [{}],
valueInteger: 0,
valueString: '',
valueStringArray: []
}
],
productId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId',
headers: {'content-type': 'application/json'},
body: {
configurationVariables: {mcmId: '', variableSet: [{placeholder: '', userValue: ''}]},
kind: '',
managedProperty: [
{
key: '',
valueBool: false,
valueBundle: {managedProperty: []},
valueBundleArray: [{}],
valueInteger: 0,
valueString: '',
valueStringArray: []
}
],
productId: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
configurationVariables: {
mcmId: '',
variableSet: [
{
placeholder: '',
userValue: ''
}
]
},
kind: '',
managedProperty: [
{
key: '',
valueBool: false,
valueBundle: {
managedProperty: []
},
valueBundleArray: [
{}
],
valueInteger: 0,
valueString: '',
valueStringArray: []
}
],
productId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId',
headers: {'content-type': 'application/json'},
data: {
configurationVariables: {mcmId: '', variableSet: [{placeholder: '', userValue: ''}]},
kind: '',
managedProperty: [
{
key: '',
valueBool: false,
valueBundle: {managedProperty: []},
valueBundleArray: [{}],
valueInteger: 0,
valueString: '',
valueStringArray: []
}
],
productId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"configurationVariables":{"mcmId":"","variableSet":[{"placeholder":"","userValue":""}]},"kind":"","managedProperty":[{"key":"","valueBool":false,"valueBundle":{"managedProperty":[]},"valueBundleArray":[{}],"valueInteger":0,"valueString":"","valueStringArray":[]}],"productId":""}'
};
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 = @{ @"configurationVariables": @{ @"mcmId": @"", @"variableSet": @[ @{ @"placeholder": @"", @"userValue": @"" } ] },
@"kind": @"",
@"managedProperty": @[ @{ @"key": @"", @"valueBool": @NO, @"valueBundle": @{ @"managedProperty": @[ ] }, @"valueBundleArray": @[ @{ } ], @"valueInteger": @0, @"valueString": @"", @"valueStringArray": @[ ] } ],
@"productId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'configurationVariables' => [
'mcmId' => '',
'variableSet' => [
[
'placeholder' => '',
'userValue' => ''
]
]
],
'kind' => '',
'managedProperty' => [
[
'key' => '',
'valueBool' => null,
'valueBundle' => [
'managedProperty' => [
]
],
'valueBundleArray' => [
[
]
],
'valueInteger' => 0,
'valueString' => '',
'valueStringArray' => [
]
]
],
'productId' => ''
]),
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('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId', [
'body' => '{
"configurationVariables": {
"mcmId": "",
"variableSet": [
{
"placeholder": "",
"userValue": ""
}
]
},
"kind": "",
"managedProperty": [
{
"key": "",
"valueBool": false,
"valueBundle": {
"managedProperty": []
},
"valueBundleArray": [
{}
],
"valueInteger": 0,
"valueString": "",
"valueStringArray": []
}
],
"productId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'configurationVariables' => [
'mcmId' => '',
'variableSet' => [
[
'placeholder' => '',
'userValue' => ''
]
]
],
'kind' => '',
'managedProperty' => [
[
'key' => '',
'valueBool' => null,
'valueBundle' => [
'managedProperty' => [
]
],
'valueBundleArray' => [
[
]
],
'valueInteger' => 0,
'valueString' => '',
'valueStringArray' => [
]
]
],
'productId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'configurationVariables' => [
'mcmId' => '',
'variableSet' => [
[
'placeholder' => '',
'userValue' => ''
]
]
],
'kind' => '',
'managedProperty' => [
[
'key' => '',
'valueBool' => null,
'valueBundle' => [
'managedProperty' => [
]
],
'valueBundleArray' => [
[
]
],
'valueInteger' => 0,
'valueString' => '',
'valueStringArray' => [
]
]
],
'productId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId');
$request->setRequestMethod('PUT');
$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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"configurationVariables": {
"mcmId": "",
"variableSet": [
{
"placeholder": "",
"userValue": ""
}
]
},
"kind": "",
"managedProperty": [
{
"key": "",
"valueBool": false,
"valueBundle": {
"managedProperty": []
},
"valueBundleArray": [
{}
],
"valueInteger": 0,
"valueString": "",
"valueStringArray": []
}
],
"productId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"configurationVariables": {
"mcmId": "",
"variableSet": [
{
"placeholder": "",
"userValue": ""
}
]
},
"kind": "",
"managedProperty": [
{
"key": "",
"valueBool": false,
"valueBundle": {
"managedProperty": []
},
"valueBundleArray": [
{}
],
"valueInteger": 0,
"valueString": "",
"valueStringArray": []
}
],
"productId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId"
payload = {
"configurationVariables": {
"mcmId": "",
"variableSet": [
{
"placeholder": "",
"userValue": ""
}
]
},
"kind": "",
"managedProperty": [
{
"key": "",
"valueBool": False,
"valueBundle": { "managedProperty": [] },
"valueBundleArray": [{}],
"valueInteger": 0,
"valueString": "",
"valueStringArray": []
}
],
"productId": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId"
payload <- "{\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId') do |req|
req.body = "{\n \"configurationVariables\": {\n \"mcmId\": \"\",\n \"variableSet\": [\n {\n \"placeholder\": \"\",\n \"userValue\": \"\"\n }\n ]\n },\n \"kind\": \"\",\n \"managedProperty\": [\n {\n \"key\": \"\",\n \"valueBool\": false,\n \"valueBundle\": {\n \"managedProperty\": []\n },\n \"valueBundleArray\": [\n {}\n ],\n \"valueInteger\": 0,\n \"valueString\": \"\",\n \"valueStringArray\": []\n }\n ],\n \"productId\": \"\"\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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId";
let payload = json!({
"configurationVariables": json!({
"mcmId": "",
"variableSet": (
json!({
"placeholder": "",
"userValue": ""
})
)
}),
"kind": "",
"managedProperty": (
json!({
"key": "",
"valueBool": false,
"valueBundle": json!({"managedProperty": ()}),
"valueBundleArray": (json!({})),
"valueInteger": 0,
"valueString": "",
"valueStringArray": ()
})
),
"productId": ""
});
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("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId \
--header 'content-type: application/json' \
--data '{
"configurationVariables": {
"mcmId": "",
"variableSet": [
{
"placeholder": "",
"userValue": ""
}
]
},
"kind": "",
"managedProperty": [
{
"key": "",
"valueBool": false,
"valueBundle": {
"managedProperty": []
},
"valueBundleArray": [
{}
],
"valueInteger": 0,
"valueString": "",
"valueStringArray": []
}
],
"productId": ""
}'
echo '{
"configurationVariables": {
"mcmId": "",
"variableSet": [
{
"placeholder": "",
"userValue": ""
}
]
},
"kind": "",
"managedProperty": [
{
"key": "",
"valueBool": false,
"valueBundle": {
"managedProperty": []
},
"valueBundleArray": [
{}
],
"valueInteger": 0,
"valueString": "",
"valueStringArray": []
}
],
"productId": ""
}' | \
http PUT {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "configurationVariables": {\n "mcmId": "",\n "variableSet": [\n {\n "placeholder": "",\n "userValue": ""\n }\n ]\n },\n "kind": "",\n "managedProperty": [\n {\n "key": "",\n "valueBool": false,\n "valueBundle": {\n "managedProperty": []\n },\n "valueBundleArray": [\n {}\n ],\n "valueInteger": 0,\n "valueString": "",\n "valueStringArray": []\n }\n ],\n "productId": ""\n}' \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"configurationVariables": [
"mcmId": "",
"variableSet": [
[
"placeholder": "",
"userValue": ""
]
]
],
"kind": "",
"managedProperty": [
[
"key": "",
"valueBool": false,
"valueBundle": ["managedProperty": []],
"valueBundleArray": [[]],
"valueInteger": 0,
"valueString": "",
"valueStringArray": []
]
],
"productId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/managedConfigurationsForUser/:managedConfigurationForUserId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
androidenterprise.managedconfigurationssettings.list
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings
QUERY PARAMS
enterpriseId
productId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings"
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings"
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/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings';
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings',
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings');
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings';
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings",
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings")
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/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings";
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/managedConfigurationsSettings")! 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
androidenterprise.permissions.get
{{baseUrl}}/androidenterprise/v1/permissions/:permissionId
QUERY PARAMS
permissionId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/permissions/:permissionId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/permissions/:permissionId")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/permissions/:permissionId"
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}}/androidenterprise/v1/permissions/:permissionId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/permissions/:permissionId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/permissions/:permissionId"
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/androidenterprise/v1/permissions/:permissionId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/permissions/:permissionId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/permissions/:permissionId"))
.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}}/androidenterprise/v1/permissions/:permissionId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/permissions/:permissionId")
.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}}/androidenterprise/v1/permissions/:permissionId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/permissions/:permissionId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/permissions/:permissionId';
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}}/androidenterprise/v1/permissions/:permissionId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/permissions/:permissionId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/permissions/:permissionId',
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}}/androidenterprise/v1/permissions/:permissionId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/permissions/:permissionId');
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}}/androidenterprise/v1/permissions/:permissionId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/permissions/:permissionId';
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}}/androidenterprise/v1/permissions/:permissionId"]
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}}/androidenterprise/v1/permissions/:permissionId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/permissions/:permissionId",
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}}/androidenterprise/v1/permissions/:permissionId');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/permissions/:permissionId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/permissions/:permissionId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/permissions/:permissionId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/permissions/:permissionId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/permissions/:permissionId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/permissions/:permissionId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/permissions/:permissionId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/permissions/:permissionId")
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/androidenterprise/v1/permissions/:permissionId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/permissions/:permissionId";
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}}/androidenterprise/v1/permissions/:permissionId
http GET {{baseUrl}}/androidenterprise/v1/permissions/:permissionId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/permissions/:permissionId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/permissions/:permissionId")! 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
androidenterprise.products.approve
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve
QUERY PARAMS
enterpriseId
productId
BODY json
{
"approvalUrlInfo": {
"approvalUrl": ""
},
"approvedPermissions": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve");
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 \"approvalUrlInfo\": {\n \"approvalUrl\": \"\"\n },\n \"approvedPermissions\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve" {:content-type :json
:form-params {:approvalUrlInfo {:approvalUrl ""}
:approvedPermissions ""}})
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"approvalUrlInfo\": {\n \"approvalUrl\": \"\"\n },\n \"approvedPermissions\": \"\"\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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve"),
Content = new StringContent("{\n \"approvalUrlInfo\": {\n \"approvalUrl\": \"\"\n },\n \"approvedPermissions\": \"\"\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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"approvalUrlInfo\": {\n \"approvalUrl\": \"\"\n },\n \"approvedPermissions\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve"
payload := strings.NewReader("{\n \"approvalUrlInfo\": {\n \"approvalUrl\": \"\"\n },\n \"approvedPermissions\": \"\"\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/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 81
{
"approvalUrlInfo": {
"approvalUrl": ""
},
"approvedPermissions": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve")
.setHeader("content-type", "application/json")
.setBody("{\n \"approvalUrlInfo\": {\n \"approvalUrl\": \"\"\n },\n \"approvedPermissions\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"approvalUrlInfo\": {\n \"approvalUrl\": \"\"\n },\n \"approvedPermissions\": \"\"\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 \"approvalUrlInfo\": {\n \"approvalUrl\": \"\"\n },\n \"approvedPermissions\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve")
.header("content-type", "application/json")
.body("{\n \"approvalUrlInfo\": {\n \"approvalUrl\": \"\"\n },\n \"approvedPermissions\": \"\"\n}")
.asString();
const data = JSON.stringify({
approvalUrlInfo: {
approvalUrl: ''
},
approvedPermissions: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve',
headers: {'content-type': 'application/json'},
data: {approvalUrlInfo: {approvalUrl: ''}, approvedPermissions: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"approvalUrlInfo":{"approvalUrl":""},"approvedPermissions":""}'
};
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "approvalUrlInfo": {\n "approvalUrl": ""\n },\n "approvedPermissions": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"approvalUrlInfo\": {\n \"approvalUrl\": \"\"\n },\n \"approvedPermissions\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve")
.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/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve',
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({approvalUrlInfo: {approvalUrl: ''}, approvedPermissions: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve',
headers: {'content-type': 'application/json'},
body: {approvalUrlInfo: {approvalUrl: ''}, approvedPermissions: ''},
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
approvalUrlInfo: {
approvalUrl: ''
},
approvedPermissions: ''
});
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve',
headers: {'content-type': 'application/json'},
data: {approvalUrlInfo: {approvalUrl: ''}, approvedPermissions: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"approvalUrlInfo":{"approvalUrl":""},"approvedPermissions":""}'
};
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 = @{ @"approvalUrlInfo": @{ @"approvalUrl": @"" },
@"approvedPermissions": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"approvalUrlInfo\": {\n \"approvalUrl\": \"\"\n },\n \"approvedPermissions\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve",
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([
'approvalUrlInfo' => [
'approvalUrl' => ''
],
'approvedPermissions' => ''
]),
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve', [
'body' => '{
"approvalUrlInfo": {
"approvalUrl": ""
},
"approvedPermissions": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'approvalUrlInfo' => [
'approvalUrl' => ''
],
'approvedPermissions' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'approvalUrlInfo' => [
'approvalUrl' => ''
],
'approvedPermissions' => ''
]));
$request->setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve');
$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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"approvalUrlInfo": {
"approvalUrl": ""
},
"approvedPermissions": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"approvalUrlInfo": {
"approvalUrl": ""
},
"approvedPermissions": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"approvalUrlInfo\": {\n \"approvalUrl\": \"\"\n },\n \"approvedPermissions\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve"
payload = {
"approvalUrlInfo": { "approvalUrl": "" },
"approvedPermissions": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve"
payload <- "{\n \"approvalUrlInfo\": {\n \"approvalUrl\": \"\"\n },\n \"approvedPermissions\": \"\"\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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve")
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 \"approvalUrlInfo\": {\n \"approvalUrl\": \"\"\n },\n \"approvedPermissions\": \"\"\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/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve') do |req|
req.body = "{\n \"approvalUrlInfo\": {\n \"approvalUrl\": \"\"\n },\n \"approvedPermissions\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve";
let payload = json!({
"approvalUrlInfo": json!({"approvalUrl": ""}),
"approvedPermissions": ""
});
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve \
--header 'content-type: application/json' \
--data '{
"approvalUrlInfo": {
"approvalUrl": ""
},
"approvedPermissions": ""
}'
echo '{
"approvalUrlInfo": {
"approvalUrl": ""
},
"approvedPermissions": ""
}' | \
http POST {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "approvalUrlInfo": {\n "approvalUrl": ""\n },\n "approvedPermissions": ""\n}' \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"approvalUrlInfo": ["approvalUrl": ""],
"approvedPermissions": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/approve")! 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
androidenterprise.products.generateApprovalUrl
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl
QUERY PARAMS
enterpriseId
productId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl';
const options = {method: 'POST'};
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl',
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: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl');
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl';
const options = {method: 'POST'};
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl
http POST {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/generateApprovalUrl")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
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
androidenterprise.products.get
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId
QUERY PARAMS
enterpriseId
productId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId"
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId"
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/androidenterprise/v1/enterprises/:enterpriseId/products/:productId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/products/:productId',
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId');
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId",
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/products/:productId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId")
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/androidenterprise/v1/enterprises/:enterpriseId/products/:productId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId";
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId")! 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
androidenterprise.products.getAppRestrictionsSchema
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema
QUERY PARAMS
enterpriseId
productId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema"
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema"
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/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema';
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema',
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema');
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema';
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema",
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema")
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/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema";
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/appRestrictionsSchema")! 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
androidenterprise.products.getPermissions
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions
QUERY PARAMS
enterpriseId
productId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions"
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions"
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/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions';
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions',
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions');
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions';
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions",
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions")
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/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions";
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/permissions")! 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
androidenterprise.products.list
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products
QUERY PARAMS
enterpriseId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/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}}/androidenterprise/v1/enterprises/:enterpriseId/products"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/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/androidenterprise/v1/enterprises/:enterpriseId/products HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/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}}/androidenterprise/v1/enterprises/:enterpriseId/products")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/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}}/androidenterprise/v1/enterprises/:enterpriseId/products');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/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}}/androidenterprise/v1/enterprises/:enterpriseId/products',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/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}}/androidenterprise/v1/enterprises/:enterpriseId/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}}/androidenterprise/v1/enterprises/:enterpriseId/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}}/androidenterprise/v1/enterprises/:enterpriseId/products'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/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}}/androidenterprise/v1/enterprises/:enterpriseId/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}}/androidenterprise/v1/enterprises/:enterpriseId/products" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/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}}/androidenterprise/v1/enterprises/:enterpriseId/products');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/products")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/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/androidenterprise/v1/enterprises/:enterpriseId/products') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/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}}/androidenterprise/v1/enterprises/:enterpriseId/products
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/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()
POST
androidenterprise.products.unapprove
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove
QUERY PARAMS
enterpriseId
productId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove';
const options = {method: 'POST'};
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove',
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: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove');
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove';
const options = {method: 'POST'};
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
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}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove
http POST {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/products/:productId/unapprove")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
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
androidenterprise.serviceaccountkeys.delete
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId
QUERY PARAMS
enterpriseId
keyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId"
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId"
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/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId',
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId');
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId",
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId")
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/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId";
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId
http DELETE {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys/:keyId")! 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()
POST
androidenterprise.serviceaccountkeys.insert
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys
QUERY PARAMS
enterpriseId
BODY json
{
"data": "",
"id": "",
"publicData": "",
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys");
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 \"data\": \"\",\n \"id\": \"\",\n \"publicData\": \"\",\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys" {:content-type :json
:form-params {:data ""
:id ""
:publicData ""
:type ""}})
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"data\": \"\",\n \"id\": \"\",\n \"publicData\": \"\",\n \"type\": \"\"\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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys"),
Content = new StringContent("{\n \"data\": \"\",\n \"id\": \"\",\n \"publicData\": \"\",\n \"type\": \"\"\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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"data\": \"\",\n \"id\": \"\",\n \"publicData\": \"\",\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys"
payload := strings.NewReader("{\n \"data\": \"\",\n \"id\": \"\",\n \"publicData\": \"\",\n \"type\": \"\"\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/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 62
{
"data": "",
"id": "",
"publicData": "",
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys")
.setHeader("content-type", "application/json")
.setBody("{\n \"data\": \"\",\n \"id\": \"\",\n \"publicData\": \"\",\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"data\": \"\",\n \"id\": \"\",\n \"publicData\": \"\",\n \"type\": \"\"\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 \"data\": \"\",\n \"id\": \"\",\n \"publicData\": \"\",\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys")
.header("content-type", "application/json")
.body("{\n \"data\": \"\",\n \"id\": \"\",\n \"publicData\": \"\",\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
data: '',
id: '',
publicData: '',
type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys',
headers: {'content-type': 'application/json'},
data: {data: '', id: '', publicData: '', type: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"data":"","id":"","publicData":"","type":""}'
};
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "data": "",\n "id": "",\n "publicData": "",\n "type": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"data\": \"\",\n \"id\": \"\",\n \"publicData\": \"\",\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys")
.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/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys',
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({data: '', id: '', publicData: '', type: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys',
headers: {'content-type': 'application/json'},
body: {data: '', id: '', publicData: '', type: ''},
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
data: '',
id: '',
publicData: '',
type: ''
});
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys',
headers: {'content-type': 'application/json'},
data: {data: '', id: '', publicData: '', type: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"data":"","id":"","publicData":"","type":""}'
};
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 = @{ @"data": @"",
@"id": @"",
@"publicData": @"",
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"data\": \"\",\n \"id\": \"\",\n \"publicData\": \"\",\n \"type\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys",
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([
'data' => '',
'id' => '',
'publicData' => '',
'type' => ''
]),
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys', [
'body' => '{
"data": "",
"id": "",
"publicData": "",
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'data' => '',
'id' => '',
'publicData' => '',
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'data' => '',
'id' => '',
'publicData' => '',
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys');
$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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"data": "",
"id": "",
"publicData": "",
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"data": "",
"id": "",
"publicData": "",
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"data\": \"\",\n \"id\": \"\",\n \"publicData\": \"\",\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys"
payload = {
"data": "",
"id": "",
"publicData": "",
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys"
payload <- "{\n \"data\": \"\",\n \"id\": \"\",\n \"publicData\": \"\",\n \"type\": \"\"\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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys")
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 \"data\": \"\",\n \"id\": \"\",\n \"publicData\": \"\",\n \"type\": \"\"\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/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys') do |req|
req.body = "{\n \"data\": \"\",\n \"id\": \"\",\n \"publicData\": \"\",\n \"type\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys";
let payload = json!({
"data": "",
"id": "",
"publicData": "",
"type": ""
});
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys \
--header 'content-type: application/json' \
--data '{
"data": "",
"id": "",
"publicData": "",
"type": ""
}'
echo '{
"data": "",
"id": "",
"publicData": "",
"type": ""
}' | \
http POST {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "data": "",\n "id": "",\n "publicData": "",\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"data": "",
"id": "",
"publicData": "",
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys")! 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
androidenterprise.serviceaccountkeys.list
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys
QUERY PARAMS
enterpriseId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys"
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys"
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/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys';
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys',
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys');
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys';
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys",
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys")
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/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys";
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}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/serviceAccountKeys")! 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()
DELETE
androidenterprise.storelayoutclusters.delete
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId
QUERY PARAMS
enterpriseId
pageId
clusterId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId"
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId"
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/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId',
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId');
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId",
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId")
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/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId";
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId
http DELETE {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId")! 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
androidenterprise.storelayoutclusters.get
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId
QUERY PARAMS
enterpriseId
pageId
clusterId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId"
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId"
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/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId',
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId');
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId",
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId")
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/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId";
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId")! 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
androidenterprise.storelayoutclusters.insert
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters
QUERY PARAMS
enterpriseId
pageId
BODY json
{
"id": "",
"name": [
{
"locale": "",
"text": ""
}
],
"orderInPage": "",
"productId": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters");
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 \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters" {:content-type :json
:form-params {:id ""
:name [{:locale ""
:text ""}]
:orderInPage ""
:productId []}})
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters"),
Content = new StringContent("{\n \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters"
payload := strings.NewReader("{\n \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\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/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 120
{
"id": "",
"name": [
{
"locale": "",
"text": ""
}
],
"orderInPage": "",
"productId": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters")
.setHeader("content-type", "application/json")
.setBody("{\n \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters")
.header("content-type", "application/json")
.body("{\n \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\n}")
.asString();
const data = JSON.stringify({
id: '',
name: [
{
locale: '',
text: ''
}
],
orderInPage: '',
productId: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters',
headers: {'content-type': 'application/json'},
data: {id: '', name: [{locale: '', text: ''}], orderInPage: '', productId: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"id":"","name":[{"locale":"","text":""}],"orderInPage":"","productId":[]}'
};
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "id": "",\n "name": [\n {\n "locale": "",\n "text": ""\n }\n ],\n "orderInPage": "",\n "productId": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters")
.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/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters',
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({id: '', name: [{locale: '', text: ''}], orderInPage: '', productId: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters',
headers: {'content-type': 'application/json'},
body: {id: '', name: [{locale: '', text: ''}], orderInPage: '', productId: []},
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
id: '',
name: [
{
locale: '',
text: ''
}
],
orderInPage: '',
productId: []
});
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters',
headers: {'content-type': 'application/json'},
data: {id: '', name: [{locale: '', text: ''}], orderInPage: '', productId: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"id":"","name":[{"locale":"","text":""}],"orderInPage":"","productId":[]}'
};
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 = @{ @"id": @"",
@"name": @[ @{ @"locale": @"", @"text": @"" } ],
@"orderInPage": @"",
@"productId": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '',
'name' => [
[
'locale' => '',
'text' => ''
]
],
'orderInPage' => '',
'productId' => [
]
]),
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters', [
'body' => '{
"id": "",
"name": [
{
"locale": "",
"text": ""
}
],
"orderInPage": "",
"productId": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'id' => '',
'name' => [
[
'locale' => '',
'text' => ''
]
],
'orderInPage' => '',
'productId' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'id' => '',
'name' => [
[
'locale' => '',
'text' => ''
]
],
'orderInPage' => '',
'productId' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters');
$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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"id": "",
"name": [
{
"locale": "",
"text": ""
}
],
"orderInPage": "",
"productId": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"id": "",
"name": [
{
"locale": "",
"text": ""
}
],
"orderInPage": "",
"productId": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters"
payload = {
"id": "",
"name": [
{
"locale": "",
"text": ""
}
],
"orderInPage": "",
"productId": []
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters"
payload <- "{\n \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters")
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 \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\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/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters') do |req|
req.body = "{\n \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters";
let payload = json!({
"id": "",
"name": (
json!({
"locale": "",
"text": ""
})
),
"orderInPage": "",
"productId": ()
});
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters \
--header 'content-type: application/json' \
--data '{
"id": "",
"name": [
{
"locale": "",
"text": ""
}
],
"orderInPage": "",
"productId": []
}'
echo '{
"id": "",
"name": [
{
"locale": "",
"text": ""
}
],
"orderInPage": "",
"productId": []
}' | \
http POST {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "id": "",\n "name": [\n {\n "locale": "",\n "text": ""\n }\n ],\n "orderInPage": "",\n "productId": []\n}' \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"id": "",
"name": [
[
"locale": "",
"text": ""
]
],
"orderInPage": "",
"productId": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters")! 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
androidenterprise.storelayoutclusters.list
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters
QUERY PARAMS
enterpriseId
pageId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters"
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters"
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/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters';
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters',
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters');
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters';
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters",
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters")
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/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters";
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters")! 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()
PUT
androidenterprise.storelayoutclusters.update
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId
QUERY PARAMS
enterpriseId
pageId
clusterId
BODY json
{
"id": "",
"name": [
{
"locale": "",
"text": ""
}
],
"orderInPage": "",
"productId": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId");
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 \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId" {:content-type :json
:form-params {:id ""
:name [{:locale ""
:text ""}]
:orderInPage ""
:productId []}})
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId"),
Content = new StringContent("{\n \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId"
payload := strings.NewReader("{\n \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\n}")
req, _ := http.NewRequest("PUT", 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))
}
PUT /baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 120
{
"id": "",
"name": [
{
"locale": "",
"text": ""
}
],
"orderInPage": "",
"productId": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId")
.setHeader("content-type", "application/json")
.setBody("{\n \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId")
.header("content-type", "application/json")
.body("{\n \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\n}")
.asString();
const data = JSON.stringify({
id: '',
name: [
{
locale: '',
text: ''
}
],
orderInPage: '',
productId: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId',
headers: {'content-type': 'application/json'},
data: {id: '', name: [{locale: '', text: ''}], orderInPage: '', productId: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"id":"","name":[{"locale":"","text":""}],"orderInPage":"","productId":[]}'
};
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "id": "",\n "name": [\n {\n "locale": "",\n "text": ""\n }\n ],\n "orderInPage": "",\n "productId": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId',
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({id: '', name: [{locale: '', text: ''}], orderInPage: '', productId: []}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId',
headers: {'content-type': 'application/json'},
body: {id: '', name: [{locale: '', text: ''}], orderInPage: '', productId: []},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
id: '',
name: [
{
locale: '',
text: ''
}
],
orderInPage: '',
productId: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId',
headers: {'content-type': 'application/json'},
data: {id: '', name: [{locale: '', text: ''}], orderInPage: '', productId: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"id":"","name":[{"locale":"","text":""}],"orderInPage":"","productId":[]}'
};
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 = @{ @"id": @"",
@"name": @[ @{ @"locale": @"", @"text": @"" } ],
@"orderInPage": @"",
@"productId": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'id' => '',
'name' => [
[
'locale' => '',
'text' => ''
]
],
'orderInPage' => '',
'productId' => [
]
]),
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('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId', [
'body' => '{
"id": "",
"name": [
{
"locale": "",
"text": ""
}
],
"orderInPage": "",
"productId": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'id' => '',
'name' => [
[
'locale' => '',
'text' => ''
]
],
'orderInPage' => '',
'productId' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'id' => '',
'name' => [
[
'locale' => '',
'text' => ''
]
],
'orderInPage' => '',
'productId' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId');
$request->setRequestMethod('PUT');
$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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"id": "",
"name": [
{
"locale": "",
"text": ""
}
],
"orderInPage": "",
"productId": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"id": "",
"name": [
{
"locale": "",
"text": ""
}
],
"orderInPage": "",
"productId": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId"
payload = {
"id": "",
"name": [
{
"locale": "",
"text": ""
}
],
"orderInPage": "",
"productId": []
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId"
payload <- "{\n \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId') do |req|
req.body = "{\n \"id\": \"\",\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ],\n \"orderInPage\": \"\",\n \"productId\": []\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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId";
let payload = json!({
"id": "",
"name": (
json!({
"locale": "",
"text": ""
})
),
"orderInPage": "",
"productId": ()
});
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("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId \
--header 'content-type: application/json' \
--data '{
"id": "",
"name": [
{
"locale": "",
"text": ""
}
],
"orderInPage": "",
"productId": []
}'
echo '{
"id": "",
"name": [
{
"locale": "",
"text": ""
}
],
"orderInPage": "",
"productId": []
}' | \
http PUT {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "id": "",\n "name": [\n {\n "locale": "",\n "text": ""\n }\n ],\n "orderInPage": "",\n "productId": []\n}' \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"id": "",
"name": [
[
"locale": "",
"text": ""
]
],
"orderInPage": "",
"productId": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId/clusters/:clusterId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
androidenterprise.storelayoutpages.delete
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId
QUERY PARAMS
enterpriseId
pageId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId"
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId"
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/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId',
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId');
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId",
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId")
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/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId";
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId
http DELETE {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId")! 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
androidenterprise.storelayoutpages.get
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId
QUERY PARAMS
enterpriseId
pageId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId"
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId"
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/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId',
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId');
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId",
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId")
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/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId";
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId")! 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
androidenterprise.storelayoutpages.insert
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages
QUERY PARAMS
enterpriseId
BODY json
{
"id": "",
"link": [],
"name": [
{
"locale": "",
"text": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages");
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 \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages" {:content-type :json
:form-params {:id ""
:link []
:name [{:locale ""
:text ""}]}})
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages"),
Content = new StringContent("{\n \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages"
payload := strings.NewReader("{\n \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\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/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 94
{
"id": "",
"link": [],
"name": [
{
"locale": "",
"text": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages")
.setHeader("content-type", "application/json")
.setBody("{\n \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages")
.header("content-type", "application/json")
.body("{\n \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
id: '',
link: [],
name: [
{
locale: '',
text: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages',
headers: {'content-type': 'application/json'},
data: {id: '', link: [], name: [{locale: '', text: ''}]}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"id":"","link":[],"name":[{"locale":"","text":""}]}'
};
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "id": "",\n "link": [],\n "name": [\n {\n "locale": "",\n "text": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages")
.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/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages',
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({id: '', link: [], name: [{locale: '', text: ''}]}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages',
headers: {'content-type': 'application/json'},
body: {id: '', link: [], name: [{locale: '', text: ''}]},
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
id: '',
link: [],
name: [
{
locale: '',
text: ''
}
]
});
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages',
headers: {'content-type': 'application/json'},
data: {id: '', link: [], name: [{locale: '', text: ''}]}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"id":"","link":[],"name":[{"locale":"","text":""}]}'
};
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 = @{ @"id": @"",
@"link": @[ ],
@"name": @[ @{ @"locale": @"", @"text": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '',
'link' => [
],
'name' => [
[
'locale' => '',
'text' => ''
]
]
]),
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages', [
'body' => '{
"id": "",
"link": [],
"name": [
{
"locale": "",
"text": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'id' => '',
'link' => [
],
'name' => [
[
'locale' => '',
'text' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'id' => '',
'link' => [
],
'name' => [
[
'locale' => '',
'text' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages');
$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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"id": "",
"link": [],
"name": [
{
"locale": "",
"text": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"id": "",
"link": [],
"name": [
{
"locale": "",
"text": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages"
payload = {
"id": "",
"link": [],
"name": [
{
"locale": "",
"text": ""
}
]
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages"
payload <- "{\n \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages")
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 \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages') do |req|
req.body = "{\n \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages";
let payload = json!({
"id": "",
"link": (),
"name": (
json!({
"locale": "",
"text": ""
})
)
});
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages \
--header 'content-type: application/json' \
--data '{
"id": "",
"link": [],
"name": [
{
"locale": "",
"text": ""
}
]
}'
echo '{
"id": "",
"link": [],
"name": [
{
"locale": "",
"text": ""
}
]
}' | \
http POST {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "id": "",\n "link": [],\n "name": [\n {\n "locale": "",\n "text": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"id": "",
"link": [],
"name": [
[
"locale": "",
"text": ""
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages")! 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
androidenterprise.storelayoutpages.list
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages
QUERY PARAMS
enterpriseId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages"
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages"
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/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages';
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages',
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages');
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages';
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages",
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages")
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/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages";
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages")! 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()
PUT
androidenterprise.storelayoutpages.update
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId
QUERY PARAMS
enterpriseId
pageId
BODY json
{
"id": "",
"link": [],
"name": [
{
"locale": "",
"text": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId");
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 \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId" {:content-type :json
:form-params {:id ""
:link []
:name [{:locale ""
:text ""}]}})
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId"),
Content = new StringContent("{\n \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId"
payload := strings.NewReader("{\n \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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))
}
PUT /baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 94
{
"id": "",
"link": [],
"name": [
{
"locale": "",
"text": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId")
.setHeader("content-type", "application/json")
.setBody("{\n \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId")
.header("content-type", "application/json")
.body("{\n \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
id: '',
link: [],
name: [
{
locale: '',
text: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId',
headers: {'content-type': 'application/json'},
data: {id: '', link: [], name: [{locale: '', text: ''}]}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"id":"","link":[],"name":[{"locale":"","text":""}]}'
};
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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "id": "",\n "link": [],\n "name": [\n {\n "locale": "",\n "text": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId',
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({id: '', link: [], name: [{locale: '', text: ''}]}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId',
headers: {'content-type': 'application/json'},
body: {id: '', link: [], name: [{locale: '', text: ''}]},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
id: '',
link: [],
name: [
{
locale: '',
text: ''
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId',
headers: {'content-type': 'application/json'},
data: {id: '', link: [], name: [{locale: '', text: ''}]}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"id":"","link":[],"name":[{"locale":"","text":""}]}'
};
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 = @{ @"id": @"",
@"link": @[ ],
@"name": @[ @{ @"locale": @"", @"text": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'id' => '',
'link' => [
],
'name' => [
[
'locale' => '',
'text' => ''
]
]
]),
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('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId', [
'body' => '{
"id": "",
"link": [],
"name": [
{
"locale": "",
"text": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'id' => '',
'link' => [
],
'name' => [
[
'locale' => '',
'text' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'id' => '',
'link' => [
],
'name' => [
[
'locale' => '',
'text' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId');
$request->setRequestMethod('PUT');
$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}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"id": "",
"link": [],
"name": [
{
"locale": "",
"text": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"id": "",
"link": [],
"name": [
{
"locale": "",
"text": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId"
payload = {
"id": "",
"link": [],
"name": [
{
"locale": "",
"text": ""
}
]
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId"
payload <- "{\n \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId') do |req|
req.body = "{\n \"id\": \"\",\n \"link\": [],\n \"name\": [\n {\n \"locale\": \"\",\n \"text\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId";
let payload = json!({
"id": "",
"link": (),
"name": (
json!({
"locale": "",
"text": ""
})
)
});
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("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId \
--header 'content-type: application/json' \
--data '{
"id": "",
"link": [],
"name": [
{
"locale": "",
"text": ""
}
]
}'
echo '{
"id": "",
"link": [],
"name": [
{
"locale": "",
"text": ""
}
]
}' | \
http PUT {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "id": "",\n "link": [],\n "name": [\n {\n "locale": "",\n "text": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"id": "",
"link": [],
"name": [
[
"locale": "",
"text": ""
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/storeLayout/pages/:pageId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
androidenterprise.users.delete
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId
QUERY PARAMS
enterpriseId
userId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId"
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId"
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId',
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId');
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId",
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId")
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId";
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId
http DELETE {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId")! 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()
POST
androidenterprise.users.generateAuthenticationToken
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken
QUERY PARAMS
enterpriseId
userId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken';
const options = {method: 'POST'};
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken',
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: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken');
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken';
const options = {method: 'POST'};
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken
http POST {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/authenticationToken")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
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
androidenterprise.users.get
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId
QUERY PARAMS
enterpriseId
userId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId"
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId"
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId',
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId');
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId",
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId")
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId";
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId")! 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
androidenterprise.users.getAvailableProductSet
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet
QUERY PARAMS
enterpriseId
userId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet"
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet"
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet',
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet');
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet",
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet")
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet";
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet")! 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
androidenterprise.users.insert
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users
QUERY PARAMS
enterpriseId
BODY json
{
"accountIdentifier": "",
"accountType": "",
"displayName": "",
"id": "",
"managementType": "",
"primaryEmail": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users");
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 \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users" {:content-type :json
:form-params {:accountIdentifier ""
:accountType ""
:displayName ""
:id ""
:managementType ""
:primaryEmail ""}})
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\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}}/androidenterprise/v1/enterprises/:enterpriseId/users"),
Content = new StringContent("{\n \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\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}}/androidenterprise/v1/enterprises/:enterpriseId/users");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users"
payload := strings.NewReader("{\n \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\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/androidenterprise/v1/enterprises/:enterpriseId/users HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 129
{
"accountIdentifier": "",
"accountType": "",
"displayName": "",
"id": "",
"managementType": "",
"primaryEmail": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\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 \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users")
.header("content-type", "application/json")
.body("{\n \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountIdentifier: '',
accountType: '',
displayName: '',
id: '',
managementType: '',
primaryEmail: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users',
headers: {'content-type': 'application/json'},
data: {
accountIdentifier: '',
accountType: '',
displayName: '',
id: '',
managementType: '',
primaryEmail: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIdentifier":"","accountType":"","displayName":"","id":"","managementType":"","primaryEmail":""}'
};
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}}/androidenterprise/v1/enterprises/:enterpriseId/users',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountIdentifier": "",\n "accountType": "",\n "displayName": "",\n "id": "",\n "managementType": "",\n "primaryEmail": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users")
.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/androidenterprise/v1/enterprises/:enterpriseId/users',
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({
accountIdentifier: '',
accountType: '',
displayName: '',
id: '',
managementType: '',
primaryEmail: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users',
headers: {'content-type': 'application/json'},
body: {
accountIdentifier: '',
accountType: '',
displayName: '',
id: '',
managementType: '',
primaryEmail: ''
},
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}}/androidenterprise/v1/enterprises/:enterpriseId/users');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountIdentifier: '',
accountType: '',
displayName: '',
id: '',
managementType: '',
primaryEmail: ''
});
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}}/androidenterprise/v1/enterprises/:enterpriseId/users',
headers: {'content-type': 'application/json'},
data: {
accountIdentifier: '',
accountType: '',
displayName: '',
id: '',
managementType: '',
primaryEmail: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIdentifier":"","accountType":"","displayName":"","id":"","managementType":"","primaryEmail":""}'
};
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 = @{ @"accountIdentifier": @"",
@"accountType": @"",
@"displayName": @"",
@"id": @"",
@"managementType": @"",
@"primaryEmail": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/users" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users",
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([
'accountIdentifier' => '',
'accountType' => '',
'displayName' => '',
'id' => '',
'managementType' => '',
'primaryEmail' => ''
]),
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}}/androidenterprise/v1/enterprises/:enterpriseId/users', [
'body' => '{
"accountIdentifier": "",
"accountType": "",
"displayName": "",
"id": "",
"managementType": "",
"primaryEmail": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountIdentifier' => '',
'accountType' => '',
'displayName' => '',
'id' => '',
'managementType' => '',
'primaryEmail' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountIdentifier' => '',
'accountType' => '',
'displayName' => '',
'id' => '',
'managementType' => '',
'primaryEmail' => ''
]));
$request->setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users');
$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}}/androidenterprise/v1/enterprises/:enterpriseId/users' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIdentifier": "",
"accountType": "",
"displayName": "",
"id": "",
"managementType": "",
"primaryEmail": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIdentifier": "",
"accountType": "",
"displayName": "",
"id": "",
"managementType": "",
"primaryEmail": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users"
payload = {
"accountIdentifier": "",
"accountType": "",
"displayName": "",
"id": "",
"managementType": "",
"primaryEmail": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users"
payload <- "{\n \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\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}}/androidenterprise/v1/enterprises/:enterpriseId/users")
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 \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\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/androidenterprise/v1/enterprises/:enterpriseId/users') do |req|
req.body = "{\n \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users";
let payload = json!({
"accountIdentifier": "",
"accountType": "",
"displayName": "",
"id": "",
"managementType": "",
"primaryEmail": ""
});
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}}/androidenterprise/v1/enterprises/:enterpriseId/users \
--header 'content-type: application/json' \
--data '{
"accountIdentifier": "",
"accountType": "",
"displayName": "",
"id": "",
"managementType": "",
"primaryEmail": ""
}'
echo '{
"accountIdentifier": "",
"accountType": "",
"displayName": "",
"id": "",
"managementType": "",
"primaryEmail": ""
}' | \
http POST {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountIdentifier": "",\n "accountType": "",\n "displayName": "",\n "id": "",\n "managementType": "",\n "primaryEmail": ""\n}' \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountIdentifier": "",
"accountType": "",
"displayName": "",
"id": "",
"managementType": "",
"primaryEmail": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users")! 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
androidenterprise.users.list
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users
QUERY PARAMS
email
enterpriseId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users?email=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users" {:query-params {:email ""}})
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users?email="
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}}/androidenterprise/v1/enterprises/:enterpriseId/users?email="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users?email=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users?email="
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/androidenterprise/v1/enterprises/:enterpriseId/users?email= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users?email=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users?email="))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users?email=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users?email=")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users?email=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users',
params: {email: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users?email=';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users?email=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users?email=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users?email=',
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}}/androidenterprise/v1/enterprises/:enterpriseId/users',
qs: {email: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users');
req.query({
email: ''
});
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}}/androidenterprise/v1/enterprises/:enterpriseId/users',
params: {email: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users?email=';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users?email="]
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}}/androidenterprise/v1/enterprises/:enterpriseId/users?email=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users?email=",
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}}/androidenterprise/v1/enterprises/:enterpriseId/users?email=');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'email' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'email' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users?email=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users?email=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users?email=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users"
querystring = {"email":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users"
queryString <- list(email = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users?email=")
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/androidenterprise/v1/enterprises/:enterpriseId/users') do |req|
req.params['email'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users";
let querystring = [
("email", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users?email='
http GET '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users?email='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users?email='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users?email=")! 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()
DELETE
androidenterprise.users.revokeDeviceAccess
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess
QUERY PARAMS
enterpriseId
userId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess"
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess"
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess',
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess');
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess';
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess",
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess")
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/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess";
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess
http DELETE {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/deviceAccess")! 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()
PUT
androidenterprise.users.setAvailableProductSet
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet
QUERY PARAMS
enterpriseId
userId
BODY json
{
"productId": [],
"productSetBehavior": "",
"productVisibility": [
{
"productId": "",
"trackIds": [],
"tracks": []
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet");
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 \"productId\": [],\n \"productSetBehavior\": \"\",\n \"productVisibility\": [\n {\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet" {:content-type :json
:form-params {:productId []
:productSetBehavior ""
:productVisibility [{:productId ""
:trackIds []
:tracks []}]}})
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"productId\": [],\n \"productSetBehavior\": \"\",\n \"productVisibility\": [\n {\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet"),
Content = new StringContent("{\n \"productId\": [],\n \"productSetBehavior\": \"\",\n \"productVisibility\": [\n {\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"productId\": [],\n \"productSetBehavior\": \"\",\n \"productVisibility\": [\n {\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet"
payload := strings.NewReader("{\n \"productId\": [],\n \"productSetBehavior\": \"\",\n \"productVisibility\": [\n {\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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))
}
PUT /baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 155
{
"productId": [],
"productSetBehavior": "",
"productVisibility": [
{
"productId": "",
"trackIds": [],
"tracks": []
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet")
.setHeader("content-type", "application/json")
.setBody("{\n \"productId\": [],\n \"productSetBehavior\": \"\",\n \"productVisibility\": [\n {\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"productId\": [],\n \"productSetBehavior\": \"\",\n \"productVisibility\": [\n {\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"productId\": [],\n \"productSetBehavior\": \"\",\n \"productVisibility\": [\n {\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet")
.header("content-type", "application/json")
.body("{\n \"productId\": [],\n \"productSetBehavior\": \"\",\n \"productVisibility\": [\n {\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n}")
.asString();
const data = JSON.stringify({
productId: [],
productSetBehavior: '',
productVisibility: [
{
productId: '',
trackIds: [],
tracks: []
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet',
headers: {'content-type': 'application/json'},
data: {
productId: [],
productSetBehavior: '',
productVisibility: [{productId: '', trackIds: [], tracks: []}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"productId":[],"productSetBehavior":"","productVisibility":[{"productId":"","trackIds":[],"tracks":[]}]}'
};
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "productId": [],\n "productSetBehavior": "",\n "productVisibility": [\n {\n "productId": "",\n "trackIds": [],\n "tracks": []\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"productId\": [],\n \"productSetBehavior\": \"\",\n \"productVisibility\": [\n {\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet',
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({
productId: [],
productSetBehavior: '',
productVisibility: [{productId: '', trackIds: [], tracks: []}]
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet',
headers: {'content-type': 'application/json'},
body: {
productId: [],
productSetBehavior: '',
productVisibility: [{productId: '', trackIds: [], tracks: []}]
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
productId: [],
productSetBehavior: '',
productVisibility: [
{
productId: '',
trackIds: [],
tracks: []
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet',
headers: {'content-type': 'application/json'},
data: {
productId: [],
productSetBehavior: '',
productVisibility: [{productId: '', trackIds: [], tracks: []}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"productId":[],"productSetBehavior":"","productVisibility":[{"productId":"","trackIds":[],"tracks":[]}]}'
};
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 = @{ @"productId": @[ ],
@"productSetBehavior": @"",
@"productVisibility": @[ @{ @"productId": @"", @"trackIds": @[ ], @"tracks": @[ ] } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"productId\": [],\n \"productSetBehavior\": \"\",\n \"productVisibility\": [\n {\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'productId' => [
],
'productSetBehavior' => '',
'productVisibility' => [
[
'productId' => '',
'trackIds' => [
],
'tracks' => [
]
]
]
]),
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('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet', [
'body' => '{
"productId": [],
"productSetBehavior": "",
"productVisibility": [
{
"productId": "",
"trackIds": [],
"tracks": []
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'productId' => [
],
'productSetBehavior' => '',
'productVisibility' => [
[
'productId' => '',
'trackIds' => [
],
'tracks' => [
]
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'productId' => [
],
'productSetBehavior' => '',
'productVisibility' => [
[
'productId' => '',
'trackIds' => [
],
'tracks' => [
]
]
]
]));
$request->setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet');
$request->setRequestMethod('PUT');
$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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"productId": [],
"productSetBehavior": "",
"productVisibility": [
{
"productId": "",
"trackIds": [],
"tracks": []
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"productId": [],
"productSetBehavior": "",
"productVisibility": [
{
"productId": "",
"trackIds": [],
"tracks": []
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"productId\": [],\n \"productSetBehavior\": \"\",\n \"productVisibility\": [\n {\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet"
payload = {
"productId": [],
"productSetBehavior": "",
"productVisibility": [
{
"productId": "",
"trackIds": [],
"tracks": []
}
]
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet"
payload <- "{\n \"productId\": [],\n \"productSetBehavior\": \"\",\n \"productVisibility\": [\n {\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"productId\": [],\n \"productSetBehavior\": \"\",\n \"productVisibility\": [\n {\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet') do |req|
req.body = "{\n \"productId\": [],\n \"productSetBehavior\": \"\",\n \"productVisibility\": [\n {\n \"productId\": \"\",\n \"trackIds\": [],\n \"tracks\": []\n }\n ]\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet";
let payload = json!({
"productId": (),
"productSetBehavior": "",
"productVisibility": (
json!({
"productId": "",
"trackIds": (),
"tracks": ()
})
)
});
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("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet \
--header 'content-type: application/json' \
--data '{
"productId": [],
"productSetBehavior": "",
"productVisibility": [
{
"productId": "",
"trackIds": [],
"tracks": []
}
]
}'
echo '{
"productId": [],
"productSetBehavior": "",
"productVisibility": [
{
"productId": "",
"trackIds": [],
"tracks": []
}
]
}' | \
http PUT {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "productId": [],\n "productSetBehavior": "",\n "productVisibility": [\n {\n "productId": "",\n "trackIds": [],\n "tracks": []\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"productId": [],
"productSetBehavior": "",
"productVisibility": [
[
"productId": "",
"trackIds": [],
"tracks": []
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId/availableProductSet")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
androidenterprise.users.update
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId
QUERY PARAMS
enterpriseId
userId
BODY json
{
"accountIdentifier": "",
"accountType": "",
"displayName": "",
"id": "",
"managementType": "",
"primaryEmail": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId");
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 \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId" {:content-type :json
:form-params {:accountIdentifier ""
:accountType ""
:displayName ""
:id ""
:managementType ""
:primaryEmail ""}})
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId"),
Content = new StringContent("{\n \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId"
payload := strings.NewReader("{\n \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\n}")
req, _ := http.NewRequest("PUT", 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))
}
PUT /baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 129
{
"accountIdentifier": "",
"accountType": "",
"displayName": "",
"id": "",
"managementType": "",
"primaryEmail": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\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 \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId")
.header("content-type", "application/json")
.body("{\n \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountIdentifier: '',
accountType: '',
displayName: '',
id: '',
managementType: '',
primaryEmail: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId',
headers: {'content-type': 'application/json'},
data: {
accountIdentifier: '',
accountType: '',
displayName: '',
id: '',
managementType: '',
primaryEmail: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accountIdentifier":"","accountType":"","displayName":"","id":"","managementType":"","primaryEmail":""}'
};
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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountIdentifier": "",\n "accountType": "",\n "displayName": "",\n "id": "",\n "managementType": "",\n "primaryEmail": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId',
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({
accountIdentifier: '',
accountType: '',
displayName: '',
id: '',
managementType: '',
primaryEmail: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId',
headers: {'content-type': 'application/json'},
body: {
accountIdentifier: '',
accountType: '',
displayName: '',
id: '',
managementType: '',
primaryEmail: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountIdentifier: '',
accountType: '',
displayName: '',
id: '',
managementType: '',
primaryEmail: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId',
headers: {'content-type': 'application/json'},
data: {
accountIdentifier: '',
accountType: '',
displayName: '',
id: '',
managementType: '',
primaryEmail: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accountIdentifier":"","accountType":"","displayName":"","id":"","managementType":"","primaryEmail":""}'
};
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 = @{ @"accountIdentifier": @"",
@"accountType": @"",
@"displayName": @"",
@"id": @"",
@"managementType": @"",
@"primaryEmail": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'accountIdentifier' => '',
'accountType' => '',
'displayName' => '',
'id' => '',
'managementType' => '',
'primaryEmail' => ''
]),
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('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId', [
'body' => '{
"accountIdentifier": "",
"accountType": "",
"displayName": "",
"id": "",
"managementType": "",
"primaryEmail": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountIdentifier' => '',
'accountType' => '',
'displayName' => '',
'id' => '',
'managementType' => '',
'primaryEmail' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountIdentifier' => '',
'accountType' => '',
'displayName' => '',
'id' => '',
'managementType' => '',
'primaryEmail' => ''
]));
$request->setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId');
$request->setRequestMethod('PUT');
$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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accountIdentifier": "",
"accountType": "",
"displayName": "",
"id": "",
"managementType": "",
"primaryEmail": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accountIdentifier": "",
"accountType": "",
"displayName": "",
"id": "",
"managementType": "",
"primaryEmail": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId"
payload = {
"accountIdentifier": "",
"accountType": "",
"displayName": "",
"id": "",
"managementType": "",
"primaryEmail": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId"
payload <- "{\n \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/users/:userId') do |req|
req.body = "{\n \"accountIdentifier\": \"\",\n \"accountType\": \"\",\n \"displayName\": \"\",\n \"id\": \"\",\n \"managementType\": \"\",\n \"primaryEmail\": \"\"\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}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId";
let payload = json!({
"accountIdentifier": "",
"accountType": "",
"displayName": "",
"id": "",
"managementType": "",
"primaryEmail": ""
});
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("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId \
--header 'content-type: application/json' \
--data '{
"accountIdentifier": "",
"accountType": "",
"displayName": "",
"id": "",
"managementType": "",
"primaryEmail": ""
}'
echo '{
"accountIdentifier": "",
"accountType": "",
"displayName": "",
"id": "",
"managementType": "",
"primaryEmail": ""
}' | \
http PUT {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "accountIdentifier": "",\n "accountType": "",\n "displayName": "",\n "id": "",\n "managementType": "",\n "primaryEmail": ""\n}' \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountIdentifier": "",
"accountType": "",
"displayName": "",
"id": "",
"managementType": "",
"primaryEmail": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/users/:userId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
androidenterprise.webapps.delete
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId
QUERY PARAMS
enterpriseId
webAppId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId"
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId"
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/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId',
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId');
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId",
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId")
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/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId";
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId
http DELETE {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId")! 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
androidenterprise.webapps.get
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId
QUERY PARAMS
enterpriseId
webAppId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId"
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId"
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/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId',
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId');
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId';
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId",
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId")
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/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId";
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId")! 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
androidenterprise.webapps.insert
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps
QUERY PARAMS
enterpriseId
BODY json
{
"displayMode": "",
"icons": [
{
"imageData": ""
}
],
"isPublished": false,
"startUrl": "",
"title": "",
"versionCode": "",
"webAppId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps");
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 \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps" {:content-type :json
:form-params {:displayMode ""
:icons [{:imageData ""}]
:isPublished false
:startUrl ""
:title ""
:versionCode ""
:webAppId ""}})
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps"),
Content = new StringContent("{\n \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps"
payload := strings.NewReader("{\n \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\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/androidenterprise/v1/enterprises/:enterpriseId/webApps HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 171
{
"displayMode": "",
"icons": [
{
"imageData": ""
}
],
"isPublished": false,
"startUrl": "",
"title": "",
"versionCode": "",
"webAppId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps")
.setHeader("content-type", "application/json")
.setBody("{\n \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\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 \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps")
.header("content-type", "application/json")
.body("{\n \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\n}")
.asString();
const data = JSON.stringify({
displayMode: '',
icons: [
{
imageData: ''
}
],
isPublished: false,
startUrl: '',
title: '',
versionCode: '',
webAppId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps',
headers: {'content-type': 'application/json'},
data: {
displayMode: '',
icons: [{imageData: ''}],
isPublished: false,
startUrl: '',
title: '',
versionCode: '',
webAppId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"displayMode":"","icons":[{"imageData":""}],"isPublished":false,"startUrl":"","title":"","versionCode":"","webAppId":""}'
};
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "displayMode": "",\n "icons": [\n {\n "imageData": ""\n }\n ],\n "isPublished": false,\n "startUrl": "",\n "title": "",\n "versionCode": "",\n "webAppId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps")
.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/androidenterprise/v1/enterprises/:enterpriseId/webApps',
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({
displayMode: '',
icons: [{imageData: ''}],
isPublished: false,
startUrl: '',
title: '',
versionCode: '',
webAppId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps',
headers: {'content-type': 'application/json'},
body: {
displayMode: '',
icons: [{imageData: ''}],
isPublished: false,
startUrl: '',
title: '',
versionCode: '',
webAppId: ''
},
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
displayMode: '',
icons: [
{
imageData: ''
}
],
isPublished: false,
startUrl: '',
title: '',
versionCode: '',
webAppId: ''
});
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps',
headers: {'content-type': 'application/json'},
data: {
displayMode: '',
icons: [{imageData: ''}],
isPublished: false,
startUrl: '',
title: '',
versionCode: '',
webAppId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"displayMode":"","icons":[{"imageData":""}],"isPublished":false,"startUrl":"","title":"","versionCode":"","webAppId":""}'
};
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 = @{ @"displayMode": @"",
@"icons": @[ @{ @"imageData": @"" } ],
@"isPublished": @NO,
@"startUrl": @"",
@"title": @"",
@"versionCode": @"",
@"webAppId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps",
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([
'displayMode' => '',
'icons' => [
[
'imageData' => ''
]
],
'isPublished' => null,
'startUrl' => '',
'title' => '',
'versionCode' => '',
'webAppId' => ''
]),
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps', [
'body' => '{
"displayMode": "",
"icons": [
{
"imageData": ""
}
],
"isPublished": false,
"startUrl": "",
"title": "",
"versionCode": "",
"webAppId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'displayMode' => '',
'icons' => [
[
'imageData' => ''
]
],
'isPublished' => null,
'startUrl' => '',
'title' => '',
'versionCode' => '',
'webAppId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'displayMode' => '',
'icons' => [
[
'imageData' => ''
]
],
'isPublished' => null,
'startUrl' => '',
'title' => '',
'versionCode' => '',
'webAppId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps');
$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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"displayMode": "",
"icons": [
{
"imageData": ""
}
],
"isPublished": false,
"startUrl": "",
"title": "",
"versionCode": "",
"webAppId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"displayMode": "",
"icons": [
{
"imageData": ""
}
],
"isPublished": false,
"startUrl": "",
"title": "",
"versionCode": "",
"webAppId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/webApps", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps"
payload = {
"displayMode": "",
"icons": [{ "imageData": "" }],
"isPublished": False,
"startUrl": "",
"title": "",
"versionCode": "",
"webAppId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps"
payload <- "{\n \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps")
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 \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\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/androidenterprise/v1/enterprises/:enterpriseId/webApps') do |req|
req.body = "{\n \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps";
let payload = json!({
"displayMode": "",
"icons": (json!({"imageData": ""})),
"isPublished": false,
"startUrl": "",
"title": "",
"versionCode": "",
"webAppId": ""
});
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps \
--header 'content-type: application/json' \
--data '{
"displayMode": "",
"icons": [
{
"imageData": ""
}
],
"isPublished": false,
"startUrl": "",
"title": "",
"versionCode": "",
"webAppId": ""
}'
echo '{
"displayMode": "",
"icons": [
{
"imageData": ""
}
],
"isPublished": false,
"startUrl": "",
"title": "",
"versionCode": "",
"webAppId": ""
}' | \
http POST {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "displayMode": "",\n "icons": [\n {\n "imageData": ""\n }\n ],\n "isPublished": false,\n "startUrl": "",\n "title": "",\n "versionCode": "",\n "webAppId": ""\n}' \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"displayMode": "",
"icons": [["imageData": ""]],
"isPublished": false,
"startUrl": "",
"title": "",
"versionCode": "",
"webAppId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps")! 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
androidenterprise.webapps.list
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps
QUERY PARAMS
enterpriseId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps")
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps"
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps"
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/androidenterprise/v1/enterprises/:enterpriseId/webApps HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps"))
.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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps")
.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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps';
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/webApps',
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps');
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps';
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps"]
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps",
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps');
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/webApps")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps")
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/androidenterprise/v1/enterprises/:enterpriseId/webApps') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps";
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps
http GET {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps")! 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()
PUT
androidenterprise.webapps.update
{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId
QUERY PARAMS
enterpriseId
webAppId
BODY json
{
"displayMode": "",
"icons": [
{
"imageData": ""
}
],
"isPublished": false,
"startUrl": "",
"title": "",
"versionCode": "",
"webAppId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId");
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 \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId" {:content-type :json
:form-params {:displayMode ""
:icons [{:imageData ""}]
:isPublished false
:startUrl ""
:title ""
:versionCode ""
:webAppId ""}})
require "http/client"
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId"),
Content = new StringContent("{\n \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId"
payload := strings.NewReader("{\n \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\n}")
req, _ := http.NewRequest("PUT", 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))
}
PUT /baseUrl/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 171
{
"displayMode": "",
"icons": [
{
"imageData": ""
}
],
"isPublished": false,
"startUrl": "",
"title": "",
"versionCode": "",
"webAppId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId")
.setHeader("content-type", "application/json")
.setBody("{\n \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\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 \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId")
.header("content-type", "application/json")
.body("{\n \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\n}")
.asString();
const data = JSON.stringify({
displayMode: '',
icons: [
{
imageData: ''
}
],
isPublished: false,
startUrl: '',
title: '',
versionCode: '',
webAppId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId',
headers: {'content-type': 'application/json'},
data: {
displayMode: '',
icons: [{imageData: ''}],
isPublished: false,
startUrl: '',
title: '',
versionCode: '',
webAppId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"displayMode":"","icons":[{"imageData":""}],"isPublished":false,"startUrl":"","title":"","versionCode":"","webAppId":""}'
};
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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "displayMode": "",\n "icons": [\n {\n "imageData": ""\n }\n ],\n "isPublished": false,\n "startUrl": "",\n "title": "",\n "versionCode": "",\n "webAppId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId',
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({
displayMode: '',
icons: [{imageData: ''}],
isPublished: false,
startUrl: '',
title: '',
versionCode: '',
webAppId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId',
headers: {'content-type': 'application/json'},
body: {
displayMode: '',
icons: [{imageData: ''}],
isPublished: false,
startUrl: '',
title: '',
versionCode: '',
webAppId: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
displayMode: '',
icons: [
{
imageData: ''
}
],
isPublished: false,
startUrl: '',
title: '',
versionCode: '',
webAppId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId',
headers: {'content-type': 'application/json'},
data: {
displayMode: '',
icons: [{imageData: ''}],
isPublished: false,
startUrl: '',
title: '',
versionCode: '',
webAppId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"displayMode":"","icons":[{"imageData":""}],"isPublished":false,"startUrl":"","title":"","versionCode":"","webAppId":""}'
};
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 = @{ @"displayMode": @"",
@"icons": @[ @{ @"imageData": @"" } ],
@"isPublished": @NO,
@"startUrl": @"",
@"title": @"",
@"versionCode": @"",
@"webAppId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'displayMode' => '',
'icons' => [
[
'imageData' => ''
]
],
'isPublished' => null,
'startUrl' => '',
'title' => '',
'versionCode' => '',
'webAppId' => ''
]),
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('PUT', '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId', [
'body' => '{
"displayMode": "",
"icons": [
{
"imageData": ""
}
],
"isPublished": false,
"startUrl": "",
"title": "",
"versionCode": "",
"webAppId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'displayMode' => '',
'icons' => [
[
'imageData' => ''
]
],
'isPublished' => null,
'startUrl' => '',
'title' => '',
'versionCode' => '',
'webAppId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'displayMode' => '',
'icons' => [
[
'imageData' => ''
]
],
'isPublished' => null,
'startUrl' => '',
'title' => '',
'versionCode' => '',
'webAppId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId');
$request->setRequestMethod('PUT');
$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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"displayMode": "",
"icons": [
{
"imageData": ""
}
],
"isPublished": false,
"startUrl": "",
"title": "",
"versionCode": "",
"webAppId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"displayMode": "",
"icons": [
{
"imageData": ""
}
],
"isPublished": false,
"startUrl": "",
"title": "",
"versionCode": "",
"webAppId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId"
payload = {
"displayMode": "",
"icons": [{ "imageData": "" }],
"isPublished": False,
"startUrl": "",
"title": "",
"versionCode": "",
"webAppId": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId"
payload <- "{\n \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId') do |req|
req.body = "{\n \"displayMode\": \"\",\n \"icons\": [\n {\n \"imageData\": \"\"\n }\n ],\n \"isPublished\": false,\n \"startUrl\": \"\",\n \"title\": \"\",\n \"versionCode\": \"\",\n \"webAppId\": \"\"\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}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId";
let payload = json!({
"displayMode": "",
"icons": (json!({"imageData": ""})),
"isPublished": false,
"startUrl": "",
"title": "",
"versionCode": "",
"webAppId": ""
});
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("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId \
--header 'content-type: application/json' \
--data '{
"displayMode": "",
"icons": [
{
"imageData": ""
}
],
"isPublished": false,
"startUrl": "",
"title": "",
"versionCode": "",
"webAppId": ""
}'
echo '{
"displayMode": "",
"icons": [
{
"imageData": ""
}
],
"isPublished": false,
"startUrl": "",
"title": "",
"versionCode": "",
"webAppId": ""
}' | \
http PUT {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "displayMode": "",\n "icons": [\n {\n "imageData": ""\n }\n ],\n "isPublished": false,\n "startUrl": "",\n "title": "",\n "versionCode": "",\n "webAppId": ""\n}' \
--output-document \
- {{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"displayMode": "",
"icons": [["imageData": ""]],
"isPublished": false,
"startUrl": "",
"title": "",
"versionCode": "",
"webAppId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/androidenterprise/v1/enterprises/:enterpriseId/webApps/:webAppId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()