Skip to main content
GET
/
v1
/
objects
/
{id}
JavaScript
import Runloop from '@runloop/api-client';

const client = new Runloop({
  bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});

const objectView = await client.objects.retrieve('id');

console.log(objectView.id);
import os
from runloop_api_client import Runloop

client = Runloop(
bearer_token=os.environ.get("RUNLOOP_API_KEY"), # This is the default and can be omitted
)
object_view = client.objects.retrieve(
"id",
)
print(object_view.id)
curl --request GET \
--url https://api.runloop.ai/v1/objects/{id} \
--header 'Authorization: Bearer <token>'
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.runloop.ai/v1/objects/{id}",
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.runloop.ai/v1/objects/{id}"

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.runloop.ai/v1/objects/{id}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.runloop.ai/v1/objects/{id}")

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
{
  "id": "<string>",
  "name": "<string>",
  "create_time_ms": 123,
  "size_bytes": 123,
  "delete_after_time_ms": 123,
  "metadata": {},
  "upload_url": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The unique identifier of the Object to retrieve.

Response

Object retrieved successfully.

An Object represents a stored data entity with metadata.

id
string
required

The unique identifier of the Object.

name
string
required

The name of the Object.

state
enum<string>
required

The current state of the Object.

Available options:
UPLOADING,
READ_ONLY,
DELETED,
ERROR
content_type
enum<string>
required

The content type of the Object.

Available options:
unspecified,
text,
binary,
gzip,
tar,
tgz
create_time_ms
integer<int64>
required

The creation time of the Object in milliseconds since epoch.

size_bytes
integer<int64> | null

The size of the Object content in bytes (null until uploaded).

delete_after_time_ms
integer<int64> | null

The time after which the Object will be deleted in milliseconds since epoch.

metadata
object | null

User defined metadata to attach to the Object for organization.

upload_url
string | null

Presigned URL for uploading content to S3 (only present on create).