Skip to content

Commit 89e7f81

Browse files
authored
updated read me to point to api docs fixes #2279 (#2280)
* updated read me to point to api docs fixes #2279 * api -> API
1 parent d041b73 commit 89e7f81

File tree

1 file changed

+29
-123
lines changed

1 file changed

+29
-123
lines changed

README.md

Lines changed: 29 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ Experimenter is a platform for managing experiments in [Mozilla Firefox](https:/
2525

2626
[https://experimenter.services.mozilla.com/](https://experimenter.services.mozilla.com/)
2727

28-
2928
## What is an experiment?
3029

3130
An experiment is a way to measure how a change to your product affects how people use it.
@@ -52,48 +51,47 @@ An experiment has three parts:
5251
1. Analyze and collect the results to understand how the new feature impacted users
5352
1. Do it again!
5453

55-
5654
## Installation
5755

58-
1. Install [docker](https://www.docker.com/) on your machine
56+
1. Install [docker](https://www.docker.com/) on your machine
5957

60-
1. Clone the repo
58+
1. Clone the repo
6159

6260
git clone <your fork>
6361

64-
1. Copy the sample env file
62+
1. Copy the sample env file
6563

6664
cp .env.sample .env
6765

68-
1. Set DEBUG=True for local development
66+
1. Set DEBUG=True for local development
6967

7068
vi .env
7169

72-
1. Create a new secret key and put it in .env
70+
1. Create a new secret key and put it in .env
7371

7472
make secretkey
7573

76-
1. Run tests
74+
1. Run tests
7775

7876
make test
7977

80-
1. Run database migrations
78+
1. Run database migrations
8179

8280
make migrate
8381

84-
1. Make a local user
82+
1. Make a local user
8583

8684
make createuser
8785

88-
1. Load the initial data
86+
1. Load the initial data
8987

9088
make load_locales_countries
9189

92-
1. Run a dev instance
90+
1. Run a dev instance
9391

9492
make up
9593

96-
1. Navigate to it and add an SSL exception to your browser
94+
1. Navigate to it and add an SSL exception to your browser
9795

9896
https://localhost/
9997

@@ -106,167 +104,75 @@ Experimenter uses [docker](https://www.docker.com/) for all development, testing
106104
The following helpful commands have been provided via a Makefile:
107105

108106
### build
107+
109108
Build the application container by executing the [build script](https://github.com/mozilla/experimenter/blob/master/scripts/build.sh)
110109

111110
### compose_build
111+
112112
Build the supporting services (nginx, postgresql) defined in the [compose file](https://github.com/mozilla/experimenter/blob/master/docker-compose.yml)
113113

114114
### up
115+
115116
Start a dev server listening on port 80 using the [Django runserver](https://docs.djangoproject.com/en/1.10/ref/django-admin/#runserver)
116117

117118
### test
119+
118120
Run the Django test suite with code coverage
119121

120122
### lint
123+
121124
Run flake8 against the code
122125

123126
### check
127+
124128
Run both test and lint
125129

126130
### migrate
131+
127132
Apply all django migrations
128133

129134
### createuser
135+
130136
Create an admin user in the local dev instance
131137

132138
### load_locales_countries
139+
133140
Populates locales and countries
134141

135142
### load_dummy_experiments
143+
136144
Populates db with dummy experiments
137145

138146
### shell
147+
139148
Start an ipython shell inside the container (this lets you import and test code, interact with the db, etc)
140149

141150
### bash
151+
142152
Start a bash shell inside the container (this lets you interact with the containerized filesystem)
143153

144154
### ssl
155+
145156
Create dummy SSL certs to use the dev server over a locally secure
146157
connection. This helps test client behaviour with a secure
147158
connection. This task is run automatically when needed.
148159

149160
### kill
161+
150162
Stop and delete all docker containers.
151-
WARNING: this will remove your database and all data. Use this to reset your dev environment.
163+
WARNING: this will remove your database and all data. Use this to reset your dev environment.
152164

153165
### refresh
166+
154167
Will run kill, migrate, load_locales_countries load_dummy_experiments
155168

156169
### up_all
170+
157171
will start up a normandy and delivery console instance. Prereqs. Symlink normandy and delivery console eg. `ln -s ../normandy normandy`, ensure user is assigned superuser status
158172

159173
## API
160174

161-
### GET /api/v1/experiments/
162-
List all of the started experiments.
163-
164-
#### Optional Query Parameters
165-
status - Return only the experiments with the given status, options are:
166-
- 'Draft'
167-
- 'Review'
168-
- 'Ship'
169-
- 'Accepted'
170-
- 'Live'
171-
- 'Complete'
172-
- 'Rejected'
173-
174-
Example: GET /api/v1/experiments/?status=Pending
175-
176-
[
177-
{
178-
"client_matching":"Some \"additional\" filtering",
179-
"locales": [{"code":"en-US", "name": "English (US)"}],
180-
"countries": [{"code": "US", "name": "United States of America"}],
181-
"control":{
182-
"description":"Eos sunt adipisci beatae. Aut sunt totam maiores reprehenderit sed vero. Nam fugit sequi repellendus cumque. Fugit maxime suscipit eius quas iure exercitationem voluptatibus.",
183-
"name":"Seamless 5thgeneration task-force",
184-
"ratio":7,
185-
"slug":"seamless-5thgeneration-task-force",
186-
"value":"\"synergized-client-driven-artificial-intelligence\""
187-
},
188-
"end_date":1505767052000.0,
189-
"experiment_slug":"pref-flip-re-contextualized-systemic-synergy-self-enabling-needs-based-hardware",
190-
"experiment_url":"https://localhost/experiments/experiment/144/change/",
191-
"firefox_channel":"Release",
192-
"firefox_version":"57.0",
193-
"name":"Self-enabling needs-based hardware",
194-
"population_percent":"60.0000",
195-
"pref_branch":"default",
196-
"pref_name":"browser.phased.hybrid.implementation.enabled",
197-
"pref_type":"string",
198-
"public_name": "An experiment!",
199-
"public_description": "We are experimenting!",
200-
"slug":"self-enabling-needs-based-hardware",
201-
"start_date":1505767052000.0,
202-
"status":"Complete",
203-
"variant":{
204-
"description":"Modi perferendis repudiandae ducimus dolorem eum rem. Esse porro iure consectetur facere. Quidem nam enim dolore eius ab facilis.",
205-
"name":"Business-focused upward-trending Graphic Interface",
206-
"ratio":2,
207-
"slug":"business-focused-upward-trending-graphic-interface",
208-
"value":"\"synchronized-upward-trending-knowledgebase\""
209-
}
210-
},
211-
]
212-
213-
### GET /api/v1/experiments/<experiment_slug>/
214-
Return a serialization of the requested experiment.
215-
216-
Example: GET /api/v1/experiments/self-enabled-needs-based-hardware/
217-
218-
{
219-
"client_matching":"Some \"additional\" filtering",
220-
"locales": [{"code":"en-US", "name": "English (US)"}],
221-
"countries": [{"code": "US", "name": "United States of America"}],
222-
"control":{
223-
"description":"Eos sunt adipisci beatae. Aut sunt totam maiores reprehenderit sed vero. Nam fugit sequi repellendus cumque. Fugit maxime suscipit eius quas iure exercitationem voluptatibus.",
224-
"name":"Seamless 5thgeneration task-force",
225-
"ratio":7,
226-
"slug":"seamless-5thgeneration-task-force",
227-
"value":"\"synergized-client-driven-artificial-intelligence\""
228-
},
229-
"end_date":1505767052000.0,
230-
"experiment_slug":"pref-flip-re-contextualized-systemic-synergy-self-enabling-needs-based-hardware",
231-
"experiment_url":"https://localhost/experiments/experiment/144/change/",
232-
"firefox_channel":"Release",
233-
"firefox_version":"57.0",
234-
"name":"Self-enabling needs-based hardware",
235-
"objectives":"Illo maiores libero ratione. Dolorum nostrum molestiae blanditiis cumque. Libero saepe ipsum accusantium maxime.",
236-
"population_percent":"60.0000",
237-
"pref_branch":"default",
238-
"pref_name":"browser.phased.hybrid.implementation.enabled",
239-
"pref_type":"string",
240-
"addon_name": "Self-Enabling Addon",
241-
"addon_experiment_id": "self-enabling-addon",
242-
"addon_release_url": "https://example.com/release.xpi",
243-
"slug":"self-enabling-needs-based-hardware",
244-
"start_date":1505767052000.0,
245-
"variant":{
246-
"description":"Modi perferendis repudiandae ducimus dolorem eum rem. Esse porro iure consectetur facere. Quidem nam enim dolore eius ab facilis.",
247-
"name":"Business-focused upward-trending Graphic Interface",
248-
"ratio":2,
249-
"slug":"business-focused-upward-trending-graphic-interface",
250-
"value":"\"synchronized-upward-trending-knowledgebase\""
251-
},
252-
"changes":{
253-
{
254-
"changed_on":"2019-04-01T17:53:30.747620Z",
255-
"changed_by":42,
256-
"pretty_status":"Created Experiment",
257-
"new_status":"Draft",
258-
"old_status":null
259-
},
260-
{
261-
"changed_on":"2019-04-16T17:53:30.747620Z",
262-
"changed_by":43,
263-
"pretty_status":"Ready for Sign-Off",
264-
"new_status":"Review",
265-
"old_status":"Draft"
266-
}
267-
}
268-
}
269-
175+
API documentation can be found [here](https://htmlpreview.github.io/?https://github.com/mozilla/experimenter/blob/master/app/experimenter/docs/swagger-ui.html)
270176

271177
## Contributing
272178

0 commit comments

Comments
 (0)