UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 22.6 kB
{"openapi":"3.0.0","info":{"contact":{"name":"Google","url":"https://google.com"},"description":"The Poly API provides read access to assets hosted on <a href=\"https://poly.google.com\">poly.google.com</a> to all, and upload access to <a href=\"https://poly.google.com\">poly.google.com</a> for whitelisted accounts.\n","title":"Poly","version":"v1","x-apiClientRegistration":{"url":"https://console.developers.google.com"},"x-logo":{"url":"https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},"x-origin":[{"converter":{"url":"https://github.com/lucybot/api-spec-converter","version":"2.7.18"},"format":"google","url":"https://poly.googleapis.com/$discovery/rest?version=v1","version":"v1"}],"x-preferred":true,"x-providerName":"googleapis.com","x-serviceName":"poly"},"externalDocs":{"url":"https://developers.google.com/poly/"},"tags":[{"name":"assets"},{"name":"users"}],"paths":{"/v1/assets":{"get":{"description":"Lists all public, remixable assets. These are assets with an access level of\nPUBLIC and published under the\nCC-By license.","operationId":"poly.assets.list","parameters":[{"description":"Filter assets based on the specified category. Supported values are:\n`animals`, `architecture`, `art`, `food`, `nature`, `objects`, `people`, `scenes`,\n`technology`, and `transport`.","in":"query","name":"category","schema":{"type":"string"}},{"description":"Return only assets that have been curated by the Poly team.","in":"query","name":"curated","schema":{"type":"boolean"}},{"description":"Return only assets with the matching format. Acceptable values are:\n`BLOCKS`, `FBX`, `GLTF`, `GLTF2`, `OBJ`, `TILT`.","in":"query","name":"format","schema":{"type":"string"}},{"description":"One or more search terms to be matched against all text that Poly has\nindexed for assets, which includes display_name,\ndescription, and tags. Multiple keywords should be\nseparated by spaces.","in":"query","name":"keywords","schema":{"type":"string"}},{"description":"Returns assets that are of the specified complexity or less. Defaults to\nCOMPLEX. For example, a request for\nMEDIUM assets also includes\nSIMPLE assets.","in":"query","name":"maxComplexity","schema":{"type":"string","enum":["COMPLEXITY_UNSPECIFIED","COMPLEX","MEDIUM","SIMPLE"]}},{"description":"Specifies an ordering for assets. Acceptable values are:\n`BEST`, `NEWEST`, `OLDEST`. Defaults to `BEST`, which ranks assets\nbased on a combination of popularity and other features.","in":"query","name":"orderBy","schema":{"type":"string"}},{"description":"The maximum number of assets to be returned. This value must be between `1`\nand `100`. Defaults to `20`.","in":"query","name":"pageSize","schema":{"type":"integer"}},{"description":"Specifies a continuation token from a previous search whose results were\nsplit into multiple pages. To get the next page, submit the same request\nspecifying the value from next_page_token.","in":"query","name":"pageToken","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ListAssetsResponse"}}}}},"tags":["assets"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/uploadType"},{"$ref":"#/components/parameters/upload_protocol"}]},"/v1/{name}":{"get":{"description":"Returns detailed information about an asset given its name.\nPRIVATE assets are returned only if\n the currently authenticated user (via OAuth token) is the author of the asset.","operationId":"poly.assets.get","parameters":[{"description":"Required. An asset's name in the form `assets/{ASSET_ID}`.","in":"path","name":"name","required":true,"x-reservedExpansion":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Asset"}}}}},"tags":["assets"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/uploadType"},{"$ref":"#/components/parameters/upload_protocol"}]},"/v1/{name}/assets":{"get":{"description":"Lists assets authored by the given user. Only the value 'me', representing\nthe currently-authenticated user, is supported. May include assets with an\naccess level of PRIVATE or\nUNLISTED and assets which are\nAll Rights Reserved for the\ncurrently-authenticated user.","operationId":"poly.users.assets.list","parameters":[{"description":"Return only assets with the matching format. Acceptable values are:\n`BLOCKS`, `FBX`, `GLTF`, `GLTF2`, `OBJ`, and `TILT`.","in":"query","name":"format","schema":{"type":"string"}},{"description":"A valid user id. Currently, only the special value 'me', representing the\ncurrently-authenticated user is supported. To use 'me', you must pass\nan OAuth token with the request.","in":"path","name":"name","required":true,"x-reservedExpansion":true,"schema":{"type":"string"}},{"description":"Specifies an ordering for assets. Acceptable values are:\n`BEST`, `NEWEST`, `OLDEST`. Defaults to `BEST`, which ranks assets\nbased on a combination of popularity and other features.","in":"query","name":"orderBy","schema":{"type":"string"}},{"description":"The maximum number of assets to be returned. This value must be between `1`\nand `100`. Defaults to `20`.","in":"query","name":"pageSize","schema":{"type":"integer"}},{"description":"Specifies a continuation token from a previous search whose results were\nsplit into multiple pages. To get the next page, submit the same request\nspecifying the value from\nnext_page_token.","in":"query","name":"pageToken","schema":{"type":"string"}},{"description":"The visibility of the assets to be returned.\nDefaults to VISIBILITY_UNSPECIFIED which returns all assets.","in":"query","name":"visibility","schema":{"type":"string","enum":["VISIBILITY_UNSPECIFIED","PUBLISHED","PRIVATE"]}}],"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ListUserAssetsResponse"}}}}},"tags":["users"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/uploadType"},{"$ref":"#/components/parameters/upload_protocol"}]},"/v1/{name}/likedassets":{"get":{"description":"Lists assets that the user has liked. Only the value 'me', representing\nthe currently-authenticated user, is supported. May include assets with an\naccess level of UNLISTED.","operationId":"poly.users.likedassets.list","parameters":[{"description":"Return only assets with the matching format. Acceptable values are:\n`BLOCKS`, `FBX`, `GLTF`, `GLTF2`, `OBJ`, `TILT`.","in":"query","name":"format","schema":{"type":"string"}},{"description":"A valid user id. Currently, only the special value 'me', representing the\ncurrently-authenticated user is supported. To use 'me', you must pass\nan OAuth token with the request.","in":"path","name":"name","required":true,"x-reservedExpansion":true,"schema":{"type":"string"}},{"description":"Specifies an ordering for assets. Acceptable values are:\n`BEST`, `NEWEST`, `OLDEST`, 'LIKED_TIME'. Defaults to `LIKED_TIME`, which\nranks assets based on how recently they were liked.","in":"query","name":"orderBy","schema":{"type":"string"}},{"description":"The maximum number of assets to be returned. This value must be between `1`\nand `100`. Defaults to `20`.","in":"query","name":"pageSize","schema":{"type":"integer"}},{"description":"Specifies a continuation token from a previous search whose results were\nsplit into multiple pages. To get the next page, submit the same request\nspecifying the value from\nnext_page_token.","in":"query","name":"pageToken","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ListLikedAssetsResponse"}}}}},"tags":["users"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/uploadType"},{"$ref":"#/components/parameters/upload_protocol"}]}},"servers":[{"url":"https://poly.googleapis.com/"}],"components":{"parameters":{"access_token":{"description":"OAuth access token.","in":"query","name":"access_token","schema":{"type":"string"}},"alt":{"description":"Data format for response.","in":"query","name":"alt","schema":{"type":"string","enum":["json","media","proto"],"default":"json"}},"callback":{"description":"JSONP","in":"query","name":"callback","schema":{"type":"string"}},"fields":{"description":"Selector specifying which fields to include in a partial response.","in":"query","name":"fields","schema":{"type":"string"}},"key":{"description":"API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.","in":"query","name":"key","schema":{"type":"string"}},"oauth_token":{"description":"OAuth 2.0 token for the current user.","in":"query","name":"oauth_token","schema":{"type":"string"}},"prettyPrint":{"description":"Returns response with indentations and line breaks.","in":"query","name":"prettyPrint","schema":{"type":"boolean","default":true}},"quotaUser":{"description":"Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.","in":"query","name":"quotaUser","schema":{"type":"string"}},"uploadType":{"description":"Legacy upload protocol for media (e.g. \"media\", \"multipart\").","in":"query","name":"uploadType","schema":{"type":"string"}},"upload_protocol":{"description":"Upload protocol for media (e.g. \"raw\", \"multipart\").","in":"query","name":"upload_protocol","schema":{"type":"string"}},"_.xgafv":{"description":"V1 error format.","in":"query","name":"$.xgafv","schema":{"type":"string","enum":["1","2"]}}},"schemas":{"Asset":{"description":"Represents and describes an asset in the Poly library. An asset is a 3D model\nor scene created using [Tilt Brush](//www.tiltbrush.com),\n[Blocks](//vr.google.com/blocks/), or any 3D program that produces a file\nthat can be upload to Poly.","properties":{"authorName":{"description":"The author's publicly visible name. Use this name when giving credit to the\nauthor. For more information, see [Licensing](/poly/discover/licensing).","type":"string"},"createTime":{"description":"For published assets, the time when the asset was published.\nFor unpublished assets, the time when the asset was created.","format":"google-datetime","type":"string"},"description":{"description":"The human-readable description, set by the asset's author.","type":"string"},"displayName":{"description":"The human-readable name, set by the asset's author.","type":"string"},"formats":{"description":"A list of Formats where each\nformat describes one representation of the asset.","items":{"$ref":"#/components/schemas/Format"},"type":"array"},"isCurated":{"description":"Whether this asset has been curated by the Poly team.","type":"boolean"},"license":{"description":"The license under which the author has made the asset available\nfor use, if any.","enum":["UNKNOWN","CREATIVE_COMMONS_BY","ALL_RIGHTS_RESERVED"],"type":"string"},"metadata":{"description":"Application-defined opaque metadata for this asset. This field is only\nreturned when querying for the signed-in user's own assets, not for public\nassets. This string is limited to 1K chars. It is up to the creator of\nthe asset to define the format for this string (for example, JSON).","type":"string"},"name":{"description":"The unique identifier for the asset in the form:\n`assets/{ASSET_ID}`.","type":"string"},"presentationParams":{"$ref":"#/components/schemas/PresentationParams"},"remixInfo":{"$ref":"#/components/schemas/RemixInfo"},"thumbnail":{"$ref":"#/components/schemas/File"},"updateTime":{"description":"The time when the asset was last modified. For published assets, whose\ncontents are immutable, the update time changes only when metadata\nproperties, such as visibility, are updated.","format":"google-datetime","type":"string"},"visibility":{"description":"The visibility of the asset and who can access it.","enum":["VISIBILITY_UNSPECIFIED","PRIVATE","UNLISTED","PUBLIC"],"type":"string"}},"type":"object"},"AssetImportMessage":{"description":"A message generated by the asset import process.","properties":{"code":{"description":"The code associated with this message.","enum":["CODE_UNSPECIFIED","NO_IMPORTABLE_FILE","EMPTY_MODEL","OBJ_PARSE_ERROR","EXPIRED","IMAGE_ERROR","EXTRA_FILES_WITH_ARCHIVE","DEFAULT_MATERIALS","FATAL_ERROR","INVALID_ELEMENT_TYPE"],"type":"string"},"filePath":{"description":"An optional file path. Only present for those error codes that specify it.","type":"string"},"imageError":{"$ref":"#/components/schemas/ImageError"},"objParseError":{"$ref":"#/components/schemas/ObjParseError"}},"type":"object"},"File":{"description":"Represents a file in Poly, which can be a root,\nresource, or thumbnail file.","properties":{"contentType":{"description":"The MIME content-type, such as `image/png`.\nFor more information, see\n[MIME types](//developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types).","type":"string"},"relativePath":{"description":"The path of the resource file relative to the root file.\nFor root or thumbnail files, this is just the filename.","type":"string"},"url":{"description":"The URL where the file data can be retrieved.","type":"string"}},"type":"object"},"Format":{"description":"The same asset can be represented in different formats, for example,\na [WaveFront .obj](//en.wikipedia.org/wiki/Wavefront_.obj_file) file with its\ncorresponding .mtl file or a [Khronos glTF](//www.khronos.org/gltf) file\nwith its corresponding .glb binary data. A format refers to a specific\nrepresentation of an asset and contains all information needed to\nretrieve and describe this representation.","properties":{"formatComplexity":{"$ref":"#/components/schemas/FormatComplexity"},"formatType":{"description":"A short string that identifies the format type of this representation.\nPossible values are: `FBX`, `GLTF`, `GLTF2`, `OBJ`, and `TILT`.","type":"string"},"resources":{"description":"A list of dependencies of the root element. May include, but is not\nlimited to, materials, textures, and shader programs.","items":{"$ref":"#/components/schemas/File"},"type":"array"},"root":{"$ref":"#/components/schemas/File"}},"type":"object"},"FormatComplexity":{"description":"Information on the complexity of this Format.","properties":{"lodHint":{"description":"A non-negative integer that represents the level of detail (LOD) of this\nformat relative to other formats of the same asset with the same\nformat_type.\nThis hint allows you to sort formats from the most-detailed (0) to\nleast-detailed (integers greater than 0).","format":"int32","type":"integer"},"triangleCount":{"description":"The estimated number of triangles.","format":"int64","type":"string"}},"type":"object"},"ImageError":{"description":"A message resulting from reading an image file.","properties":{"code":{"description":"The type of image error encountered. Optional for older image errors.","enum":["CODE_UNSPECIFIED","INVALID_IMAGE","IMAGE_TOO_BIG","WRONG_IMAGE_TYPE"],"type":"string"},"filePath":{"description":"The file path in the import of the image that was rejected.","type":"string"}},"type":"object"},"ListAssetsResponse":{"description":"A response message from a request to list.","properties":{"assets":{"description":"A list of assets that match the criteria specified in the request.","items":{"$ref":"#/components/schemas/Asset"},"type":"array"},"nextPageToken":{"description":"The continuation token for retrieving the next page. If empty,\nindicates that there are no more pages. To get the next page, submit the\nsame request specifying this value as the\npage_token.","type":"string"},"totalSize":{"description":"The total number of assets in the list, without pagination.","format":"int32","type":"integer"}},"type":"object"},"ListLikedAssetsResponse":{"description":"A response message from a request to list.","properties":{"assets":{"description":"A list of assets that match the criteria specified in the request.","items":{"$ref":"#/components/schemas/Asset"},"type":"array"},"nextPageToken":{"description":"The continuation token for retrieving the next page. If empty,\nindicates that there are no more pages. To get the next page, submit the\nsame request specifying this value as the\npage_token.","type":"string"},"totalSize":{"description":"The total number of assets in the list, without pagination.","format":"int32","type":"integer"}},"type":"object"},"ListUserAssetsResponse":{"description":"A response message from a request to list.","properties":{"nextPageToken":{"description":"The continuation token for retrieving the next page. If empty,\nindicates that there are no more pages. To get the next page, submit the\nsame request specifying this value as the\npage_token.","type":"string"},"totalSize":{"description":"The total number of assets in the list, without pagination.","format":"int32","type":"integer"},"userAssets":{"description":"A list of UserAssets matching the request.","items":{"$ref":"#/components/schemas/UserAsset"},"type":"array"}},"type":"object"},"ObjParseError":{"description":"Details of an error resulting from parsing an OBJ file","properties":{"code":{"description":"The type of problem found (required).","enum":["CODE_UNSPECIFIED","INCONSISTENT_VERTEX_REFS","INVALID_COMMAND","INVALID_NUMBER","INVALID_VERTEX_REF","MISSING_GEOMETRIC_VERTEX","MISSING_TOKEN","TOO_FEW_DIMENSIONS","TOO_FEW_VERTICES","TOO_MANY_DIMENSIONS","UNSUPPORTED_COMMAND","UNUSED_TOKENS","VERTEX_NOT_FOUND","NUMBER_OUT_OF_RANGE","INVALID_VALUE","INVALID_TEXTURE_OPTION","TOO_MANY_PROBLEMS","MISSING_FILE_NAME","FILE_NOT_FOUND","UNKNOWN_MATERIAL","NO_MATERIAL_DEFINED","INVALID_SMOOTHING_GROUP","MISSING_VERTEX_COLORS","FILE_SUBSTITUTION","LINE_TOO_LONG","INVALID_FILE_PATH"],"type":"string"},"endIndex":{"description":"The ending character index at which the problem was found.","format":"int32","type":"integer"},"filePath":{"description":"The file path in which the problem was found.","type":"string"},"line":{"description":"The text of the line. Note that this may be truncated if the line was very\nlong. This may not include the error if it occurs after line truncation.","type":"string"},"lineNumber":{"description":"Line number at which the problem was found.","format":"int32","type":"integer"},"startIndex":{"description":"The starting character index at which the problem was found.","format":"int32","type":"integer"}},"type":"object"},"PresentationParams":{"description":"Hints for displaying the asset, based on information available when the asset\nwas uploaded.","properties":{"backgroundColor":{"description":"A background color which could be used for displaying the 3D asset in a\n'thumbnail' or 'palette' style view. Authors have the option to set this\nbackground color when publishing or editing their asset.\n\nThis is represented as a six-digit hexademical triplet specifying the\nRGB components of the background color, e.g. #FF0000 for Red.","type":"string"},"colorSpace":{"description":"The materials' diffuse/albedo color. This does not apply to vertex colors\nor texture maps.","enum":["UNKNOWN","LINEAR","GAMMA"],"type":"string"},"orientingRotation":{"$ref":"#/components/schemas/Quaternion"}},"type":"object"},"Quaternion":{"description":"A [Quaternion](//en.wikipedia.org/wiki/Quaternion). Please note: if in the\nresponse you see \"w: 1\" and nothing else this is the default value of\n[0, 0, 0, 1] where x,y, and z are 0.","properties":{"w":{"description":"The scalar component.","format":"double","type":"number"},"x":{"description":"The x component.","format":"double","type":"number"},"y":{"description":"The y component.","format":"double","type":"number"},"z":{"description":"The z component.","format":"double","type":"number"}},"type":"object"},"RemixInfo":{"description":"Info about the sources of this asset (i.e. assets that were remixed to\ncreate this asset).","properties":{"sourceAsset":{"description":"Resource ids for the sources of this remix, of the form:\n`assets/{ASSET_ID}`","items":{"type":"string"},"type":"array"}},"type":"object"},"StartAssetImportResponse":{"description":"A response message from a request to startImport.\nThis is returned in the response field of the Operation.","properties":{"assetId":{"description":"The id of newly created asset. If this is empty when the operation is\ncomplete it means the import failed. Please refer to the\nassetImportMessages field to understand what went wrong.","type":"string"},"assetImportId":{"description":"The id of the asset import.","type":"string"},"assetImportMessages":{"description":"The message from the asset import. This will contain any warnings\n(or - in the case of failure - errors) that occurred during import.","items":{"$ref":"#/components/schemas/AssetImportMessage"},"type":"array"},"publishUrl":{"description":"The publish URL for the asset.","type":"string"}},"type":"object"},"UserAsset":{"description":"Data about the user's asset.","properties":{"asset":{"$ref":"#/components/schemas/Asset"}},"type":"object"}}}}