Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1 | Gerrit Code Review - '/projects/' REST API |
| 2 | ========================================== |
| 3 | |
| 4 | This page describes the project related REST endpoints. |
| 5 | Please also take note of the general information on the |
| 6 | link:rest-api.html[REST API]. |
| 7 | |
| 8 | Endpoints |
| 9 | --------- |
| 10 | |
Edwin Kempin | c3fe3cb | 2013-02-13 15:09:23 +0100 | [diff] [blame] | 11 | [[project-endpoints]] |
| 12 | Project Endpoints |
| 13 | ----------------- |
| 14 | |
Edwin Kempin | 7620274 | 2013-02-15 13:51:50 +0100 | [diff] [blame] | 15 | [[list-projects]] |
Edwin Kempin | 82d3037 | 2013-02-04 08:49:34 +0100 | [diff] [blame] | 16 | GET /projects/ (List Projects) |
| 17 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 18 | Lists the projects accessible by the caller. This is the same as |
| 19 | using the link:cmd-ls-projects.html[ls-projects] command over SSH, |
| 20 | and accepts the same options as query parameters. |
| 21 | |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 22 | As result a map is returned that maps the project names to |
| 23 | link:#project-info[ProjectInfo] entries. The entries in the map are sorted |
| 24 | by project name. |
| 25 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 26 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 27 | ---- |
| 28 | GET /projects/?d HTTP/1.0 |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 29 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 30 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 31 | .Response |
| 32 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 33 | HTTP/1.1 200 OK |
| 34 | Content-Disposition: attachment |
| 35 | Content-Type: application/json;charset=UTF-8 |
| 36 | |
| 37 | )]}' |
| 38 | { |
| 39 | "external/bison": { |
| 40 | "kind": "gerritcodereview#project", |
| 41 | "id": "external%2Fbison", |
| 42 | "description": "GNU parser generator" |
| 43 | }, |
| 44 | "external/gcc": { |
| 45 | "kind": "gerritcodereview#project", |
| 46 | "id": "external%2Fgcc", |
| 47 | }, |
| 48 | "external/openssl": { |
| 49 | "kind": "gerritcodereview#project", |
| 50 | "id": "external%2Fopenssl", |
| 51 | "description": "encryption\ncrypto routines" |
| 52 | }, |
| 53 | "test": { |
| 54 | "kind": "gerritcodereview#project", |
| 55 | "id": "test", |
| 56 | "description": "\u003chtml\u003e is escaped" |
| 57 | } |
| 58 | } |
| 59 | ---- |
| 60 | |
Edwin Kempin | a64c4b9 | 2013-01-23 11:30:40 +0100 | [diff] [blame] | 61 | .Get all projects with their description |
| 62 | **** |
| 63 | get::/projects/?d |
| 64 | **** |
| 65 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 66 | [[suggest-projects]] |
| 67 | The `/projects/` URL also accepts a prefix string in the `p` parameter. |
| 68 | This limits the results to those projects that start with the specified |
| 69 | prefix. |
| 70 | List all projects that start with `platform/`: |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 71 | |
| 72 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 73 | ---- |
| 74 | GET /projects/?p=platform%2F HTTP/1.0 |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 75 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 76 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 77 | .Response |
| 78 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 79 | HTTP/1.1 200 OK |
| 80 | Content-Disposition: attachment |
| 81 | Content-Type: application/json;charset=UTF-8 |
| 82 | |
| 83 | )]}' |
| 84 | { |
| 85 | "platform/drivers": { |
| 86 | "kind": "gerritcodereview#project", |
| 87 | "id": "platform%2Fdrivers", |
| 88 | }, |
| 89 | "platform/tools": { |
| 90 | "kind": "gerritcodereview#project", |
| 91 | "id": "platform%2Ftools", |
| 92 | } |
| 93 | } |
| 94 | ---- |
| 95 | E.g. this feature can be used by suggestion client UI's to limit results. |
| 96 | |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 97 | [[get-project-description]] |
| 98 | GET /projects/\{project-name\}/description (Get Project Description) |
| 99 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 100 | Retrieves the description of a project. |
| 101 | |
| 102 | .Request |
| 103 | ---- |
| 104 | GET /projects/plugins%2Freplication/description HTTP/1.0 |
| 105 | ---- |
| 106 | |
| 107 | .Response |
| 108 | ---- |
| 109 | HTTP/1.1 200 OK |
| 110 | Content-Disposition: attachment |
| 111 | Content-Type: application/json;charset=UTF-8 |
| 112 | |
| 113 | )]}' |
| 114 | "Copies to other servers using the Git protocol" |
| 115 | ---- |
| 116 | |
Edwin Kempin | efec449 | 2013-02-22 10:09:23 +0100 | [diff] [blame^] | 117 | If the project does not have a description an empty string is returned. |
| 118 | |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 119 | [[set-project-description]] |
| 120 | PUT /projects/\{project-name\}/description (Set Project Description) |
| 121 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 122 | Sets the description of a project. |
| 123 | |
| 124 | The new project description must be provided in the request body inside |
| 125 | a link:#project-description-input[ProjectDescriptionInput] entity. |
| 126 | |
| 127 | .Request |
| 128 | ---- |
| 129 | PUT /projects/plugins%2Freplication/description HTTP/1.0 |
| 130 | Content-Type: application/json;charset=UTF-8 |
| 131 | |
| 132 | { |
| 133 | "description": "Plugin for Gerrit that handles the replication.", |
| 134 | "commit_message": "Update the project description" |
| 135 | } |
| 136 | ---- |
| 137 | |
| 138 | As response the new project description is returned. |
| 139 | |
| 140 | .Response |
| 141 | ---- |
| 142 | HTTP/1.1 200 OK |
| 143 | Content-Disposition: attachment |
| 144 | Content-Type: application/json;charset=UTF-8 |
| 145 | |
| 146 | )]}' |
| 147 | "Plugin for Gerrit that handles the replication." |
| 148 | ---- |
| 149 | |
| 150 | [[delete-project-description]] |
| 151 | DELETE /projects/\{project-name\}/description (Delete Project Description) |
| 152 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 153 | Deletes the description of a project. |
| 154 | |
Edwin Kempin | efec449 | 2013-02-22 10:09:23 +0100 | [diff] [blame^] | 155 | The request body does not need to include a |
| 156 | link:#project-description-input[ProjectDescriptionInput] entity if no |
| 157 | commit message is specified. |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 158 | |
Edwin Kempin | efec449 | 2013-02-22 10:09:23 +0100 | [diff] [blame^] | 159 | Please note that some proxies prohibit request bodies for DELETE |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 160 | requests. In this case, if you want to specify a commit message, use |
| 161 | link:#set-project-description[PUT] to delete the description. |
| 162 | |
| 163 | .Request |
| 164 | ---- |
| 165 | DELETE /projects/plugins%2Freplication/description HTTP/1.0 |
| 166 | ---- |
| 167 | |
| 168 | .Response |
| 169 | ---- |
| 170 | HTTP/1.1 204 No Content |
| 171 | ---- |
| 172 | |
Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 173 | [[get-project-parent]] |
| 174 | GET /projects/\{project-name\}/parent (Get Project Parent) |
| 175 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 176 | Retrieves the name of a project's parent project. For the |
| 177 | `All-Projects` root project an empty string is returned. |
| 178 | |
| 179 | .Request |
| 180 | ---- |
| 181 | GET /projects/plugins%2Freplication/parent HTTP/1.0 |
| 182 | ---- |
| 183 | |
| 184 | .Response |
| 185 | ---- |
| 186 | HTTP/1.1 200 OK |
| 187 | Content-Disposition: attachment |
| 188 | Content-Type: application/json;charset=UTF-8 |
| 189 | |
| 190 | )]}' |
| 191 | "All-Projects" |
| 192 | ---- |
| 193 | |
| 194 | [[set-project-parent]] |
| 195 | PUT /projects/\{project-name\}/parent (Set Project Parent) |
| 196 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 197 | Sets the parent project for a project. |
| 198 | |
| 199 | The new name of the parent project must be provided in the request body |
| 200 | inside a link:#project-parent-input[ProjectParentInput] entity. |
| 201 | |
| 202 | .Request |
| 203 | ---- |
| 204 | PUT /projects/plugins%2Freplication/parent HTTP/1.0 |
| 205 | Content-Type: application/json;charset=UTF-8 |
| 206 | |
| 207 | { |
| 208 | "parent": "Public-Plugins", |
| 209 | "commit_message": "Update the project parent" |
| 210 | } |
| 211 | ---- |
| 212 | |
| 213 | As response the new parent project name is returned. |
| 214 | |
| 215 | .Response |
| 216 | ---- |
| 217 | HTTP/1.1 200 OK |
| 218 | Content-Disposition: attachment |
| 219 | Content-Type: application/json;charset=UTF-8 |
| 220 | |
| 221 | )]}' |
| 222 | "Public-Plugins" |
| 223 | ---- |
| 224 | |
Edwin Kempin | c3fe3cb | 2013-02-13 15:09:23 +0100 | [diff] [blame] | 225 | [[dashboard-endpoints]] |
| 226 | Dashboard Endpoints |
| 227 | ------------------- |
| 228 | |
Edwin Kempin | 7620274 | 2013-02-15 13:51:50 +0100 | [diff] [blame] | 229 | [[list-dashboards]] |
Edwin Kempin | 7fe2f7f | 2013-02-06 10:12:52 +0100 | [diff] [blame] | 230 | GET /projects/\{project-name\}/dashboards/ (List Dashboards) |
| 231 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 232 | List custom dashboards for a project. |
| 233 | |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 234 | As result a list of link:#dashboard-info[DashboardInfo] entries is |
| 235 | returned. |
| 236 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 237 | List all dashboards for the `work/my-project` project: |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 238 | |
| 239 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 240 | ---- |
| 241 | GET /projects/work%2Fmy-project/dashboards/ HTTP/1.0 |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 242 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 243 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 244 | .Response |
| 245 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 246 | HTTP/1.1 200 OK |
| 247 | Content-Disposition: attachment |
| 248 | Content-Type: application/json;charset=UTF-8 |
| 249 | |
| 250 | )]}' |
| 251 | [ |
| 252 | { |
| 253 | "kind": "gerritcodereview#dashboard", |
| 254 | "id": "main:closed", |
| 255 | "ref": "main", |
| 256 | "path": "closed", |
| 257 | "description": "Merged and abandoned changes in last 7 weeks", |
| 258 | "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w", |
| 259 | "default": true, |
| 260 | "title": "Closed changes", |
| 261 | "sections": [ |
| 262 | { |
| 263 | "name": "Merged", |
| 264 | "query": "status:merged age:7w" |
| 265 | }, |
| 266 | { |
| 267 | "name": "Abandoned", |
| 268 | "query": "status:abandoned age:7w" |
| 269 | } |
| 270 | ] |
| 271 | } |
| 272 | ] |
| 273 | ---- |
| 274 | |
Edwin Kempin | a64c4b9 | 2013-01-23 11:30:40 +0100 | [diff] [blame] | 275 | .Get all dashboards of the 'All-Projects' project |
| 276 | **** |
| 277 | get::/projects/All-Projects/dashboards/ |
| 278 | **** |
| 279 | |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 280 | [[get-dashboard]] |
| 281 | GET /projects/\{project-name\}/dashboards/\{dashboard-id\} (Get Dashboard) |
| 282 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 283 | Retrieves a project dashboard. The dashboard can be defined on that |
| 284 | project or be inherited from a parent project. |
| 285 | |
| 286 | .Request |
| 287 | ---- |
| 288 | GET /projects/work%2Fmy-project/dashboards/main:closed HTTP/1.0 |
| 289 | ---- |
| 290 | |
| 291 | As response a link:#dashboard-info[DashboardInfo] entity is returned |
| 292 | that describes the dashboard. |
| 293 | |
| 294 | .Response |
| 295 | ---- |
| 296 | HTTP/1.1 200 OK |
| 297 | Content-Disposition: attachment |
| 298 | Content-Type: application/json;charset=UTF-8 |
| 299 | |
| 300 | )]}' |
| 301 | { |
| 302 | "kind": "gerritcodereview#dashboard", |
| 303 | "id": "main:closed", |
| 304 | "ref": "main", |
| 305 | "path": "closed", |
| 306 | "description": "Merged and abandoned changes in last 7 weeks", |
| 307 | "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w", |
| 308 | "default": true, |
| 309 | "title": "Closed changes", |
| 310 | "sections": [ |
| 311 | { |
| 312 | "name": "Merged", |
| 313 | "query": "status:merged age:7w" |
| 314 | }, |
| 315 | { |
| 316 | "name": "Abandoned", |
| 317 | "query": "status:abandoned age:7w" |
| 318 | } |
| 319 | ] |
| 320 | } |
| 321 | ---- |
| 322 | |
| 323 | To retrieve the default dashboard of a project use `default` as |
| 324 | dashboard-id. |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 325 | |
| 326 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 327 | ---- |
| 328 | GET /projects/work%2Fmy-project/dashboards/default HTTP/1.0 |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 329 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 330 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 331 | .Response |
| 332 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 333 | HTTP/1.1 200 OK |
| 334 | Content-Disposition: attachment |
| 335 | Content-Type: application/json;charset=UTF-8 |
| 336 | |
| 337 | )]}' |
| 338 | { |
| 339 | "kind": "gerritcodereview#dashboard", |
| 340 | "id": "main:closed", |
| 341 | "ref": "main", |
| 342 | "path": "closed", |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 343 | "description": "Merged and abandoned changes in last 7 weeks", |
| 344 | "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w", |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 345 | "default": true, |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 346 | "title": "Closed changes", |
| 347 | "sections": [ |
| 348 | { |
| 349 | "name": "Merged", |
| 350 | "query": "status:merged age:7w" |
| 351 | }, |
| 352 | { |
| 353 | "name": "Abandoned", |
| 354 | "query": "status:abandoned age:7w" |
| 355 | } |
| 356 | ] |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 357 | } |
| 358 | ---- |
| 359 | |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 360 | [[set-dashboard]] |
| 361 | PUT /projects/\{project-name\}/dashboards/\{dashboard-id\} (Set Dashboard) |
| 362 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 363 | Updates/Creates a project dashboard. |
| 364 | |
| 365 | Currently only supported for the `default` dashboard. |
| 366 | |
| 367 | The creation/update information for the dashboard must be provided in |
| 368 | the request body as a link:#dashboard-input[DashboardInput] entity. |
| 369 | |
| 370 | .Request |
| 371 | ---- |
| 372 | PUT /projects/work%2Fmy-project/dashboards/default HTTP/1.0 |
| 373 | Content-Type: application/json;charset=UTF-8 |
| 374 | |
| 375 | { |
| 376 | "id": "main:closed", |
| 377 | "commit_message": "Define the default dashboard" |
| 378 | } |
| 379 | ---- |
| 380 | |
| 381 | As response the new/updated dashboard is returned as a |
| 382 | link:#dashboard-info[DashboardInfo] entity. |
| 383 | |
| 384 | .Response |
| 385 | ---- |
| 386 | HTTP/1.1 200 OK |
| 387 | Content-Disposition: attachment |
| 388 | Content-Type: application/json;charset=UTF-8 |
| 389 | |
| 390 | )]}' |
| 391 | { |
| 392 | "kind": "gerritcodereview#dashboard", |
| 393 | "id": "main:closed", |
| 394 | "ref": "main", |
| 395 | "path": "closed", |
| 396 | "description": "Merged and abandoned changes in last 7 weeks", |
| 397 | "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w", |
| 398 | "default": true, |
| 399 | "title": "Closed changes", |
| 400 | "sections": [ |
| 401 | { |
| 402 | "name": "Merged", |
| 403 | "query": "status:merged age:7w" |
| 404 | }, |
| 405 | { |
| 406 | "name": "Abandoned", |
| 407 | "query": "status:abandoned age:7w" |
| 408 | } |
| 409 | ] |
| 410 | } |
| 411 | ---- |
| 412 | |
| 413 | [[delete-dashboard]] |
| 414 | DELETE /projects/\{project-name\}/dashboards/\{dashboard-id\} (Delete Dashboard) |
| 415 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 416 | Deletes a project dashboard. |
| 417 | |
| 418 | Currently only supported for the `default` dashboard. |
| 419 | |
Edwin Kempin | efec449 | 2013-02-22 10:09:23 +0100 | [diff] [blame^] | 420 | The request body does not need to include a link:#dashboard-input[ |
| 421 | DashbaordInput] entity if no commit message is specified. |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 422 | |
| 423 | Please note that some proxies prohibit request bodies for DELETE |
| 424 | requests. |
| 425 | |
| 426 | .Request |
| 427 | ---- |
| 428 | DELETE /projects/work%2Fmy-project/dashboards/default HTTP/1.0 |
| 429 | ---- |
| 430 | |
| 431 | .Response |
| 432 | ---- |
| 433 | HTTP/1.1 204 No Content |
| 434 | ---- |
| 435 | |
Edwin Kempin | 34d8335 | 2013-02-06 10:40:17 +0100 | [diff] [blame] | 436 | |
| 437 | [[ids]] |
| 438 | IDs |
| 439 | --- |
| 440 | |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 441 | \{dashboard-id\} |
| 442 | ~~~~~~~~~~~~~~~~ |
| 443 | The ID of a dashboard in the format '<ref>:<path>'. |
| 444 | |
| 445 | A special dashboard ID is `default` which represents the default |
| 446 | dashboard of a project. |
| 447 | |
Edwin Kempin | 34d8335 | 2013-02-06 10:40:17 +0100 | [diff] [blame] | 448 | \{project-name\} |
| 449 | ~~~~~~~~~~~~~~~~ |
| 450 | The name of the project. |
| 451 | |
| 452 | |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 453 | [[json-entities]] |
| 454 | JSON Entities |
| 455 | ------------- |
| 456 | |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 457 | [[dashboard-info]] |
| 458 | DashboardInfo |
| 459 | ~~~~~~~~~~~~~ |
| 460 | The `DashboardInfo` entity contains information about a project |
| 461 | dashboard. |
| 462 | |
| 463 | [options="header",width="50%",cols="1,^2,4"] |
| 464 | |=============================== |
| 465 | |Field Name ||Description |
| 466 | |`kind` ||`gerritcodereview#dashboard` |
| 467 | |`id` || |
| 468 | The ID of the dashboard. The ID has the format '<ref>:<path>', |
| 469 | where ref and path are URL encoded. |
| 470 | |`project` || |
| 471 | The name of the project for which this dashboard is returned. |
| 472 | |`defining_project`|| |
| 473 | The name of the project in which this dashboard is defined. |
| 474 | This is different from `project` if the dashboard is inherited from a |
| 475 | parent project. |
| 476 | |`ref` || |
| 477 | The name of the ref in which the dashboard is defined, without the |
| 478 | `refs/meta/dashboards/` prefix, which is common for all dashboard refs. |
| 479 | |`path` || |
| 480 | The path of the file in which the dashboard is defined. |
| 481 | |`description` |optional|The description of the dashboard. |
| 482 | |`foreach` |optional| |
| 483 | Subquery that applies to all sections in the dashboard. + |
| 484 | Tokens such as `${project}` are not resolved. |
| 485 | |`url` || |
| 486 | The URL under which the dashboard can be opened in the Gerrit WebUI. + |
| 487 | The URL is relative to the canonical web URL. + |
| 488 | Tokens in the queries such as `${project}` are resolved. |
| 489 | |`default` |not set if `false`| |
| 490 | Whether this is the default dashboard of the project. |
| 491 | |`title` |optional|The title of the dashboard. |
| 492 | |`sections` || |
| 493 | The list of link:#dashboard-section-info[sections] in the dashboard. |
| 494 | |=============================== |
| 495 | |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 496 | [[dashboard-input]] |
| 497 | DashboardInput |
| 498 | ~~~~~~~~~~~~~~ |
| 499 | The `DashboardInput` entity contains information to create/update a |
| 500 | project dashboard. |
| 501 | |
| 502 | [options="header",width="50%",cols="1,^2,4"] |
| 503 | |============================= |
| 504 | |Field Name ||Description |
| 505 | |`id` |optional| |
| 506 | ID of a dashboard to which this dashboard should link to. |
| 507 | |`commit_message`|optional| |
| 508 | Message that should be used to commit the change of the dashboard. |
| 509 | |============================= |
| 510 | |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 511 | [[dashboard-section-info]] |
| 512 | DashboardSectionInfo |
| 513 | ~~~~~~~~~~~~~~~~~~~~ |
| 514 | The `DashboardSectionInfo` entity contains information about a section |
| 515 | in a dashboard. |
| 516 | |
| 517 | [options="header",width="50%",cols="1,6"] |
| 518 | |=========================== |
| 519 | |Field Name |Description |
| 520 | |`name` |The title of the section. |
| 521 | |`query` |The query of the section. + |
| 522 | Tokens such as `${project}` are not resolved. |
| 523 | |=========================== |
| 524 | |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 525 | [[project-description-input]] |
| 526 | ProjectDescriptionInput |
| 527 | ~~~~~~~~~~~~~~~~~~~~~~~ |
| 528 | The `ProjectDescriptionInput` entity contains information for setting a |
| 529 | project description. |
| 530 | |
| 531 | [options="header",width="50%",cols="1,^2,4"] |
| 532 | |============================= |
| 533 | |Field Name ||Description |
| 534 | |`description` |optional|The project description. + |
| 535 | The project description will be deleted if not set. |
| 536 | |`commit_message`|optional| |
| 537 | Message that should be used to commit the change of the project |
| 538 | description in the `project.config` file to the `refs/meta/config` |
| 539 | branch. |
| 540 | |============================= |
| 541 | |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 542 | [[project-info]] |
| 543 | ProjectInfo |
| 544 | ~~~~~~~~~~~ |
| 545 | The `ProjectInfo` entity contains information about a project. |
| 546 | |
| 547 | [options="header",width="50%",cols="1,^2,4"] |
| 548 | |=========================== |
| 549 | |Field Name ||Description |
| 550 | |`kind` ||`gerritcodereview#project` |
| 551 | |`id` ||The URL encoded project name. |
| 552 | |`name` | |
| 553 | not set if returned in a map where the project name is used as map key| |
| 554 | The name of the project. |
| 555 | |`parent` |optional, + |
| 556 | not set for the root project| |
| 557 | The name of the parent project. + |
| 558 | `?-<n>` if the parent project is not visible (`<n>` is a number which |
| 559 | is increased for each non-visible project). |
| 560 | |`description` |optional|The description of the project. |
| 561 | |`branches` |optional|Map of branch names to HEAD revisions. |
| 562 | |=========================== |
| 563 | |
Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 564 | [[project-parent-input]] |
| 565 | ProjectParentInput |
| 566 | ~~~~~~~~~~~~~~~~~~ |
| 567 | The `ProjectParentInput` entity contains information for setting a |
| 568 | project parent. |
| 569 | |
| 570 | [options="header",width="50%",cols="1,^2,4"] |
| 571 | |============================= |
| 572 | |Field Name ||Description |
| 573 | |`parent` ||The name of the parent project. |
| 574 | |`commit_message`|optional| |
| 575 | Message that should be used to commit the change of the project parent |
| 576 | in the `project.config` file to the `refs/meta/config` branch. |
| 577 | |============================= |
| 578 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 579 | |
| 580 | GERRIT |
| 581 | ------ |
| 582 | Part of link:index.html[Gerrit Code Review] |