Assets API

Assets

https://apis.roblox.com/assets

Get Asset

GET /v1/assets

매개 변수

assetId Asset
Path
필수
readMask string

요청

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

응답

필요한 권한

  • 읽기
  • asset:read

한도

각 API 키별: IP 주소당 60초마다 60 요청

Create Asset

POST /v1/assets

매개 변수

request Asset
FormData
필수
fileContent string
FormData
필수

요청

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'

응답

200 - OK
Returns the Operation ID for checking the creation status.
반환: object: Operation
path string
metadata Any
done boolean
error Status
response Any

필요한 권한

  • 읽기
  • 쓰기
  • asset:read
  • asset:write

한도

각 API 키별: IP 주소당 60초마다 60 요청

Update Asset

PATCH /v1/assets/{assetId}

매개 변수

request Asset
FormData
필수
fileContent string
FormData
updateMask string

요청

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

응답

200 - OK
Returns the Operation ID for checking the update status / Returns the updated metadata fields.
반환: object: Operation
path string
metadata Any
done boolean
error Status
response Any

필요한 권한

  • 읽기
  • 쓰기
  • asset:read
  • asset:write

한도

각 API 키별: IP 주소당 60초마다 60 요청

Get Asset Version

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

매개 변수

assetId string
Path
필수
versionNumber string
Path
필수

요청

Get Asset Version

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

응답

필요한 권한

  • 읽기
  • asset:read

한도

각 API 키별: IP 주소당 60초마다 60 요청

List Asset Versions

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

매개 변수

assetId string
Path
필수
maxPageSize number
pageToken string

요청

List Asset Versions

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

응답

필요한 권한

  • 읽기
  • 쓰기
  • asset:read
  • asset:write

한도

각 API 키별: IP 주소당 60초마다 60 요청

Rollback Asset Version

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

매개 변수

assetId string
Path
필수
assetVersion string
FormData
필수

요청

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

응답

필요한 권한

  • 읽기
  • 쓰기
  • asset:read
  • asset:write

한도

각 API 키별: IP 주소당 60초마다 60 요청

Get Operation

GET /v1/operations/{operationId}

요청

Get Operation

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

응답

200 - OK
반환: object: Operation
path string
metadata Any
done boolean
error Status
response Any

필요한 권한

  • 읽기
  • asset:read

한도

각 API 키별: IP 주소당 60초마다 60 요청

개체

다음 개체는 수락되거나 반환되는 페이로드를 설명합니다. 이러한 개체가 사용되는 시기에 대한 자세한 정보는 각 개별 끝점을 참고하세요.

Any

특성

@type string
필수

Asset

특성

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

CreationContext

특성

creator Creator
필수
expectedPrice number
필수

Creator

특성

userId number
필수
groupId number
필수

ModerationResult

특성

moderationState string
필수

Operation

특성

path string
필수
metadata Any
필수
done boolean
필수
error Status
필수
response Any
필수

Preview

특성

asset string
필수
altText string
필수

Status

특성

code number
필수
message string
필수
details array<Any>
필수