From 2670301b2b0fa4bb5e7d0ec6bfe87fdcd3b74eb8 Mon Sep 17 00:00:00 2001 From: "Z.J. van de Weg" Date: Tue, 7 Feb 2017 23:02:16 +0100 Subject: Update API docs on finding project by namespace/name [ci skip] Fixes #27835 --- doc/api/README.md | 7 +++++++ doc/api/projects.md | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/api/README.md b/doc/api/README.md index b334ca46caf..77338dc0a2f 100644 --- a/doc/api/README.md +++ b/doc/api/README.md @@ -284,6 +284,13 @@ Additional pagination headers are also sent back. | `X-Next-Page` | The index of the next page | | `X-Prev-Page` | The index of the previous page | +## Project ID vs Project string + +When in this documentation a reference is made to the project id, one could also use NAMESPACE/PROJECT_NAME. +If using namespaced projects call make sure that the NAMESPACE/PROJECT_NAME is URL-encoded, eg. `/api/v3/projects/diaspora%2Fdiaspora` +(where `/` is represented by `%2F`). + + ## `id` vs `iid` When you work with the API, you may notice two similar fields in API entities: diff --git a/doc/api/projects.md b/doc/api/projects.md index 122075bbd11..2847f499dec 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -351,8 +351,8 @@ Parameters: ### Get single project Get a specific project, identified by project ID or NAMESPACE/PROJECT_NAME, which is owned by the authenticated user. -If using namespaced projects call make sure that the NAMESPACE/PROJECT_NAME is URL-encoded, eg. `/api/v3/projects/diaspora%2Fdiaspora` (where `/` is represented by `%2F`). This endpoint can be accessed without authentication if -the project is publicly accessible. +If using namespaced projects call make sure that the NAMESPACE/PROJECT_NAME is URL-encoded, eg. `/api/v3/projects/diaspora%2Fdiaspora` +(where `/` is represented by `%2F`). This endpoint can be accessed without authentication if the project is publicly accessible. ``` GET /projects/:id -- cgit v1.2.3