⚠️Draft Content
Storyblok
Search Storyblok's Documentation
  1. Retrieve One Asset

Management API

Retrieve One Asset

Returns a single asset object by providing a specific numeric id.

https://mapi.storyblok.com/v1/spaces/:space_id/assets/:asset_id

Path Parameters

  • :space_id

    required number

    Numeric ID of a space

  • :asset_id

    required string

    Numeric id of an asset

Response Properties

  • asset

    The Asset Object

    A single asset object

    • id

      number

      The numeric ID

    • filename

      string

      Full path of the asset, including the file name

    • space_id

      number

      Space ID in which the asset is connected

    • created_at

      string

      Creation date (Format: yyyy-MM-dd'T'HH:mm:ssZ)

    • updated_at

      string

      Latest update date (Format: yyyy-MM-dd'T'HH:mm:ssZ)

    • file

      object or null

      Represents a File object when uploading an asset. Returns null when retrieving asset details.

    • asset_folder_id

      number

      Id of the folder containing this asset

    • deleted_at

      string

      Deleted date (Format: YYYY-mm-dd HH:MM)

    • short_filename

      string

      The file name of the asset

    • content_type

      string

      The MIME type of the asset

    • content_length

      number

      The content length in bytes

    • alt

      string

      Alt text for the asset (default language)

    • copyright

      string

      Copyright text for the asset (default language)

    • title

      string

      Title of the asset (default language)

    • source

      string

      Source text of the asset (default language)

    • expire_at

      string

      Date when the asset should expire (Format: yyyy-MM-dd'T'HH:mm:ssZ)

    • focus

      string

      The focus point of the image (Only for image assets)

    • internal_tag_ids

      string[]

      List of ids of the tags assigned to the asset

    • internal_tags_list

      object[]

      List of objects containing the details of tags used for the asset

      • id

        number

        Id of the tag

      • name

        string

        Name of the tag

    • locked

      boolean

      Defines if the asset is locked for any changes

    • publish_at

      string

      Date when the asset should be made public (Format: yyyy-MM-dd'T'HH:mm:ssZ)

    • is_private

      boolean

      Defines if the asset should be inaccessable to the public

    • meta_data

      object

      Includes custom metadata fields for an asset along with the default ones. It also contains the translations of the same if added in the format metafield__i18n__langcode . This field should be used for updating the metadata including the default ones. (alt, title, source, copyright)

Request
curl "https://mapi.storyblok.com/v1/spaces/606/assets/14" \
  -X GET \
  -H "Authorization: YOUR_OAUTH_TOKEN" \
  -H "Content-Type: application/json"
Request
// Using the Universal JavaScript Client:
// https://github.com/storyblok/storyblok-js-client
Storyblok.get('/spaces/606/assets/14', {})
  .then(response => {
    console.log(response)
  }).catch(error => { 
    console.log(error)
  })
Request
$client = new \Storyblok\ManagementClient('YOUR_OAUTH_TOKEN');

$client->get('/spaces/606/assets/14')->getBody();
Request
require 'storyblok'
client = Storyblok::Client.new(oauth_token: 'YOUR_OAUTH_TOKEN')

client.false('/spaces/606/assets/14')
Request
HttpResponse<String> response = Unirest.get("https://mapi.storyblok.com/v1/spaces/606/assets/14")
  .header("Authorization", "YOUR_OAUTH_TOKEN")
  .asString();
Request
var client = new RestClient("https://mapi.storyblok.com/v1/spaces/606/assets/14");
var request = new RestRequest(Method.GET);

request.AddHeader("Authorization", "YOUR_OAUTH_TOKEN");
IRestResponse response = client.Execute(request);
Request
import Foundation

let headers = [
  "Content-Type": "application/json",
  "Authorization": "YOUR_OAUTH_TOKEN"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://mapi.storyblok.com/v1/spaces/606/assets/14")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0)
request.method = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
Request
import requests

url = "https://mapi.storyblok.com/v1/spaces/606/assets/14"

querystring = {}

payload = ""
headers = {
  'Content-Type': "application/json",
  'Authorization': "YOUR_OAUTH_TOKEN"
}

response = requests.request("GET", url, data=payload, headers=headers, params=querystring)

print(response.text)

An asset object is returned as a response.

Example Response
{
    "id": 21149738,
    "filename": "https://s3.amazonaws.com/a.storyblok.com/f/325428/x/702eb75167/img_3180.MOV",
    "space_id": 325428,
    "created_at": "2025-02-27T11:26:59.518Z",
    "updated_at": "2025-02-27T11:27:26.097Z",
    "file": null,
    "asset_folder_id": null,
    "deleted_at": null,
    "short_filename": "img_3180.MOV",
    "content_length": 14448082,
    "content_type": "video/quicktime",
    "permanently_deleted": false,
    "alt": "",
    "copyright": "",
    "title": "",
    "focus": "",
    "ext_id": null,
    "expire_at": null,
    "source": "",
    "internal_tag_ids": [],
    "locked": false,
    "is_private": false,
    "publish_at": null,
    "meta_data": {},
    "internal_tags_list": []
}