|
5 | 5 | "version": "1.0", |
6 | 6 | "x-roblox-extensions-version": "1.0.0" |
7 | 7 | }, |
8 | | - "paths": {}, |
| 8 | + "paths": { |
| 9 | + "/asset-permissions-api/v1/assets/permissions": { |
| 10 | + "patch": { |
| 11 | + "tags": ["AssetPermissions"], |
| 12 | + "summary": "Grant a subject permission to multiple assets.\n \nAuthorization is required to grant permissions to the subject and asset IDs in the request.", |
| 13 | + "requestBody": { |
| 14 | + "content": { |
| 15 | + "application/json-patch+json": { |
| 16 | + "schema": { |
| 17 | + "$ref": "#/components/schemas/BatchGrantPermissionsRequest" |
| 18 | + } |
| 19 | + }, |
| 20 | + "application/json": { |
| 21 | + "schema": { |
| 22 | + "$ref": "#/components/schemas/BatchGrantPermissionsRequest" |
| 23 | + } |
| 24 | + }, |
| 25 | + "text/json": { |
| 26 | + "schema": { |
| 27 | + "$ref": "#/components/schemas/BatchGrantPermissionsRequest" |
| 28 | + } |
| 29 | + }, |
| 30 | + "application/*+json": { |
| 31 | + "schema": { |
| 32 | + "$ref": "#/components/schemas/BatchGrantPermissionsRequest" |
| 33 | + } |
| 34 | + } |
| 35 | + } |
| 36 | + }, |
| 37 | + "responses": { |
| 38 | + "200": { |
| 39 | + "description": "OK", |
| 40 | + "content": { |
| 41 | + "application/json": { |
| 42 | + "schema": { |
| 43 | + "$ref": "#/components/schemas/BatchGrantPermissionsResponse" |
| 44 | + } |
| 45 | + } |
| 46 | + } |
| 47 | + }, |
| 48 | + "400": { |
| 49 | + "description": "Bad Request", |
| 50 | + "content": { |
| 51 | + "application/json": { |
| 52 | + "schema": { |
| 53 | + "$ref": "#/components/schemas/ErrorResponse" |
| 54 | + } |
| 55 | + } |
| 56 | + } |
| 57 | + }, |
| 58 | + "403": { |
| 59 | + "description": "Forbidden", |
| 60 | + "content": { |
| 61 | + "application/json": { |
| 62 | + "schema": { |
| 63 | + "$ref": "#/components/schemas/ErrorResponse" |
| 64 | + } |
| 65 | + } |
| 66 | + } |
| 67 | + }, |
| 68 | + "500": { |
| 69 | + "description": "Internal Server Error", |
| 70 | + "content": { |
| 71 | + "application/json": { |
| 72 | + "schema": { |
| 73 | + "$ref": "#/components/schemas/ErrorResponse" |
| 74 | + } |
| 75 | + } |
| 76 | + } |
| 77 | + } |
| 78 | + }, |
| 79 | + "x-roblox-stability": "BETA", |
| 80 | + "x-roblox-rate-limits": { |
| 81 | + "perApiKeyOwner": { |
| 82 | + "period": "MINUTE", |
| 83 | + "maxInPeriod": 100 |
| 84 | + } |
| 85 | + }, |
| 86 | + "x-roblox-scopes": [ |
| 87 | + { |
| 88 | + "name": "asset-permissions:write" |
| 89 | + } |
| 90 | + ], |
| 91 | + "x-roblox-engine-usability": { |
| 92 | + "apiKeyWithHttpService": false |
| 93 | + }, |
| 94 | + "security": [ |
| 95 | + { |
| 96 | + "roblox-legacy-cookie": [] |
| 97 | + }, |
| 98 | + { |
| 99 | + "roblox-api-key": [] |
| 100 | + } |
| 101 | + ] |
| 102 | + } |
| 103 | + } |
| 104 | + }, |
9 | 105 | "components": { |
10 | | - "securitySchemes": {} |
| 106 | + "schemas": { |
| 107 | + "AssetAction": { |
| 108 | + "enum": [ |
| 109 | + "Invalid", |
| 110 | + "Edit", |
| 111 | + "Use", |
| 112 | + "Download", |
| 113 | + "CopyFromRcc", |
| 114 | + "UpdateFromRcc" |
| 115 | + ], |
| 116 | + "type": "string", |
| 117 | + "description": "Asset permission actions that can be granted.\n \nActions:\n* Invalid - default value, not a valid action.\n* Edit - grants the ability to edit and manage the asset.\n* Use - grants the ability to use the asset.\n* Download - grants the ability to download the asset.\n* CopyFromRcc - grants the ability to copy the asset from RCC, used to enable AssetService:CreatePlaceAsync().\n* UpdateFromRcc - grants the ability to update the asset from RCC, used to enable AssetService:UpdatePlaceAsync().\n \nValid AssetType - SubjectType - Action combinations:\n* Animation - Group/User/Universe - Use\n* Audio - Group/User/Universe - Use\n* Decal - All/Group/User/Universe - Use\n* Image - All/Group/User/Universe - Use\n* Mesh - All/Group/User/Universe - Use\n* MeshPart - Group/User/Universe - Use\n* Model - User - Edit\n * Group/User/Universe - Use\n* Place - All - Download\n * Universe - CopyFromRcc/UpdateFromRcc\n* Video - Group/User/Universe - Use." |
| 118 | + }, |
| 119 | + "AssetGrantRequest": { |
| 120 | + "type": "object", |
| 121 | + "properties": { |
| 122 | + "assetId": { |
| 123 | + "type": "integer", |
| 124 | + "description": "The asset ID to grant permission to.", |
| 125 | + "format": "int64" |
| 126 | + }, |
| 127 | + "grantToDependencies": { |
| 128 | + "type": "boolean", |
| 129 | + "description": "Whether to extend the permission grant to dependencies of the asset. This will be done asynchronously after the main grant." |
| 130 | + }, |
| 131 | + "parentVersionNumber": { |
| 132 | + "type": "integer", |
| 133 | + "description": "The version number of 'assetId' to use for determining asset dependencies.", |
| 134 | + "format": "int32" |
| 135 | + } |
| 136 | + }, |
| 137 | + "additionalProperties": false, |
| 138 | + "description": "Asset grant requests with additional options to grant to dependencies." |
| 139 | + }, |
| 140 | + "BatchGrantPermissionsRequest": { |
| 141 | + "type": "object", |
| 142 | + "properties": { |
| 143 | + "subjectType": { |
| 144 | + "$ref": "#/components/schemas/SubjectType" |
| 145 | + }, |
| 146 | + "subjectId": { |
| 147 | + "type": "string", |
| 148 | + "description": "The subject ID to grant to. Must be empty for SubjectType 'All'.", |
| 149 | + "nullable": true |
| 150 | + }, |
| 151 | + "action": { |
| 152 | + "$ref": "#/components/schemas/AssetAction" |
| 153 | + }, |
| 154 | + "requests": { |
| 155 | + "type": "array", |
| 156 | + "items": { |
| 157 | + "$ref": "#/components/schemas/AssetGrantRequest" |
| 158 | + }, |
| 159 | + "description": "Array of asset grant requests. If populated, 'requests' will override 'assetIds'.", |
| 160 | + "nullable": true |
| 161 | + }, |
| 162 | + "assetIds": { |
| 163 | + "type": "array", |
| 164 | + "items": { |
| 165 | + "type": "integer", |
| 166 | + "format": "int64" |
| 167 | + }, |
| 168 | + "description": "[Deprecated] The list of asset IDs to grant this permission to. 'requests' will be prioritized over this list.", |
| 169 | + "nullable": true, |
| 170 | + "deprecated": true |
| 171 | + }, |
| 172 | + "enableDeepAccessCheck": { |
| 173 | + "type": "boolean", |
| 174 | + "description": "[Do not use] An optional boolean to indicate if a deep access check should be done. This is not intended for public use." |
| 175 | + } |
| 176 | + }, |
| 177 | + "additionalProperties": false, |
| 178 | + "description": "Request object to grant one permission to multiple assets." |
| 179 | + }, |
| 180 | + "BatchGrantPermissionsResponse": { |
| 181 | + "type": "object", |
| 182 | + "properties": { |
| 183 | + "successAssetIds": { |
| 184 | + "type": "array", |
| 185 | + "items": { |
| 186 | + "type": "integer", |
| 187 | + "format": "int64" |
| 188 | + }, |
| 189 | + "description": "The list of asset IDs that granted successfully.", |
| 190 | + "nullable": true |
| 191 | + }, |
| 192 | + "errors": { |
| 193 | + "type": "array", |
| 194 | + "items": { |
| 195 | + "$ref": "#/components/schemas/GrantPermissionError" |
| 196 | + }, |
| 197 | + "description": "The list of grants that had errors.", |
| 198 | + "nullable": true |
| 199 | + } |
| 200 | + }, |
| 201 | + "additionalProperties": false, |
| 202 | + "description": "Response object to grant one permission to multiple assets." |
| 203 | + }, |
| 204 | + "Error": { |
| 205 | + "type": "object", |
| 206 | + "properties": { |
| 207 | + "code": { |
| 208 | + "$ref": "#/components/schemas/ErrorCode" |
| 209 | + }, |
| 210 | + "message": { |
| 211 | + "type": "string", |
| 212 | + "description": "The human readable error message.", |
| 213 | + "nullable": true |
| 214 | + } |
| 215 | + }, |
| 216 | + "additionalProperties": false, |
| 217 | + "description": "The error object for results." |
| 218 | + }, |
| 219 | + "ErrorCode": { |
| 220 | + "enum": [ |
| 221 | + "UnknownError", |
| 222 | + "InvalidRequest", |
| 223 | + "AssetNotFound", |
| 224 | + "CannotManageAsset", |
| 225 | + "PublicAssetCannotBeGrantedTo", |
| 226 | + "CannotManageSubject", |
| 227 | + "SubjectNotFound", |
| 228 | + "AssetTypeNotEnabled", |
| 229 | + "PermissionLimitReached" |
| 230 | + ], |
| 231 | + "type": "string", |
| 232 | + "description": "Enums for customized error code in error responses." |
| 233 | + }, |
| 234 | + "ErrorResponse": { |
| 235 | + "type": "object", |
| 236 | + "properties": { |
| 237 | + "error": { |
| 238 | + "$ref": "#/components/schemas/Error" |
| 239 | + } |
| 240 | + }, |
| 241 | + "additionalProperties": false, |
| 242 | + "description": "The error object for responses." |
| 243 | + }, |
| 244 | + "GrantPermissionError": { |
| 245 | + "type": "object", |
| 246 | + "properties": { |
| 247 | + "assetId": { |
| 248 | + "type": "integer", |
| 249 | + "description": "Failed asset ID.", |
| 250 | + "format": "int64" |
| 251 | + }, |
| 252 | + "code": { |
| 253 | + "$ref": "#/components/schemas/ErrorCode" |
| 254 | + } |
| 255 | + }, |
| 256 | + "additionalProperties": false, |
| 257 | + "description": "Single error for BatchGrantPermissionsResponse." |
| 258 | + }, |
| 259 | + "SubjectType": { |
| 260 | + "enum": ["Invalid", "User", "Group", "GroupRoleset", "All", "Universe"], |
| 261 | + "type": "string" |
| 262 | + } |
| 263 | + }, |
| 264 | + "securitySchemes": { |
| 265 | + "roblox-legacy-cookie": { |
| 266 | + "type": "apiKey", |
| 267 | + "description": "A browser cookie that represents the identity of a Roblox user. DO NOT SHARE THIS. Sharing this will allow someone to log in as you and to steal your Robux and items. When possible, use API keys with the x-api-key header or OAuth 2.0 instead for authentication.", |
| 268 | + "in": "cookie", |
| 269 | + "name": ".ROBLOSECURITY" |
| 270 | + }, |
| 271 | + "roblox-api-key": { |
| 272 | + "type": "apiKey", |
| 273 | + "description": "A configurable key that allows granular access to Roblox resources. See https://create.roblox.com/docs/cloud/auth/api-keys for more information.", |
| 274 | + "in": "header", |
| 275 | + "name": "x-api-key" |
| 276 | + } |
| 277 | + } |
11 | 278 | }, |
12 | 279 | "servers": [ |
13 | 280 | { |
|
0 commit comments