Skip to content

Commit d8113ef

Browse files
author
Kevin Friedman
committed
Added Swagger docs
1 parent efa5345 commit d8113ef

1 file changed

Lines changed: 210 additions & 0 deletions

File tree

swagger/v0.1.json

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
2+
{
3+
"swagger": "2.0",
4+
"info": {
5+
"version": "0.1",
6+
"title": "Google Analytics Proxy API"
7+
},
8+
"host": "api.nypltech.org",
9+
"basePath": "/api",
10+
"schemes": [
11+
"https"
12+
],
13+
"tags": [
14+
{
15+
"name": "gaproxy",
16+
"description": "Google Analytics Proxy API"
17+
}
18+
],
19+
"paths": {
20+
"/v0.1/javascript/gaproxy.js": {
21+
"get": {
22+
"tags": [
23+
"gaproxy"
24+
],
25+
"summary": "Generate a JavaScript tracking snippet (gaproxy.js)",
26+
"description": "See: https://developers.google.com/analytics/devguides/collection/analyticsjs/#the_javascript_tracking_snippet",
27+
"produces": [
28+
"application/javascript"
29+
],
30+
"responses": {
31+
"200": {
32+
"description": "JavaScript tracking snippet",
33+
"type": "string"
34+
}
35+
}
36+
}
37+
},
38+
"/v0.1/ga-proxy/create": {
39+
"get": {
40+
"tags": [
41+
"gaproxy"
42+
],
43+
"summary": "Create a Tracker object",
44+
"description": "See: https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers",
45+
"parameters": [
46+
{
47+
"name": "trackingId",
48+
"in": "query",
49+
"required": true,
50+
"type": "string"
51+
},
52+
{
53+
"name": "cookieDomain",
54+
"in": "query",
55+
"required": true,
56+
"type": "string"
57+
},
58+
{
59+
"name": "clientId",
60+
"in": "query",
61+
"required": true,
62+
"type": "string"
63+
},
64+
{
65+
"name": "metricNameSpace",
66+
"in": "query",
67+
"required": false,
68+
"type": "string"
69+
}
70+
],
71+
"produces": [
72+
"image/gif"
73+
],
74+
"responses": {
75+
"200": {
76+
"description": "A 1x1 pixel in GIF format"
77+
}
78+
}
79+
}
80+
},
81+
"/v0.1/ga-proxy/send/pageview": {
82+
"get": {
83+
"tags": [
84+
"gaproxy"
85+
],
86+
"summary": "Send page tracking information",
87+
"description": "See: https://developers.google.com/analytics/devguides/collection/analyticsjs/pages",
88+
"parameters": [
89+
{
90+
"name": "trackingId",
91+
"in": "query",
92+
"required": true,
93+
"type": "string"
94+
},
95+
{
96+
"name": "cookieDomain",
97+
"in": "query",
98+
"required": true,
99+
"type": "string"
100+
},
101+
{
102+
"name": "clientId",
103+
"in": "query",
104+
"required": true,
105+
"type": "string"
106+
},
107+
{
108+
"name": "metricNameSpace",
109+
"in": "query",
110+
"required": false,
111+
"type": "string"
112+
},
113+
{
114+
"name": "page",
115+
"in": "query",
116+
"required": true,
117+
"type": "string"
118+
},
119+
{
120+
"name": "host",
121+
"in": "query",
122+
"required": false,
123+
"type": "string"
124+
}
125+
],
126+
"produces": [
127+
"image/gif"
128+
],
129+
"responses": {
130+
"200": {
131+
"description": "A 1x1 pixel in GIF format"
132+
}
133+
}
134+
}
135+
},
136+
"/v0.1/ga-proxy/send/event": {
137+
"get": {
138+
"tags": [
139+
"gaproxy"
140+
],
141+
"summary": "Send an event",
142+
"description": "See: https://developers.google.com/analytics/devguides/collection/analyticsjs/events",
143+
"parameters": [
144+
{
145+
"name": "trackingId",
146+
"in": "query",
147+
"required": true,
148+
"type": "string"
149+
},
150+
{
151+
"name": "cookieDomain",
152+
"in": "query",
153+
"required": true,
154+
"type": "string"
155+
},
156+
{
157+
"name": "clientId",
158+
"in": "query",
159+
"required": true,
160+
"type": "string"
161+
},
162+
{
163+
"name": "metricNameSpace",
164+
"in": "query",
165+
"required": true,
166+
"type": "string"
167+
},
168+
{
169+
"name": "metricNameSpace",
170+
"in": "query",
171+
"required": true,
172+
"type": "string"
173+
},
174+
{
175+
"name": "eventCategory",
176+
"in": "query",
177+
"required": true,
178+
"type": "string"
179+
},
180+
{
181+
"name": "eventAction",
182+
"in": "query",
183+
"required": true,
184+
"type": "string"
185+
},
186+
{
187+
"name": "eventLabel",
188+
"in": "query",
189+
"required": false,
190+
"type": "string"
191+
},
192+
{
193+
"name": "eventValue",
194+
"in": "query",
195+
"required": false,
196+
"type": "string"
197+
}
198+
],
199+
"produces": [
200+
"image/gif"
201+
],
202+
"responses": {
203+
"200": {
204+
"description": "A 1x1 pixel in GIF format"
205+
}
206+
}
207+
}
208+
}
209+
}
210+
}

0 commit comments

Comments
 (0)