blob: 98ef67513724aae9d7e779eccf318824790ea16a [file] [log] [blame]
{
"kind": "discovery#restDescription",
"etag": "\"0kaFfN0xfjZjASExv-gUnrWhdto/K1JioxMHlF8MIXHfwPqF4rpXsEg\"",
"discoveryVersion": "v1",
"id": "youtubeAnalytics:v1",
"name": "youtubeAnalytics",
"canonicalName": "YouTube Analytics",
"version": "v1",
"revision": "20130422",
"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": {
"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": {
"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"
]
}
}
}
}
}