You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/v3/repos/releases.md
+16-12Lines changed: 16 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ title: Releases | GitHub API
9
9
10
10
## List releases for a repository
11
11
12
-
Information about published releases are available to everyone.
12
+
Information about published releases are available to everyone.
13
13
Only users with push access will receive listings for draft releases.
14
14
15
15
GET /repos/:owner/:repo/releases
@@ -29,11 +29,17 @@ Git tags that have not been associated with a release.
29
29
30
30
### Response
31
31
32
+
{{#tip}}
33
+
34
+
<aid="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
+
32
40
<%= headers 200 %>
33
41
<%= json :release %>
34
42
35
-
**Note:** This returns an `"upload_url"` hypermedia relation that provides the
36
-
[endpoint that creates release assets](#upload-a-release-asset).
37
43
38
44
## Create a release
39
45
@@ -123,18 +129,16 @@ Users with push access to the repository can delete a release.
123
129
124
130
## Upload a release asset
125
131
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
+
<spanclass="not-enterprise">You need to use an HTTP client which supports
135
+
<ahref="http://en.wikipedia.org/wiki/Server_Name_Indication">SNI</a> to make calls to this endpoint.</span>
130
136
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.
134
139
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
136
141
137
-
This endpoint is provided by a URI template in [the release's API response](#get-a-single-release).
0 commit comments