Commit 7623ab0c authored by Sean McGivern's avatar Sean McGivern

Make projects API docs match parameter style

parent 0a1baaa8
...@@ -28,12 +28,14 @@ GET /projects ...@@ -28,12 +28,14 @@ GET /projects
Parameters: Parameters:
- `archived` (optional) - if passed, limit by archived status | Attribute | Type | Required | Description |
- `visibility` (optional) - if passed, limit by visibility `public`, `internal`, `private` | --------- | ---- | -------- | ----------- |
- `order_by` (optional) - Return requests ordered by `id`, `name`, `path`, `created_at`, `updated_at` or `last_activity_at` fields. Default is `created_at` | `archived` | boolean | no | Limit by archived status |
- `sort` (optional) - Return requests sorted in `asc` or `desc` order. Default is `desc` | `visibility` | string | no | Limit by visibility `public`, `internal`, or `private` |
- `search` (optional) - Return list of authorized projects according to a search criteria | `order_by` | string | no | Return projects ordered by `id`, `name`, `path`, `created_at`, `updated_at`, or `last_activity_at` fields. Default is `created_at` |
- `simple` (optional) - When set, return only the ID, URL, name, and path of each project | `sort` | string | no | Return projects sorted in `asc` or `desc` order. Default is `desc` |
| `search` | string | no | Return list of authorized projects matching the search criteria |
| `simple` | boolean | no | Return only the ID, URL, name, and path of each project |
```json ```json
[ [
...@@ -162,12 +164,14 @@ GET /projects/visible ...@@ -162,12 +164,14 @@ GET /projects/visible
Parameters: Parameters:
- `archived` (optional) - if passed, limit by archived status | Attribute | Type | Required | Description |
- `visibility` (optional) - if passed, limit by visibility `public`, `internal`, `private` | --------- | ---- | -------- | ----------- |
- `order_by` (optional) - Return requests ordered by `id`, `name`, `path`, `created_at`, `updated_at` or `last_activity_at` fields. Default is `created_at` | `archived` | boolean | no | Limit by archived status |
- `sort` (optional) - Return requests sorted in `asc` or `desc` order. Default is `desc` | `visibility` | string | no | Limit by visibility `public`, `internal`, or `private` |
- `search` (optional) - Return list of authorized projects according to a search criteria | `order_by` | string | no | Return projects ordered by `id`, `name`, `path`, `created_at`, `updated_at`, or `last_activity_at` fields. Default is `created_at` |
- `simple` (optional) - When set, return only the ID, URL, name, and path of each project | `sort` | string | no | Return projects sorted in `asc` or `desc` order. Default is `desc` |
| `search` | string | no | Return list of authorized projects matching the search criteria |
| `simple` | boolean | no | Return only the ID, URL, name, and path of each project |
```json ```json
[ [
...@@ -294,11 +298,13 @@ GET /projects/owned ...@@ -294,11 +298,13 @@ GET /projects/owned
Parameters: Parameters:
- `archived` (optional) - if passed, limit by archived status | Attribute | Type | Required | Description |
- `visibility` (optional) - if passed, limit by visibility `public`, `internal`, `private` | --------- | ---- | -------- | ----------- |
- `order_by` (optional) - Return requests ordered by `id`, `name`, `path`, `created_at`, `updated_at` or `last_activity_at` fields. Default is `created_at` | `archived` | boolean | no | Limit by archived status |
- `sort` (optional) - Return requests sorted in `asc` or `desc` order. Default is `desc` | `visibility` | string | no | Limit by visibility `public`, `internal`, or `private` |
- `search` (optional) - Return list of authorized projects according to a search criteria | `order_by` | string | no | Return projects ordered by `id`, `name`, `path`, `created_at`, `updated_at`, or `last_activity_at` fields. Default is `created_at` |
| `sort` | string | no | Return projects sorted in `asc` or `desc` order. Default is `desc` |
| `search` | string | no | Return list of authorized projects matching the search criteria |
### List starred projects ### List starred projects
...@@ -310,11 +316,13 @@ GET /projects/starred ...@@ -310,11 +316,13 @@ GET /projects/starred
Parameters: Parameters:
- `archived` (optional) - if passed, limit by archived status | Attribute | Type | Required | Description |
- `visibility` (optional) - if passed, limit by visibility `public`, `internal`, `private` | --------- | ---- | -------- | ----------- |
- `order_by` (optional) - Return requests ordered by `id`, `name`, `path`, `created_at`, `updated_at` or `last_activity_at` fields. Default is `created_at` | `archived` | boolean | no | Limit by archived status |
- `sort` (optional) - Return requests sorted in `asc` or `desc` order. Default is `desc` | `visibility` | string | no | Limit by visibility `public`, `internal`, or `private` |
- `search` (optional) - Return list of authorized projects according to a search criteria | `order_by` | string | no | Return projects ordered by `id`, `name`, `path`, `created_at`, `updated_at`, or `last_activity_at` fields. Default is `created_at` |
| `sort` | string | no | Return projects sorted in `asc` or `desc` order. Default is `desc` |
| `search` | string | no | Return list of authorized projects matching the search criteria |
### List ALL projects ### List ALL projects
...@@ -326,11 +334,13 @@ GET /projects/all ...@@ -326,11 +334,13 @@ GET /projects/all
Parameters: Parameters:
- `archived` (optional) - if passed, limit by archived status | Attribute | Type | Required | Description |
- `visibility` (optional) - if passed, limit by visibility `public`, `internal`, `private` | --------- | ---- | -------- | ----------- |
- `order_by` (optional) - Return requests ordered by `id`, `name`, `path`, `created_at`, `updated_at` or `last_activity_at` fields. Default is `created_at` | `archived` | boolean | no | Limit by archived status |
- `sort` (optional) - Return requests sorted in `asc` or `desc` order. Default is `desc` | `visibility` | string | no | Limit by visibility `public`, `internal`, or `private` |
- `search` (optional) - Return list of authorized projects according to a search criteria | `order_by` | string | no | Return projects ordered by `id`, `name`, `path`, `created_at`, `updated_at`, or `last_activity_at` fields. Default is `created_at` |
| `sort` | string | no | Return projects sorted in `asc` or `desc` order. Default is `desc` |
| `search` | string | no | Return list of authorized projects matching the search criteria |
### Get single project ### Get single project
...@@ -343,7 +353,9 @@ GET /projects/:id ...@@ -343,7 +353,9 @@ GET /projects/:id
Parameters: Parameters:
- `id` (required) - The ID or NAMESPACE/PROJECT_NAME of a project | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID or NAMESPACE/PROJECT_NAME of the project |
```json ```json
{ {
...@@ -432,7 +444,9 @@ GET /projects/:id/events ...@@ -432,7 +444,9 @@ GET /projects/:id/events
Parameters: Parameters:
- `id` (required) - The ID or NAMESPACE/PROJECT_NAME of a project | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID or NAMESPACE/PROJECT_NAME of the project |
```json ```json
[ [
...@@ -570,24 +584,26 @@ POST /projects ...@@ -570,24 +584,26 @@ POST /projects
Parameters: Parameters:
- `name` (required) - new project name | Attribute | Type | Required | Description |
- `path` (optional) - custom repository name for new project. By default generated based on name | --------- | ---- | -------- | ----------- |
- `namespace_id` (optional) - namespace for the new project (defaults to user) | `name` | string | yes | The name of the new project |
- `description` (optional) - short project description | `path` | string | no | Custom repository name for new project. By default generated based on name |
- `issues_enabled` (optional) | `namespace_id` | integer | no | Namespace for the new project (defaults to the current user's namespace) |
- `merge_requests_enabled` (optional) | `description` | string | no | Short project description |
- `builds_enabled` (optional) | `issues_enabled` | boolean | no | Enable issues for this project |
- `wiki_enabled` (optional) | `merge_requests_enabled` | boolean | no | Enable merge requests for this project |
- `snippets_enabled` (optional) | `builds_enabled` | boolean | no | Enable builds for this project |
- `container_registry_enabled` (optional) | `wiki_enabled` | boolean | no | Enable wiki for this project |
- `shared_runners_enabled` (optional) | `snippets_enabled` | boolean | no | Enable snippets for this project |
- `public` (optional) - if `true` same as setting visibility_level = 20 | `container_registry_enabled` | boolean | no | Enable container registry for this project |
- `visibility_level` (optional) | `shared_runners_enabled` | boolean | no | Enable shared runners for this project |
- `import_url` (optional) | `public` | boolean | no | If `true`, the same as setting `visibility_level` to 20 |
- `public_builds` (optional) | `visibility_level` | integer | no | See [project visibility level][#project-visibility-level] |
- `only_allow_merge_if_build_succeeds` (optional) | `import_url` | string | no | URL to import repository from |
- `lfs_enabled` (optional) | `public_builds` | boolean | no | If `true`, builds can be viewed by non-project-members |
- `request_access_enabled` (optional) - Allow users to request member access. | `only_allow_merge_if_build_succeeds` | boolean | no | Set whether merge requests can only be merged with successful builds |
| `lfs_enabled` | boolean | no | Enable LFS |
| `request_access_enabled` | boolean | no | Allow users to request member access |
### Create project for user ### Create project for user
...@@ -599,23 +615,27 @@ POST /projects/user/:user_id ...@@ -599,23 +615,27 @@ POST /projects/user/:user_id
Parameters: Parameters:
- `user_id` (required) - user_id of owner | Attribute | Type | Required | Description |
- `name` (required) - new project name | --------- | ---- | -------- | ----------- |
- `description` (optional) - short project description | `user_id` | integer | yes | The user ID of the project owner |
- `issues_enabled` (optional) | `name` | string | yes | The name of the new project |
- `merge_requests_enabled` (optional) | `path` | string | no | Custom repository name for new project. By default generated based on name |
- `builds_enabled` (optional) | `namespace_id` | integer | no | Namespace for the new project (defaults to the current user's namespace) |
- `wiki_enabled` (optional) | `description` | string | no | Short project description |
- `snippets_enabled` (optional) | `issues_enabled` | boolean | no | Enable issues for this project |
- `container_registry_enabled` (optional) | `merge_requests_enabled` | boolean | no | Enable merge requests for this project |
- `shared_runners_enabled` (optional) | `builds_enabled` | boolean | no | Enable builds for this project |
- `public` (optional) - if `true` same as setting visibility_level = 20 | `wiki_enabled` | boolean | no | Enable wiki for this project |
- `visibility_level` (optional) | `snippets_enabled` | boolean | no | Enable snippets for this project |
- `import_url` (optional) | `container_registry_enabled` | boolean | no | Enable container registry for this project |
- `public_builds` (optional) | `shared_runners_enabled` | boolean | no | Enable shared runners for this project |
- `only_allow_merge_if_build_succeeds` (optional) | `public` | boolean | no | If `true`, the same as setting `visibility_level` to 20 |
- `lfs_enabled` (optional) | `visibility_level` | integer | no | See [project visibility level][#project-visibility-level] |
- `request_access_enabled` (optional) - Allow users to request member access. | `import_url` | string | no | URL to import repository from |
| `public_builds` | boolean | no | If `true`, builds can be viewed by non-project-members |
| `only_allow_merge_if_build_succeeds` | boolean | no | Set whether merge requests can only be merged with successful builds |
| `lfs_enabled` | boolean | no | Enable LFS |
| `request_access_enabled` | boolean | no | Allow users to request member access |
### Edit project ### Edit project
...@@ -627,24 +647,26 @@ PUT /projects/:id ...@@ -627,24 +647,26 @@ PUT /projects/:id
Parameters: Parameters:
- `id` (required) - The ID or NAMESPACE/PROJECT_NAME of a project | Attribute | Type | Required | Description |
- `name` (optional) - project name | --------- | ---- | -------- | ----------- |
- `path` (optional) - repository name for project | `id` | integer/string | yes | The ID or NAMESPACE/PROJECT_NAME of the project |
- `description` (optional) - short project description | `name` | string | yes | The name of the project |
- `default_branch` (optional) | `path` | string | no | Custom repository name for the project. By default generated based on name |
- `issues_enabled` (optional) | `description` | string | no | Short project description |
- `merge_requests_enabled` (optional) | `issues_enabled` | boolean | no | Enable issues for this project |
- `builds_enabled` (optional) | `merge_requests_enabled` | boolean | no | Enable merge requests for this project |
- `wiki_enabled` (optional) | `builds_enabled` | boolean | no | Enable builds for this project |
- `snippets_enabled` (optional) | `wiki_enabled` | boolean | no | Enable wiki for this project |
- `container_registry_enabled` (optional) | `snippets_enabled` | boolean | no | Enable snippets for this project |
- `shared_runners_enabled` (optional) | `container_registry_enabled` | boolean | no | Enable container registry for this project |
- `public` (optional) - if `true` same as setting visibility_level = 20 | `shared_runners_enabled` | boolean | no | Enable shared runners for this project |
- `visibility_level` (optional) | `public` | boolean | no | If `true`, the same as setting `visibility_level` to 20 |
- `public_builds` (optional) | `visibility_level` | integer | no | See [project visibility level][#project-visibility-level] |
- `only_allow_merge_if_build_succeeds` (optional) | `import_url` | string | no | URL to import repository from |
- `lfs_enabled` (optional) | `public_builds` | boolean | no | If `true`, builds can be viewed by non-project-members |
- `request_access_enabled` (optional) - Allow users to request member access. | `only_allow_merge_if_build_succeeds` | boolean | no | Set whether merge requests can only be merged with successful builds |
| `lfs_enabled` | boolean | no | Enable LFS |
| `request_access_enabled` | boolean | no | Allow users to request member access |
On success, method returns 200 with the updated project. If parameters are On success, method returns 200 with the updated project. If parameters are
invalid, 400 is returned. invalid, 400 is returned.
...@@ -659,8 +681,10 @@ POST /projects/fork/:id ...@@ -659,8 +681,10 @@ POST /projects/fork/:id
Parameters: Parameters:
- `id` (required) - The ID or NAMESPACE/PROJECT_NAME of the project to be forked | Attribute | Type | Required | Description |
- `namespace` (optional) - The ID or path of the namespace that the project will be forked to | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID or NAMESPACE/PROJECT_NAME of the project |
| `namespace` | integer/string | yes | The ID or path of the namespace that the project will be forked to |
### Star a project ### Star a project
...@@ -671,9 +695,11 @@ Stars a given project. Returns status code `201` and the project on success and ...@@ -671,9 +695,11 @@ Stars a given project. Returns status code `201` and the project on success and
POST /projects/:id/star POST /projects/:id/star
``` ```
Parameters:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME | | `id` | integer/string | yes | The ID or NAMESPACE/PROJECT_NAME of the project |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/star" curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/star"
...@@ -741,7 +767,7 @@ DELETE /projects/:id/star ...@@ -741,7 +767,7 @@ DELETE /projects/:id/star
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME | | `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME |
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/star" curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/star"
...@@ -813,7 +839,7 @@ POST /projects/:id/archive ...@@ -813,7 +839,7 @@ POST /projects/:id/archive
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME | | `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/archive" curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/archive"
...@@ -901,7 +927,7 @@ POST /projects/:id/unarchive ...@@ -901,7 +927,7 @@ POST /projects/:id/unarchive
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME | | `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/unarchive" curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/unarchive"
...@@ -984,7 +1010,9 @@ DELETE /projects/:id ...@@ -984,7 +1010,9 @@ DELETE /projects/:id
Parameters: Parameters:
- `id` (required) - The ID or NAMESPACE/PROJECT_NAME of the project to be forked | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME |
## Uploads ## Uploads
...@@ -998,8 +1026,10 @@ POST /projects/:id/uploads ...@@ -998,8 +1026,10 @@ POST /projects/:id/uploads
Parameters: Parameters:
- `id` (required) - The ID or NAMESPACE/PROJECT_NAME of the project to be forked | Attribute | Type | Required | Description |
- `file` (required) - The file to be uploaded | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME |
| `file` | string | yes | The file to be uploaded |
```json ```json
{ {
...@@ -1027,10 +1057,12 @@ POST /projects/:id/share ...@@ -1027,10 +1057,12 @@ POST /projects/:id/share
Parameters: Parameters:
- `id` (required) - The ID or NAMESPACE/PROJECT_NAME of the project to be forked | Attribute | Type | Required | Description |
- `group_id` (required) - The ID of a group | --------- | ---- | -------- | ----------- |
- `group_access` (required) - Level of permissions for sharing | `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME |
- `expires_at` - Share expiration date in ISO 8601 format: 2016-09-26 | `group_id` | integer | yes | The ID of the group to share with |
| `group_access` | integer | yes | The permissions level to grant the group |
| `expires_at` | string | no | Share expiration date in ISO 8601 format: 2016-09-26 |
## Hooks ## Hooks
...@@ -1047,7 +1079,9 @@ GET /projects/:id/hooks ...@@ -1047,7 +1079,9 @@ GET /projects/:id/hooks
Parameters: Parameters:
- `id` (required) - The ID or NAMESPACE/PROJECT_NAME of a project | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME |
### Get project hook ### Get project hook
...@@ -1059,8 +1093,10 @@ GET /projects/:id/hooks/:hook_id ...@@ -1059,8 +1093,10 @@ GET /projects/:id/hooks/:hook_id
Parameters: Parameters:
- `id` (required) - The ID or NAMESPACE/PROJECT_NAME of a project | Attribute | Type | Required | Description |
- `hook_id` (required) - The ID of a project hook | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME |
| `hook_id` | integer | yes | The ID of a project hook |
```json ```json
{ {
...@@ -1090,17 +1126,19 @@ POST /projects/:id/hooks ...@@ -1090,17 +1126,19 @@ POST /projects/:id/hooks
Parameters: Parameters:
- `id` (required) - The ID or NAMESPACE/PROJECT_NAME of a project | Attribute | Type | Required | Description |
- `url` (required) - The hook URL | --------- | ---- | -------- | ----------- |
- `push_events` - Trigger hook on push events | `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME |
- `issues_events` - Trigger hook on issues events | `url` | string | yes | The hook URL |
- `merge_requests_events` - Trigger hook on merge_requests events | `push_events` | boolean | no | Trigger hook on push events |
- `tag_push_events` - Trigger hook on push_tag events | `issues_events` | boolean | no | Trigger hook on issues events |
- `note_events` - Trigger hook on note events | `merge_requests_events` | boolean | no | Trigger hook on merge requests events |
- `build_events` - Trigger hook on build events | `tag_push_events` | boolean | no | Trigger hook on tag push events |
- `pipeline_events` - Trigger hook on pipeline events | `note_events` | boolean | no | Trigger hook on note events |
- `wiki_page_events` - Trigger hook on wiki page events | `build_events` | boolean | no | Trigger hook on build events |
- `enable_ssl_verification` - Do SSL verification when triggering the hook | `pipeline_events` | boolean | no | Trigger hook on pipeline events |
| `wiki_events` | boolean | no | Trigger hook on wiki events |
| `enable_ssl_verification` | boolean | no | Do SSL verification when triggering the hook |
### Edit project hook ### Edit project hook
...@@ -1112,18 +1150,20 @@ PUT /projects/:id/hooks/:hook_id ...@@ -1112,18 +1150,20 @@ PUT /projects/:id/hooks/:hook_id
Parameters: Parameters:
- `id` (required) - The ID or NAMESPACE/PROJECT_NAME of a project | Attribute | Type | Required | Description |
- `hook_id` (required) - The ID of a project hook | --------- | ---- | -------- | ----------- |
- `url` (required) - The hook URL | `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME |
- `push_events` - Trigger hook on push events | `hook_id` | integer | yes | The ID of the project hook |
- `issues_events` - Trigger hook on issues events | `url` | string | yes | The hook URL |
- `merge_requests_events` - Trigger hook on merge_requests events | `push_events` | boolean | no | Trigger hook on push events |
- `tag_push_events` - Trigger hook on push_tag events | `issues_events` | boolean | no | Trigger hook on issues events |
- `note_events` - Trigger hook on note events | `merge_requests_events` | boolean | no | Trigger hook on merge requests events |
- `build_events` - Trigger hook on build events | `tag_push_events` | boolean | no | Trigger hook on tag push events |
- `pipeline_events` - Trigger hook on pipeline events | `note_events` | boolean | no | Trigger hook on note events |
- `wiki_page_events` - Trigger hook on wiki page events | `build_events` | boolean | no | Trigger hook on build events |
- `enable_ssl_verification` - Do SSL verification when triggering the hook | `pipeline_events` | boolean | no | Trigger hook on pipeline events |
| `wiki_events` | boolean | no | Trigger hook on wiki events |
| `enable_ssl_verification` | boolean | no | Do SSL verification when triggering the hook |
### Delete project hook ### Delete project hook
...@@ -1136,8 +1176,10 @@ DELETE /projects/:id/hooks/:hook_id ...@@ -1136,8 +1176,10 @@ DELETE /projects/:id/hooks/:hook_id
Parameters: Parameters:
- `id` (required) - The ID or NAMESPACE/PROJECT_NAME of a project | Attribute | Type | Required | Description |
- `hook_id` (required) - The ID of hook to delete | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME |
| `hook_id` | integer | yes | The ID of the project hook |
Note the JSON response differs if the hook is available or not. If the project hook Note the JSON response differs if the hook is available or not. If the project hook
is available before it is returned in the JSON response or an empty response is returned. is available before it is returned in the JSON response or an empty response is returned.
...@@ -1156,7 +1198,9 @@ GET /projects/:id/repository/branches ...@@ -1156,7 +1198,9 @@ GET /projects/:id/repository/branches
Parameters: Parameters:
- `id` (required) - The ID or NAMESPACE/PROJECT_NAME of a project | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME |
```json ```json
[ [
...@@ -1211,10 +1255,12 @@ GET /projects/:id/repository/branches/:branch ...@@ -1211,10 +1255,12 @@ GET /projects/:id/repository/branches/:branch
Parameters: Parameters:
- `id` (required) - The ID or NAMESPACE/PROJECT_NAME of a project | Attribute | Type | Required | Description |
- `branch` (required) - The name of the branch. | --------- | ---- | -------- | ----------- |
- `developers_can_push` - Flag if developers can push to the branch. | `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME |
- `developers_can_merge` - Flag if developers can merge to the branch. | `branch` | string | yes | The name of the branch |
| `developers_can_push` | boolean | no | Flag if developers can push to the branch |
| `developers_can_merge` | boolean | no | Flag if developers can merge to the branch |
### Protect single branch ### Protect single branch
...@@ -1226,8 +1272,10 @@ PUT /projects/:id/repository/branches/:branch/protect ...@@ -1226,8 +1272,10 @@ PUT /projects/:id/repository/branches/:branch/protect
Parameters: Parameters:
- `id` (required) - The ID or NAMESPACE/PROJECT_NAME of a project | Attribute | Type | Required | Description |
- `branch` (required) - The name of the branch. | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME |
| `branch` | string | yes | The name of the branch |
### Unprotect single branch ### Unprotect single branch
...@@ -1239,8 +1287,10 @@ PUT /projects/:id/repository/branches/:branch/unprotect ...@@ -1239,8 +1287,10 @@ PUT /projects/:id/repository/branches/:branch/unprotect
Parameters: Parameters:
- `id` (required) - The ID or NAMESPACE/PROJECT_NAME of a project | Attribute | Type | Required | Description |
- `branch` (required) - The name of the branch. | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME |
| `branch` | string | yes | The name of the branch |
## Admin fork relation ## Admin fork relation
...@@ -1254,8 +1304,10 @@ POST /projects/:id/fork/:forked_from_id ...@@ -1254,8 +1304,10 @@ POST /projects/:id/fork/:forked_from_id
Parameters: Parameters:
- `id` (required) - The ID or NAMESPACE/PROJECT_NAME of the project to be forked | Attribute | Type | Required | Description |
- `forked_from_id:` (required) - The ID of the project that was forked from | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME |
| `forked_from_id` | ID | yes | The ID of the project that was forked from |
### Delete an existing forked from relationship ### Delete an existing forked from relationship
...@@ -1265,7 +1317,9 @@ DELETE /projects/:id/fork ...@@ -1265,7 +1317,9 @@ DELETE /projects/:id/fork
Parameter: Parameter:
- `id` (required) - The ID or NAMESPACE/PROJECT_NAME of the project to be forked | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME |
## Search for projects by name ## Search for projects by name
...@@ -1277,8 +1331,10 @@ GET /projects/search/:query ...@@ -1277,8 +1331,10 @@ GET /projects/search/:query
Parameters: Parameters:
- `query` (required) - A string contained in the project name | Attribute | Type | Required | Description |
- `per_page` (optional) - number of projects to return per page | --------- | ---- | -------- | ----------- |
- `page` (optional) - the page to retrieve | `query` (required) - A string contained in the project name
- `order_by` (optional) - Return requests ordered by `id`, `name`, `created_at` or `last_activity_at` fields | `per_page` (optional) - number of projects to return per page
- `sort` (optional) - Return requests sorted in `asc` or `desc` order | `page` (optional) - the page to retrieve
| `order_by` (optional) - Return requests ordered by `id`, `name`, `created_at` or `last_activity_at` fields
| `sort` | string | no | Return requests sorted in `asc` or `desc` order |
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment