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
Kode Status lain
Izin yang Diperlukan
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
Kode Status lain
Izin yang Diperlukan
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
curl --location --request PATCH 'https://apis.roblox.com/assets/v1/assets/{assetId}?updateMask=description%2CdisplayName' \
--header 'x-api-key: {apiKey}' \
--form 'request="{
\"assetType\": \"{assetType}\",
\"assetId\": {assetId},
\"displayName\": \"{new display name}\",
\"description\": \"{new description}\",
\"creationContext\": {
\"creator\": {
\"userId\": {userId}
},
\"expectedPrice\":{expectedPrice}
},
}"' \
--form 'fileContent=@\"{file-path}\"'
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
curl --location --request PATCH 'https://apis.roblox.com/assets/v1/assets/{assetId}?updateMask=twitchSocialLink%2CgithubSocialLink' \
--header 'x-api-key: {apiKey}' \
--form 'request="{\"assetId\": \"{assetId}\", \"twitchSocialLink\": {\"title\": \"Optional title\", \"uri\": \"https://twitch.tv/your-channel\"}, \"githubSocialLink\": {\"title\": \"Optional title\", \"uri\": \"https://github.com/your-repo\"}}"'
Respons
Kode Status lain
Izin yang Diperlukan
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
Kode Status lain
Izin yang Diperlukan
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
Kode Status lain
Izin yang Diperlukan
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
Kode Status lain
Izin yang Diperlukan
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
Kode Status lain
Izin yang Diperlukan
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
SocialLink
Atribut
title string
uri string
Status
Atribut
code number
message string
details array<object>