Releases
Get Current
Retrieve the current release.
GET
/
releases
/
current
curl (Linux)
curl \
--unix-socket /run/miru/miru.sock \
--request GET \
--url http://localhost/v0.2/releases/current$api = Get-Content -Raw "$env:ProgramData\Miru\device-api\device-api.json" | ConvertFrom-Json; `
Invoke-RestMethod -Method Get `
-Uri "http://127.0.0.1:$($api.port)/v0.2/releases/current" `
-Headers @{ Authorization = "Bearer $($api.token)" }from miru_device_sdk import Miru
client = Miru()
release = client.releases.current()
print(release.id)const options = {method: 'GET'};
fetch('http://localhost/v0.2/releases/current', 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 => "http://localhost/v0.2/releases/current",
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 := "http://localhost/v0.2/releases/current"
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("http://localhost/v0.2/releases/current")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/v0.2/releases/current")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"object": "release",
"id": "rls_123",
"version": "v1.0.0",
"git_commit_id": "git_commit_123",
"created_at": "2024-01-01T00:00:00Z"
}Response
200 - application/json
Successfully retrieved the current release.
The object type, which is always release.
Available options:
release Example:
"release"
ID of the release.
Example:
"rls_123"
The version of the release.
Example:
"v1.0.0"
The ID of the git commit associated with this release.
Example:
"git_commit_123"
Timestamp of when the release was created.
Example:
"2024-01-01T00:00:00Z"
⌘I
curl (Linux)
curl \
--unix-socket /run/miru/miru.sock \
--request GET \
--url http://localhost/v0.2/releases/current$api = Get-Content -Raw "$env:ProgramData\Miru\device-api\device-api.json" | ConvertFrom-Json; `
Invoke-RestMethod -Method Get `
-Uri "http://127.0.0.1:$($api.port)/v0.2/releases/current" `
-Headers @{ Authorization = "Bearer $($api.token)" }from miru_device_sdk import Miru
client = Miru()
release = client.releases.current()
print(release.id)const options = {method: 'GET'};
fetch('http://localhost/v0.2/releases/current', 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 => "http://localhost/v0.2/releases/current",
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 := "http://localhost/v0.2/releases/current"
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("http://localhost/v0.2/releases/current")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/v0.2/releases/current")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"object": "release",
"id": "rls_123",
"version": "v1.0.0",
"git_commit_id": "git_commit_123",
"created_at": "2024-01-01T00:00:00Z"
}
