curl --request POST \
--url https://managexrapi.com/v1/files/ \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
[
{
"url": "https://my-bucket-name.s3.amazonaws.com/main_assets_all.bundle",
"name": "main_assets_all.bundle",
"size": 1204975930,
"md5": "7ah69cMtXyaz5OfsCRtOjQ==",
"description": "Content bundle for training app",
"libraryDirectoryPath": "/com.managexr.demoTrainingApp/"
},
{
"url": "https://my-bucket-name.s3.amazonaws.com/module2-assets.bundle",
"name": "module2-assets.bundle",
"size": 1204975930,
"md5": "7ah69cMtXyaz5OfsCRtOjQ==",
"description": "Assets for module 2 of training app",
"libraryDirectoryPath": "/com.managexr.demoTrainingApp/"
}
]
'import requests
url = "https://managexrapi.com/v1/files/"
payload = [
{
"url": "https://my-bucket-name.s3.amazonaws.com/main_assets_all.bundle",
"name": "main_assets_all.bundle",
"size": 1204975930,
"md5": "7ah69cMtXyaz5OfsCRtOjQ==",
"description": "Content bundle for training app",
"libraryDirectoryPath": "/com.managexr.demoTrainingApp/"
},
{
"url": "https://my-bucket-name.s3.amazonaws.com/module2-assets.bundle",
"name": "module2-assets.bundle",
"size": 1204975930,
"md5": "7ah69cMtXyaz5OfsCRtOjQ==",
"description": "Assets for module 2 of training app",
"libraryDirectoryPath": "/com.managexr.demoTrainingApp/"
}
]
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
url: 'https://my-bucket-name.s3.amazonaws.com/main_assets_all.bundle',
name: 'main_assets_all.bundle',
size: 1204975930,
md5: '7ah69cMtXyaz5OfsCRtOjQ==',
description: 'Content bundle for training app',
libraryDirectoryPath: '/com.managexr.demoTrainingApp/'
},
{
url: 'https://my-bucket-name.s3.amazonaws.com/module2-assets.bundle',
name: 'module2-assets.bundle',
size: 1204975930,
md5: '7ah69cMtXyaz5OfsCRtOjQ==',
description: 'Assets for module 2 of training app',
libraryDirectoryPath: '/com.managexr.demoTrainingApp/'
}
])
};
fetch('https://managexrapi.com/v1/files/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://managexrapi.com/v1/files/",
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([
[
'url' => 'https://my-bucket-name.s3.amazonaws.com/main_assets_all.bundle',
'name' => 'main_assets_all.bundle',
'size' => 1204975930,
'md5' => '7ah69cMtXyaz5OfsCRtOjQ==',
'description' => 'Content bundle for training app',
'libraryDirectoryPath' => '/com.managexr.demoTrainingApp/'
],
[
'url' => 'https://my-bucket-name.s3.amazonaws.com/module2-assets.bundle',
'name' => 'module2-assets.bundle',
'size' => 1204975930,
'md5' => '7ah69cMtXyaz5OfsCRtOjQ==',
'description' => 'Assets for module 2 of training app',
'libraryDirectoryPath' => '/com.managexr.demoTrainingApp/'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://managexrapi.com/v1/files/"
payload := strings.NewReader("[\n {\n \"url\": \"https://my-bucket-name.s3.amazonaws.com/main_assets_all.bundle\",\n \"name\": \"main_assets_all.bundle\",\n \"size\": 1204975930,\n \"md5\": \"7ah69cMtXyaz5OfsCRtOjQ==\",\n \"description\": \"Content bundle for training app\",\n \"libraryDirectoryPath\": \"/com.managexr.demoTrainingApp/\"\n },\n {\n \"url\": \"https://my-bucket-name.s3.amazonaws.com/module2-assets.bundle\",\n \"name\": \"module2-assets.bundle\",\n \"size\": 1204975930,\n \"md5\": \"7ah69cMtXyaz5OfsCRtOjQ==\",\n \"description\": \"Assets for module 2 of training app\",\n \"libraryDirectoryPath\": \"/com.managexr.demoTrainingApp/\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://managexrapi.com/v1/files/")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("[\n {\n \"url\": \"https://my-bucket-name.s3.amazonaws.com/main_assets_all.bundle\",\n \"name\": \"main_assets_all.bundle\",\n \"size\": 1204975930,\n \"md5\": \"7ah69cMtXyaz5OfsCRtOjQ==\",\n \"description\": \"Content bundle for training app\",\n \"libraryDirectoryPath\": \"/com.managexr.demoTrainingApp/\"\n },\n {\n \"url\": \"https://my-bucket-name.s3.amazonaws.com/module2-assets.bundle\",\n \"name\": \"module2-assets.bundle\",\n \"size\": 1204975930,\n \"md5\": \"7ah69cMtXyaz5OfsCRtOjQ==\",\n \"description\": \"Assets for module 2 of training app\",\n \"libraryDirectoryPath\": \"/com.managexr.demoTrainingApp/\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://managexrapi.com/v1/files/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"url\": \"https://my-bucket-name.s3.amazonaws.com/main_assets_all.bundle\",\n \"name\": \"main_assets_all.bundle\",\n \"size\": 1204975930,\n \"md5\": \"7ah69cMtXyaz5OfsCRtOjQ==\",\n \"description\": \"Content bundle for training app\",\n \"libraryDirectoryPath\": \"/com.managexr.demoTrainingApp/\"\n },\n {\n \"url\": \"https://my-bucket-name.s3.amazonaws.com/module2-assets.bundle\",\n \"name\": \"module2-assets.bundle\",\n \"size\": 1204975930,\n \"md5\": \"7ah69cMtXyaz5OfsCRtOjQ==\",\n \"description\": \"Assets for module 2 of training app\",\n \"libraryDirectoryPath\": \"/com.managexr.demoTrainingApp/\"\n }\n]"
response = http.request(request)
puts response.read_bodyCreate Files
Create self-hosted files in your ManageXR Files library.
Once created, you can use Edit App Version or Edit Configuration to deploy the file with an app version or on a configuration, respectively.
To create files hosted on ManageXR’s servers, use the ManageXR CLI
curl --request POST \
--url https://managexrapi.com/v1/files/ \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
[
{
"url": "https://my-bucket-name.s3.amazonaws.com/main_assets_all.bundle",
"name": "main_assets_all.bundle",
"size": 1204975930,
"md5": "7ah69cMtXyaz5OfsCRtOjQ==",
"description": "Content bundle for training app",
"libraryDirectoryPath": "/com.managexr.demoTrainingApp/"
},
{
"url": "https://my-bucket-name.s3.amazonaws.com/module2-assets.bundle",
"name": "module2-assets.bundle",
"size": 1204975930,
"md5": "7ah69cMtXyaz5OfsCRtOjQ==",
"description": "Assets for module 2 of training app",
"libraryDirectoryPath": "/com.managexr.demoTrainingApp/"
}
]
'import requests
url = "https://managexrapi.com/v1/files/"
payload = [
{
"url": "https://my-bucket-name.s3.amazonaws.com/main_assets_all.bundle",
"name": "main_assets_all.bundle",
"size": 1204975930,
"md5": "7ah69cMtXyaz5OfsCRtOjQ==",
"description": "Content bundle for training app",
"libraryDirectoryPath": "/com.managexr.demoTrainingApp/"
},
{
"url": "https://my-bucket-name.s3.amazonaws.com/module2-assets.bundle",
"name": "module2-assets.bundle",
"size": 1204975930,
"md5": "7ah69cMtXyaz5OfsCRtOjQ==",
"description": "Assets for module 2 of training app",
"libraryDirectoryPath": "/com.managexr.demoTrainingApp/"
}
]
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
url: 'https://my-bucket-name.s3.amazonaws.com/main_assets_all.bundle',
name: 'main_assets_all.bundle',
size: 1204975930,
md5: '7ah69cMtXyaz5OfsCRtOjQ==',
description: 'Content bundle for training app',
libraryDirectoryPath: '/com.managexr.demoTrainingApp/'
},
{
url: 'https://my-bucket-name.s3.amazonaws.com/module2-assets.bundle',
name: 'module2-assets.bundle',
size: 1204975930,
md5: '7ah69cMtXyaz5OfsCRtOjQ==',
description: 'Assets for module 2 of training app',
libraryDirectoryPath: '/com.managexr.demoTrainingApp/'
}
])
};
fetch('https://managexrapi.com/v1/files/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://managexrapi.com/v1/files/",
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([
[
'url' => 'https://my-bucket-name.s3.amazonaws.com/main_assets_all.bundle',
'name' => 'main_assets_all.bundle',
'size' => 1204975930,
'md5' => '7ah69cMtXyaz5OfsCRtOjQ==',
'description' => 'Content bundle for training app',
'libraryDirectoryPath' => '/com.managexr.demoTrainingApp/'
],
[
'url' => 'https://my-bucket-name.s3.amazonaws.com/module2-assets.bundle',
'name' => 'module2-assets.bundle',
'size' => 1204975930,
'md5' => '7ah69cMtXyaz5OfsCRtOjQ==',
'description' => 'Assets for module 2 of training app',
'libraryDirectoryPath' => '/com.managexr.demoTrainingApp/'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://managexrapi.com/v1/files/"
payload := strings.NewReader("[\n {\n \"url\": \"https://my-bucket-name.s3.amazonaws.com/main_assets_all.bundle\",\n \"name\": \"main_assets_all.bundle\",\n \"size\": 1204975930,\n \"md5\": \"7ah69cMtXyaz5OfsCRtOjQ==\",\n \"description\": \"Content bundle for training app\",\n \"libraryDirectoryPath\": \"/com.managexr.demoTrainingApp/\"\n },\n {\n \"url\": \"https://my-bucket-name.s3.amazonaws.com/module2-assets.bundle\",\n \"name\": \"module2-assets.bundle\",\n \"size\": 1204975930,\n \"md5\": \"7ah69cMtXyaz5OfsCRtOjQ==\",\n \"description\": \"Assets for module 2 of training app\",\n \"libraryDirectoryPath\": \"/com.managexr.demoTrainingApp/\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://managexrapi.com/v1/files/")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("[\n {\n \"url\": \"https://my-bucket-name.s3.amazonaws.com/main_assets_all.bundle\",\n \"name\": \"main_assets_all.bundle\",\n \"size\": 1204975930,\n \"md5\": \"7ah69cMtXyaz5OfsCRtOjQ==\",\n \"description\": \"Content bundle for training app\",\n \"libraryDirectoryPath\": \"/com.managexr.demoTrainingApp/\"\n },\n {\n \"url\": \"https://my-bucket-name.s3.amazonaws.com/module2-assets.bundle\",\n \"name\": \"module2-assets.bundle\",\n \"size\": 1204975930,\n \"md5\": \"7ah69cMtXyaz5OfsCRtOjQ==\",\n \"description\": \"Assets for module 2 of training app\",\n \"libraryDirectoryPath\": \"/com.managexr.demoTrainingApp/\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://managexrapi.com/v1/files/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"url\": \"https://my-bucket-name.s3.amazonaws.com/main_assets_all.bundle\",\n \"name\": \"main_assets_all.bundle\",\n \"size\": 1204975930,\n \"md5\": \"7ah69cMtXyaz5OfsCRtOjQ==\",\n \"description\": \"Content bundle for training app\",\n \"libraryDirectoryPath\": \"/com.managexr.demoTrainingApp/\"\n },\n {\n \"url\": \"https://my-bucket-name.s3.amazonaws.com/module2-assets.bundle\",\n \"name\": \"module2-assets.bundle\",\n \"size\": 1204975930,\n \"md5\": \"7ah69cMtXyaz5OfsCRtOjQ==\",\n \"description\": \"Assets for module 2 of training app\",\n \"libraryDirectoryPath\": \"/com.managexr.demoTrainingApp/\"\n }\n]"
response = http.request(request)
puts response.read_bodyAuthorizations
API key based authentication where is the Base64 encoding of API_KEY_ID:API_KEY_SECRET
- Username: The API Key ID.
- Password: The API Key Secret.
Query Parameters
Unique identifier of the organization. This parameter is only necessary when using multi-organization API keys.
Defaults to the organizationId associated with the API key.
Body
Publicly accessible direct URL to download the file. ManageXR will use this url to download the file to devices.
"https://my-bucket-name.s3.amazonaws.com/main_assets_all.bundle"
Name of the file, including extension
"main_assets_all.bundle"
Size of the file in bytes
1204975930
MD5 hash of the file for integrity verification
"7ah69cMtXyaz5OfsCRtOjQ=="
Optional description of the file's contents or purpose
"Content bundle for training app"
Path to the file in the Library > Files section of ManageXR. A libraryDirectoryPath of "/" indicates that it is at the root of the Files library.
"/"