blob: 4a09a3656aed8dde8ed4218b2e5689a29d0551b1 [file] [log] [blame]
{
"fullyEncodeReservedExpansion": true,
"title": "Poly API",
"ownerName": "Google",
"resources": {
"users": {
"resources": {
"likedassets": {
"methods": {
"list": {
"response": {
"$ref": "ListLikedAssetsResponse"
},
"parameterOrder": [
"name"
],
"httpMethod": "GET",
"parameters": {
"name": {
"pattern": "^users/[^/]+$",
"location": "path",
"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.",
"required": true,
"type": "string"
},
"orderBy": {
"location": "query",
"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.",
"type": "string"
},
"pageToken": {
"type": "string",
"location": "query",
"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."
},
"pageSize": {
"description": "The maximum number of assets to be returned. This value must be between `1`\nand `100`. Defaults to `20`.",
"format": "int32",
"type": "integer",
"location": "query"
},
"format": {
"location": "query",
"description": "Return only assets with the matching format. Acceptable values are:\n`BLOCKS`, `FBX`, `GLTF`, `GLTF2`, `OBJ`, `TILT`.",
"type": "string"
}
},
"flatPath": "v1/users/{usersId}/likedassets",
"path": "v1/{+name}/likedassets",
"id": "poly.users.likedassets.list",
"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."
}
}
},
"assets": {
"methods": {
"list": {
"parameters": {
"name": {
"required": true,
"type": "string",
"pattern": "^users/[^/]+$",
"location": "path",
"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."
},
"orderBy": {
"location": "query",
"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.",
"type": "string"
},
"format": {
"location": "query",
"description": "Return only assets with the matching format. Acceptable values are:\n`BLOCKS`, `FBX`, `GLTF`, `GLTF2`, `OBJ`, and `TILT`.",
"type": "string"
},
"pageToken": {
"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.",
"type": "string",
"location": "query"
},
"pageSize": {
"location": "query",
"description": "The maximum number of assets to be returned. This value must be between `1`\nand `100`. Defaults to `20`.",
"format": "int32",
"type": "integer"
},
"visibility": {
"description": "The visibility of the assets to be returned.\nDefaults to VISIBILITY_UNSPECIFIED which returns all assets.",
"type": "string",
"location": "query",
"enum": [
"VISIBILITY_UNSPECIFIED",
"PUBLISHED",
"PRIVATE"
]
}
},
"flatPath": "v1/users/{usersId}/assets",
"id": "poly.users.assets.list",
"path": "v1/{+name}/assets",
"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.",
"httpMethod": "GET",
"response": {
"$ref": "ListUserAssetsResponse"
},
"parameterOrder": [
"name"
]
}
}
}
}
},
"assets": {
"methods": {
"get": {
"httpMethod": "GET",
"parameterOrder": [
"name"
],
"response": {
"$ref": "Asset"
},
"parameters": {
"name": {
"description": "Required. An asset's name in the form `assets/{ASSET_ID}`.",
"required": true,
"type": "string",
"pattern": "^assets/[^/]+$",
"location": "path"
}
},
"flatPath": "v1/assets/{assetsId}",
"id": "poly.assets.get",
"path": "v1/{+name}",
"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."
},
"list": {
"response": {
"$ref": "ListAssetsResponse"
},
"parameterOrder": [],
"httpMethod": "GET",
"parameters": {
"maxComplexity": {
"location": "query",
"enum": [
"COMPLEXITY_UNSPECIFIED",
"COMPLEX",
"MEDIUM",
"SIMPLE"
],
"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.",
"type": "string"
},
"pageToken": {
"location": "query",
"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.",
"type": "string"
},
"pageSize": {
"type": "integer",
"location": "query",
"description": "The maximum number of assets to be returned. This value must be between `1`\nand `100`. Defaults to `20`.",
"format": "int32"
},
"keywords": {
"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.",
"type": "string",
"location": "query"
},
"orderBy": {
"type": "string",
"location": "query",
"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."
},
"format": {
"location": "query",
"description": "Return only assets with the matching format. Acceptable values are:\n`BLOCKS`, `FBX`, `GLTF`, `GLTF2`, `OBJ`, `TILT`.",
"type": "string"
},
"curated": {
"location": "query",
"description": "Return only assets that have been curated by the Poly team.",
"type": "boolean"
},
"category": {
"location": "query",
"description": "Filter assets based on the specified category. Supported values are:\n`animals`, `architecture`, `art`, `food`, `nature`, `objects`, `people`, `scenes`,\n`technology`, and `transport`.",
"type": "string"
}
},
"flatPath": "v1/assets",
"path": "v1/assets",
"id": "poly.assets.list",
"description": "Lists all public, remixable assets. These are assets with an access level of\nPUBLIC and published under the\nCC-By license."
}
}
}
},
"parameters": {
"upload_protocol": {
"type": "string",
"location": "query",
"description": "Upload protocol for media (e.g. \"raw\", \"multipart\")."
},
"prettyPrint": {
"location": "query",
"description": "Returns response with indentations and line breaks.",
"type": "boolean",
"default": "true"
},
"uploadType": {
"location": "query",
"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
"type": "string"
},
"fields": {
"description": "Selector specifying which fields to include in a partial response.",
"type": "string",
"location": "query"
},
"$.xgafv": {
"description": "V1 error format.",
"type": "string",
"enumDescriptions": [
"v1 error format",
"v2 error format"
],
"location": "query",
"enum": [
"1",
"2"
]
},
"callback": {
"location": "query",
"description": "JSONP",
"type": "string"
},
"alt": {
"enumDescriptions": [
"Responses with Content-Type of application/json",
"Media download with context-dependent Content-Type",
"Responses with Content-Type of application/x-protobuf"
],
"location": "query",
"description": "Data format for response.",
"default": "json",
"enum": [
"json",
"media",
"proto"
],
"type": "string"
},
"key": {
"location": "query",
"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.",
"type": "string"
},
"access_token": {
"description": "OAuth access token.",
"type": "string",
"location": "query"
},
"quotaUser": {
"location": "query",
"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.",
"type": "string"
},
"pp": {
"description": "Pretty-print response.",
"type": "boolean",
"default": "true",
"location": "query"
},
"oauth_token": {
"location": "query",
"description": "OAuth 2.0 token for the current user.",
"type": "string"
},
"bearer_token": {
"location": "query",
"description": "OAuth bearer token.",
"type": "string"
}
},
"version": "v1",
"baseUrl": "https://poly.googleapis.com/",
"kind": "discovery#restDescription",
"description": "The Poly API provides read-only access to assets hosted on \u003ca href=\"https://poly.google.com\"\u003epoly.google.com\u003c/a\u003e.\n",
"servicePath": "",
"basePath": "",
"id": "poly:v1",
"documentationLink": "https://developers.google.com/poly/",
"revision": "20171213",
"discoveryVersion": "v1",
"version_module": true,
"schemas": {
"ListAssetsResponse": {
"description": "A response message from a request to list.",
"type": "object",
"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"
},
"assets": {
"description": "A list of assets that match the criteria specified in the request.",
"type": "array",
"items": {
"$ref": "Asset"
}
},
"totalSize": {
"description": "The total number of assets in the list, without pagination.",
"format": "int32",
"type": "integer"
}
},
"id": "ListAssetsResponse"
},
"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.",
"type": "object",
"properties": {
"resources": {
"description": "A list of dependencies of the root element. May include, but is not\nlimited to, materials, textures, and shader programs.",
"type": "array",
"items": {
"$ref": "File"
}
},
"formatComplexity": {
"$ref": "FormatComplexity",
"description": "Complexity stats about this representation of the asset."
},
"root": {
"$ref": "File",
"description": "The root of the file hierarchy. This will always be populated.\nFor some format_types - such as `TILT`, which are self-contained -\nthis is all of the data.\n\nOther types - such as `OBJ` - often reference other data elements.\nThese are contained in the resources field."
},
"formatType": {
"description": "A short string that identifies the format type of this representation.\nPossible values are: `FBX`, `GLTF`, `GLTF2`, `OBJ`, and `TILT`.",
"type": "string"
}
},
"id": "Format"
},
"Asset": {
"properties": {
"license": {
"enumDescriptions": [
"Unknown license value.",
"Creative Commons CC-BY 3.0. https://creativecommons.org/licenses/by/3.0/",
"Unlicensed: All Rights Reserved by the author. Unlicensed assets are\n**not** returned by List Assets."
],
"enum": [
"UNKNOWN",
"CREATIVE_COMMONS_BY",
"ALL_RIGHTS_RESERVED"
],
"description": "The license under which the author has made the asset available\nfor use, if any.",
"type": "string"
},
"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"
},
"isCurated": {
"description": "Whether this asset has been curated by the Poly team.",
"type": "boolean"
},
"formats": {
"description": "A list of Formats where each\nformat describes one representation of the asset.",
"type": "array",
"items": {
"$ref": "Format"
}
},
"presentationParams": {
"$ref": "PresentationParams",
"description": "Hints for displaying the asset. Note that these parameters are not\nimmutable; the author of an asset may change them post-publication."
},
"thumbnail": {
"description": "The thumbnail image for the asset.",
"$ref": "File"
},
"description": {
"description": "The human-readable description, set by the asset's author.",
"type": "string"
},
"visibility": {
"enum": [
"VISIBILITY_UNSPECIFIED",
"PRIVATE",
"UNLISTED",
"PUBLIC"
],
"description": "The visibility of the asset and who can access it.",
"type": "string",
"enumDescriptions": [
"Unknown (and invalid) visibility.",
"Access to the asset and its underlying files and resources is restricted to\nthe author.\n**Authentication:** You must supply an OAuth token that corresponds to the\nauthor's account.",
"Access to the asset and its underlying files and resources is available to\nanyone with the asset's name. Unlisted assets are **not**\nreturned by List Assets.",
"Access to the asset and its underlying files and resources is available\nto anyone."
]
},
"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"
},
"name": {
"description": "The unique identifier for the asset in the form:\n`assets/{ASSET_ID}`.",
"type": "string"
},
"displayName": {
"description": "The human-readable name, set by the asset's author.",
"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"
}
},
"id": "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.",
"type": "object"
},
"PresentationParams": {
"description": "Hints for displaying the asset, based on information available when the asset\nwas uploaded.",
"type": "object",
"properties": {
"orientingRotation": {
"$ref": "Quaternion",
"description": "A rotation that should be applied to the object root to make it upright.\nMore precisely, this quaternion transforms from \"object space\" (the space\nin which the object is defined) to \"presentation space\", a coordinate\nsystem where +Y is up, +X is right, -Z is forward. For example, if\nthe object is the Eiffel Tower, in its local coordinate system the\nobject might be laid out such that the base of the tower is on the\nYZ plane and the tip of the tower is towards positive X. In this case\nthis quaternion would specify a rotation (of 90 degrees about the Z\naxis) such that in the presentation space the base of the tower is\naligned with the XZ plane, and the tip of the tower lies towards +Y.\n\nThis rotation is unrelated to the object's pose in the web preview,\nwhich is just a camera position setting and is *not* reflected in this\nrotation.\n\nPlease note: this is applicable only to the gLTF."
},
"colorSpace": {
"description": "The materials' diffuse/albedo color. This does not apply to vertex colors\nor texture maps.",
"type": "string",
"enumDescriptions": [
"Invalid color value.",
"Linear color values. Default.",
"Colors should be converted to linear by assuming gamma = 2.0."
],
"enum": [
"UNKNOWN",
"LINEAR",
"GAMMA"
]
}
},
"id": "PresentationParams"
},
"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.",
"type": "object",
"properties": {
"y": {
"type": "number",
"description": "The y component.",
"format": "double"
},
"x": {
"description": "The x component.",
"format": "double",
"type": "number"
},
"z": {
"description": "The z component.",
"format": "double",
"type": "number"
},
"w": {
"description": "The scalar component.",
"format": "double",
"type": "number"
}
},
"id": "Quaternion"
},
"FormatComplexity": {
"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": {
"type": "string",
"description": "The estimated number of triangles.",
"format": "int64"
}
},
"id": "FormatComplexity",
"description": "Information on the complexity of this Format.",
"type": "object"
},
"ListUserAssetsResponse": {
"description": "A response message from a request to list.",
"type": "object",
"properties": {
"userAssets": {
"description": "A list of UserAssets matching the request.",
"type": "array",
"items": {
"$ref": "UserAsset"
}
},
"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"
}
},
"id": "ListUserAssetsResponse"
},
"UserAsset": {
"description": "Data about the user's asset.",
"type": "object",
"properties": {
"asset": {
"description": "An Asset.",
"$ref": "Asset"
}
},
"id": "UserAsset"
},
"File": {
"description": "Represents a file in Poly, which can be a root,\nresource, or thumbnail file.",
"type": "object",
"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"
}
},
"id": "File"
},
"ListLikedAssetsResponse": {
"description": "A response message from a request to list.",
"type": "object",
"properties": {
"nextPageToken": {
"type": "string",
"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."
},
"assets": {
"description": "A list of assets that match the criteria specified in the request.",
"type": "array",
"items": {
"$ref": "Asset"
}
},
"totalSize": {
"description": "The total number of assets in the list, without pagination.",
"format": "int32",
"type": "integer"
}
},
"id": "ListLikedAssetsResponse"
}
},
"icons": {
"x16": "http://www.google.com/images/icons/product/search-16.gif",
"x32": "http://www.google.com/images/icons/product/search-32.gif"
},
"protocol": "rest",
"canonicalName": "Poly Service",
"rootUrl": "https://poly.googleapis.com/",
"ownerDomain": "google.com",
"name": "poly",
"batchPath": "batch"
}