Get main files by stone ID
curl --request GET \
--url https://api.diadna.cloud/diamond/getMainFilesByStoneId \
--header 'secret-key: <api-key>'import requests
url = "https://api.diadna.cloud/diamond/getMainFilesByStoneId"
headers = {"secret-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'secret-key': '<api-key>'}};
fetch('https://api.diadna.cloud/diamond/getMainFilesByStoneId', 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.diadna.cloud/diamond/getMainFilesByStoneId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"secret-key: <api-key>"
],
]);
$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.diadna.cloud/diamond/getMainFilesByStoneId"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("secret-key", "<api-key>")
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.diadna.cloud/diamond/getMainFilesByStoneId")
.header("secret-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.diadna.cloud/diamond/getMainFilesByStoneId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["secret-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"Table": [
{
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"name": "<string>",
"base": "<string>",
"scan": "<string>",
"stage": "<string>",
"points": "<string>",
"companyId": "<string>",
"created_by": "<string>",
"updated_by": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"deleted_by": "<string>",
"part": "<string>"
}
]
}Endpoints
Get Main Files
Fetches the main files associated with a specific stone ID and stage.
GET
/
diamond
/
getMainFilesByStoneId
Get main files by stone ID
curl --request GET \
--url https://api.diadna.cloud/diamond/getMainFilesByStoneId \
--header 'secret-key: <api-key>'import requests
url = "https://api.diadna.cloud/diamond/getMainFilesByStoneId"
headers = {"secret-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'secret-key': '<api-key>'}};
fetch('https://api.diadna.cloud/diamond/getMainFilesByStoneId', 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.diadna.cloud/diamond/getMainFilesByStoneId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"secret-key: <api-key>"
],
]);
$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.diadna.cloud/diamond/getMainFilesByStoneId"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("secret-key", "<api-key>")
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.diadna.cloud/diamond/getMainFilesByStoneId")
.header("secret-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.diadna.cloud/diamond/getMainFilesByStoneId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["secret-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"Table": [
{
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"name": "<string>",
"base": "<string>",
"scan": "<string>",
"stage": "<string>",
"points": "<string>",
"companyId": "<string>",
"created_by": "<string>",
"updated_by": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"deleted_by": "<string>",
"part": "<string>"
}
]
}Authorizations
Query Parameters
The stone ID (e.g., 12659-229)
Stage of the stone
Available options:
ROUGH, POLISH, AFTERSAWING Response
200 - application/json
Main files fetched successfully
Show child attributes
Show child attributes