Skip to content
This repository was archived by the owner on Nov 16, 2022. It is now read-only.
/ bonfire_api_json Public archive

http api json post endpoints for bonfire

License

Notifications You must be signed in to change notification settings

dyne/bonfire_api_json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Bonfire.API.JSON

Endpoints

  • POST /api/json/get-objects

    give:

    curl -XPOST -Hcontent-type:application/json -d'{"ids": ["a", "b", "c"]}' http://localhost:4000/api/json/get-objects
    

    get:

    {"data": [{"__typename": "EconomicResource", "id": "a", ...}, {"__typename": "EconomicEvent", "id": "b", ...}, {"__typename": "Process", "id": "c", ...}, ...]}
    
  • POST /api/json/trace

    give:

    curl -XPOST -Hcontent-type:application/json -d'{"id": "01FSBW06DKPMY3F51RXGWNVATN", "recurseLimit": 2}' http://localhost:4000/api/json/trace
    

    get:

    {"data": [{"__typename": "EconomicResource", "id": "a", ...}, {"__typename": "EconomicEvent", "id": "b", ...}, {"__typename": "Process", "id": "c", ...}, ...]}
    
  • POST /api/json/track

    give:

    curl -XPOST -Hcontent-type:application/json -d'{"id": "01FSBW06DKPMY3F51RXGWNVATN", "recurseLimit": 2}' http://localhost:4000/api/json/track
    

    get:

    {"data": [{"__typename": "EconomicResource", "id": "a", ...}, {"__typename": "EconomicEvent", "id": "b", ...}, {"__typename": "Process", "id": "c", ...}, ...]}
    

Unwinding

If you need the data to be not wrapped within an object with the data key, you can pass the unwind boolean option with true value:

  • POST /api/json/get-objects

    give:

    curl -XPOST -Hcontent-type:application/json -d'{"unwind": true, "ids": ["a", "b", "c"]}' http://localhost:4000/api/json/get-objects
    

    get:

    [{"__typename": "EconomicResource", "id": "a", ...}, {"__typename": "EconomicEvent", "id": "b", ...}, {"__typename": "Process", "id": "c", ...}, ...]
    

About

http api json post endpoints for bonfire

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

  •  

Packages

No packages published

Languages