List of APIs for Remote Execution Service v1.0
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Authentication
HTTP Authentication, scheme: basic Basic Auth
API Key (Tenant)
- Parameter Name: Tenant, in: header. Name of tenant
Api
Publishes message to be executed on current or remote location.
Code samples
# You can also use wget
curl -X POST /service/remote-execution/messages \
-H 'Content-Type: application/json' \
-H 'api-version: string' \
-H 'Tenant: API_KEY'
POST /service/remote-execution/messages HTTP/1.1
Content-Type: application/json
api-version: string
const inputBody = '{
"content": "string",
"location": "15f20760-76a7-41ee-b509-705d3ffd8eb5",
"url": "string"
}';
const headers = {
'Content-Type':'application/json',
'api-version':'string',
'Tenant':'API_KEY'
};
fetch('/service/remote-execution/messages',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'api-version' => 'string',
'Tenant' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/service/remote-execution/messages', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePostRequest()
{
string url = "/service/remote-execution/messages";
string json = @"{
""content"": ""string"",
""location"": ""15f20760-76a7-41ee-b509-705d3ffd8eb5"",
""url"": ""string""
}";
PublishMessageRequest content = JsonConvert.DeserializeObject(json);
await PostAsync(content, url);
}
/// Performs a POST Request
public async Task PostAsync(PublishMessageRequest content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute POST request
HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
}
/// Serialize an object to Json
private StringContent SerializeObject(PublishMessageRequest content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
URL obj = new URL("/service/remote-execution/messages");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /service/remote-execution/messages
Body parameter
{
"content": "string",
"location": "15f20760-76a7-41ee-b509-705d3ffd8eb5",
"url": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
api-version | query | string | false | none |
api-version | header | string | false | none |
body | body | PublishMessageRequest | true | Represents webhook request. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | None |
Retrieves last processed messages.
Code samples
# You can also use wget
curl -X GET /service/remote-execution/messages \
-H 'api-version: string' \
-H 'Tenant: API_KEY'
GET /service/remote-execution/messages HTTP/1.1
api-version: string
const headers = {
'api-version':'string',
'Tenant':'API_KEY'
};
fetch('/service/remote-execution/messages',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
<?php
require 'vendor/autoload.php';
$headers = array(
'api-version' => 'string',
'Tenant' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/service/remote-execution/messages', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/service/remote-execution/messages";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
URL obj = new URL("/service/remote-execution/messages");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /service/remote-execution/messages
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
count | query | integer(int32) | false | Count of messages to retrieve. |
api-version | query | string | false | none |
api-version | header | string | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | None |
Retrieves available locations.
Code samples
# You can also use wget
curl -X GET /service/remote-execution/locations \
-H 'api-version: string' \
-H 'Tenant: API_KEY'
GET /service/remote-execution/locations HTTP/1.1
api-version: string
const headers = {
'api-version':'string',
'Tenant':'API_KEY'
};
fetch('/service/remote-execution/locations',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
<?php
require 'vendor/autoload.php';
$headers = array(
'api-version' => 'string',
'Tenant' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/service/remote-execution/locations', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/service/remote-execution/locations";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
URL obj = new URL("/service/remote-execution/locations");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /service/remote-execution/locations
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
api-version | query | string | false | none |
api-version | header | string | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | None |
Retrieves status of message, if it was processed or not.
Code samples
# You can also use wget
curl -X GET /service/remote-execution/messages/{id} \
-H 'api-version: string' \
-H 'Tenant: API_KEY'
GET /service/remote-execution/messages/{id} HTTP/1.1
api-version: string
const headers = {
'api-version':'string',
'Tenant':'API_KEY'
};
fetch('/service/remote-execution/messages/{id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
<?php
require 'vendor/autoload.php';
$headers = array(
'api-version' => 'string',
'Tenant' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/service/remote-execution/messages/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/service/remote-execution/messages/{id}";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
URL obj = new URL("/service/remote-execution/messages/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /service/remote-execution/messages/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | trackingId that was retieved after message push. |
api-version | query | string | false | none |
api-version | header | string | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | None |
Schemas
PublishMessageRequest
{
"content": "string",
"location": "15f20760-76a7-41ee-b509-705d3ffd8eb5",
"url": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
content | string¦null | false | none | none |
location | string(uuid)¦null | false | none | none |
url | string | true | none | none |