From 2ed6941f519331a44204fbadc6d2d2a91087c6b8 Mon Sep 17 00:00:00 2001 From: Matt Lee Date: Tue, 29 Nov 2016 12:42:50 -0500 Subject: WIP: Updates our documentation to point to gitlab.com --- doc/api/README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'doc/api/README.md') diff --git a/doc/api/README.md b/doc/api/README.md index f65b934b9db..b216dd228d9 100644 --- a/doc/api/README.md +++ b/doc/api/README.md @@ -88,7 +88,7 @@ You can use an OAuth 2 token to authenticate with the API by passing it either i Example of using the OAuth2 token in the header: ```shell -curl --header "Authorization: Bearer OAUTH-TOKEN" https://gitlab.example.com/api/v3/projects +curl --header "Authorization: Bearer OAUTH-TOKEN" https://gitlab.com/api/v3/projects ``` Read more about [GitLab as an OAuth2 client](oauth2.md). @@ -119,13 +119,13 @@ is defined in [`lib/api.rb`][lib-api-url]. Example of a valid API request: ```shell -GET https://gitlab.example.com/api/v3/projects?private_token=9koXpg98eAheJpvBs5tK +GET https://gitlab.com/api/v3/projects?private_token=9koXpg98eAheJpvBs5tK ``` Example of a valid API request using cURL and authentication via header: ```shell -curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects" +curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.com/api/v3/projects" ``` The API uses JSON to serialize data. You don't need to specify `.json` at the @@ -198,7 +198,7 @@ GET /projects?private_token=9koXpg98eAheJpvBs5tK&sudo=username ``` ```shell -curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --header "SUDO: username" "https://gitlab.example.com/api/v3/projects" +curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --header "SUDO: username" "https://gitlab.com/api/v3/projects" ``` Example of a valid API call and a request using cURL with sudo request, @@ -209,7 +209,7 @@ GET /projects?private_token=9koXpg98eAheJpvBs5tK&sudo=23 ``` ```shell -curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --header "SUDO: 23" "https://gitlab.example.com/api/v3/projects" +curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --header "SUDO: 23" "https://gitlab.com/api/v3/projects" ``` ## Pagination @@ -225,7 +225,7 @@ resources you can pass the following parameters: In the example below, we list 50 [namespaces](namespaces.md) per page. ```bash -curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/namespaces?per_page=50 +curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.com/api/v3/namespaces?per_page=50 ``` ### Pagination Link header @@ -239,7 +239,7 @@ and we request the second page (`page=2`) of [comments](notes.md) of the issue with ID `8` which belongs to the project with ID `8`: ```bash -curl --head --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/8/issues/8/notes?per_page=3&page=2 +curl --head --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.com/api/v3/projects/8/issues/8/notes?per_page=3&page=2 ``` The response will then be: @@ -250,7 +250,7 @@ Cache-Control: no-cache Content-Length: 1103 Content-Type: application/json Date: Mon, 18 Jan 2016 09:43:18 GMT -Link: ; rel="prev", ; rel="next", ; rel="first", ; rel="last" +Link: ; rel="prev", ; rel="next", ; rel="first", ; rel="last" Status: 200 OK Vary: Origin X-Next-Page: 3 -- cgit v1.2.1