🌐
GitHub
github.com › ethanresnick › json-api-example
GitHub - ethanresnick/json-api-example: An example API created with my JSON-API library (http://github.com/ethanresnick/json-api) · GitHub
An example API created with v3 of my JSON-API library (http://github.com/ethanresnick/json-api).
Starred by 31 users
Forked by 15 users
Languages   JavaScript
🌐
GitHub
github.com › json-api › json-api
GitHub - json-api/json-api: A specification for building JSON APIs · GitHub
Documentation for the application/vnd.api+json media type, a specification for APIs that use JSON.
Starred by 7.7K users
Forked by 920 users
Languages   CSS 43.6% | JavaScript 37.8% | HTML 7.7% | Sass 3.4% | Python 2.9% | Makefile 2.0%
🌐
GitHub
github.com › typicode › json-server
GitHub - typicode/json-server: Get a full fake REST API with zero coding in less than 30 seconds (seriously) · GitHub
1 month ago - Get a full fake REST API with zero coding in less than 30 seconds (seriously) - typicode/json-server
Starred by 75.7K users
Forked by 7.3K users
Languages   JavaScript 91.7% | HTML 8.3%
🌐
GitHub
github.com › json-api
json-api · GitHub
json-api/explorer’s past year of commit activity
🌐
GitHub
github.com › apis-json › api-json
GitHub - apis-json/api-json: APIS.json an API discovery format · GitHub
This is why the 3Scale team got to work building an open source APIs.json driven search engine: APIs.io as an open source API search engine using APis.json.
Starred by 119 users
Forked by 25 users
🌐
Medium
victorscholz.medium.com › hosting-a-json-api-on-github-pages-47b402f72603
Hosting a JSON API on GitHub Pages | by Victor Scholz | Medium
October 1, 2020 - Now comes the fun part! Create a new folder within your project (I called mine Data) and put your JSON file in it. ... Head back on over to your browser and go to your URL with the file path to the data added to it.
🌐
GitHub
github.com › google › jsonapi
GitHub - google/jsonapi: jsonapi.org style payload serializer and deserializer · GitHub
You wouldn't want to use structs like those that JSON API sends because it is difficult to get at all of your data easily. ... This program demonstrates the implementation of a create, a show, and a list http.Handler. It outputs some example requests and responses as well as serialized examples of the source/target structs to json.
Starred by 1.4K users
Forked by 219 users
Languages   Go
🌐
GitHub
github.com › api-samples
JSON REST API Sample Applications · GitHub
Python Countries REST JSON API example · Python · Showing 8 of 8 repositories · countries-sinatra Public · A simple REST JSON API built with Ruby / Sinatra · There was an error while loading. Please reload this page. api-samples/countries-sinatra’s past year of commit activity ·
🌐
GitHub
gist.github.com › kinlane › 29cb12217e3aa092489b35a5600c40ca
apis-json-example · GitHub
November 6, 2024 - apis-json-example. GitHub Gist: instantly share code, notes, and snippets.
Find elsewhere
🌐
GitHub
github.com › ethanresnick › json-api
GitHub - ethanresnick/json-api: Turn your node app into a JSON API server (http://jsonapi.org/)
Turn your node app into a JSON API server (http://jsonapi.org/) - ethanresnick/json-api
Starred by 268 users
Forked by 40 users
Languages   TypeScript 96.8% | CSS 1.8% | Pug 1.4% | TypeScript 96.8% | CSS 1.8% | Pug 1.4%
🌐
GitHub
github.com › topics › json-api
json-api · GitHub Topics · GitHub
DummyJSON.com provides different types of REST Endpoints filled with JSON data which you can use in developing the frontend with your favorite framework and library without worrying about writing a backend. nodejs javascript api json json-api placeholder rest-api api-client javascript-library api-rest dummy-data json-server placeholderapi dummy-data-generator
🌐
GitHub
github.com › neomerx › json-api
GitHub - neomerx/json-api: Framework agnostic JSON API (jsonapi.org) implementation
Parameter http://example.com/api/v1 is a URL prefix that will be applied to all encoded links unless they have a flag set telling not to add any prefixes. Parameter JSON_PRETTY_PRINT is a PHP predefined JSON constant.
Starred by 738 users
Forked by 67 users
Languages   PHP 99.9% | Dockerfile 0.1% | PHP 99.9% | Dockerfile 0.1%
🌐
GitHub
github.com › public-apis › public-apis
GitHub - public-apis/public-apis: A collective list of free APIs · GitHub
Get the IP geolocation data through the simple REST API. All the responses are JSON encoded
Starred by 412K users
Forked by 44.6K users
Languages   Python 96.8% | Shell 3.2%
🌐
GitHub
github.com › yury-dymov › phoenix-json-api-example
GitHub - yury-dymov/phoenix-json-api-example: JSON API web service example
JSON API web service example. Contribute to yury-dymov/phoenix-json-api-example development by creating an account on GitHub.
Starred by 4 users
Forked by 4 users
Languages   JavaScript 55.0% | Elixir 45.0% | JavaScript 55.0% | Elixir 45.0%
🌐
GitHub
github.com › yury-dymov › phoenix-json-api-example › tree › master
phoenix-json-api-example/ at master · yury-dymov/phoenix-json-api-example
March 31, 2021 - JSON API web service example. Contribute to yury-dymov/phoenix-json-api-example development by creating an account on GitHub.
Author   yury-dymov
🌐
GitHub
github.com › vburzynski › Example-JSON-API-Server
GitHub - vburzynski/Example-JSON-API-Server
This sample JSON-API server uses express and swagger-express-mw to implement an API that is designed with Swagger and conforms to the JSON API Specification.
Author   vburzynski
🌐
GitHub
github.com › timacdonald › json-api
GitHub - timacdonald/json-api: A lightweight API resource for Laravel that helps you adhere to the JSON:API standard. Supports sparse fieldsets, compound documents, and more. · GitHub
The JsonApiResource class provided by this package is a specialisation of Laravel's Eloquent API resource. All public facing APIs are still accessible; in a controller, for example, you interact with a JsonApiResource as you would with Laravel's JsonResource class.
Starred by 638 users
Forked by 50 users
Languages   PHP
🌐
GitHub
docs.github.com › rest › guides › getting-started-with-the-rest-api
Getting started with the REST API - GitHub Docs
The following example request uses the "Get Octocat" endpoint to return the octocat as ASCII art. ... gh api --method GET /octocat \ --header 'Accept: application/vnd.github+json' \ --header "X-GitHub-Api-Version: 2022-11-28"
Top answer
1 of 2
9

You were close:) Lets assume, that

1) your login: YourUsername

2) your access token: 123a321

3) repository to be updated: YourRepo

4) file to be created: file.txt

5) folder that will contains new file: f1/f2

According to those assumptions your request should be following:

type : PUT

url : https://api.github.com/repos/YourUsername/YourRepo/contents/f1/f2/file.txt

headers :

{
 "Content-Type" : "application/vnd.github.v3+json",
 "Authorization" : "token 123a321"
}

body :

{
  "message": "my commit message",
  "committer": {
    "name": "My name",
    "email": "my email"
  },
  "content": "base64encoded"
}


UPD If you write in java, you can use GitHubFileAPI library, that I recently pushed to the maven central repository.

2 of 2
0

Solution: In order to perform action on github api you can use curl according to Github doc:

  1. first make sure you have specific privileges and authentication token generated to your account in order to interact with Github api:

profile Settings -> Developer Settings -> Personal access tokens -> Generate new token

  1. the command should be in http PUT method on path /repos/:owner/:repo/contents/:path
  2. The required params for editing or adding new files (according to api) message (String), Content (String) and sha(String), additional params are branch(String) commiter(String) and author(String)

Lets perform some curl message in order to perform your action, the simple formula for this case would be:

curl --user <userName>:<token>
--data '{"key":"value"}'
--header <HeaderType>
--request <HTTPMethod>
<fullURL>

for demonstration lets fill some details:

 curl --user johnDoe:abc123!@#
 --data '{"message":"my message","content":"my content","sha":"abcjfhtenf736gd843ji43903"}'
 --header Content-Type:application/json
 --request PUT
https://api.github.com/repos/MyOrganization/MyCoolApp/contents/app/models
  1. Verify on Github the content has been inserted correctly to your branch