|
| 1 | +--- |
| 2 | +kind: change |
| 3 | +title: Issue Locking and Unlocking API Preview Period |
| 4 | +created_at: 2016-02-11 |
| 5 | +author_name: davidcelis |
| 6 | +--- |
| 7 | + |
| 8 | +We're introducing new API methods to allow repository collaborators to [lock and unlock conversations][lock-an-issue]. Developers with [collaborator permissions][permissions] on a repository can start experimenting with these new endpoints today during the preview period. |
| 9 | + |
| 10 | +To lock a conversation, make a `PUT` request to the conversation's issue: |
| 11 | + |
| 12 | +``` command-line |
| 13 | +$ curl "https://api.github.com/repos/github/hubot/issues/1/lock" \ |
| 14 | + -X PUT \ |
| 15 | + -H "Authorization: token $TOKEN" \ |
| 16 | + -H "Content-Length: 0" \ |
| 17 | + -H "Accept: application/vnd.github.the-key-preview" |
| 18 | +``` |
| 19 | + |
| 20 | +To unlock a conversation, make a similarly constructed `DELETE` request: |
| 21 | + |
| 22 | +``` command-line |
| 23 | +$ curl "https://api.github.com/repos/github/hubot/issues/1/lock" \ |
| 24 | + -X DELETE \ |
| 25 | + -H "Authorization: token $TOKEN" \ |
| 26 | + -H "Accept: application/vnd.github.the-key-preview" |
| 27 | +``` |
| 28 | + |
| 29 | +#### How can I try it? |
| 30 | + |
| 31 | +Starting today, developers can preview these new API methods. To use them during the preview period, you’ll need to provide the following custom [media type][media-types] in the `Accept` header: |
| 32 | + |
| 33 | +``` |
| 34 | +application/vnd.github.the-key-preview+json |
| 35 | +``` |
| 36 | + |
| 37 | +During the preview period, we may change aspects of these API methods based on developer feedback. If we do, we will announce the changes here on the developer blog, but we will not provide any advance notice. |
| 38 | + |
| 39 | +Take a look at [the documentation][docs] and, if you have any questions, please [get in touch][contact]. |
| 40 | + |
| 41 | +[contact]: https://github.com/contact?form%5Bsubject%5D=Issue+Locking+and+Unlocking+API+Preview |
| 42 | +[docs]: /v3/issues/#lock-an-issue |
| 43 | +[lock-an-issue]: https://help.github.com/articles/locking-conversations/ |
| 44 | +[media-types]: /v3/media/ |
| 45 | +[permissions]: https://help.github.com/articles/what-are-the-different-access-permissions/ |
0 commit comments