Assets API

Assets

https://apis.roblox.com/assets

Get Asset

GET /v1/assets

Parametri

assetId Asset
Path
Necessario
readMask string

Richiesta

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}'

Risposta

Permessi Necessari

  • Leggi
  • asset:read

Limiti

Per chiave API: 60 richieste ogni 60 secondi per indirizzo IP

Create Asset

POST /v1/assets

Parametri

request Asset
FormData
Necessario
fileContent string
FormData
Necessario

Richiesta

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'

Risposta

200 - OK
Returns the Operation ID for checking the creation status.
Ritorna un(a) object: Operation
path string
metadata Any
done boolean
error Status
response Any

Permessi Necessari

  • Leggi
  • Scrivi
  • asset:read
  • asset:write

Limiti

Per chiave API: 60 richieste ogni 60 secondi per indirizzo IP

Update Asset

PATCH /v1/assets/{assetId}

Parametri

request Asset
FormData
Necessario
fileContent string
FormData
updateMask string

Richiesta

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.\"}]}"'

Risposta

200 - OK
Returns the Operation ID for checking the update status / Returns the updated metadata fields.
Ritorna un(a) object: Operation
path string
metadata Any
done boolean
error Status
response Any

Permessi Necessari

  • Leggi
  • Scrivi
  • asset:read
  • asset:write

Limiti

Per chiave API: 60 richieste ogni 60 secondi per indirizzo IP

Get Asset Version

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

Parametri

assetId string
Path
Necessario
versionNumber string
Path
Necessario

Richiesta

Get Asset Version

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

Risposta

Permessi Necessari

  • Leggi
  • asset:read

Limiti

Per chiave API: 60 richieste ogni 60 secondi per indirizzo IP

List Asset Versions

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

Parametri

assetId string
Path
Necessario
maxPageSize number
pageToken string

Richiesta

List Asset Versions

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

Risposta

Permessi Necessari

  • Leggi
  • Scrivi
  • asset:read
  • asset:write

Limiti

Per chiave API: 60 richieste ogni 60 secondi per indirizzo IP

Rollback Asset Version

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

Parametri

assetId string
Path
Necessario
assetVersion string
FormData
Necessario

Richiesta

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}\"}'

Risposta

Permessi Necessari

  • Leggi
  • Scrivi
  • asset:read
  • asset:write

Limiti

Per chiave API: 60 richieste ogni 60 secondi per indirizzo IP

Get Operation

GET /v1/operations/{operationId}

Richiesta

Get Operation

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

Risposta

200 - OK
Ritorna un(a) object: Operation
path string
metadata Any
done boolean
error Status
response Any

Permessi Necessari

  • Leggi
  • asset:read

Limiti

Per chiave API: 60 richieste ogni 60 secondi per indirizzo IP

Oggetti

Gli oggetti seguenti descrivono i payloads accettati o restituiti. Per maggiori informazioni su quando vengono utilizzati questi oggetti, consultare ogni singolo endpoint.

Any

Attributi

@type string
Necessario

Asset

Attributi

assetType string
Necessario
assetId number
Necessario
creationContext CreationContext
Necessario
description string
Necessario
displayName string
Necessario
path string
Necessario
revisionId string
Necessario
revisionCreateTime string
Necessario
moderationResult ModerationResult
Necessario
icon string
Necessario
previews array<Preview>
Necessario

CreationContext

Attributi

creator Creator
Necessario
expectedPrice number
Necessario

Creator

Attributi

userId number
Necessario
groupId number
Necessario

ModerationResult

Attributi

moderationState string
Necessario

Operation

Attributi

path string
Necessario
metadata Any
Necessario
done boolean
Necessario
error Status
Necessario
response Any
Necessario

Preview

Attributi

asset string
Necessario
altText string
Necessario

Status

Attributi

code number
Necessario
message string
Necessario
details array<Any>
Necessario