Using Postman to Make Github API POST Request

During this post, we will cover how to submit a POST request through Postman to the Github API in order to submit a new issue on a Github repo.


First, download Postman here and open it.

Second, select request from menu and then name your request anything your heart desires and save it in a folder.
SelectRequest
NameYourRequest

PostmanRequestSelect

Third, select “POST” from the menu bar.

Fourth, select “Headers” from the menu underneath.
Fifth, enter in “token ENTERYOURCODEHERE” in the Value container.
TokenAuthorization

Sixth, select “Raw” from Body menu bar.
Seventh, enter in your issue as a hash.
yourIssueHash

Lastly, get your response data and check Github to see if the Issue was posted! If it was, then your POST request was a success! Congratulations!

Below is the example, data for a request that I made to the Github API to post an issue on my blog, which can be viewed Maxgrok Github Issues


{ "url": "https://api.github.com/repos/maxgrok/maxgrok.github.io/issues/3", "repository_url": "https://api.github.com/repos/maxgrok/maxgrok.github.io", "labels_url": "https://api.github.com/repos/maxgrok/maxgrok.github.io/issues/3/labels{/name}", "comments_url": "https://api.github.com/repos/maxgrok/maxgrok.github.io/issues/3/comments", "events_url": "https://api.github.com/repos/maxgrok/maxgrok.github.io/issues/3/events", "html_url": "https://github.com/maxgrok/maxgrok.github.io/issues/3", "id": 312596781, "number": 3, "title": "Issue Test", "user": { "login": "maxgrok", "id": 16481962, "avatar_url": "https://avatars2.githubusercontent.com/u/16481962?v=4", "gravatar_id": "", "url": "https://api.github.com/users/maxgrok", "html_url": "https://github.com/maxgrok", "followers_url": "https://api.github.com/users/maxgrok/followers", "following_url": "https://api.github.com/users/maxgrok/following{/other_user}", "gists_url": "https://api.github.com/users/maxgrok/gists{/gist_id}", "starred_url": "https://api.github.com/users/maxgrok/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/maxgrok/subscriptions", "organizations_url": "https://api.github.com/users/maxgrok/orgs", "repos_url": "https://api.github.com/users/maxgrok/repos", "events_url": "https://api.github.com/users/maxgrok/events{/privacy}", "received_events_url": "https://api.github.com/users/maxgrok/received_events", "type": "User", "site_admin": false }, "labels": [], "state": "open", "locked": false, "assignee": null, "assignees": [], "milestone": null, "comments": 0, "created_at": "2018-04-09T16:20:31Z", "updated_at": "2018-04-09T16:20:31Z", "closed_at": null, "author_association": "OWNER", "body": "This is an issue!", "closed_by": null }
Published 9 Apr 2018

founder && full stack && ethereum developer.
Max Goodman on Twitter