1{
2 "auth": {
3 "oauth2": {
4 "scopes": {
5 "https://www.googleapis.com/auth/urlshortener": {
6 "description": "Manage your goo.gl short URLs"
7 }
8 }
9 }
10 },
11 "basePath": "/urlshortener/v1/",
12 "baseUrl": "https://www.googleapis.com/urlshortener/v1/",
13 "batchPath": "batch/urlshortener/v1",
14 "description": "Lets you create, inspect, and manage goo.gl short URLs",
15 "discoveryVersion": "v1",
16 "documentationLink": "https://developers.google.com/url-shortener/v1/getting_started",
17 "etag": "\"Zkyw9ACJZUvcYmlFaKGChzhmtnE/jbVoxNHEXKU6P25SSgxX2Q4e0lo\"",
18 "icons": {
19 "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png",
20 "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png"
21 },
22 "id": "urlshortener:v1",
23 "kind": "discovery#restDescription",
24 "name": "urlshortener",
25 "ownerDomain": "google.com",
26 "ownerName": "Google",
27 "parameters": {
28 "alt": {
29 "default": "json",
30 "description": "Data format for the response.",
31 "enum": [
32 "json"
33 ],
34 "enumDescriptions": [
35 "Responses with Content-Type of application/json"
36 ],
37 "location": "query",
38 "type": "string"
39 },
40 "fields": {
41 "description": "Selector specifying which fields to include in a partial response.",
42 "location": "query",
43 "type": "string"
44 },
45 "key": {
46 "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.",
47 "location": "query",
48 "type": "string"
49 },
50 "oauth_token": {
51 "description": "OAuth 2.0 token for the current user.",
52 "location": "query",
53 "type": "string"
54 },
55 "prettyPrint": {
56 "default": "true",
57 "description": "Returns response with indentations and line breaks.",
58 "location": "query",
59 "type": "boolean"
60 },
61 "quotaUser": {
62 "description": "An opaque string that represents a user for quota purposes. Must not exceed 40 characters.",
63 "location": "query",
64 "type": "string"
65 },
66 "userIp": {
67 "description": "Deprecated. Please use quotaUser instead.",
68 "location": "query",
69 "type": "string"
70 }
71 },
72 "protocol": "rest",
73 "resources": {
74 "url": {
75 "methods": {
76 "get": {
77 "description": "Expands a short URL or gets creation time and analytics.",
78 "httpMethod": "GET",
79 "id": "urlshortener.url.get",
80 "parameterOrder": [
81 "shortUrl"
82 ],
83 "parameters": {
84 "projection": {
85 "description": "Additional information to return.",
86 "enum": [
87 "ANALYTICS_CLICKS",
88 "ANALYTICS_TOP_STRINGS",
89 "FULL"
90 ],
91 "enumDescriptions": [
92 "Returns only click counts.",
93 "Returns only top string counts.",
94 "Returns the creation timestamp and all available analytics."
95 ],
96 "location": "query",
97 "type": "string"
98 },
99 "shortUrl": {
100 "description": "The short URL, including the protocol.",
101 "location": "query",
102 "required": true,
103 "type": "string"
104 }
105 },
106 "path": "url",
107 "response": {
108 "$ref": "Url"
109 },
110 "scopes": [
111 "https://www.googleapis.com/auth/urlshortener"
112 ]
113 },
114 "insert": {
115 "description": "Creates a new short URL.",
116 "httpMethod": "POST",
117 "id": "urlshortener.url.insert",
118 "path": "url",
119 "request": {
120 "$ref": "Url"
121 },
122 "response": {
123 "$ref": "Url"
124 },
125 "scopes": [
126 "https://www.googleapis.com/auth/urlshortener"
127 ]
128 },
129 "list": {
130 "description": "Retrieves a list of URLs shortened by a user.",
131 "httpMethod": "GET",
132 "id": "urlshortener.url.list",
133 "parameters": {
134 "projection": {
135 "description": "Additional information to return.",
136 "enum": [
137 "ANALYTICS_CLICKS",
138 "FULL"
139 ],
140 "enumDescriptions": [
141 "Returns short URL click counts.",
142 "Returns short URL click counts."
143 ],
144 "location": "query",
145 "type": "string"
146 },
147 "start-token": {
148 "description": "Token for requesting successive pages of results.",
149 "location": "query",
150 "type": "string"
151 }
152 },
153 "path": "url/history",
154 "response": {
155 "$ref": "UrlHistory"
156 },
157 "scopes": [
158 "https://www.googleapis.com/auth/urlshortener"
159 ]
160 }
161 }
162 }
163 },
164 "revision": "20150519",
165 "rootUrl": "https://www.googleapis.com/",
166 "schemas": {
167 "AnalyticsSnapshot": {
168 "id": "AnalyticsSnapshot",
169 "properties": {
170 "browsers": {
171 "description": "Top browsers, e.g. \"Chrome\"; sorted by (descending) click counts. Only present if this data is available.",
172 "items": {
173 "$ref": "StringCount"
174 },
175 "type": "array"
176 },
177 "countries": {
178 "description": "Top countries (expressed as country codes), e.g. \"US\" or \"DE\"; sorted by (descending) click counts. Only present if this data is available.",
179 "items": {
180 "$ref": "StringCount"
181 },
182 "type": "array"
183 },
184 "longUrlClicks": {
185 "description": "Number of clicks on all goo.gl short URLs pointing to this long URL.",
186 "format": "int64",
187 "type": "string"
188 },
189 "platforms": {
190 "description": "Top platforms or OSes, e.g. \"Windows\"; sorted by (descending) click counts. Only present if this data is available.",
191 "items": {
192 "$ref": "StringCount"
193 },
194 "type": "array"
195 },
196 "referrers": {
197 "description": "Top referring hosts, e.g. \"www.google.com\"; sorted by (descending) click counts. Only present if this data is available.",
198 "items": {
199 "$ref": "StringCount"
200 },
201 "type": "array"
202 },
203 "shortUrlClicks": {
204 "description": "Number of clicks on this short URL.",
205 "format": "int64",
206 "type": "string"
207 }
208 },
209 "type": "object"
210 },
211 "AnalyticsSummary": {
212 "id": "AnalyticsSummary",
213 "properties": {
214 "allTime": {
215 "$ref": "AnalyticsSnapshot",
216 "description": "Click analytics over all time."
217 },
218 "day": {
219 "$ref": "AnalyticsSnapshot",
220 "description": "Click analytics over the last day."
221 },
222 "month": {
223 "$ref": "AnalyticsSnapshot",
224 "description": "Click analytics over the last month."
225 },
226 "twoHours": {
227 "$ref": "AnalyticsSnapshot",
228 "description": "Click analytics over the last two hours."
229 },
230 "week": {
231 "$ref": "AnalyticsSnapshot",
232 "description": "Click analytics over the last week."
233 }
234 },
235 "type": "object"
236 },
237 "StringCount": {
238 "id": "StringCount",
239 "properties": {
240 "count": {
241 "description": "Number of clicks for this top entry, e.g. for this particular country or browser.",
242 "format": "int64",
243 "type": "string"
244 },
245 "id": {
246 "description": "Label assigned to this top entry, e.g. \"US\" or \"Chrome\".",
247 "type": "string"
248 }
249 },
250 "type": "object"
251 },
252 "Url": {
253 "id": "Url",
254 "properties": {
255 "analytics": {
256 "$ref": "AnalyticsSummary",
257 "description": "A summary of the click analytics for the short and long URL. Might not be present if not requested or currently unavailable."
258 },
259 "created": {
260 "description": "Time the short URL was created; ISO 8601 representation using the yyyy-MM-dd'T'HH:mm:ss.SSSZZ format, e.g. \"2010-10-14T19:01:24.944+00:00\".",
261 "type": "string"
262 },
263 "id": {
264 "description": "Short URL, e.g. \"http://goo.gl/l6MS\".",
265 "type": "string"
266 },
267 "kind": {
268 "default": "urlshortener#url",
269 "description": "The fixed string \"urlshortener#url\".",
270 "type": "string"
271 },
272 "longUrl": {
273 "description": "Long URL, e.g. \"http://www.google.com/\". Might not be present if the status is \"REMOVED\".",
274 "type": "string"
275 },
276 "status": {
277 "description": "Status of the target URL. Possible values: \"OK\", \"MALWARE\", \"PHISHING\", or \"REMOVED\". A URL might be marked \"REMOVED\" if it was flagged as spam, for example.",
278 "type": "string"
279 }
280 },
281 "type": "object"
282 },
283 "UrlHistory": {
284 "id": "UrlHistory",
285 "properties": {
286 "items": {
287 "description": "A list of URL resources.",
288 "items": {
289 "$ref": "Url"
290 },
291 "type": "array"
292 },
293 "itemsPerPage": {
294 "description": "Number of items returned with each full \"page\" of results. Note that the last page could have fewer items than the \"itemsPerPage\" value.",
295 "format": "int32",
296 "type": "integer"
297 },
298 "kind": {
299 "default": "urlshortener#urlHistory",
300 "description": "The fixed string \"urlshortener#urlHistory\".",
301 "type": "string"
302 },
303 "nextPageToken": {
304 "description": "A token to provide to get the next page of results.",
305 "type": "string"
306 },
307 "totalItems": {
308 "description": "Total number of short URLs associated with this user (may be approximate).",
309 "format": "int32",
310 "type": "integer"
311 }
312 },
313 "type": "object"
314 }
315 },
316 "servicePath": "urlshortener/v1/",
317 "title": "URL Shortener API",
318 "version": "v1"
319}
View as plain text