dex/vendor/google.golang.org/api/youtubeanalytics/v1/youtubeanalytics-api.json
2016-04-08 11:56:29 -07:00

415 lines
15 KiB
JSON

{
"kind": "discovery#restDescription",
"etag": "\"FrPV2U6xXFUq8eRv_PO3IoAURkc/nlDKGR94Mbaj_YAIBNSZijmIvJQ\"",
"discoveryVersion": "v1",
"id": "youtubeAnalytics:v1",
"name": "youtubeAnalytics",
"canonicalName": "YouTube Analytics",
"version": "v1",
"revision": "20140724",
"title": "YouTube Analytics API",
"description": "Retrieve your YouTube Analytics reports.",
"ownerDomain": "google.com",
"ownerName": "Google",
"icons": {
"x16": "http://www.google.com/images/icons/product/youtube-16.png",
"x32": "http://www.google.com/images/icons/product/youtube-32.png"
},
"documentationLink": "http://developers.google.com/youtube/analytics/",
"protocol": "rest",
"baseUrl": "https://www.googleapis.com/youtube/analytics/v1/",
"basePath": "/youtube/analytics/v1/",
"rootUrl": "https://www.googleapis.com/",
"servicePath": "youtube/analytics/v1/",
"batchPath": "batch",
"parameters": {
"alt": {
"type": "string",
"description": "Data format for the response.",
"default": "json",
"enum": [
"csv",
"json"
],
"enumDescriptions": [
"Responses with Content-Type of text/csv",
"Responses with Content-Type of application/json"
],
"location": "query"
},
"fields": {
"type": "string",
"description": "Selector specifying which fields to include in a partial response.",
"location": "query"
},
"key": {
"type": "string",
"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.",
"location": "query"
},
"oauth_token": {
"type": "string",
"description": "OAuth 2.0 token for the current user.",
"location": "query"
},
"prettyPrint": {
"type": "boolean",
"description": "Returns response with indentations and line breaks.",
"default": "true",
"location": "query"
},
"quotaUser": {
"type": "string",
"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. Overrides userIp if both are provided.",
"location": "query"
},
"userIp": {
"type": "string",
"description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.",
"location": "query"
}
},
"auth": {
"oauth2": {
"scopes": {
"https://www.googleapis.com/auth/yt-analytics-monetary.readonly": {
"description": "View YouTube Analytics monetary reports for your YouTube content"
},
"https://www.googleapis.com/auth/yt-analytics.readonly": {
"description": "View YouTube Analytics reports for your YouTube content"
}
}
}
},
"schemas": {
"BatchReportDefinitionList": {
"id": "BatchReportDefinitionList",
"type": "object",
"description": "A paginated list of batchReportDefinition resources returned in response to a youtubeAnalytics.batchReportDefinitions.list request.",
"properties": {
"items": {
"type": "array",
"description": "A list of batchReportDefinition resources that match the request criteria.",
"items": {
"$ref": "BatchReportDefinitionTemplate"
}
},
"kind": {
"type": "string",
"description": "This value specifies the type of data included in the API response. For the list method, the kind property value is youtubeAnalytics#batchReportDefinitionList.",
"default": "youtubeAnalytics#batchReportDefinitionList"
}
}
},
"BatchReportDefinitionTemplate": {
"id": "BatchReportDefinitionTemplate",
"type": "object",
"description": "Contains single batchReportDefinition resource.",
"properties": {
"defaultOutput": {
"type": "array",
"description": "Default report definition's output.",
"items": {
"type": "object",
"properties": {
"format": {
"type": "string",
"description": "Format of the output."
},
"type": {
"type": "string",
"description": "Type of the output.",
"default": "cloudStorageOutput"
}
}
}
},
"id": {
"type": "string",
"description": "The ID that YouTube assigns and uses to uniquely identify the report definition."
},
"name": {
"type": "string",
"description": "Name of the report definition."
},
"status": {
"type": "string",
"description": "Status of the report definition."
},
"type": {
"type": "string",
"description": "Type of the report definition."
}
}
},
"BatchReportList": {
"id": "BatchReportList",
"type": "object",
"description": "A paginated list of batchReport resources returned in response to a youtubeAnalytics.batchReport.list request.",
"properties": {
"items": {
"type": "array",
"description": "A list of batchReport resources that match the request criteria.",
"items": {
"$ref": "BatchReportTemplate"
}
},
"kind": {
"type": "string",
"description": "This value specifies the type of data included in the API response. For the list method, the kind property value is youtubeAnalytics#batchReportList.",
"default": "youtubeAnalytics#batchReportList"
}
}
},
"BatchReportTemplate": {
"id": "BatchReportTemplate",
"type": "object",
"description": "Contains single batchReport resource.",
"properties": {
"id": {
"type": "string",
"description": "The ID that YouTube assigns and uses to uniquely identify the report."
},
"outputs": {
"type": "array",
"description": "Report outputs.",
"items": {
"type": "object",
"properties": {
"downloadUrl": {
"type": "string",
"description": "Cloud storage URL to download this report. This URL is valid for 30 minutes."
},
"format": {
"type": "string",
"description": "Format of the output."
},
"type": {
"type": "string",
"description": "Type of the output.",
"default": "cloudStorageOutput"
}
}
}
},
"report_id": {
"type": "string",
"description": "The ID of the the report definition."
},
"timeSpan": {
"type": "object",
"description": "Period included in the report. For reports containing all entities endTime is not set. Both startTime and endTime are inclusive.",
"properties": {
"endTime": {
"type": "string",
"description": "End of the period included in the report. Inclusive. For reports containing all entities endTime is not set.",
"format": "date-time"
},
"startTime": {
"type": "string",
"description": "Start of the period included in the report. Inclusive.",
"format": "date-time"
}
}
},
"timeUpdated": {
"type": "string",
"description": "The time when the report was updated.",
"format": "date-time"
}
}
},
"ResultTable": {
"id": "ResultTable",
"type": "object",
"description": "Contains a single result table. The table is returned as an array of rows that contain the values for the cells of the table. Depending on the metric or dimension, the cell can contain a string (video ID, country code) or a number (number of views or number of likes).",
"properties": {
"columnHeaders": {
"type": "array",
"description": "This value specifies information about the data returned in the rows fields. Each item in the columnHeaders list identifies a field returned in the rows value, which contains a list of comma-delimited data. The columnHeaders list will begin with the dimensions specified in the API request, which will be followed by the metrics specified in the API request. The order of both dimensions and metrics will match the ordering in the API request. For example, if the API request contains the parameters dimensions=ageGroup,gender&metrics=viewerPercentage, the API response will return columns in this order: ageGroup,gender,viewerPercentage.",
"items": {
"type": "object",
"properties": {
"columnType": {
"type": "string",
"description": "The type of the column (DIMENSION or METRIC)."
},
"dataType": {
"type": "string",
"description": "The type of the data in the column (STRING, INTEGER, FLOAT, etc.)."
},
"name": {
"type": "string",
"description": "The name of the dimension or metric."
}
}
}
},
"kind": {
"type": "string",
"description": "This value specifies the type of data included in the API response. For the query method, the kind property value will be youtubeAnalytics#resultTable.",
"default": "youtubeAnalytics#resultTable"
},
"rows": {
"type": "array",
"description": "The list contains all rows of the result table. Each item in the list is an array that contains comma-delimited data corresponding to a single row of data. The order of the comma-delimited data fields will match the order of the columns listed in the columnHeaders field. If no data is available for the given query, the rows element will be omitted from the response. The response for a query with the day dimension will not contain rows for the most recent days.",
"items": {
"type": "array",
"items": {
"type": "any"
}
}
}
}
}
},
"resources": {
"batchReportDefinitions": {
"methods": {
"list": {
"id": "youtubeAnalytics.batchReportDefinitions.list",
"path": "batchReportDefinitions",
"httpMethod": "GET",
"description": "Retrieves a list of available batch report definitions.",
"parameters": {
"onBehalfOfContentOwner": {
"type": "string",
"description": "The onBehalfOfContentOwner parameter identifies the content owner that the user is acting on behalf of.",
"required": true,
"location": "query"
}
},
"parameterOrder": [
"onBehalfOfContentOwner"
],
"response": {
"$ref": "BatchReportDefinitionList"
},
"scopes": [
"https://www.googleapis.com/auth/yt-analytics-monetary.readonly",
"https://www.googleapis.com/auth/yt-analytics.readonly"
]
}
}
},
"batchReports": {
"methods": {
"list": {
"id": "youtubeAnalytics.batchReports.list",
"path": "batchReports",
"httpMethod": "GET",
"description": "Retrieves a list of processed batch reports.",
"parameters": {
"batchReportDefinitionId": {
"type": "string",
"description": "The batchReportDefinitionId parameter specifies the ID of the batch reportort definition for which you are retrieving reports.",
"required": true,
"location": "query"
},
"onBehalfOfContentOwner": {
"type": "string",
"description": "The onBehalfOfContentOwner parameter identifies the content owner that the user is acting on behalf of.",
"required": true,
"location": "query"
}
},
"parameterOrder": [
"batchReportDefinitionId",
"onBehalfOfContentOwner"
],
"response": {
"$ref": "BatchReportList"
},
"scopes": [
"https://www.googleapis.com/auth/yt-analytics-monetary.readonly",
"https://www.googleapis.com/auth/yt-analytics.readonly"
]
}
}
},
"reports": {
"methods": {
"query": {
"id": "youtubeAnalytics.reports.query",
"path": "reports",
"httpMethod": "GET",
"description": "Retrieve your YouTube Analytics reports.",
"parameters": {
"dimensions": {
"type": "string",
"description": "A comma-separated list of YouTube Analytics dimensions, such as views or ageGroup,gender. See the Available Reports document for a list of the reports that you can retrieve and the dimensions used for those reports. Also see the Dimensions document for definitions of those dimensions.",
"pattern": "[0-9a-zA-Z,]+",
"location": "query"
},
"end-date": {
"type": "string",
"description": "The end date for fetching YouTube Analytics data. The value should be in YYYY-MM-DD format.",
"required": true,
"pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}",
"location": "query"
},
"filters": {
"type": "string",
"description": "A list of filters that should be applied when retrieving YouTube Analytics data. The Available Reports document identifies the dimensions that can be used to filter each report, and the Dimensions document defines those dimensions. If a request uses multiple filters, join them together with a semicolon (;), and the returned result table will satisfy both filters. For example, a filters parameter value of video==dMH0bHeiRNg;country==IT restricts the result set to include data for the given video in Italy.",
"location": "query"
},
"ids": {
"type": "string",
"description": "Identifies the YouTube channel or content owner for which you are retrieving YouTube Analytics data.\n- To request data for a YouTube user, set the ids parameter value to channel==CHANNEL_ID, where CHANNEL_ID specifies the unique YouTube channel ID.\n- To request data for a YouTube CMS content owner, set the ids parameter value to contentOwner==OWNER_NAME, where OWNER_NAME is the CMS name of the content owner.",
"required": true,
"pattern": "[a-zA-Z]+==[a-zA-Z0-9_+-]+",
"location": "query"
},
"max-results": {
"type": "integer",
"description": "The maximum number of rows to include in the response.",
"format": "int32",
"minimum": "1",
"location": "query"
},
"metrics": {
"type": "string",
"description": "A comma-separated list of YouTube Analytics metrics, such as views or likes,dislikes. See the Available Reports document for a list of the reports that you can retrieve and the metrics available in each report, and see the Metrics document for definitions of those metrics.",
"required": true,
"pattern": "[0-9a-zA-Z,]+",
"location": "query"
},
"sort": {
"type": "string",
"description": "A comma-separated list of dimensions or metrics that determine the sort order for YouTube Analytics data. By default the sort order is ascending. The '-' prefix causes descending sort order.",
"pattern": "[-0-9a-zA-Z,]+",
"location": "query"
},
"start-date": {
"type": "string",
"description": "The start date for fetching YouTube Analytics data. The value should be in YYYY-MM-DD format.",
"required": true,
"pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}",
"location": "query"
},
"start-index": {
"type": "integer",
"description": "An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter (one-based, inclusive).",
"format": "int32",
"minimum": "1",
"location": "query"
}
},
"parameterOrder": [
"ids",
"start-date",
"end-date",
"metrics"
],
"response": {
"$ref": "ResultTable"
},
"scopes": [
"https://www.googleapis.com/auth/yt-analytics-monetary.readonly",
"https://www.googleapis.com/auth/yt-analytics.readonly"
]
}
}
}
}
}