Serverless Functions
Get function metadata
GET
/
compute
/
functions
/
{functionId}
Get function metadata
curl --request GET \
--url https://api.mobilerun.ai/v1/compute/functions/{functionId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mobilerun.ai/v1/compute/functions/{functionId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mobilerun.ai/v1/compute/functions/{functionId}', 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.mobilerun.ai/v1/compute/functions/{functionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.mobilerun.ai/v1/compute/functions/{functionId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.mobilerun.ai/v1/compute/functions/{functionId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mobilerun.ai/v1/compute/functions/{functionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"version": 2,
"description": "<string>",
"sha256": "<string>",
"sizeBytes": 123,
"status": "pending_inspection",
"manifest": {
"hosts": [],
"credentials": [],
"scopes": []
},
"inputSchema": {},
"outputSchema": {},
"outputKind": "<string>",
"datasetKey": "<string>",
"inspectError": {
"code": "<string>",
"message": "<string>",
"errors": [
{
"code": "<string>",
"message": "<string>",
"line": 123,
"repair": {
"action": "<string>",
"hint": "<string>"
}
}
]
},
"runtimeVersion": "<string>",
"createdBy": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"versionCount": 2
}
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"retryAfterSeconds": 123,
"traceId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"retryAfterSeconds": 123,
"traceId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"retryAfterSeconds": 123,
"traceId": "<string>"
}{
"code": "function_not_found",
"message": "<string>",
"traceId": "<string>",
"retryAfterSeconds": 123
}{
"code": "function_published",
"message": "<string>",
"traceId": "<string>",
"retryAfterSeconds": 123
}{
"code": "function_too_large",
"message": "<string>",
"traceId": "<string>",
"retryAfterSeconds": 123
}{
"code": "function_integrity_error",
"message": "<string>",
"traceId": "<string>",
"retryAfterSeconds": 123
}{
"code": "storage_unavailable",
"message": "<string>",
"traceId": "<string>",
"retryAfterSeconds": 123
}Was this page helpful?
⌘I
Get function metadata
curl --request GET \
--url https://api.mobilerun.ai/v1/compute/functions/{functionId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mobilerun.ai/v1/compute/functions/{functionId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mobilerun.ai/v1/compute/functions/{functionId}', 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.mobilerun.ai/v1/compute/functions/{functionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.mobilerun.ai/v1/compute/functions/{functionId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.mobilerun.ai/v1/compute/functions/{functionId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mobilerun.ai/v1/compute/functions/{functionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"version": 2,
"description": "<string>",
"sha256": "<string>",
"sizeBytes": 123,
"status": "pending_inspection",
"manifest": {
"hosts": [],
"credentials": [],
"scopes": []
},
"inputSchema": {},
"outputSchema": {},
"outputKind": "<string>",
"datasetKey": "<string>",
"inspectError": {
"code": "<string>",
"message": "<string>",
"errors": [
{
"code": "<string>",
"message": "<string>",
"line": 123,
"repair": {
"action": "<string>",
"hint": "<string>"
}
}
]
},
"runtimeVersion": "<string>",
"createdBy": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"versionCount": 2
}
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"retryAfterSeconds": 123,
"traceId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"retryAfterSeconds": 123,
"traceId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>",
"retryAfterSeconds": 123,
"traceId": "<string>"
}{
"code": "function_not_found",
"message": "<string>",
"traceId": "<string>",
"retryAfterSeconds": 123
}{
"code": "function_published",
"message": "<string>",
"traceId": "<string>",
"retryAfterSeconds": 123
}{
"code": "function_too_large",
"message": "<string>",
"traceId": "<string>",
"retryAfterSeconds": 123
}{
"code": "function_integrity_error",
"message": "<string>",
"traceId": "<string>",
"retryAfterSeconds": 123
}{
"code": "storage_unavailable",
"message": "<string>",
"traceId": "<string>",
"retryAfterSeconds": 123
}