Assets API

Assets

https://apis.roblox.com/assets

Get Asset

GET /v1/assets

Parameter

assetId object
Path
Diperlukan
readMask string

Permintaan

Get Asset without readMask

curl --location --request GET 'https://apis.roblox.com/assets/v1/assets/{assetId}' \
--header 'x-api-key: {apiKey}'
Get Asset with readMask

curl --location --request GET 'https://apis.roblox.com/assets/v1/assets/{assetId}?readMask={read_mask}' \
--header 'x-api-key: {apiKey}'

Respons

Izin yang Diperlukan

  • Baca
  • asset:read

Batas

Per Kunci API: 60 permintaan setiap 60 detik per Alamat IP

Create Asset

POST /v1/assets

Parameter

request object
FormData
Diperlukan
fileContent string
FormData
Diperlukan

Permintaan

Create Asset

curl --location --request POST 'https://apis.roblox.com/assets/v1/assets' \
--header 'x-api-key: {apiKey}' \
--form 'request="{
\"assetType\": \"Model\",
\"displayName\": \"Name\",
\"description\": \"This is a description\",
\"creationContext\": {
\"creator\": {
\"userId\": \"${userId}\"
}
}
}"' \
--form 'fileContent=@"/filepath/model.fbx";type=model/fbx'

Respons

200 - OK
Returns the Operation ID for checking the creation status.
Memberikan nilai object
path string
metadata object
done boolean
error object
response object

Izin yang Diperlukan

  • Baca
  • Tulis
  • asset:read
  • asset:write

Batas

Per Kunci API: 60 permintaan setiap 60 detik per Alamat IP

Update Asset

PATCH /v1/assets/{assetId}

Parameter

request object
FormData
Diperlukan
fileContent string
FormData
updateMask string

Permintaan

Update Content Only and Create a New Version

curl --location --request PATCH 'https://apis.roblox.com/assets/v1/assets/{assetId}' \
--header 'x-api-key: {apiKey}' \
--form 'request="{\"assetId\": {assetId} }"' \
--form 'fileContent="@\"{file-path}\""'
Update Content and Metadata

Update a List of Previews

curl --location --request PATCH 'https://apis.roblox.com/assets/v1/assets/{assetId}?updateMask=previews' \
--header 'x-api-key: {apiKey}' \
--form 'request="{\"assetId\": \"{assetId}\", \"previews\": [{\"asset\": \"assets/123\", \"altText\": \"Your alt text.\"}]}"'
Update Social Links

Respons

200 - OK
Returns the Operation ID for checking the update status / Returns the updated metadata fields.
Memberikan nilai object
application/json

{\"previews\": [\n {\"asset\": \"assets/123\", \"altText\": \"preview 1\"},\n {\"asset\": \"assets/456\", \"altText\": \"preview 2\"}\n]}
path string
metadata object
done boolean
error object
response object

Izin yang Diperlukan

  • Baca
  • Tulis
  • asset:read
  • asset:write

Batas

Per Kunci API: 60 permintaan setiap 60 detik per Alamat IP

Get Asset Version

GET /v1/assets/{assetId}/versions/{versionNumber}

Parameter

assetId string
Path
Diperlukan
versionNumber string
Path
Diperlukan

Permintaan

Get Asset Version

curl --location 'https://apis.roblox.com/assets/v1/assets/{assetId}/versions/{versionNumber}' \
--header 'x-api-key: {apiKey}'

Respons

Izin yang Diperlukan

  • Baca
  • asset:read

Batas

Per Kunci API: 60 permintaan setiap 60 detik per Alamat IP

List Asset Versions

GET /assets/v1/assets/{assetId}/versions

Parameter

assetId string
Path
Diperlukan
maxPageSize number
pageToken string

Permintaan

List Asset Versions

curl --location 'https://apis.roblox.com/assets/v1/assets/{assetid}/versions?pageToken=&maxPageSize=' \
--header 'x-api-key: {apiKey}'

Respons

Izin yang Diperlukan

  • Baca
  • asset:read

Batas

Per Kunci API: 60 permintaan setiap 60 detik per Alamat IP

Rollback Asset Version

POST /assets/v1/assets/{assetId}/versions:rollback

Parameter

assetId string
Path
Diperlukan
assetVersion string
FormData
Diperlukan

Permintaan

Rollback Asset Versions

curl --location 'https://apis.roblox.com/assets/v1/assets/{assetid}/versions:rollback' \
--header 'x-api-key: {apiKey}' \
--header 'Content-Type: application/json' \
--data '{\"assetVersion\":\"assets/{assetId}/versions/{versionNumber}\"}'

Respons

Izin yang Diperlukan

  • Baca
  • Tulis
  • asset:read
  • asset:write

Batas

Per Kunci API: 60 permintaan setiap 60 detik per Alamat IP

Get Operation

GET /v1/operations/{operationId}

Permintaan

Get Operation

curl --location 'https://apis.roblox.com/assets/v1/operations/{operationId}' \
--header 'x-api-key: {apiKey}'

Respons

200 - OK
Memberikan nilai object
path string
metadata object
done boolean
error object
response object

Izin yang Diperlukan

  • Baca
  • asset:read

Batas

Per Kunci API: 60 permintaan setiap 60 detik per Alamat IP

Objek

Objek berikut mendeskripsikan muatan yang diterima atau diberikan. Lihat masing-masing endpoint untuk mengetahui informasi selengkapnya tentang waktu penggunaan objek ini.

Any

Atribut

@type string

Asset

Atribut

assetType string
assetId number
creationContext object
description string
displayName string
path string
revisionId string
revisionCreateTime string
moderationResult object
icon string
previews array<object>
socialLink object

CreationContext

Atribut

creator object
Diperlukan
expectedPrice number

Creator

Atribut

userId number
groupId number

ModerationResult

Atribut

moderationState string

Operation

Atribut

path string
metadata object
done boolean
error object
response object

Preview

Atribut

asset string
altText string

Atribut

title string
uri string

Status

Atribut

code number
message string
details array<object>