@itentialopensource/adapter-bitbucket 0.3.7 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/AUTH.md +35 -0
  2. package/BROKER.md +199 -0
  3. package/CALLS.md +1741 -0
  4. package/CHANGELOG.md +72 -10
  5. package/CODE_OF_CONDUCT.md +12 -17
  6. package/CONTRIBUTING.md +3 -148
  7. package/ENHANCE.md +69 -0
  8. package/PROPERTIES.md +641 -0
  9. package/README.md +235 -576
  10. package/SUMMARY.md +9 -0
  11. package/SYSTEMINFO.md +20 -0
  12. package/TROUBLESHOOT.md +47 -0
  13. package/adapter.js +471 -819
  14. package/adapterBase.js +843 -419
  15. package/changelogs/CHANGELOG.md +134 -0
  16. package/entities/.generic/action.json +105 -0
  17. package/entities/.generic/schema.json +6 -1
  18. package/error.json +6 -0
  19. package/metadata.json +75 -0
  20. package/package.json +27 -26
  21. package/pronghorn.json +527 -116
  22. package/propertiesDecorators.json +14 -0
  23. package/propertiesSchema.json +827 -6
  24. package/refs?service=git-upload-pack +0 -0
  25. package/report/adapter-openapi.json +15713 -0
  26. package/report/adapter-openapi.yaml +13295 -0
  27. package/report/adapterInfo.json +10 -0
  28. package/report/updateReport1652978796126.json +120 -0
  29. package/report/updateReport1691507757454.json +120 -0
  30. package/report/updateReport1692202749809.json +120 -0
  31. package/report/updateReport1694455448924.json +120 -0
  32. package/report/updateReport1694457678311.json +120 -0
  33. package/report/updateReport1694463179777.json +120 -0
  34. package/report/updateReport1698421384524.json +120 -0
  35. package/sampleProperties.json +153 -3
  36. package/test/integration/adapterTestBasicGet.js +3 -5
  37. package/test/integration/adapterTestConnectivity.js +91 -42
  38. package/test/integration/adapterTestIntegration.js +155 -109
  39. package/test/unit/adapterBaseTestUnit.js +388 -308
  40. package/test/unit/adapterTestUnit.js +399 -260
  41. package/utils/adapterInfo.js +206 -0
  42. package/utils/addAuth.js +1 -1
  43. package/utils/artifactize.js +1 -1
  44. package/utils/checkMigrate.js +1 -1
  45. package/utils/entitiesToDB.js +12 -57
  46. package/utils/findPath.js +1 -1
  47. package/utils/methodDocumentor.js +273 -0
  48. package/utils/modify.js +13 -15
  49. package/utils/packModificationScript.js +1 -1
  50. package/utils/pre-commit.sh +5 -0
  51. package/utils/taskMover.js +309 -0
  52. package/utils/tbScript.js +123 -53
  53. package/utils/tbUtils.js +87 -49
  54. package/utils/testRunner.js +17 -17
  55. package/utils/troubleshootingAdapter.js +9 -6
  56. package/workflows/README.md +0 -3
package/CALLS.md ADDED
@@ -0,0 +1,1741 @@
1
+ ## Using this Adapter
2
+
3
+ The `adapter.js` file contains the calls the adapter makes available to the rest of the Itential Platform. The API detailed for these calls should be available through JSDOC. The following is a brief summary of the calls.
4
+
5
+ ### Generic Adapter Calls
6
+
7
+ These are adapter methods that IAP or you might use. There are some other methods not shown here that might be used for internal adapter functionality.
8
+
9
+ <table border="1" class="bordered-table">
10
+ <tr>
11
+ <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Method Signature</span></th>
12
+ <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Description</span></th>
13
+ <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Workflow?</span></th>
14
+ </tr>
15
+ <tr>
16
+ <td style="padding:15px">connect()</td>
17
+ <td style="padding:15px">This call is run when the Adapter is first loaded by he Itential Platform. It validates the properties have been provided correctly.</td>
18
+ <td style="padding:15px">No</td>
19
+ </tr>
20
+ <tr>
21
+ <td style="padding:15px">healthCheck(callback)</td>
22
+ <td style="padding:15px">This call ensures that the adapter can communicate with Adapter for Bitbucket. The actual call that is used is defined in the adapter properties and .system entities action.json file.</td>
23
+ <td style="padding:15px">No</td>
24
+ </tr>
25
+ <tr>
26
+ <td style="padding:15px">refreshProperties(properties)</td>
27
+ <td style="padding:15px">This call provides the adapter the ability to accept property changes without having to restart the adapter.</td>
28
+ <td style="padding:15px">No</td>
29
+ </tr>
30
+ <tr>
31
+ <td style="padding:15px">encryptProperty(property, technique, callback)</td>
32
+ <td style="padding:15px">This call will take the provided property and technique, and return the property encrypted with the technique. This allows the property to be used in the adapterProps section for the credential password so that the password does not have to be in clear text. The adapter will decrypt the property as needed for communications with Adapter for Bitbucket.</td>
33
+ <td style="padding:15px">No</td>
34
+ </tr>
35
+ <tr>
36
+ <td style="padding:15px">iapUpdateAdapterConfiguration(configFile, changes, entity, type, action, callback)</td>
37
+ <td style="padding:15px">This call provides the ability to update the adapter configuration from IAP - includes actions, schema, mockdata and other configurations.</td>
38
+ <td style="padding:15px">Yes</td>
39
+ </tr>
40
+ <tr>
41
+ <td style="padding:15px">iapSuspendAdapter(mode, callback)</td>
42
+ <td style="padding:15px">This call provides the ability to suspend the adapter and either have requests rejected or put into a queue to be processed after the adapter is resumed.</td>
43
+ <td style="padding:15px">Yes</td>
44
+ </tr>
45
+ <tr>
46
+ <td style="padding:15px">iapUnsuspendAdapter(callback)</td>
47
+ <td style="padding:15px">This call provides the ability to resume a suspended adapter. Any requests in queue will be processed before new requests.</td>
48
+ <td style="padding:15px">Yes</td>
49
+ </tr>
50
+ <tr>
51
+ <td style="padding:15px">iapGetAdapterQueue(callback)</td>
52
+ <td style="padding:15px">This call will return the requests that are waiting in the queue if throttling is enabled.</td>
53
+ <td style="padding:15px">Yes</td>
54
+ </tr>
55
+ <tr>
56
+ <td style="padding:15px">iapFindAdapterPath(apiPath, callback)</td>
57
+ <td style="padding:15px">This call provides the ability to see if a particular API path is supported by the adapter.</td>
58
+ <td style="padding:15px">Yes</td>
59
+ </tr>
60
+ <tr>
61
+ <td style="padding:15px">iapTroubleshootAdapter(props, persistFlag, adapter, callback)</td>
62
+ <td style="padding:15px">This call can be used to check on the performance of the adapter - it checks connectivity, healthcheck and basic get calls.</td>
63
+ <td style="padding:15px">Yes</td>
64
+ </tr>
65
+ <tr>
66
+ <td style="padding:15px">iapRunAdapterHealthcheck(adapter, callback)</td>
67
+ <td style="padding:15px">This call will return the results of a healthcheck.</td>
68
+ <td style="padding:15px">Yes</td>
69
+ </tr>
70
+ <tr>
71
+ <td style="padding:15px">iapRunAdapterConnectivity(callback)</td>
72
+ <td style="padding:15px">This call will return the results of a connectivity check.</td>
73
+ <td style="padding:15px">Yes</td>
74
+ </tr>
75
+ <tr>
76
+ <td style="padding:15px">iapRunAdapterBasicGet(callback)</td>
77
+ <td style="padding:15px">This call will return the results of running basic get API calls.</td>
78
+ <td style="padding:15px">Yes</td>
79
+ </tr>
80
+ <tr>
81
+ <td style="padding:15px">iapMoveAdapterEntitiesToDB(callback)</td>
82
+ <td style="padding:15px">This call will push the adapter configuration from the entities directory into the Adapter or IAP Database.</td>
83
+ <td style="padding:15px">Yes</td>
84
+ </tr>
85
+ <tr>
86
+ <td style="padding:15px">iapDeactivateTasks(tasks, callback)</td>
87
+ <td style="padding:15px">This call provides the ability to remove tasks from the adapter.</td>
88
+ <td style="padding:15px">Yes</td>
89
+ </tr>
90
+ <tr>
91
+ <td style="padding:15px">iapActivateTasks(tasks, callback)</td>
92
+ <td style="padding:15px">This call provides the ability to add deactivated tasks back into the adapter.</td>
93
+ <td style="padding:15px">Yes</td>
94
+ </tr>
95
+ <tr>
96
+ <td style="padding:15px">iapExpandedGenericAdapterRequest(metadata, uriPath, restMethod, pathVars, queryData, requestBody, addlHeaders, callback)</td>
97
+ <td style="padding:15px">This is an expanded Generic Call. The metadata object allows us to provide many new capabilities within the generic request.</td>
98
+ <td style="padding:15px">Yes</td>
99
+ </tr>
100
+ <tr>
101
+ <td style="padding:15px">genericAdapterRequest(uriPath, restMethod, queryData, requestBody, addlHeaders, callback)</td>
102
+ <td style="padding:15px">This call allows you to provide the path to have the adapter call. It is an easy way to incorporate paths that have not been built into the adapter yet.</td>
103
+ <td style="padding:15px">Yes</td>
104
+ </tr>
105
+ <tr>
106
+ <td style="padding:15px">genericAdapterRequestNoBasePath(uriPath, restMethod, queryData, requestBody, addlHeaders, callback)</td>
107
+ <td style="padding:15px">This call is the same as the genericAdapterRequest only it does not add a base_path or version to the call.</td>
108
+ <td style="padding:15px">Yes</td>
109
+ </tr>
110
+ <tr>
111
+ <td style="padding:15px">iapRunAdapterLint(callback)</td>
112
+ <td style="padding:15px">Runs lint on the addapter and provides the information back.</td>
113
+ <td style="padding:15px">Yes</td>
114
+ </tr>
115
+ <tr>
116
+ <td style="padding:15px">iapRunAdapterTests(callback)</td>
117
+ <td style="padding:15px">Runs baseunit and unit tests on the adapter and provides the information back.</td>
118
+ <td style="padding:15px">Yes</td>
119
+ </tr>
120
+ <tr>
121
+ <td style="padding:15px">iapGetAdapterInventory(callback)</td>
122
+ <td style="padding:15px">This call provides some inventory related information about the adapter.</td>
123
+ <td style="padding:15px">Yes</td>
124
+ </tr>
125
+ </table>
126
+ <br>
127
+
128
+ ### Adapter Cache Calls
129
+
130
+ These are adapter methods that are used for adapter caching. If configured, the adapter will cache based on the interval provided. However, you can force a population of the cache manually as well.
131
+
132
+ <table border="1" class="bordered-table">
133
+ <tr>
134
+ <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Method Signature</span></th>
135
+ <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Description</span></th>
136
+ <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Workflow?</span></th>
137
+ </tr>
138
+ <tr>
139
+ <td style="padding:15px">iapPopulateEntityCache(entityTypes, callback)</td>
140
+ <td style="padding:15px">This call populates the adapter cache.</td>
141
+ <td style="padding:15px">Yes</td>
142
+ </tr>
143
+ <tr>
144
+ <td style="padding:15px">iapRetrieveEntitiesCache(entityType, options, callback)</td>
145
+ <td style="padding:15px">This call retrieves the specific items from the adapter cache.</td>
146
+ <td style="padding:15px">Yes</td>
147
+ </tr>
148
+ </table>
149
+ <br>
150
+
151
+ ### Adapter Broker Calls
152
+
153
+ These are adapter methods that are used to integrate to IAP Brokers. This adapter currently supports the following broker calls.
154
+
155
+ <table border="1" class="bordered-table">
156
+ <tr>
157
+ <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Method Signature</span></th>
158
+ <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Description</span></th>
159
+ <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Workflow?</span></th>
160
+ </tr>
161
+ <tr>
162
+ <td style="padding:15px">hasEntities(entityType, entityList, callback)</td>
163
+ <td style="padding:15px">This call is utilized by the IAP Device Broker to determine if the adapter has a specific entity and item of the entity.</td>
164
+ <td style="padding:15px">No</td>
165
+ </tr>
166
+ <tr>
167
+ <td style="padding:15px">getDevice(deviceName, callback)</td>
168
+ <td style="padding:15px">This call returns the details of the requested device.</td>
169
+ <td style="padding:15px">No</td>
170
+ </tr>
171
+ <tr>
172
+ <td style="padding:15px">getDevicesFiltered(options, callback)</td>
173
+ <td style="padding:15px">This call returns the list of devices that match the criteria provided in the options filter.</td>
174
+ <td style="padding:15px">No</td>
175
+ </tr>
176
+ <tr>
177
+ <td style="padding:15px">isAlive(deviceName, callback)</td>
178
+ <td style="padding:15px">This call returns whether the device status is active</td>
179
+ <td style="padding:15px">No</td>
180
+ </tr>
181
+ <tr>
182
+ <td style="padding:15px">getConfig(deviceName, format, callback)</td>
183
+ <td style="padding:15px">This call returns the configuration for the selected device.</td>
184
+ <td style="padding:15px">No</td>
185
+ </tr>
186
+ <tr>
187
+ <td style="padding:15px">iapGetDeviceCount(callback)</td>
188
+ <td style="padding:15px">This call returns the count of devices.</td>
189
+ <td style="padding:15px">No</td>
190
+ </tr>
191
+ </table>
192
+ <br>
193
+
194
+ ### Specific Adapter Calls
195
+
196
+ Specific adapter calls are built based on the API of the Bitbucket. The Adapter Builder creates the proper method comments for generating JS-DOC for the adapter. This is the best way to get information on the calls.
197
+
198
+ <table border="1" class="bordered-table">
199
+ <tr>
200
+ <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Method Signature</span></th>
201
+ <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Description</span></th>
202
+ <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Path</span></th>
203
+ <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Workflow?</span></th>
204
+ </tr>
205
+ <tr>
206
+ <td style="padding:15px">deleteAddon(callback)</td>
207
+ <td style="padding:15px"></td>
208
+ <td style="padding:15px">{base_path}/{version}/addon?{query}</td>
209
+ <td style="padding:15px">Yes</td>
210
+ </tr>
211
+ <tr>
212
+ <td style="padding:15px">putAddon(callback)</td>
213
+ <td style="padding:15px"></td>
214
+ <td style="padding:15px">{base_path}/{version}/addon?{query}</td>
215
+ <td style="padding:15px">Yes</td>
216
+ </tr>
217
+ <tr>
218
+ <td style="padding:15px">getAddonLinkers(callback)</td>
219
+ <td style="padding:15px"></td>
220
+ <td style="padding:15px">{base_path}/{version}/addon/linkers?{query}</td>
221
+ <td style="padding:15px">Yes</td>
222
+ </tr>
223
+ <tr>
224
+ <td style="padding:15px">getAddonLinkersLinkerKey(linkerKey, callback)</td>
225
+ <td style="padding:15px"></td>
226
+ <td style="padding:15px">{base_path}/{version}/addon/linkers/{pathv1}?{query}</td>
227
+ <td style="padding:15px">Yes</td>
228
+ </tr>
229
+ <tr>
230
+ <td style="padding:15px">deleteAddonLinkersLinkerKeyValues(linkerKey, callback)</td>
231
+ <td style="padding:15px"></td>
232
+ <td style="padding:15px">{base_path}/{version}/addon/linkers/{pathv1}/values?{query}</td>
233
+ <td style="padding:15px">Yes</td>
234
+ </tr>
235
+ <tr>
236
+ <td style="padding:15px">getAddonLinkersLinkerKeyValues(linkerKey, callback)</td>
237
+ <td style="padding:15px"></td>
238
+ <td style="padding:15px">{base_path}/{version}/addon/linkers/{pathv1}/values?{query}</td>
239
+ <td style="padding:15px">Yes</td>
240
+ </tr>
241
+ <tr>
242
+ <td style="padding:15px">postAddonLinkersLinkerKeyValues(linkerKey, callback)</td>
243
+ <td style="padding:15px"></td>
244
+ <td style="padding:15px">{base_path}/{version}/addon/linkers/{pathv1}/values?{query}</td>
245
+ <td style="padding:15px">Yes</td>
246
+ </tr>
247
+ <tr>
248
+ <td style="padding:15px">putAddonLinkersLinkerKeyValues(linkerKey, callback)</td>
249
+ <td style="padding:15px"></td>
250
+ <td style="padding:15px">{base_path}/{version}/addon/linkers/{pathv1}/values?{query}</td>
251
+ <td style="padding:15px">Yes</td>
252
+ </tr>
253
+ <tr>
254
+ <td style="padding:15px">deleteAddonLinkersLinkerKeyValues2(linkerKey, callback)</td>
255
+ <td style="padding:15px"></td>
256
+ <td style="padding:15px">{base_path}/{version}/addon/linkers/{pathv1}/values/?{query}</td>
257
+ <td style="padding:15px">Yes</td>
258
+ </tr>
259
+ <tr>
260
+ <td style="padding:15px">getAddonLinkersLinkerKeyValues2(linkerKey, callback)</td>
261
+ <td style="padding:15px"></td>
262
+ <td style="padding:15px">{base_path}/{version}/addon/linkers/{pathv1}/values/?{query}</td>
263
+ <td style="padding:15px">Yes</td>
264
+ </tr>
265
+ <tr>
266
+ <td style="padding:15px">getHookEvents(callback)</td>
267
+ <td style="padding:15px">Returns the webhook resource or subject types on which webhooks can
268
+ be registered.
269
+ Each resource/subject type contains an `events` link that returns the
270
+ paginated list of specific events each individual subject type can
271
+ emit.
272
+ This endpoint is publicly accessible and does not require
273
+ authentication or scopes.
274
+ Example:
275
+ ```
276
+ $ curl https://api.bitbucket.org/2.0/hook_events
277
+ {
278
+ "repository": {
279
+ "links": {
280
+ "events": {
281
+ "href": "https://api.bitbucket.org/2.0/hook_eve...(description truncated)</td>
282
+ <td style="padding:15px">{base_path}/{version}/hook_events?{query}</td>
283
+ <td style="padding:15px">Yes</td>
284
+ </tr>
285
+ <tr>
286
+ <td style="padding:15px">getHookEventsSubjectType(subjectType = 'user', callback)</td>
287
+ <td style="padding:15px">Returns a paginated list of all valid webhook events for the
288
+ specified entity.
289
+ This is public data that does not require any scopes or authentication.
290
+ Example:
291
+ NOTE: The following example is a truncated response object for the `team` `subject_type`.
292
+ We return the same structure for the other `subject_type` objects.
293
+ ```
294
+ $ curl https://api.bitbucket.org/2.0/hook_events/team
295
+ {
296
+ "page": 1,
297
+ "pagelen": 30,
298
+ "size": 21,
299
+ "values": [
300
+ {
301
+ "category": "Repository",
302
+ ...(description truncated)</td>
303
+ <td style="padding:15px">{base_path}/{version}/hook_events/{pathv1}?{query}</td>
304
+ <td style="padding:15px">Yes</td>
305
+ </tr>
306
+ <tr>
307
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugHooks(username, repoSlug, callback)</td>
308
+ <td style="padding:15px">Returns a paginated list of webhooks installed on this repository.</td>
309
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/hooks?{query}</td>
310
+ <td style="padding:15px">Yes</td>
311
+ </tr>
312
+ <tr>
313
+ <td style="padding:15px">postRepositoriesUsernameRepoSlugHooks(username, repoSlug, callback)</td>
314
+ <td style="padding:15px">Creates a new webhook on the specified repository.
315
+ Example:
316
+ ```
317
+ $ curl -X POST -u credentials -H 'Content-Type: application/json' https://api.bitbucket.org/2.0/repositories/username/slug/hooks -d '
318
+ {
319
+ "description": "Webhook Description",
320
+ "url": "https://example.com/",
321
+ "active": true,
322
+ "events": [
323
+ "repo:push",
324
+ "issue:created",
325
+ "issue:updated"
326
+ ]
327
+ }'
328
+ ```
329
+ Note that this call requires the webhook scope, as well as any sco...(description truncated)</td>
330
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/hooks?{query}</td>
331
+ <td style="padding:15px">Yes</td>
332
+ </tr>
333
+ <tr>
334
+ <td style="padding:15px">deleteRepositoriesUsernameRepoSlugHooksUid(username, repoSlug, uid, callback)</td>
335
+ <td style="padding:15px">Deletes the specified webhook subscription from the given
336
+ repository.</td>
337
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/hooks/{pathv3}?{query}</td>
338
+ <td style="padding:15px">Yes</td>
339
+ </tr>
340
+ <tr>
341
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugHooksUid(username, repoSlug, uid, callback)</td>
342
+ <td style="padding:15px">Returns the webhook with the specified id installed on the specified
343
+ repository.</td>
344
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/hooks/{pathv3}?{query}</td>
345
+ <td style="padding:15px">Yes</td>
346
+ </tr>
347
+ <tr>
348
+ <td style="padding:15px">postRepositoriesUsernameRepoSlugSrc(username, repoSlug, body, filename, attribute, callback)</td>
349
+ <td style="padding:15px">Creates a new repository.
350
+ Note: In order to set the project for the newly created repository,
351
+ pass in either the project key or the project UUID as part of the
352
+ request body as shown in the examples below:
353
+ ```
354
+ $ curl -X POST -H "Content-Type: application/json" -d '{
355
+ "scm": "git",
356
+ "project": {
357
+ "key": "MARS"
358
+ }
359
+ }' https://api.bitbucket.org/2.0/repositories/teamsinspace/hablanding
360
+ ```
361
+ or
362
+ ```
363
+ $ curl -X POST -H "Content-Type: application/json" -d '{
364
+ "scm": "git",
365
+ "project": ...(description truncated)</td>
366
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/src?{query}</td>
367
+ <td style="padding:15px">Yes</td>
368
+ </tr>
369
+ <tr>
370
+ <td style="padding:15px">CreateACommitByUploadingAFile(username, repoSlug, message, author, parents, files, branch, callback)</td>
371
+ <td style="padding:15px">This endpoint is used to create new commits in the repository by uploading files.</td>
372
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/src?{query}</td>
373
+ <td style="padding:15px">Yes</td>
374
+ </tr>
375
+ <tr>
376
+ <td style="padding:15px">putRepositoriesUsernameRepoSlugHooksUid(username, repoSlug, uid, callback)</td>
377
+ <td style="padding:15px">Updates the specified webhook subscription.
378
+ The following properties can be mutated:
379
+ * `description`
380
+ * `url`
381
+ * `active`
382
+ * `events`</td>
383
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/hooks/{pathv3}?{query}</td>
384
+ <td style="padding:15px">Yes</td>
385
+ </tr>
386
+ <tr>
387
+ <td style="padding:15px">getRepositories(after, callback)</td>
388
+ <td style="padding:15px">Returns a paginated list of all public repositories.
389
+ This endpoint also supports filtering and sorting of the results. See
390
+ [filtering and sorting](../meta/filtering) for more details.</td>
391
+ <td style="padding:15px">{base_path}/{version}/repositories?{query}</td>
392
+ <td style="padding:15px">Yes</td>
393
+ </tr>
394
+ <tr>
395
+ <td style="padding:15px">getRepositoriesUsername(username, role = 'admin', callback)</td>
396
+ <td style="padding:15px">Returns a paginated list of all repositories owned by the specified
397
+ account or UUID.
398
+ The result can be narrowed down based on the authenticated user's role.
399
+ E.g. with `?role=contributor`, only those repositories that the
400
+ authenticated user has write access to are returned (this includes any
401
+ repo the user is an admin on, as that implies write access).
402
+ This endpoint also supports filtering and sorting of the results. See
403
+ [filtering and sorting](../../meta/filtering) for more details.</td>
404
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}?{query}</td>
405
+ <td style="padding:15px">Yes</td>
406
+ </tr>
407
+ <tr>
408
+ <td style="padding:15px">deleteRepositoriesUsernameRepoSlug(username, repoSlug, callback)</td>
409
+ <td style="padding:15px">Deletes the repository. This is an irreversible operation.
410
+ This does not affect its forks.</td>
411
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}?{query}</td>
412
+ <td style="padding:15px">Yes</td>
413
+ </tr>
414
+ <tr>
415
+ <td style="padding:15px">getRepositoriesUsernameRepoSlug(username, repoSlug, callback)</td>
416
+ <td style="padding:15px">Returns the object describing this repository.</td>
417
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}?{query}</td>
418
+ <td style="padding:15px">Yes</td>
419
+ </tr>
420
+ <tr>
421
+ <td style="padding:15px">postRepositoriesUsernameRepoSlug(username, repoSlug, body, callback)</td>
422
+ <td style="padding:15px">Creates a new repository.
423
+ Note: In order to set the project for the newly created repository,
424
+ pass in either the project key or the project UUID as part of the
425
+ request body as shown in the examples below:
426
+ ```
427
+ $ curl -X POST -H "Content-Type: application/json" -d '{
428
+ "scm": "git",
429
+ "project": {
430
+ "key": "MARS"
431
+ }
432
+ }' https://api.bitbucket.org/2.0/repositories/teamsinspace/hablanding
433
+ ```
434
+ or
435
+ ```
436
+ $ curl -X POST -H "Content-Type: application/json" -d '{
437
+ "scm": "git",
438
+ "project": ...(description truncated)</td>
439
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}?{query}</td>
440
+ <td style="padding:15px">Yes</td>
441
+ </tr>
442
+ <tr>
443
+ <td style="padding:15px">putRepositoriesUsernameRepoSlug(username, repoSlug, body, callback)</td>
444
+ <td style="padding:15px">Since this endpoint can be used to both update and to create a
445
+ repository, the request body depends on the intent.
446
+ ### Creation
447
+ See the POST documentation for the repository endpoint for an example
448
+ of the request body.
449
+ ### Update
450
+ Note: Changing the `name` of the repository will cause the location to
451
+ be changed. This is because the URL of the repo is derived from the
452
+ name (a process called slugification). In such a scenario, it is
453
+ possible for the request to fail if the newly created slug conflic...(description truncated)</td>
454
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}?{query}</td>
455
+ <td style="padding:15px">Yes</td>
456
+ </tr>
457
+ <tr>
458
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugCommitNodeStatuses(username, repoSlug, node, callback)</td>
459
+ <td style="padding:15px">Returns all statuses (e.g. build results) for a specific commit.</td>
460
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/commit/{pathv3}/statuses?{query}</td>
461
+ <td style="padding:15px">Yes</td>
462
+ </tr>
463
+ <tr>
464
+ <td style="padding:15px">postRepositoriesUsernameRepoSlugCommitNodeStatusesBuild(username, repoSlug, node, callback)</td>
465
+ <td style="padding:15px">Creates a new build status against the specified commit.
466
+ If the specified key already exists, the existing status object will
467
+ be overwritten.
468
+ When creating a new commit status, you can use a URI template for the URL.
469
+ Templates are URLs that contain variable names that Bitbucket will
470
+ evaluate at runtime whenever the URL is displayed anywhere similar to
471
+ parameter substitution in
472
+ [Bitbucket Connect](https://developer.atlassian.com/bitbucket/concepts/context-parameters.html).
473
+ For example, one could ...(description truncated)</td>
474
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/commit/{pathv3}/statuses/build?{query}</td>
475
+ <td style="padding:15px">Yes</td>
476
+ </tr>
477
+ <tr>
478
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugCommitNodeStatusesBuildKey(username, repoSlug, node, key, callback)</td>
479
+ <td style="padding:15px">Returns the specified build status for a commit.</td>
480
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/commit/{pathv3}/statuses/build/{pathv4}?{query}</td>
481
+ <td style="padding:15px">Yes</td>
482
+ </tr>
483
+ <tr>
484
+ <td style="padding:15px">putRepositoriesUsernameRepoSlugCommitNodeStatusesBuildKey(username, repoSlug, node, key, body, callback)</td>
485
+ <td style="padding:15px">Used to update the current status of a build status object on the
486
+ specific commit.
487
+ This operation can also be used to change other properties of the
488
+ build status:
489
+ * `state`
490
+ * `name`
491
+ * `description`
492
+ * `url`
493
+ * `refname`
494
+ The `key` cannot be changed.</td>
495
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/commit/{pathv3}/statuses/build/{pathv4}?{query}</td>
496
+ <td style="padding:15px">Yes</td>
497
+ </tr>
498
+ <tr>
499
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugForks(username, repoSlug, callback)</td>
500
+ <td style="padding:15px">Returns a paginated list of all the forks of the specified
501
+ repository.</td>
502
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/forks?{query}</td>
503
+ <td style="padding:15px">Yes</td>
504
+ </tr>
505
+ <tr>
506
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugPullrequestsPullRequestIdStatuses(username, repoSlug, pullRequestId, callback)</td>
507
+ <td style="padding:15px">Returns all statuses (e.g. build results) for the given pull
508
+ request.</td>
509
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pullrequests/{pathv3}/statuses?{query}</td>
510
+ <td style="padding:15px">Yes</td>
511
+ </tr>
512
+ <tr>
513
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugWatchers(username, repoSlug, callback)</td>
514
+ <td style="padding:15px">Returns a paginated list of all the watchers on the specified
515
+ repository.</td>
516
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/watchers?{query}</td>
517
+ <td style="padding:15px">Yes</td>
518
+ </tr>
519
+ <tr>
520
+ <td style="padding:15px">getTeamsUsernameHooks(username, callback)</td>
521
+ <td style="padding:15px">Returns a paginated list of webhooks installed on this team.</td>
522
+ <td style="padding:15px">{base_path}/{version}/teams/{pathv1}/hooks?{query}</td>
523
+ <td style="padding:15px">Yes</td>
524
+ </tr>
525
+ <tr>
526
+ <td style="padding:15px">postTeamsUsernameHooks(username, callback)</td>
527
+ <td style="padding:15px">Creates a new webhook on the specified team.
528
+ Team webhooks are fired for events from all repositories belonging to
529
+ that team account.
530
+ Note that only admins can install webhooks on teams.</td>
531
+ <td style="padding:15px">{base_path}/{version}/teams/{pathv1}/hooks?{query}</td>
532
+ <td style="padding:15px">Yes</td>
533
+ </tr>
534
+ <tr>
535
+ <td style="padding:15px">deleteTeamsUsernameHooksUid(username, uid, callback)</td>
536
+ <td style="padding:15px">Deletes the specified webhook subscription from the given team
537
+ account.</td>
538
+ <td style="padding:15px">{base_path}/{version}/teams/{pathv1}/hooks/{pathv2}?{query}</td>
539
+ <td style="padding:15px">Yes</td>
540
+ </tr>
541
+ <tr>
542
+ <td style="padding:15px">getTeamsUsernameHooksUid(username, uid, callback)</td>
543
+ <td style="padding:15px">Returns the webhook with the specified id installed on the given
544
+ team account.</td>
545
+ <td style="padding:15px">{base_path}/{version}/teams/{pathv1}/hooks/{pathv2}?{query}</td>
546
+ <td style="padding:15px">Yes</td>
547
+ </tr>
548
+ <tr>
549
+ <td style="padding:15px">putTeamsUsernameHooksUid(username, uid, callback)</td>
550
+ <td style="padding:15px">Updates the specified webhook subscription.
551
+ The following properties can be mutated:
552
+ * `description`
553
+ * `url`
554
+ * `active`
555
+ * `events`</td>
556
+ <td style="padding:15px">{base_path}/{version}/teams/{pathv1}/hooks/{pathv2}?{query}</td>
557
+ <td style="padding:15px">Yes</td>
558
+ </tr>
559
+ <tr>
560
+ <td style="padding:15px">getTeams(role = 'admin', callback)</td>
561
+ <td style="padding:15px">Returns all the teams that the authenticated user is associated
562
+ with.</td>
563
+ <td style="padding:15px">{base_path}/{version}/teams?{query}</td>
564
+ <td style="padding:15px">Yes</td>
565
+ </tr>
566
+ <tr>
567
+ <td style="padding:15px">getTeamsUsername(username, callback)</td>
568
+ <td style="padding:15px">Gets the public information associated with a team.
569
+ If the team's profile is private, `location`, `website` and
570
+ `created_on` elements are omitted.</td>
571
+ <td style="padding:15px">{base_path}/{version}/teams/{pathv1}?{query}</td>
572
+ <td style="padding:15px">Yes</td>
573
+ </tr>
574
+ <tr>
575
+ <td style="padding:15px">getTeamsUsernameFollowers(username, callback)</td>
576
+ <td style="padding:15px">Returns the list of accounts that are following this team.</td>
577
+ <td style="padding:15px">{base_path}/{version}/teams/{pathv1}/followers?{query}</td>
578
+ <td style="padding:15px">Yes</td>
579
+ </tr>
580
+ <tr>
581
+ <td style="padding:15px">getTeamsUsernameFollowing(username, callback)</td>
582
+ <td style="padding:15px">Returns the list of accounts this team is following.</td>
583
+ <td style="padding:15px">{base_path}/{version}/teams/{pathv1}/following?{query}</td>
584
+ <td style="padding:15px">Yes</td>
585
+ </tr>
586
+ <tr>
587
+ <td style="padding:15px">getTeamsUsernameMembers(username, callback)</td>
588
+ <td style="padding:15px">All members of a team.
589
+ Returns all members of the specified team. Any member of any of the
590
+ team's groups is considered a member of the team. This includes users
591
+ in groups that may not actually have access to any of the team's
592
+ repositories.
593
+ Note that members using the "private profile" feature are not included.</td>
594
+ <td style="padding:15px">{base_path}/{version}/teams/{pathv1}/members?{query}</td>
595
+ <td style="padding:15px">Yes</td>
596
+ </tr>
597
+ <tr>
598
+ <td style="padding:15px">getUsersUsernameHooks(username, callback)</td>
599
+ <td style="padding:15px">Returns a paginated list of webhooks installed on this user account.</td>
600
+ <td style="padding:15px">{base_path}/{version}/users/{pathv1}/hooks?{query}</td>
601
+ <td style="padding:15px">Yes</td>
602
+ </tr>
603
+ <tr>
604
+ <td style="padding:15px">postUsersUsernameHooks(username, callback)</td>
605
+ <td style="padding:15px">Creates a new webhook on the specified user account.
606
+ Account-level webhooks are fired for events from all repositories
607
+ belonging to that account.
608
+ Note that one can only register webhooks on one's own account, not that
609
+ of others.</td>
610
+ <td style="padding:15px">{base_path}/{version}/users/{pathv1}/hooks?{query}</td>
611
+ <td style="padding:15px">Yes</td>
612
+ </tr>
613
+ <tr>
614
+ <td style="padding:15px">deleteUsersUsernameHooksUid(username, uid, callback)</td>
615
+ <td style="padding:15px">Deletes the specified webhook subscription from the given user
616
+ account.</td>
617
+ <td style="padding:15px">{base_path}/{version}/users/{pathv1}/hooks/{pathv2}?{query}</td>
618
+ <td style="padding:15px">Yes</td>
619
+ </tr>
620
+ <tr>
621
+ <td style="padding:15px">getUsersUsernameHooksUid(username, uid, callback)</td>
622
+ <td style="padding:15px">Returns the webhook with the specified id installed on the given
623
+ user account.</td>
624
+ <td style="padding:15px">{base_path}/{version}/users/{pathv1}/hooks/{pathv2}?{query}</td>
625
+ <td style="padding:15px">Yes</td>
626
+ </tr>
627
+ <tr>
628
+ <td style="padding:15px">putUsersUsernameHooksUid(username, uid, callback)</td>
629
+ <td style="padding:15px">Updates the specified webhook subscription.
630
+ The following properties can be mutated:
631
+ * `description`
632
+ * `url`
633
+ * `active`
634
+ * `events`</td>
635
+ <td style="padding:15px">{base_path}/{version}/users/{pathv1}/hooks/{pathv2}?{query}</td>
636
+ <td style="padding:15px">Yes</td>
637
+ </tr>
638
+ <tr>
639
+ <td style="padding:15px">getTeamsUsernameRepositories(username, callback)</td>
640
+ <td style="padding:15px">All repositories owned by a user/team. This includes private
641
+ repositories, but filtered down to the ones that the calling user has
642
+ access to.</td>
643
+ <td style="padding:15px">{base_path}/{version}/teams/{pathv1}/repositories?{query}</td>
644
+ <td style="padding:15px">Yes</td>
645
+ </tr>
646
+ <tr>
647
+ <td style="padding:15px">getUsersUsernameRepositories(username, callback)</td>
648
+ <td style="padding:15px">All repositories owned by a user/team. This includes private
649
+ repositories, but filtered down to the ones that the calling user has
650
+ access to.</td>
651
+ <td style="padding:15px">{base_path}/{version}/users/{pathv1}/repositories?{query}</td>
652
+ <td style="padding:15px">Yes</td>
653
+ </tr>
654
+ <tr>
655
+ <td style="padding:15px">getUser(callback)</td>
656
+ <td style="padding:15px">Returns the currently logged in user.</td>
657
+ <td style="padding:15px">{base_path}/{version}/user?{query}</td>
658
+ <td style="padding:15px">Yes</td>
659
+ </tr>
660
+ <tr>
661
+ <td style="padding:15px">getUserEmails(callback)</td>
662
+ <td style="padding:15px">Returns all the authenticated user's email addresses. Both
663
+ confirmed and unconfirmed.</td>
664
+ <td style="padding:15px">{base_path}/{version}/user/emails?{query}</td>
665
+ <td style="padding:15px">Yes</td>
666
+ </tr>
667
+ <tr>
668
+ <td style="padding:15px">getUserEmailsEmail(email, callback)</td>
669
+ <td style="padding:15px">Returns details about a specific one of the authenticated user's
670
+ email addresses.
671
+ Details describe whether the address has been confirmed by the user and
672
+ whether it is the user's primary address or not.</td>
673
+ <td style="padding:15px">{base_path}/{version}/user/emails/{pathv1}?{query}</td>
674
+ <td style="padding:15px">Yes</td>
675
+ </tr>
676
+ <tr>
677
+ <td style="padding:15px">getUsersUsername(username, callback)</td>
678
+ <td style="padding:15px">Gets the public information associated with a user account.
679
+ If the user's profile is private, `location`, `website` and
680
+ `created_on` elements are omitted.</td>
681
+ <td style="padding:15px">{base_path}/{version}/users/{pathv1}?{query}</td>
682
+ <td style="padding:15px">Yes</td>
683
+ </tr>
684
+ <tr>
685
+ <td style="padding:15px">getUsersUsernameFollowers(username, callback)</td>
686
+ <td style="padding:15px">Returns the list of accounts that are following this team.</td>
687
+ <td style="padding:15px">{base_path}/{version}/users/{pathv1}/followers?{query}</td>
688
+ <td style="padding:15px">Yes</td>
689
+ </tr>
690
+ <tr>
691
+ <td style="padding:15px">getUsersUsernameFollowing(username, callback)</td>
692
+ <td style="padding:15px">Returns the list of accounts this user is following.</td>
693
+ <td style="padding:15px">{base_path}/{version}/users/{pathv1}/following?{query}</td>
694
+ <td style="padding:15px">Yes</td>
695
+ </tr>
696
+ <tr>
697
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugSrcNodePath(username, node, pathParam, repoSlug, format = 'meta', callback)</td>
698
+ <td style="padding:15px"></td>
699
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/src/{pathv3}/{pathv4}?{query}</td>
700
+ <td style="padding:15px">Yes</td>
701
+ </tr>
702
+ <tr>
703
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugBranchRestrictions(username, repoSlug, callback)</td>
704
+ <td style="padding:15px">Returns a paginated list of all branch restrictions on the
705
+ repository.</td>
706
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/branch-restrictions?{query}</td>
707
+ <td style="padding:15px">Yes</td>
708
+ </tr>
709
+ <tr>
710
+ <td style="padding:15px">postRepositoriesUsernameRepoSlugBranchRestrictions(username, repoSlug, body, callback)</td>
711
+ <td style="padding:15px">Creates a new branch restriction rule for a repository.
712
+ `kind` describes what will be restricted. Allowed values are: `push`,
713
+ `force`, `delete`, and `restrict_merges`.
714
+ Different kinds of branch restrictions have different requirements:
715
+ * `push` and `restrict_merges` require `users` and `groups` to be
716
+ specified. Empty lists are allowed, in which case permission is
717
+ denied for everybody.
718
+ * `force` can not be specified in a Mercurial repository.
719
+ `pattern` is used to determine which branches will...(description truncated)</td>
720
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/branch-restrictions?{query}</td>
721
+ <td style="padding:15px">Yes</td>
722
+ </tr>
723
+ <tr>
724
+ <td style="padding:15px">deleteRepositoriesUsernameRepoSlugBranchRestrictionsId(username, repoSlug, id, callback)</td>
725
+ <td style="padding:15px">Deletes an existing branch restriction rule.</td>
726
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/branch-restrictions/{pathv3}?{query}</td>
727
+ <td style="padding:15px">Yes</td>
728
+ </tr>
729
+ <tr>
730
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugBranchRestrictionsId(username, repoSlug, id, callback)</td>
731
+ <td style="padding:15px">Returns a specific branch restriction rule.</td>
732
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/branch-restrictions/{pathv3}?{query}</td>
733
+ <td style="padding:15px">Yes</td>
734
+ </tr>
735
+ <tr>
736
+ <td style="padding:15px">putRepositoriesUsernameRepoSlugBranchRestrictionsId(username, repoSlug, id, body, callback)</td>
737
+ <td style="padding:15px">Updates an existing branch restriction rule.
738
+ Fields not present in the request body are ignored.
739
+ See [`POST`](../../branch-restrictions#post) for details.</td>
740
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/branch-restrictions/{pathv3}?{query}</td>
741
+ <td style="padding:15px">Yes</td>
742
+ </tr>
743
+ <tr>
744
+ <td style="padding:15px">deleteRepositoriesUsernameRepoSlugCommitNodeApprove(username, repoSlug, node, callback)</td>
745
+ <td style="padding:15px">Redact the authenticated user's approval of the specified commit.
746
+ This operation is only available to users that have explicit access to
747
+ the repository. In contrast, just the fact that a repository is
748
+ publicly accessible to users does not give them the ability to approve
749
+ commits.</td>
750
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/commit/{pathv3}/approve?{query}</td>
751
+ <td style="padding:15px">Yes</td>
752
+ </tr>
753
+ <tr>
754
+ <td style="padding:15px">postRepositoriesUsernameRepoSlugCommitNodeApprove(username, repoSlug, node, callback)</td>
755
+ <td style="padding:15px">Approve the specified commit as the authenticated user.
756
+ This operation is only available to users that have explicit access to
757
+ the repository. In contrast, just the fact that a repository is
758
+ publicly accessible to users does not give them the ability to approve
759
+ commits.</td>
760
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/commit/{pathv3}/approve?{query}</td>
761
+ <td style="padding:15px">Yes</td>
762
+ </tr>
763
+ <tr>
764
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugCommitRevision(username, repoSlug, revision, callback)</td>
765
+ <td style="padding:15px">Returns the specified commit.</td>
766
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/commit/{pathv3}?{query}</td>
767
+ <td style="padding:15px">Yes</td>
768
+ </tr>
769
+ <tr>
770
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugCommitShaComments(username, sha, repoSlug, callback)</td>
771
+ <td style="padding:15px">Returns the commit's comments.
772
+ This includes both global and inline comments.
773
+ The default sorting is oldest to newest and can be overridden with
774
+ the `sort` query parameter.</td>
775
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/commit/{pathv3}/comments?{query}</td>
776
+ <td style="padding:15px">Yes</td>
777
+ </tr>
778
+ <tr>
779
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugCommitShaCommentsCommentId(username, sha, commentId, repoSlug, callback)</td>
780
+ <td style="padding:15px">Returns the specified commit comment.</td>
781
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/commit/{pathv3}/comments/{pathv4}?{query}</td>
782
+ <td style="padding:15px">Yes</td>
783
+ </tr>
784
+ <tr>
785
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugCommits(username, repoSlug, callback)</td>
786
+ <td style="padding:15px">These are the repository's commits. They are paginated and returned
787
+ in reverse chronological order, similar to the output of `git log` and
788
+ `hg log`. Like these tools, the DAG can be filtered.
789
+ ## GET /repositories/{username}/{repo_slug}/commits/
790
+ Returns all commits in the repo in topological order (newest commit
791
+ first). All branches and tags are included (similar to
792
+ `git log --all` and `hg log`).
793
+ ## GET /repositories/{username}/{repo_slug}/commits/master
794
+ Returns all commits on rev `master` (simil...(description truncated)</td>
795
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/commits?{query}</td>
796
+ <td style="padding:15px">Yes</td>
797
+ </tr>
798
+ <tr>
799
+ <td style="padding:15px">postRepositoriesUsernameRepoSlugCommits(username, repoSlug, callback)</td>
800
+ <td style="padding:15px">Identical to `GET /repositories/{username}/{repo_slug}/commits`,
801
+ except that POST allows clients to place the include and exclude
802
+ parameters in the request body to avoid URL length issues.
803
+ **Note that this resource does NOT support new commit creation.**</td>
804
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/commits?{query}</td>
805
+ <td style="padding:15px">Yes</td>
806
+ </tr>
807
+ <tr>
808
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugCommitsRevision(username, revision, repoSlug, callback)</td>
809
+ <td style="padding:15px">These are the repository's commits. They are paginated and returned
810
+ in reverse chronological order, similar to the output of `git log` and
811
+ `hg log`. Like these tools, the DAG can be filtered.
812
+ ## GET /repositories/{username}/{repo_slug}/commits/
813
+ Returns all commits in the repo in topological order (newest commit
814
+ first). All branches and tags are included (similar to
815
+ `git log --all` and `hg log`).
816
+ ## GET /repositories/{username}/{repo_slug}/commits/master
817
+ Returns all commits on rev `master` (simil...(description truncated)</td>
818
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/commits/{pathv3}?{query}</td>
819
+ <td style="padding:15px">Yes</td>
820
+ </tr>
821
+ <tr>
822
+ <td style="padding:15px">postRepositoriesUsernameRepoSlugCommitsRevision(username, revision, repoSlug, callback)</td>
823
+ <td style="padding:15px">Identical to `GET /repositories/{username}/{repo_slug}/commits`,
824
+ except that POST allows clients to place the include and exclude
825
+ parameters in the request body to avoid URL length issues.
826
+ **Note that this resource does NOT support new commit creation.**</td>
827
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/commits/{pathv3}?{query}</td>
828
+ <td style="padding:15px">Yes</td>
829
+ </tr>
830
+ <tr>
831
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugDiffSpec(username, spec, repoSlug, context, pathParam, callback)</td>
832
+ <td style="padding:15px">Produces a raw, git-style diff for either a single commit (diffed
833
+ against its first parent), or a revspec of 2 commits (e.g.
834
+ `3a8b42..9ff173` where the first commit represents the source and the
835
+ second commit the destination).
836
+ In case of the latter (diffing a revspec), a 3-way diff, or merge diff,
837
+ is computed. This shows the changes introduced by the left branch
838
+ (`3a8b42` in our example) as compared againt the right branch
839
+ (`9ff173`).
840
+ This is equivalent to merging the left branch into the right ...(description truncated)</td>
841
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/diff/{pathv3}?{query}</td>
842
+ <td style="padding:15px">Yes</td>
843
+ </tr>
844
+ <tr>
845
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugPatchSpec(username, spec, repoSlug, callback)</td>
846
+ <td style="padding:15px">Produces a raw patch for a single commit (diffed against its first
847
+ parent), or a patch-series for a revspec of 2 commits (e.g.
848
+ `3a8b42..9ff173` where the first commit represents the source and the
849
+ second commit the destination).
850
+ In case of the latter (diffing a revspec), a patch series is returned
851
+ for the commits on the source branch (`3a8b42` and its ancestors in
852
+ our example). For Mercurial, a single patch is returned that combines
853
+ the changes of all commits on the source branch.
854
+ While similar ...(description truncated)</td>
855
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/patch/{pathv3}?{query}</td>
856
+ <td style="padding:15px">Yes</td>
857
+ </tr>
858
+ <tr>
859
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugComponents(username, repoSlug, callback)</td>
860
+ <td style="padding:15px">Returns the components that have been defined in the issue tracker.
861
+ This resource is only available on repositories that have the issue
862
+ tracker enabled.</td>
863
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/components?{query}</td>
864
+ <td style="padding:15px">Yes</td>
865
+ </tr>
866
+ <tr>
867
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugComponentsComponentId(username, repoSlug, componentId, callback)</td>
868
+ <td style="padding:15px">Returns the specified issue tracker component object.</td>
869
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/components/{pathv3}?{query}</td>
870
+ <td style="padding:15px">Yes</td>
871
+ </tr>
872
+ <tr>
873
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugIssues(username, repoSlug, callback)</td>
874
+ <td style="padding:15px">Returns the issues in the issue tracker.</td>
875
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/issues?{query}</td>
876
+ <td style="padding:15px">Yes</td>
877
+ </tr>
878
+ <tr>
879
+ <td style="padding:15px">postRepositoriesUsernameRepoSlugIssues(username, repoSlug, body, callback)</td>
880
+ <td style="padding:15px">Creates a new issue.
881
+ This call requires authentication. Private repositories or private
882
+ issue trackers require the caller to authenticate with an account that
883
+ has appropriate authorisation.
884
+ The authenticated user is used for the issue's `reporter` field.</td>
885
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/issues?{query}</td>
886
+ <td style="padding:15px">Yes</td>
887
+ </tr>
888
+ <tr>
889
+ <td style="padding:15px">deleteRepositoriesUsernameRepoSlugIssuesIssueId(username, issueId, repoSlug, callback)</td>
890
+ <td style="padding:15px">Deletes the specified issue. This requires write access to the
891
+ repository.</td>
892
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/issues/{pathv3}?{query}</td>
893
+ <td style="padding:15px">Yes</td>
894
+ </tr>
895
+ <tr>
896
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugIssuesIssueId(username, issueId, repoSlug, callback)</td>
897
+ <td style="padding:15px">Returns the specified issue.</td>
898
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/issues/{pathv3}?{query}</td>
899
+ <td style="padding:15px">Yes</td>
900
+ </tr>
901
+ <tr>
902
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugIssuesIssueIdAttachments(username, repoSlug, issueId, callback)</td>
903
+ <td style="padding:15px">Returns all attachments for this issue.
904
+ This returns the files' meta data. This does not return the files'
905
+ actual contents.
906
+ The files are always ordered by their upload date.</td>
907
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/issues/{pathv3}/attachments?{query}</td>
908
+ <td style="padding:15px">Yes</td>
909
+ </tr>
910
+ <tr>
911
+ <td style="padding:15px">postRepositoriesUsernameRepoSlugIssuesIssueIdAttachments(username, repoSlug, issueId, callback)</td>
912
+ <td style="padding:15px">Upload new issue attachments.
913
+ To upload files, perform a `multipart/form-data` POST containing one
914
+ or more file fields.
915
+ When a file is uploaded with the same name as an existing attachment,
916
+ then the existing file will be replaced.</td>
917
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/issues/{pathv3}/attachments?{query}</td>
918
+ <td style="padding:15px">Yes</td>
919
+ </tr>
920
+ <tr>
921
+ <td style="padding:15px">deleteRepositoriesUsernameRepoSlugIssuesIssueIdAttachmentsPath(username, pathParam, issueId, repoSlug, callback)</td>
922
+ <td style="padding:15px">Deletes an attachment.</td>
923
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/issues/{pathv3}/attachments/{pathv4}?{query}</td>
924
+ <td style="padding:15px">Yes</td>
925
+ </tr>
926
+ <tr>
927
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugIssuesIssueIdAttachmentsPath(username, pathParam, issueId, repoSlug, callback)</td>
928
+ <td style="padding:15px">Returns the contents of the specified file attachment.
929
+ Note that this endpoint does not return a JSON response, but instead
930
+ returns a redirect pointing to the actual file that in turn will return
931
+ the raw contents.
932
+ The redirect URL contains a one-time token that has a limited lifetime.
933
+ As a result, the link should not be persisted, stored, or shared.</td>
934
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/issues/{pathv3}/attachments/{pathv4}?{query}</td>
935
+ <td style="padding:15px">Yes</td>
936
+ </tr>
937
+ <tr>
938
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugIssuesIssueIdComments(username, issueId, repoSlug, callback)</td>
939
+ <td style="padding:15px">Returns all comments that were made on the specified issue.
940
+ The default sorting is oldest to newest and can be overridden with
941
+ the `sort` query parameter.</td>
942
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/issues/{pathv3}/comments?{query}</td>
943
+ <td style="padding:15px">Yes</td>
944
+ </tr>
945
+ <tr>
946
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugIssuesIssueIdCommentsCommentId(username, commentId, issueId, repoSlug, callback)</td>
947
+ <td style="padding:15px">Returns the specified issue comment object.</td>
948
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/issues/{pathv3}/comments/{pathv4}?{query}</td>
949
+ <td style="padding:15px">Yes</td>
950
+ </tr>
951
+ <tr>
952
+ <td style="padding:15px">deleteRepositoriesUsernameRepoSlugIssuesIssueIdVote(username, repoSlug, issueId, callback)</td>
953
+ <td style="padding:15px">Retract your vote.</td>
954
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/issues/{pathv3}/vote?{query}</td>
955
+ <td style="padding:15px">Yes</td>
956
+ </tr>
957
+ <tr>
958
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugIssuesIssueIdVote(username, repoSlug, issueId, callback)</td>
959
+ <td style="padding:15px">Check whether the authenticated user has voted for this issue.
960
+ A 204 status code indicates that the user has voted, while a 404
961
+ implies they haven't.</td>
962
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/issues/{pathv3}/vote?{query}</td>
963
+ <td style="padding:15px">Yes</td>
964
+ </tr>
965
+ <tr>
966
+ <td style="padding:15px">putRepositoriesUsernameRepoSlugIssuesIssueIdVote(username, repoSlug, issueId, callback)</td>
967
+ <td style="padding:15px">Vote for this issue.
968
+ To cast your vote, do an empty PUT. The 204 status code indicates that
969
+ the operation was successful.</td>
970
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/issues/{pathv3}/vote?{query}</td>
971
+ <td style="padding:15px">Yes</td>
972
+ </tr>
973
+ <tr>
974
+ <td style="padding:15px">deleteRepositoriesUsernameRepoSlugIssuesIssueIdWatch(username, repoSlug, issueId, callback)</td>
975
+ <td style="padding:15px">Stop watching this issue.</td>
976
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/issues/{pathv3}/watch?{query}</td>
977
+ <td style="padding:15px">Yes</td>
978
+ </tr>
979
+ <tr>
980
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugIssuesIssueIdWatch(username, repoSlug, issueId, callback)</td>
981
+ <td style="padding:15px">Indicated whether or not the authenticated user is watching this
982
+ issue.</td>
983
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/issues/{pathv3}/watch?{query}</td>
984
+ <td style="padding:15px">Yes</td>
985
+ </tr>
986
+ <tr>
987
+ <td style="padding:15px">putRepositoriesUsernameRepoSlugIssuesIssueIdWatch(username, repoSlug, issueId, callback)</td>
988
+ <td style="padding:15px">Start watching this issue.
989
+ To start watching this issue, do an empty PUT. The 204 status code
990
+ indicates that the operation was successful.</td>
991
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/issues/{pathv3}/watch?{query}</td>
992
+ <td style="padding:15px">Yes</td>
993
+ </tr>
994
+ <tr>
995
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugMilestones(username, repoSlug, callback)</td>
996
+ <td style="padding:15px">Returns the milestones that have been defined in the issue tracker.
997
+ This resource is only available on repositories that have the issue
998
+ tracker enabled.</td>
999
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/milestones?{query}</td>
1000
+ <td style="padding:15px">Yes</td>
1001
+ </tr>
1002
+ <tr>
1003
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugMilestonesMilestoneId(username, repoSlug, milestoneId, callback)</td>
1004
+ <td style="padding:15px">Returns the specified issue tracker milestone object.</td>
1005
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/milestones/{pathv3}?{query}</td>
1006
+ <td style="padding:15px">Yes</td>
1007
+ </tr>
1008
+ <tr>
1009
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugVersions(username, repoSlug, callback)</td>
1010
+ <td style="padding:15px">Returns the versions that have been defined in the issue tracker.
1011
+ This resource is only available on repositories that have the issue
1012
+ tracker enabled.</td>
1013
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/versions?{query}</td>
1014
+ <td style="padding:15px">Yes</td>
1015
+ </tr>
1016
+ <tr>
1017
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugVersionsVersionId(username, repoSlug, versionId, callback)</td>
1018
+ <td style="padding:15px">Returns the specified issue tracker version object.</td>
1019
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/versions/{pathv3}?{query}</td>
1020
+ <td style="padding:15px">Yes</td>
1021
+ </tr>
1022
+ <tr>
1023
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugDefaultReviewers(username, repoSlug, callback)</td>
1024
+ <td style="padding:15px">Returns the repository's default reviewers.
1025
+ These are the users that are automatically added as reviewers on every
1026
+ new pull request that is created.</td>
1027
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/default-reviewers?{query}</td>
1028
+ <td style="padding:15px">Yes</td>
1029
+ </tr>
1030
+ <tr>
1031
+ <td style="padding:15px">deleteRepositoriesUsernameRepoSlugDefaultReviewersTargetUsername(username, targetUsername, repoSlug, callback)</td>
1032
+ <td style="padding:15px">Removes a default reviewer from the repository.</td>
1033
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/default-reviewers/{pathv3}?{query}</td>
1034
+ <td style="padding:15px">Yes</td>
1035
+ </tr>
1036
+ <tr>
1037
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugDefaultReviewersTargetUsername(username, targetUsername, repoSlug, callback)</td>
1038
+ <td style="padding:15px">Returns the specified reviewer.
1039
+ This can be used to test whether a user is among the repository's
1040
+ default reviewers list. A 404 indicates that that specified user is not
1041
+ a default reviewer.</td>
1042
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/default-reviewers/{pathv3}?{query}</td>
1043
+ <td style="padding:15px">Yes</td>
1044
+ </tr>
1045
+ <tr>
1046
+ <td style="padding:15px">putRepositoriesUsernameRepoSlugDefaultReviewersTargetUsername(username, targetUsername, repoSlug, callback)</td>
1047
+ <td style="padding:15px">Adds the specified user to the repository's list of default
1048
+ reviewers.
1049
+ This method is idempotent. Adding a user a second time has no effect.</td>
1050
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/default-reviewers/{pathv3}?{query}</td>
1051
+ <td style="padding:15px">Yes</td>
1052
+ </tr>
1053
+ <tr>
1054
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugPullrequests(username, repoSlug, state = 'MERGED', callback)</td>
1055
+ <td style="padding:15px">Returns a paginated list of all pull requests on the specified
1056
+ repository. By default only open pull requests are returned. This can
1057
+ be controlled using the `state` query parameter. To retrieve pull
1058
+ requests that are in one of multiple states, repeat the `state`
1059
+ parameter for each individual state.
1060
+ This endpoint also supports filtering and sorting of the results. See
1061
+ [filtering and sorting](../../../../meta/filtering) for more details.</td>
1062
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pullrequests?{query}</td>
1063
+ <td style="padding:15px">Yes</td>
1064
+ </tr>
1065
+ <tr>
1066
+ <td style="padding:15px">postRepositoriesUsernameRepoSlugPullrequests(username, repoSlug, body, callback)</td>
1067
+ <td style="padding:15px">Creates a new pull request.</td>
1068
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pullrequests?{query}</td>
1069
+ <td style="padding:15px">Yes</td>
1070
+ </tr>
1071
+ <tr>
1072
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugPullrequestsActivity(username, repoSlug, callback)</td>
1073
+ <td style="padding:15px">Returns a paginated list of the pull request's activity log.
1074
+ This includes comments that were made by the reviewers, updates and
1075
+ approvals.</td>
1076
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pullrequests/activity?{query}</td>
1077
+ <td style="padding:15px">Yes</td>
1078
+ </tr>
1079
+ <tr>
1080
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugPullrequestsPullRequestId(username, repoSlug, pullRequestId, callback)</td>
1081
+ <td style="padding:15px">Returns the specified pull request.</td>
1082
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pullrequests/{pathv3}?{query}</td>
1083
+ <td style="padding:15px">Yes</td>
1084
+ </tr>
1085
+ <tr>
1086
+ <td style="padding:15px">putRepositoriesUsernameRepoSlugPullrequestsPullRequestId(username, repoSlug, pullRequestId, body, callback)</td>
1087
+ <td style="padding:15px">Mutates the specified pull request.
1088
+ This can be used to change the pull request's branches or description.
1089
+ Only open pull requests can be mutated.</td>
1090
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pullrequests/{pathv3}?{query}</td>
1091
+ <td style="padding:15px">Yes</td>
1092
+ </tr>
1093
+ <tr>
1094
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugPullrequestsPullRequestIdActivity(username, repoSlug, pullRequestId, callback)</td>
1095
+ <td style="padding:15px">Returns a paginated list of the pull request's activity log.
1096
+ This includes comments that were made by the reviewers, updates and
1097
+ approvals.</td>
1098
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pullrequests/{pathv3}/activity?{query}</td>
1099
+ <td style="padding:15px">Yes</td>
1100
+ </tr>
1101
+ <tr>
1102
+ <td style="padding:15px">deleteRepositoriesUsernameRepoSlugPullrequestsPullRequestIdApprove(username, pullRequestId, repoSlug, callback)</td>
1103
+ <td style="padding:15px">Redact the authenticated user's approval of the specified pull
1104
+ request.</td>
1105
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pullrequests/{pathv3}/approve?{query}</td>
1106
+ <td style="padding:15px">Yes</td>
1107
+ </tr>
1108
+ <tr>
1109
+ <td style="padding:15px">postRepositoriesUsernameRepoSlugPullrequestsPullRequestIdApprove(username, pullRequestId, repoSlug, callback)</td>
1110
+ <td style="padding:15px">Approve the specified pull request as the authenticated user.</td>
1111
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pullrequests/{pathv3}/approve?{query}</td>
1112
+ <td style="padding:15px">Yes</td>
1113
+ </tr>
1114
+ <tr>
1115
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugPullrequestsPullRequestIdComments(username, pullRequestId, repoSlug, callback)</td>
1116
+ <td style="padding:15px">Returns a paginated list of the pull request's comments.
1117
+ This includes both global, inline comments and replies.
1118
+ The default sorting is oldest to newest and can be overridden with
1119
+ the `sort` query parameter.
1120
+ This endpoint also supports filtering and sorting of the results. See
1121
+ [filtering and sorting](../../../../../../meta/filtering) for more
1122
+ details.</td>
1123
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pullrequests/{pathv3}/comments?{query}</td>
1124
+ <td style="padding:15px">Yes</td>
1125
+ </tr>
1126
+ <tr>
1127
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommentsCommentId(username, pullRequestId, commentId, repoSlug, callback)</td>
1128
+ <td style="padding:15px">Returns a specific pull request comment.</td>
1129
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pullrequests/{pathv3}/comments/{pathv4}?{query}</td>
1130
+ <td style="padding:15px">Yes</td>
1131
+ </tr>
1132
+ <tr>
1133
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugPullrequestsPullRequestIdCommits(username, pullRequestId, repoSlug, callback)</td>
1134
+ <td style="padding:15px">Returns a paginated list of the pull request's commits.
1135
+ These are the commits that are being merged into the destination
1136
+ branch when the pull requests gets accepted.</td>
1137
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pullrequests/{pathv3}/commits?{query}</td>
1138
+ <td style="padding:15px">Yes</td>
1139
+ </tr>
1140
+ <tr>
1141
+ <td style="padding:15px">postRepositoriesUsernameRepoSlugPullrequestsPullRequestIdDecline(username, pullRequestId, repoSlug, callback)</td>
1142
+ <td style="padding:15px">Declines the pull request.</td>
1143
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pullrequests/{pathv3}/decline?{query}</td>
1144
+ <td style="padding:15px">Yes</td>
1145
+ </tr>
1146
+ <tr>
1147
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugPullrequestsPullRequestIdDiff(username, pullRequestId, repoSlug, callback)</td>
1148
+ <td style="padding:15px"></td>
1149
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pullrequests/{pathv3}/diff?{query}</td>
1150
+ <td style="padding:15px">Yes</td>
1151
+ </tr>
1152
+ <tr>
1153
+ <td style="padding:15px">postRepositoriesUsernameRepoSlugPullrequestsPullRequestIdMerge(username, pullRequestId, repoSlug, body, callback)</td>
1154
+ <td style="padding:15px">Merges the pull request.</td>
1155
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pullrequests/{pathv3}/merge?{query}</td>
1156
+ <td style="padding:15px">Yes</td>
1157
+ </tr>
1158
+ <tr>
1159
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugPullrequestsPullRequestIdPatch(username, pullRequestId, repoSlug, callback)</td>
1160
+ <td style="padding:15px"></td>
1161
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pullrequests/{pathv3}/patch?{query}</td>
1162
+ <td style="padding:15px">Yes</td>
1163
+ </tr>
1164
+ <tr>
1165
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugDownloads(username, repoSlug, callback)</td>
1166
+ <td style="padding:15px">Returns a list of download links associated with the repository.</td>
1167
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/downloads?{query}</td>
1168
+ <td style="padding:15px">Yes</td>
1169
+ </tr>
1170
+ <tr>
1171
+ <td style="padding:15px">postRepositoriesUsernameRepoSlugDownloads(username, repoSlug, callback)</td>
1172
+ <td style="padding:15px">Upload new download artifacts.
1173
+ To upload files, perform a `multipart/form-data` POST containing one
1174
+ or more `files` fields:
1175
+ $ echo Hello World > hello.txt
1176
+ $ curl -s -u evzijst -X POST https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads -F files=@hello.txt
1177
+ When a file is uploaded with the same name as an existing artifact,
1178
+ then the existing file will be replaced.</td>
1179
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/downloads?{query}</td>
1180
+ <td style="padding:15px">Yes</td>
1181
+ </tr>
1182
+ <tr>
1183
+ <td style="padding:15px">deleteRepositoriesUsernameRepoSlugDownloadsFilename(username, filename, repoSlug, callback)</td>
1184
+ <td style="padding:15px">Deletes the specified download artifact from the repository.</td>
1185
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/downloads/{pathv3}?{query}</td>
1186
+ <td style="padding:15px">Yes</td>
1187
+ </tr>
1188
+ <tr>
1189
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugDownloadsFilename(username, filename, repoSlug, callback)</td>
1190
+ <td style="padding:15px">Return a redirect to the contents of a download artifact.
1191
+ This endpoint returns the actual file contents and not the artifact's
1192
+ metadata.
1193
+ $ curl -s -L https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads/hello.txt
1194
+ Hello World</td>
1195
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/downloads/{pathv3}?{query}</td>
1196
+ <td style="padding:15px">Yes</td>
1197
+ </tr>
1198
+ <tr>
1199
+ <td style="padding:15px">getPipelinesForRepository(username, repoSlug, callback)</td>
1200
+ <td style="padding:15px">Find pipelines</td>
1201
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pipelines/?{query}</td>
1202
+ <td style="padding:15px">Yes</td>
1203
+ </tr>
1204
+ <tr>
1205
+ <td style="padding:15px">createPipelineForRepository(username, repoSlug, body, callback)</td>
1206
+ <td style="padding:15px">Endpoint to create and initiate a pipeline.
1207
+ There are a couple of different options to initiate a pipeline, where the payload of the request will determine which type of pipeline will be instantiated.
1208
+ # Trigger a Pipeline for a branch or tag
1209
+ One way to trigger pipelines is by specifying the reference for which you want to trigger a pipeline (e.g. a branch or tag).
1210
+ The specified reference will be used to determine which pipeline definition from the `bitbucket-pipelines.yml` file will be applied...(description truncated)</td>
1211
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pipelines/?{query}</td>
1212
+ <td style="padding:15px">Yes</td>
1213
+ </tr>
1214
+ <tr>
1215
+ <td style="padding:15px">getPipelineForRepository(username, repoSlug, pipelineUuid, callback)</td>
1216
+ <td style="padding:15px">Retrieve a specified pipeline</td>
1217
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pipelines/{pathv3}?{query}</td>
1218
+ <td style="padding:15px">Yes</td>
1219
+ </tr>
1220
+ <tr>
1221
+ <td style="padding:15px">getPipelineStepsForRepository(username, repoSlug, pipelineUuid, callback)</td>
1222
+ <td style="padding:15px">Find steps for the given pipeline.</td>
1223
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pipelines/{pathv3}/steps/?{query}</td>
1224
+ <td style="padding:15px">Yes</td>
1225
+ </tr>
1226
+ <tr>
1227
+ <td style="padding:15px">getPipelineStepForRepository(username, repoSlug, pipelineUuid, stepUuid, callback)</td>
1228
+ <td style="padding:15px">Retrieve a given step of a pipeline.</td>
1229
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pipelines/{pathv3}/steps/{pathv4}?{query}</td>
1230
+ <td style="padding:15px">Yes</td>
1231
+ </tr>
1232
+ <tr>
1233
+ <td style="padding:15px">getPipelineStepLogForRepository(username, repoSlug, pipelineUuid, stepUuid, callback)</td>
1234
+ <td style="padding:15px">Retrieve the log file for a given step of a pipeline.
1235
+ This endpoint supports (and encourages!) the use of [HTTP Range requests](https://tools.ietf.org/html/rfc7233) to deal with potentially very large log files.</td>
1236
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pipelines/{pathv3}/steps/{pathv4}/log?{query}</td>
1237
+ <td style="padding:15px">Yes</td>
1238
+ </tr>
1239
+ <tr>
1240
+ <td style="padding:15px">stopPipeline(username, repoSlug, pipelineUuid, callback)</td>
1241
+ <td style="padding:15px">Signal the stop of a pipeline and all of its steps that not have completed yet.</td>
1242
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pipelines/{pathv3}/stopPipeline?{query}</td>
1243
+ <td style="padding:15px">Yes</td>
1244
+ </tr>
1245
+ <tr>
1246
+ <td style="padding:15px">getRepositoryPipelineConfig(username, repoSlug, callback)</td>
1247
+ <td style="padding:15px">Retrieve the repository pipelines configuration.</td>
1248
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pipelines_config?{query}</td>
1249
+ <td style="padding:15px">Yes</td>
1250
+ </tr>
1251
+ <tr>
1252
+ <td style="padding:15px">updateRepositoryPipelineConfig(username, repoSlug, body, callback)</td>
1253
+ <td style="padding:15px">Update the pipelines configuration for a repository.</td>
1254
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pipelines_config?{query}</td>
1255
+ <td style="padding:15px">Yes</td>
1256
+ </tr>
1257
+ <tr>
1258
+ <td style="padding:15px">deleteRepositoryPipelineKeyPair(username, repoSlug, callback)</td>
1259
+ <td style="padding:15px">Delete the repository SSH key pair.</td>
1260
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pipelines_config/ssh/key_pair?{query}</td>
1261
+ <td style="padding:15px">Yes</td>
1262
+ </tr>
1263
+ <tr>
1264
+ <td style="padding:15px">getRepositoryPipelineSshKeyPair(username, repoSlug, callback)</td>
1265
+ <td style="padding:15px">Retrieve the repository SSH key pair excluding the SSH private key. The private key is a write only field and will never be exposed in the logs or the REST API.</td>
1266
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pipelines_config/ssh/key_pair?{query}</td>
1267
+ <td style="padding:15px">Yes</td>
1268
+ </tr>
1269
+ <tr>
1270
+ <td style="padding:15px">updateRepositoryPipelineKeyPair(username, repoSlug, body, callback)</td>
1271
+ <td style="padding:15px">Create or update the repository SSH key pair. The private key will be set as a default SSH identity in your build container.</td>
1272
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pipelines_config/ssh/key_pair?{query}</td>
1273
+ <td style="padding:15px">Yes</td>
1274
+ </tr>
1275
+ <tr>
1276
+ <td style="padding:15px">getRepositoryPipelineKnownHosts(username, repoSlug, callback)</td>
1277
+ <td style="padding:15px">Find repository level known hosts.</td>
1278
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pipelines_config/ssh/known_hosts/?{query}</td>
1279
+ <td style="padding:15px">Yes</td>
1280
+ </tr>
1281
+ <tr>
1282
+ <td style="padding:15px">createRepositoryPipelineKnownHost(username, repoSlug, body, callback)</td>
1283
+ <td style="padding:15px">Create a repository level known host.</td>
1284
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pipelines_config/ssh/known_hosts/?{query}</td>
1285
+ <td style="padding:15px">Yes</td>
1286
+ </tr>
1287
+ <tr>
1288
+ <td style="padding:15px">deleteRepositoryPipelineKnownHost(username, repoSlug, knownHostUuid, callback)</td>
1289
+ <td style="padding:15px">Delete a repository level known host.</td>
1290
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pipelines_config/ssh/known_hosts/{pathv3}?{query}</td>
1291
+ <td style="padding:15px">Yes</td>
1292
+ </tr>
1293
+ <tr>
1294
+ <td style="padding:15px">getRepositoryPipelineKnownHost(username, repoSlug, knownHostUuid, callback)</td>
1295
+ <td style="padding:15px">Retrieve a repository level known host.</td>
1296
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pipelines_config/ssh/known_hosts/{pathv3}?{query}</td>
1297
+ <td style="padding:15px">Yes</td>
1298
+ </tr>
1299
+ <tr>
1300
+ <td style="padding:15px">updateRepositoryPipelineKnownHost(username, repoSlug, knownHostUuid, body, callback)</td>
1301
+ <td style="padding:15px">Update a repository level known host.</td>
1302
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pipelines_config/ssh/known_hosts/{pathv3}?{query}</td>
1303
+ <td style="padding:15px">Yes</td>
1304
+ </tr>
1305
+ <tr>
1306
+ <td style="padding:15px">getRepositoryPipelineVariables(username, repoSlug, callback)</td>
1307
+ <td style="padding:15px">Find repository level variables.</td>
1308
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pipelines_config/variables/?{query}</td>
1309
+ <td style="padding:15px">Yes</td>
1310
+ </tr>
1311
+ <tr>
1312
+ <td style="padding:15px">createRepositoryPipelineVariable(username, repoSlug, body, callback)</td>
1313
+ <td style="padding:15px">Create a repository level variable.</td>
1314
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pipelines_config/variables/?{query}</td>
1315
+ <td style="padding:15px">Yes</td>
1316
+ </tr>
1317
+ <tr>
1318
+ <td style="padding:15px">deleteRepositoryPipelineVariable(username, repoSlug, variableUuid, callback)</td>
1319
+ <td style="padding:15px">Delete a repository level variable.</td>
1320
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pipelines_config/variables/{pathv3}?{query}</td>
1321
+ <td style="padding:15px">Yes</td>
1322
+ </tr>
1323
+ <tr>
1324
+ <td style="padding:15px">getRepositoryPipelineVariable(username, repoSlug, variableUuid, callback)</td>
1325
+ <td style="padding:15px">Retrieve a repository level variable.</td>
1326
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pipelines_config/variables/{pathv3}?{query}</td>
1327
+ <td style="padding:15px">Yes</td>
1328
+ </tr>
1329
+ <tr>
1330
+ <td style="padding:15px">updateRepositoryPipelineVariable(username, repoSlug, variableUuid, body, callback)</td>
1331
+ <td style="padding:15px">Update a repository level variable.</td>
1332
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/pipelines_config/variables/{pathv3}?{query}</td>
1333
+ <td style="padding:15px">Yes</td>
1334
+ </tr>
1335
+ <tr>
1336
+ <td style="padding:15px">getPipelineVariablesForTeam(username, callback)</td>
1337
+ <td style="padding:15px">Find account level variables.</td>
1338
+ <td style="padding:15px">{base_path}/{version}/teams/{pathv1}/pipelines_config/variables/?{query}</td>
1339
+ <td style="padding:15px">Yes</td>
1340
+ </tr>
1341
+ <tr>
1342
+ <td style="padding:15px">createPipelineVariableForTeam(username, body, callback)</td>
1343
+ <td style="padding:15px">Create an account level variable.</td>
1344
+ <td style="padding:15px">{base_path}/{version}/teams/{pathv1}/pipelines_config/variables/?{query}</td>
1345
+ <td style="padding:15px">Yes</td>
1346
+ </tr>
1347
+ <tr>
1348
+ <td style="padding:15px">deletePipelineVariableForTeam(username, variableUuid, callback)</td>
1349
+ <td style="padding:15px">Delete a team level variable.</td>
1350
+ <td style="padding:15px">{base_path}/{version}/teams/{pathv1}/pipelines_config/variables/{pathv2}?{query}</td>
1351
+ <td style="padding:15px">Yes</td>
1352
+ </tr>
1353
+ <tr>
1354
+ <td style="padding:15px">getPipelineVariableForTeam(username, variableUuid, callback)</td>
1355
+ <td style="padding:15px">Retrieve a team level variable.</td>
1356
+ <td style="padding:15px">{base_path}/{version}/teams/{pathv1}/pipelines_config/variables/{pathv2}?{query}</td>
1357
+ <td style="padding:15px">Yes</td>
1358
+ </tr>
1359
+ <tr>
1360
+ <td style="padding:15px">updatePipelineVariableForTeam(username, variableUuid, body, callback)</td>
1361
+ <td style="padding:15px">Update a team level variable.</td>
1362
+ <td style="padding:15px">{base_path}/{version}/teams/{pathv1}/pipelines_config/variables/{pathv2}?{query}</td>
1363
+ <td style="padding:15px">Yes</td>
1364
+ </tr>
1365
+ <tr>
1366
+ <td style="padding:15px">getPipelineVariablesForUser(username, callback)</td>
1367
+ <td style="padding:15px">Find user level variables.</td>
1368
+ <td style="padding:15px">{base_path}/{version}/users/{pathv1}/pipelines_config/variables/?{query}</td>
1369
+ <td style="padding:15px">Yes</td>
1370
+ </tr>
1371
+ <tr>
1372
+ <td style="padding:15px">createPipelineVariableForUser(username, body, callback)</td>
1373
+ <td style="padding:15px">Create a user level variable.</td>
1374
+ <td style="padding:15px">{base_path}/{version}/users/{pathv1}/pipelines_config/variables/?{query}</td>
1375
+ <td style="padding:15px">Yes</td>
1376
+ </tr>
1377
+ <tr>
1378
+ <td style="padding:15px">deletePipelineVariableForUser(username, variableUuid, callback)</td>
1379
+ <td style="padding:15px">Delete an account level variable.</td>
1380
+ <td style="padding:15px">{base_path}/{version}/users/{pathv1}/pipelines_config/variables/{pathv2}?{query}</td>
1381
+ <td style="padding:15px">Yes</td>
1382
+ </tr>
1383
+ <tr>
1384
+ <td style="padding:15px">getPipelineVariableForUser(username, variableUuid, callback)</td>
1385
+ <td style="padding:15px">Retrieve a user level variable.</td>
1386
+ <td style="padding:15px">{base_path}/{version}/users/{pathv1}/pipelines_config/variables/{pathv2}?{query}</td>
1387
+ <td style="padding:15px">Yes</td>
1388
+ </tr>
1389
+ <tr>
1390
+ <td style="padding:15px">updatePipelineVariableForUser(username, variableUuid, body, callback)</td>
1391
+ <td style="padding:15px">Update a user level variable.</td>
1392
+ <td style="padding:15px">{base_path}/{version}/users/{pathv1}/pipelines_config/variables/{pathv2}?{query}</td>
1393
+ <td style="padding:15px">Yes</td>
1394
+ </tr>
1395
+ <tr>
1396
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugRefs(username, repoSlug, callback)</td>
1397
+ <td style="padding:15px"></td>
1398
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/refs?{query}</td>
1399
+ <td style="padding:15px">Yes</td>
1400
+ </tr>
1401
+ <tr>
1402
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugRefsBranches(username, repoSlug, callback)</td>
1403
+ <td style="padding:15px"></td>
1404
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/refs/branches?{query}</td>
1405
+ <td style="padding:15px">Yes</td>
1406
+ </tr>
1407
+ <tr>
1408
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugRefsBranchesName(username, name, repoSlug, callback)</td>
1409
+ <td style="padding:15px"></td>
1410
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/refs/branches/{pathv3}?{query}</td>
1411
+ <td style="padding:15px">Yes</td>
1412
+ </tr>
1413
+ <tr>
1414
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugRefsTags(username, repoSlug, callback)</td>
1415
+ <td style="padding:15px"></td>
1416
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/refs/tags?{query}</td>
1417
+ <td style="padding:15px">Yes</td>
1418
+ </tr>
1419
+ <tr>
1420
+ <td style="padding:15px">postRepositoriesUsernameRepoSlugRefsTags(username, repoSlug, body, callback)</td>
1421
+ <td style="padding:15px">Creates a new tag in the specified repository.
1422
+ The payload of the POST should consist of a JSON document that
1423
+ contains the name of the tag and the target hash.
1424
+ ```
1425
+ {
1426
+ "name" : "new tag name",
1427
+ "target" : {
1428
+ "hash" : "target commit hash",
1429
+ }
1430
+ }
1431
+ ```
1432
+ This endpoint does support using short hash prefixes for the commit
1433
+ hash, but it may return a 400 response if the provided prefix is
1434
+ ambiguous. Using a full commit hash is the preferred approach.</td>
1435
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/refs/tags?{query}</td>
1436
+ <td style="padding:15px">Yes</td>
1437
+ </tr>
1438
+ <tr>
1439
+ <td style="padding:15px">getRepositoriesUsernameRepoSlugRefsTagsName(username, name, repoSlug, callback)</td>
1440
+ <td style="padding:15px"></td>
1441
+ <td style="padding:15px">{base_path}/{version}/repositories/{pathv1}/{pathv2}/refs/tags/{pathv3}?{query}</td>
1442
+ <td style="padding:15px">Yes</td>
1443
+ </tr>
1444
+ <tr>
1445
+ <td style="padding:15px">getSnippets(role = 'owner', callback)</td>
1446
+ <td style="padding:15px">Returns all snippets. Like pull requests, repositories and teams, the
1447
+ full set of snippets is defined by what the current user has access to.
1448
+ This includes all snippets owned by the current user, but also all snippets
1449
+ owned by any of the teams the user is a member of, or snippets by other
1450
+ users that the current user is either watching or has collaborated on (for
1451
+ instance by commenting on it).
1452
+ To limit the set of returned snippets, apply the
1453
+ `?role=[owner|contributor|member]` query parameter wher...(description truncated)</td>
1454
+ <td style="padding:15px">{base_path}/{version}/snippets?{query}</td>
1455
+ <td style="padding:15px">Yes</td>
1456
+ </tr>
1457
+ <tr>
1458
+ <td style="padding:15px">postSnippets(body, callback)</td>
1459
+ <td style="padding:15px">Creates a new snippet under the authenticated user's account.
1460
+ Snippets can contain multiple files. Both text and binary files are
1461
+ supported.
1462
+ The simplest way to create a new snippet from a local file:
1463
+ $ curl -u username:password -X POST https://api.bitbucket.org/2.0/snippets -F file=@image.png
1464
+ Creating snippets through curl has a few limitations and so let's look
1465
+ at a more complicated scenario.
1466
+ Snippets are created with a multipart POST. Both `multipart/form-data`
1467
+ and `multipar...(description truncated)</td>
1468
+ <td style="padding:15px">{base_path}/{version}/snippets?{query}</td>
1469
+ <td style="padding:15px">Yes</td>
1470
+ </tr>
1471
+ <tr>
1472
+ <td style="padding:15px">getSnippetsUsername(role = 'owner', username, callback)</td>
1473
+ <td style="padding:15px">Identical to `/snippets`, except that the result is further filtered
1474
+ by the snippet owner and only those that are owned by `{username}` are
1475
+ returned.</td>
1476
+ <td style="padding:15px">{base_path}/{version}/snippets/{pathv1}?{query}</td>
1477
+ <td style="padding:15px">Yes</td>
1478
+ </tr>
1479
+ <tr>
1480
+ <td style="padding:15px">postSnippetsUsername(username, body, callback)</td>
1481
+ <td style="padding:15px">Identical to `/snippets`, except that the new snippet will be
1482
+ created under the account specified in the path parameter `{username}`.</td>
1483
+ <td style="padding:15px">{base_path}/{version}/snippets/{pathv1}?{query}</td>
1484
+ <td style="padding:15px">Yes</td>
1485
+ </tr>
1486
+ <tr>
1487
+ <td style="padding:15px">deleteSnippetsUsernameEncodedId(username, encodedId, callback)</td>
1488
+ <td style="padding:15px">Deletes a snippet and returns an empty response.</td>
1489
+ <td style="padding:15px">{base_path}/{version}/snippets/{pathv1}/{pathv2}?{query}</td>
1490
+ <td style="padding:15px">Yes</td>
1491
+ </tr>
1492
+ <tr>
1493
+ <td style="padding:15px">getSnippetsUsernameEncodedId(username, encodedId, callback)</td>
1494
+ <td style="padding:15px">Retrieves a single snippet.
1495
+ Snippets support multiple content types:
1496
+ * application/json
1497
+ * multipart/related
1498
+ * multipart/form-data
1499
+ application/json
1500
+ ----------------
1501
+ The default content type of the response is `application/json`.
1502
+ Since JSON is always `utf-8`, it cannot reliably contain file contents
1503
+ for files that are not text. Therefore, JSON snippet documents only
1504
+ contain the filename and links to the file contents.
1505
+ This means that in order to retrieve all parts of a snippet, N+1
1506
+ requests need t...(description truncated)</td>
1507
+ <td style="padding:15px">{base_path}/{version}/snippets/{pathv1}/{pathv2}?{query}</td>
1508
+ <td style="padding:15px">Yes</td>
1509
+ </tr>
1510
+ <tr>
1511
+ <td style="padding:15px">putSnippetsUsernameEncodedId(username, encodedId, callback)</td>
1512
+ <td style="padding:15px">Used to update a snippet. Use this to add and delete files and to
1513
+ change a snippet's title.
1514
+ To update a snippet, one can either PUT a full snapshot, or only the
1515
+ parts that need to be changed.
1516
+ The contract for PUT on this API is that properties missing from the
1517
+ request remain untouched so that snippets can be efficiently
1518
+ manipulated with differential payloads.
1519
+ To delete a property (e.g. the title, or a file), include its name in
1520
+ the request, but omit its value (use `null`).
1521
+ As in Git, explicit re...(description truncated)</td>
1522
+ <td style="padding:15px">{base_path}/{version}/snippets/{pathv1}/{pathv2}?{query}</td>
1523
+ <td style="padding:15px">Yes</td>
1524
+ </tr>
1525
+ <tr>
1526
+ <td style="padding:15px">getSnippetsUsernameEncodedIdComments(username, encodedId, callback)</td>
1527
+ <td style="padding:15px">Used to retrieve a paginated list of all comments for a specific
1528
+ snippet.
1529
+ This resource works identical to commit and pull request comments.
1530
+ The default sorting is oldest to newest and can be overridden with
1531
+ the `sort` query parameter.</td>
1532
+ <td style="padding:15px">{base_path}/{version}/snippets/{pathv1}/{pathv2}/comments?{query}</td>
1533
+ <td style="padding:15px">Yes</td>
1534
+ </tr>
1535
+ <tr>
1536
+ <td style="padding:15px">postSnippetsUsernameEncodedIdComments(username, encodedId, body, callback)</td>
1537
+ <td style="padding:15px">Creates a new comment.
1538
+ The only required field in the body is `content.raw`.
1539
+ To create a threaded reply to an existing comment, include `parent.id`.</td>
1540
+ <td style="padding:15px">{base_path}/{version}/snippets/{pathv1}/{pathv2}/comments?{query}</td>
1541
+ <td style="padding:15px">Yes</td>
1542
+ </tr>
1543
+ <tr>
1544
+ <td style="padding:15px">deleteSnippetsUsernameEncodedIdCommentsCommentId(username, commentId, encodedId, callback)</td>
1545
+ <td style="padding:15px">Deletes a snippet comment.
1546
+ Comments can only be removed by their author.</td>
1547
+ <td style="padding:15px">{base_path}/{version}/snippets/{pathv1}/{pathv2}/comments/{pathv3}?{query}</td>
1548
+ <td style="padding:15px">Yes</td>
1549
+ </tr>
1550
+ <tr>
1551
+ <td style="padding:15px">getSnippetsUsernameEncodedIdCommentsCommentId(username, commentId, encodedId, callback)</td>
1552
+ <td style="padding:15px">Returns the specific snippet comment.</td>
1553
+ <td style="padding:15px">{base_path}/{version}/snippets/{pathv1}/{pathv2}/comments/{pathv3}?{query}</td>
1554
+ <td style="padding:15px">Yes</td>
1555
+ </tr>
1556
+ <tr>
1557
+ <td style="padding:15px">putSnippetsUsernameEncodedIdCommentsCommentId(username, commentId, encodedId, callback)</td>
1558
+ <td style="padding:15px">Updates a comment.
1559
+ Comments can only be updated by their author.</td>
1560
+ <td style="padding:15px">{base_path}/{version}/snippets/{pathv1}/{pathv2}/comments/{pathv3}?{query}</td>
1561
+ <td style="padding:15px">Yes</td>
1562
+ </tr>
1563
+ <tr>
1564
+ <td style="padding:15px">getSnippetsUsernameEncodedIdCommits(username, encodedId, callback)</td>
1565
+ <td style="padding:15px">Returns the changes (commits) made on this snippet.</td>
1566
+ <td style="padding:15px">{base_path}/{version}/snippets/{pathv1}/{pathv2}/commits?{query}</td>
1567
+ <td style="padding:15px">Yes</td>
1568
+ </tr>
1569
+ <tr>
1570
+ <td style="padding:15px">getSnippetsUsernameEncodedIdCommitsRevision(username, encodedId, revision, callback)</td>
1571
+ <td style="padding:15px"></td>
1572
+ <td style="padding:15px">{base_path}/{version}/snippets/{pathv1}/{pathv2}/commits/{pathv3}?{query}</td>
1573
+ <td style="padding:15px">Yes</td>
1574
+ </tr>
1575
+ <tr>
1576
+ <td style="padding:15px">deleteSnippetsUsernameEncodedIdWatch(username, encodedId, callback)</td>
1577
+ <td style="padding:15px">Used to stop watching a specific snippet. Returns 204 (No Content)
1578
+ to indicate success.</td>
1579
+ <td style="padding:15px">{base_path}/{version}/snippets/{pathv1}/{pathv2}/watch?{query}</td>
1580
+ <td style="padding:15px">Yes</td>
1581
+ </tr>
1582
+ <tr>
1583
+ <td style="padding:15px">getSnippetsUsernameEncodedIdWatch(username, encodedId, callback)</td>
1584
+ <td style="padding:15px">Used to check if the current user is watching a specific snippet.
1585
+ Returns 204 (No Content) if the user is watching the snippet and 404 if
1586
+ not.
1587
+ Hitting this endpoint anonymously always returns a 404.</td>
1588
+ <td style="padding:15px">{base_path}/{version}/snippets/{pathv1}/{pathv2}/watch?{query}</td>
1589
+ <td style="padding:15px">Yes</td>
1590
+ </tr>
1591
+ <tr>
1592
+ <td style="padding:15px">putSnippetsUsernameEncodedIdWatch(username, encodedId, callback)</td>
1593
+ <td style="padding:15px">Used to start watching a specific snippet. Returns 204 (No Content).</td>
1594
+ <td style="padding:15px">{base_path}/{version}/snippets/{pathv1}/{pathv2}/watch?{query}</td>
1595
+ <td style="padding:15px">Yes</td>
1596
+ </tr>
1597
+ <tr>
1598
+ <td style="padding:15px">getSnippetsUsernameEncodedIdWatchers(username, encodedId, callback)</td>
1599
+ <td style="padding:15px">Returns a paginated list of all users watching a specific snippet.</td>
1600
+ <td style="padding:15px">{base_path}/{version}/snippets/{pathv1}/{pathv2}/watchers?{query}</td>
1601
+ <td style="padding:15px">Yes</td>
1602
+ </tr>
1603
+ <tr>
1604
+ <td style="padding:15px">deleteSnippetsUsernameEncodedIdNodeId(username, nodeId, encodedId, callback)</td>
1605
+ <td style="padding:15px">Deletes the snippet.
1606
+ Note that this only works for versioned URLs that point to the latest
1607
+ commit of the snippet. Pointing to an older commit results in a 405
1608
+ status code.
1609
+ To delete a snippet, regardless of whether or not concurrent changes
1610
+ are being made to it, use `DELETE /snippets/{encoded_id}` instead.</td>
1611
+ <td style="padding:15px">{base_path}/{version}/snippets/{pathv1}/{pathv2}/{pathv3}?{query}</td>
1612
+ <td style="padding:15px">Yes</td>
1613
+ </tr>
1614
+ <tr>
1615
+ <td style="padding:15px">getSnippetsUsernameEncodedIdNodeId(username, encodedId, nodeId, callback)</td>
1616
+ <td style="padding:15px">Identical to `GET /snippets/encoded_id`, except that this endpoint
1617
+ can be used to retrieve the contents of the snippet as it was at an
1618
+ older revision, while `/snippets/encoded_id` always returns the
1619
+ snippet's current revision.
1620
+ Note that only the snippet's file contents are versioned, not its
1621
+ meta data properties like the title.
1622
+ Other than that, the two endpoints are identical in behavior.</td>
1623
+ <td style="padding:15px">{base_path}/{version}/snippets/{pathv1}/{pathv2}/{pathv3}?{query}</td>
1624
+ <td style="padding:15px">Yes</td>
1625
+ </tr>
1626
+ <tr>
1627
+ <td style="padding:15px">putSnippetsUsernameEncodedIdNodeId(username, encodedId, nodeId, callback)</td>
1628
+ <td style="padding:15px">Identical to `UPDATE /snippets/encoded_id`, except that this endpoint
1629
+ takes an explicit commit revision. Only the snippet's "HEAD"/"tip"
1630
+ (most recent) version can be updated and requests on all other,
1631
+ older revisions fail by returning a 405 status.
1632
+ Usage of this endpoint over the unrestricted `/snippets/encoded_id`
1633
+ could be desired if the caller wants to be sure no concurrent
1634
+ modifications have taken place between the moment of the UPDATE
1635
+ request and the original GET.
1636
+ This can be considered a so...(description truncated)</td>
1637
+ <td style="padding:15px">{base_path}/{version}/snippets/{pathv1}/{pathv2}/{pathv3}?{query}</td>
1638
+ <td style="padding:15px">Yes</td>
1639
+ </tr>
1640
+ <tr>
1641
+ <td style="padding:15px">getSnippetsUsernameEncodedIdNodeIdFilesPath(username, pathParam, nodeId, encodedId, callback)</td>
1642
+ <td style="padding:15px">Retrieves the raw contents of a specific file in the snippet. The
1643
+ `Content-Disposition` header will be "attachment" to avoid issues with
1644
+ malevolent executable files.
1645
+ The file's mime type is derived from its filename and returned in the
1646
+ `Content-Type` header.
1647
+ Note that for text files, no character encoding is included as part of
1648
+ the content type.</td>
1649
+ <td style="padding:15px">{base_path}/{version}/snippets/{pathv1}/{pathv2}/{pathv3}/files/{pathv4}?{query}</td>
1650
+ <td style="padding:15px">Yes</td>
1651
+ </tr>
1652
+ <tr>
1653
+ <td style="padding:15px">getSnippetsUsernameEncodedIdRevisionDiff(username, pathParam, encodedId, revision, callback)</td>
1654
+ <td style="padding:15px">Returns the diff of the specified commit against its first parent.
1655
+ Note that this resource is different in functionality from the `patch`
1656
+ resource.
1657
+ The differences between a diff and a patch are:
1658
+ * patches have a commit header with the username, message, etc
1659
+ * diffs support the optional `path=foo/bar.py` query param to filter the
1660
+ diff to just that one file diff (not supported for patches)
1661
+ * for a merge, the diff will show the diff between the merge commit and
1662
+ its first parent (identical to h...(description truncated)</td>
1663
+ <td style="padding:15px">{base_path}/{version}/snippets/{pathv1}/{pathv2}/{pathv3}/diff?{query}</td>
1664
+ <td style="padding:15px">Yes</td>
1665
+ </tr>
1666
+ <tr>
1667
+ <td style="padding:15px">getSnippetsUsernameEncodedIdRevisionPatch(username, encodedId, revision, callback)</td>
1668
+ <td style="padding:15px">Returns the patch of the specified commit against its first
1669
+ parent.
1670
+ Note that this resource is different in functionality from the `diff`
1671
+ resource.
1672
+ The differences between a diff and a patch are:
1673
+ * patches have a commit header with the username, message, etc
1674
+ * diffs support the optional `path=foo/bar.py` query param to filter the
1675
+ diff to just that one file diff (not supported for patches)
1676
+ * for a merge, the diff will show the diff between the merge commit and
1677
+ its first parent (identical to h...(description truncated)</td>
1678
+ <td style="padding:15px">{base_path}/{version}/snippets/{pathv1}/{pathv2}/{pathv3}/patch?{query}</td>
1679
+ <td style="padding:15px">Yes</td>
1680
+ </tr>
1681
+ <tr>
1682
+ <td style="padding:15px">getTeamsOwnerProjects(owner, callback)</td>
1683
+ <td style="padding:15px"></td>
1684
+ <td style="padding:15px">{base_path}/{version}/teams/{pathv1}/projects/?{query}</td>
1685
+ <td style="padding:15px">Yes</td>
1686
+ </tr>
1687
+ <tr>
1688
+ <td style="padding:15px">postTeamsOwnerProjects(owner, body, callback)</td>
1689
+ <td style="padding:15px">Creates a new project.
1690
+ Note that the avatar has to be embedded as either a data-url
1691
+ or a URL to an external image as shown in the examples below:
1692
+ ```
1693
+ $ body=$(cat << EOF
1694
+ {
1695
+ "name": "Mars Project",
1696
+ "key": "MARS",
1697
+ "description": "Software for colonizing mars.",
1698
+ "links": {
1699
+ "avatar": {
1700
+ "href": "data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/..."
1701
+ }
1702
+ },
1703
+ "is_private": false
1704
+ }
1705
+ EOF
1706
+ )
1707
+ $ curl -H "Content-Type: application/js...(description truncated)</td>
1708
+ <td style="padding:15px">{base_path}/{version}/teams/{pathv1}/projects/?{query}</td>
1709
+ <td style="padding:15px">Yes</td>
1710
+ </tr>
1711
+ <tr>
1712
+ <td style="padding:15px">deleteTeamsOwnerProjectsProjectKey(owner, projectKey, callback)</td>
1713
+ <td style="padding:15px"></td>
1714
+ <td style="padding:15px">{base_path}/{version}/teams/{pathv1}/projects/{pathv2}?{query}</td>
1715
+ <td style="padding:15px">Yes</td>
1716
+ </tr>
1717
+ <tr>
1718
+ <td style="padding:15px">getTeamsOwnerProjectsProjectKey(owner, projectKey, callback)</td>
1719
+ <td style="padding:15px"></td>
1720
+ <td style="padding:15px">{base_path}/{version}/teams/{pathv1}/projects/{pathv2}?{query}</td>
1721
+ <td style="padding:15px">Yes</td>
1722
+ </tr>
1723
+ <tr>
1724
+ <td style="padding:15px">putTeamsOwnerProjectsProjectKey(owner, projectKey, body, callback)</td>
1725
+ <td style="padding:15px">Since this endpoint can be used to both update and to create a
1726
+ project, the request body depends on the intent.
1727
+ ### Creation
1728
+ See the POST documentation for the project collection for an
1729
+ example of the request body.
1730
+ Note: The `key` should not be specified in the body of request
1731
+ (since it is already present in the URL). The `name` is required,
1732
+ everything else is optional.
1733
+ ### Update
1734
+ See the POST documentation for the project collection for an
1735
+ example of the request body.
1736
+ Note: The key is not requi...(description truncated)</td>
1737
+ <td style="padding:15px">{base_path}/{version}/teams/{pathv1}/projects/{pathv2}?{query}</td>
1738
+ <td style="padding:15px">Yes</td>
1739
+ </tr>
1740
+ </table>
1741
+ <br>