blob: 1c6586002c6dd70f97e6396906e1d17016ea4be2 [file] [log] [blame]
{
"batchPath": "batch",
"revision": "20170823",
"documentationLink": "https://developers.google.com/youtube/reporting/v1/reports/",
"id": "youtubereporting:v1",
"title": "YouTube Reporting API",
"discoveryVersion": "v1",
"ownerName": "Google",
"resources": {
"reportTypes": {
"methods": {
"list": {
"httpMethod": "GET",
"parameterOrder": [],
"response": {
"$ref": "ListReportTypesResponse"
},
"scopes": [
"https://www.googleapis.com/auth/yt-analytics-monetary.readonly",
"https://www.googleapis.com/auth/yt-analytics.readonly"
],
"parameters": {
"pageSize": {
"location": "query",
"format": "int32",
"description": "Requested page size. Server may return fewer report types than requested.\nIf unspecified, server will pick an appropriate default.",
"type": "integer"
},
"onBehalfOfContentOwner": {
"location": "query",
"description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).",
"type": "string"
},
"includeSystemManaged": {
"description": "If set to true, also system-managed report types will be returned;\notherwise only the report types that can be used to create new reporting\njobs will be returned.",
"type": "boolean",
"location": "query"
},
"pageToken": {
"location": "query",
"description": "A token identifying a page of results the server should return. Typically,\nthis is the value of\nListReportTypesResponse.next_page_token\nreturned in response to the previous call to the `ListReportTypes` method.",
"type": "string"
}
},
"flatPath": "v1/reportTypes",
"path": "v1/reportTypes",
"id": "youtubereporting.reportTypes.list",
"description": "Lists report types."
}
}
},
"media": {
"methods": {
"download": {
"description": "Method for media download. Download is supported\non the URI `/v1/media/{+name}?alt=media`.",
"supportsMediaDownload": true,
"httpMethod": "GET",
"parameterOrder": [
"resourceName"
],
"response": {
"$ref": "Media"
},
"scopes": [
"https://www.googleapis.com/auth/yt-analytics-monetary.readonly",
"https://www.googleapis.com/auth/yt-analytics.readonly"
],
"parameters": {
"resourceName": {
"description": "Name of the media that is being downloaded. See\nReadRequest.resource_name.",
"type": "string",
"required": true,
"pattern": "^.+$",
"location": "path"
}
},
"flatPath": "v1/media/{mediaId}",
"path": "v1/media/{+resourceName}",
"id": "youtubereporting.media.download"
}
}
},
"jobs": {
"methods": {
"delete": {
"description": "Deletes a job.",
"httpMethod": "DELETE",
"parameterOrder": [
"jobId"
],
"response": {
"$ref": "Empty"
},
"parameters": {
"jobId": {
"location": "path",
"description": "The ID of the job to delete.",
"type": "string",
"required": true
},
"onBehalfOfContentOwner": {
"description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).",
"type": "string",
"location": "query"
}
},
"scopes": [
"https://www.googleapis.com/auth/yt-analytics-monetary.readonly",
"https://www.googleapis.com/auth/yt-analytics.readonly"
],
"flatPath": "v1/jobs/{jobId}",
"path": "v1/jobs/{jobId}",
"id": "youtubereporting.jobs.delete"
},
"get": {
"description": "Gets a job.",
"httpMethod": "GET",
"parameterOrder": [
"jobId"
],
"response": {
"$ref": "Job"
},
"parameters": {
"jobId": {
"location": "path",
"description": "The ID of the job to retrieve.",
"type": "string",
"required": true
},
"onBehalfOfContentOwner": {
"description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).",
"type": "string",
"location": "query"
}
},
"scopes": [
"https://www.googleapis.com/auth/yt-analytics-monetary.readonly",
"https://www.googleapis.com/auth/yt-analytics.readonly"
],
"flatPath": "v1/jobs/{jobId}",
"path": "v1/jobs/{jobId}",
"id": "youtubereporting.jobs.get"
},
"list": {
"flatPath": "v1/jobs",
"id": "youtubereporting.jobs.list",
"path": "v1/jobs",
"description": "Lists jobs.",
"response": {
"$ref": "ListJobsResponse"
},
"parameterOrder": [],
"httpMethod": "GET",
"parameters": {
"includeSystemManaged": {
"description": "If set to true, also system-managed jobs will be returned; otherwise only\nuser-created jobs will be returned. System-managed jobs can neither be\nmodified nor deleted.",
"type": "boolean",
"location": "query"
},
"pageToken": {
"description": "A token identifying a page of results the server should return. Typically,\nthis is the value of\nListReportTypesResponse.next_page_token\nreturned in response to the previous call to the `ListJobs` method.",
"type": "string",
"location": "query"
},
"pageSize": {
"location": "query",
"format": "int32",
"description": "Requested page size. Server may return fewer jobs than requested.\nIf unspecified, server will pick an appropriate default.",
"type": "integer"
},
"onBehalfOfContentOwner": {
"location": "query",
"description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).",
"type": "string"
}
},
"scopes": [
"https://www.googleapis.com/auth/yt-analytics-monetary.readonly",
"https://www.googleapis.com/auth/yt-analytics.readonly"
]
},
"create": {
"request": {
"$ref": "Job"
},
"description": "Creates a job and returns it.",
"response": {
"$ref": "Job"
},
"parameterOrder": [],
"httpMethod": "POST",
"scopes": [
"https://www.googleapis.com/auth/yt-analytics-monetary.readonly",
"https://www.googleapis.com/auth/yt-analytics.readonly"
],
"parameters": {
"onBehalfOfContentOwner": {
"location": "query",
"description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).",
"type": "string"
}
},
"flatPath": "v1/jobs",
"id": "youtubereporting.jobs.create",
"path": "v1/jobs"
}
},
"resources": {
"reports": {
"methods": {
"get": {
"flatPath": "v1/jobs/{jobId}/reports/{reportId}",
"path": "v1/jobs/{jobId}/reports/{reportId}",
"id": "youtubereporting.jobs.reports.get",
"description": "Gets the metadata of a specific report.",
"httpMethod": "GET",
"parameterOrder": [
"jobId",
"reportId"
],
"response": {
"$ref": "Report"
},
"scopes": [
"https://www.googleapis.com/auth/yt-analytics-monetary.readonly",
"https://www.googleapis.com/auth/yt-analytics.readonly"
],
"parameters": {
"reportId": {
"description": "The ID of the report to retrieve.",
"type": "string",
"required": true,
"location": "path"
},
"jobId": {
"description": "The ID of the job.",
"type": "string",
"required": true,
"location": "path"
},
"onBehalfOfContentOwner": {
"description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).",
"type": "string",
"location": "query"
}
}
},
"list": {
"flatPath": "v1/jobs/{jobId}/reports",
"id": "youtubereporting.jobs.reports.list",
"path": "v1/jobs/{jobId}/reports",
"description": "Lists reports created by a specific job.\nReturns NOT_FOUND if the job does not exist.",
"response": {
"$ref": "ListReportsResponse"
},
"parameterOrder": [
"jobId"
],
"httpMethod": "GET",
"parameters": {
"createdAfter": {
"location": "query",
"format": "google-datetime",
"description": "If set, only reports created after the specified date/time are returned.",
"type": "string"
},
"startTimeAtOrAfter": {
"format": "google-datetime",
"description": "If set, only reports whose start time is greater than or equal the\nspecified date/time are returned.",
"type": "string",
"location": "query"
},
"pageToken": {
"location": "query",
"description": "A token identifying a page of results the server should return. Typically,\nthis is the value of\nListReportsResponse.next_page_token\nreturned in response to the previous call to the `ListReports` method.",
"type": "string"
},
"pageSize": {
"location": "query",
"format": "int32",
"description": "Requested page size. Server may return fewer report types than requested.\nIf unspecified, server will pick an appropriate default.",
"type": "integer"
},
"onBehalfOfContentOwner": {
"description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).",
"type": "string",
"location": "query"
},
"startTimeBefore": {
"format": "google-datetime",
"description": "If set, only reports whose start time is smaller than the specified\ndate/time are returned.",
"type": "string",
"location": "query"
},
"jobId": {
"description": "The ID of the job.",
"type": "string",
"required": true,
"location": "path"
}
},
"scopes": [
"https://www.googleapis.com/auth/yt-analytics-monetary.readonly",
"https://www.googleapis.com/auth/yt-analytics.readonly"
]
}
}
}
}
}
},
"parameters": {
"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": {
"location": "query",
"description": "Pretty-print response.",
"default": "true",
"type": "boolean"
},
"bearer_token": {
"location": "query",
"description": "OAuth bearer token.",
"type": "string"
},
"oauth_token": {
"description": "OAuth 2.0 token for the current user.",
"type": "string",
"location": "query"
},
"upload_protocol": {
"location": "query",
"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
"type": "string"
},
"prettyPrint": {
"location": "query",
"description": "Returns response with indentations and line breaks.",
"default": "true",
"type": "boolean"
},
"fields": {
"description": "Selector specifying which fields to include in a partial response.",
"type": "string",
"location": "query"
},
"uploadType": {
"location": "query",
"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
"type": "string"
},
"$.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": {
"enum": [
"json",
"media",
"proto"
],
"type": "string",
"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"
}
},
"schemas": {
"Report": {
"description": "A report's metadata including the URL from which the report itself can be\ndownloaded.",
"type": "object",
"properties": {
"jobExpireTime": {
"format": "google-datetime",
"description": "The date/time when the job this report belongs to will expire/expired.",
"type": "string"
},
"endTime": {
"format": "google-datetime",
"description": "The end of the time period that the report instance covers. The value is\nexclusive.",
"type": "string"
},
"downloadUrl": {
"description": "The URL from which the report can be downloaded (max. 1000 characters).",
"type": "string"
},
"startTime": {
"format": "google-datetime",
"description": "The start of the time period that the report instance covers. The value is\ninclusive.",
"type": "string"
},
"createTime": {
"format": "google-datetime",
"description": "The date/time when this report was created.",
"type": "string"
},
"jobId": {
"description": "The ID of the job that created this report.",
"type": "string"
},
"id": {
"description": "The server-generated ID of the report.",
"type": "string"
}
},
"id": "Report"
},
"Empty": {
"description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.",
"type": "object",
"properties": {},
"id": "Empty"
},
"ListReportTypesResponse": {
"description": "Response message for ReportingService.ListReportTypes.",
"type": "object",
"properties": {
"reportTypes": {
"description": "The list of report types.",
"items": {
"$ref": "ReportType"
},
"type": "array"
},
"nextPageToken": {
"description": "A token to retrieve next page of results.\nPass this value in the\nListReportTypesRequest.page_token\nfield in the subsequent call to `ListReportTypes` method to retrieve the next\npage of results.",
"type": "string"
}
},
"id": "ListReportTypesResponse"
},
"ReportType": {
"description": "A report type.",
"type": "object",
"properties": {
"deprecateTime": {
"format": "google-datetime",
"description": "The date/time when this report type was/will be deprecated.",
"type": "string"
},
"name": {
"description": "The name of the report type (max. 100 characters).",
"type": "string"
},
"systemManaged": {
"description": "True if this a system-managed report type; otherwise false. Reporting jobs\nfor system-managed report types are created automatically and can thus not\nbe used in the `CreateJob` method.",
"type": "boolean"
},
"id": {
"description": "The ID of the report type (max. 100 characters).",
"type": "string"
}
},
"id": "ReportType"
},
"ListJobsResponse": {
"description": "Response message for ReportingService.ListJobs.",
"type": "object",
"properties": {
"jobs": {
"description": "The list of jobs.",
"items": {
"$ref": "Job"
},
"type": "array"
},
"nextPageToken": {
"description": "A token to retrieve next page of results.\nPass this value in the\nListJobsRequest.page_token\nfield in the subsequent call to `ListJobs` method to retrieve the next\npage of results.",
"type": "string"
}
},
"id": "ListJobsResponse"
},
"Job": {
"description": "A job creating reports of a specific type.",
"type": "object",
"properties": {
"createTime": {
"format": "google-datetime",
"description": "The creation date/time of the job.",
"type": "string"
},
"reportTypeId": {
"description": "The type of reports this job creates. Corresponds to the ID of a\nReportType.",
"type": "string"
},
"expireTime": {
"format": "google-datetime",
"description": "The date/time when this job will expire/expired. After a job expired, no\nnew reports are generated.",
"type": "string"
},
"name": {
"description": "The name of the job (max. 100 characters).",
"type": "string"
},
"id": {
"description": "The server-generated ID of the job (max. 40 characters).",
"type": "string"
},
"systemManaged": {
"description": "True if this a system-managed job that cannot be modified by the user;\notherwise false.",
"type": "boolean"
}
},
"id": "Job"
},
"ListReportsResponse": {
"description": "Response message for ReportingService.ListReports.",
"type": "object",
"properties": {
"reports": {
"description": "The list of report types.",
"items": {
"$ref": "Report"
},
"type": "array"
},
"nextPageToken": {
"description": "A token to retrieve next page of results.\nPass this value in the\nListReportsRequest.page_token\nfield in the subsequent call to `ListReports` method to retrieve the next\npage of results.",
"type": "string"
}
},
"id": "ListReportsResponse"
},
"Media": {
"description": "Media resource.",
"type": "object",
"properties": {
"resourceName": {
"description": "Name of the media resource.",
"type": "string"
}
},
"id": "Media"
}
},
"protocol": "rest",
"icons": {
"x16": "http://www.google.com/images/icons/product/search-16.gif",
"x32": "http://www.google.com/images/icons/product/search-32.gif"
},
"version": "v1",
"baseUrl": "https://youtubereporting.googleapis.com/",
"canonicalName": "YouTube Reporting",
"auth": {
"oauth2": {
"scopes": {
"https://www.googleapis.com/auth/yt-analytics.readonly": {
"description": "View YouTube Analytics reports for your YouTube content"
},
"https://www.googleapis.com/auth/yt-analytics-monetary.readonly": {
"description": "View monetary and non-monetary YouTube Analytics reports for your YouTube content"
}
}
}
},
"kind": "discovery#restDescription",
"description": "Schedules reporting jobs containing your YouTube Analytics data and downloads the resulting bulk data reports in the form of CSV files.",
"servicePath": "",
"rootUrl": "https://youtubereporting.googleapis.com/",
"basePath": "",
"ownerDomain": "google.com",
"name": "youtubereporting"
}