8000 Merge pull request #635 from github/update-1415666052 · dud3/developer.github.com@8c74366 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8c74366

Browse files
author
hubot
committed
Merge pull request github#635 from github/update-1415666052
2 parents b3f11ed + 33a5672 commit 8c74366

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

content/v3/repos/releases.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ title: Releases | GitHub API
99

1010
## List releases for a repository
1111

12-
Information about published releases are available to everyone.
12+
Information about published releases are available to everyone.
1313
Only users with push access will receive listings for draft releases.
1414

1515
GET /repos/:owner/:repo/releases
@@ -29,11 +29,17 @@ Git tags that have not been associated with a release.
2929

3030
### Response
3131

32+
{{#tip}}
33+
34+
<a id="releases-hypermedia-url"/>
35+
36+
**Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://developer.github.com/v3/#hypermedia).
37+
38+
{{/tip}}
39+
3240
<%= headers 200 %>
3341
<%= json :release %>
3442

35-
**Note:** This returns an `"upload_url"` hypermedia relation that provides the
36-
[endpoint that creates release assets](#upload-a-release-asset).
3743

3844
## Create a release
3945

@@ -123,18 +129,16 @@ Users with push access to the repository can delete a release.
123129

124130
## Upload a release asset
125131

126-
This is a unique endpoint. The request's domain changes from `"api.github.com"`
127-
to **`"uploads.github.com"`**. You need to use an HTTP client which supports
128-
[SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this
129-
endpoint.
132+
This endpoint makes use of [a Hypermedia relation](/v3/#hypermedia) to determine which URL to access.
133+
This endpoint is provided by a URI template in [the release's API response](#get-a-single-release).
134+
<span class="not-enterprise">You need to use an HTTP client which supports
135+
<a href="http://en.wikipedia.org/wiki/Server_Name_Indication">SNI</a> to make calls to this endpoint.</span>
130136

131-
The asset data is expected in its raw binary form, rather than JSON.
132-
Everything else about the endpoint is the same.
133-
Pass your authentication exactly the same as the rest of the API.
137+
The asset data is expected in its raw binary form, rather than JSON.
138+
Everything else about the endpoint is the same as the rest of the API. For example, you'll still need to pass your authentication to be able to upload an asset.
134139

135-
POST https://uploads.github.com/repos/:owner/:repo/releases/:id/assets?name=foo.zip
140+
POST https://<upload_url>/repos/:owner/:repo/releases/:id/assets?name=foo.zip
136141

137-
This endpoint is provided by a URI template in [the release's API response](#get-a-single-release).
138142

139143
### Input
140144

0 commit comments

Comments
 (0)
0