cURL
curl --request GET \
--url https://api.usemoonshine.com/index-resourcesimport requests
url = "https://api.usemoonshine.com/index-resources"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.usemoonshine.com/index-resources', 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://api.usemoonshine.com/index-resources",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.usemoonshine.com/index-resources"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.usemoonshine.com/index-resources")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usemoonshine.com/index-resources")
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[
{
"file_name": "<string>",
"file_id": "<string>",
"status": "<string>",
"upload_time": "2023-11-07T05:31:56Z",
"file_type": "<string>",
"is_large": true,
"metadata": {
"fps": 123
},
"src": "<string>"
}
]{
"error": 123,
"message": "<string>"
}Indexes
Get Index Resources
Returns media resources from the system with caching mechanism
GET
/
index-resources
cURL
curl --request GET \
--url https://api.usemoonshine.com/index-resourcesimport requests
url = "https://api.usemoonshine.com/index-resources"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.usemoonshine.com/index-resources', 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://api.usemoonshine.com/index-resources",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.usemoonshine.com/index-resources"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.usemoonshine.com/index-resources")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usemoonshine.com/index-resources")
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[
{
"file_name": "<string>",
"file_id": "<string>",
"status": "<string>",
"upload_time": "2023-11-07T05:31:56Z",
"file_type": "<string>",
"is_large": true,
"metadata": {
"fps": 123
},
"src": "<string>"
}
]{
"error": 123,
"message": "<string>"
}Query Parameters
The user ID to fetch media resources for
User authentication token
Name of the media index
Response
Media groups response
Name of the original file
Unique identifier for the file
Processing status of the file
When the file was uploaded
Type of media file
Whether the file is considered large
Show child attributes
Show child attributes
URL to access the media file
⌘I