Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/pages.md')
-rw-r--r--doc/api/pages.md67
1 files changed, 67 insertions, 0 deletions
diff --git a/doc/api/pages.md b/doc/api/pages.md
index 69c96f2aeb9..5467b5112df 100644
--- a/doc/api/pages.md
+++ b/doc/api/pages.md
@@ -29,3 +29,70 @@ DELETE /projects/:id/pages
```shell
curl --request 'DELETE' --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/2/pages"
```
+
+## Get pages settings for a project
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/436932) in GitLab 16.8.
+
+Prerequisites:
+
+- You must have at least the Maintainer role for the project.
+
+List Pages settings for the project.
+
+```plaintext
+GET /projects/:id/pages
+```
+
+Supported attributes:
+
+| Attribute | Type | Required | Description |
+| --------- | -------------- | -------- | ---------------------------------------- |
+| `id` | integer/string | Yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding) owned by the authenticated user |
+
+If successful, returns [`200`](rest/index.md#status-codes) and the following
+response attributes:
+
+| Attribute | Type | Description |
+| ----------------------------------------- | ---------- | ----------------------- |
+| `url` | string | URL to access this project pages. |
+| `is_unique_domain_enabled` | boolean | If [unique domain](../user/project/pages/introduction.md) is enabled. |
+| `force_https` | boolean | `true` if the project is set to force HTTPS. |
+| `deployments[]` | array | List of current active deployments. |
+
+| `deployments[]` attribute | Type | Description |
+| ----------------------------------------- | ---------- | ----------------------- |
+| `created_at` | date | Date deployment was created. |
+| `url` | string | URL for this deployment. |
+| `path_prefix` | string | Path prefix of this deployment when using [multiple deployments](../user/project/pages/index.md#create-multiple-deployments). |
+| `root_directory` | string | Root directory. |
+
+Example request:
+
+```shell
+curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/2/pages"
+```
+
+Example response:
+
+```json
+{
+ "url": "http://html-root-4160ce5f0e9a6c90ccb02755b7fc80f5a2a09ffbb1976cf80b653.pages.gdk.test:3010",
+ "is_unique_domain_enabled": true,
+ "force_https": false,
+ "deployments": [
+ {
+ "created_at": "2024-01-05T18:58:14.916Z",
+ "url": "http://html-root-4160ce5f0e9a6c90ccb02755b7fc80f5a2a09ffbb1976cf80b653.pages.gdk.test:3010/",
+ "path_prefix": "",
+ "root_directory": null
+ },
+ {
+ "created_at": "2024-01-05T18:58:46.042Z",
+ "url": "http://html-root-4160ce5f0e9a6c90ccb02755b7fc80f5a2a09ffbb1976cf80b653.pages.gdk.test:3010/mr3",
+ "path_prefix": "mr3",
+ "root_directory": null
+ }
+ ]
+}
+```