Skip to content

Latest commit

 

History

History
103 lines (69 loc) · 1.92 KB

api_http.md

File metadata and controls

103 lines (69 loc) · 1.92 KB

ForkBase HTTP Service RESTful API

NOTE

Currently, we only support VString related object operations.

  [public] /get

    // get the value of a branch head
    POST -d "key=XXX&branch=XXX"

    // get the value of a version
    POST -d "key=XXX&version=XXX"
  [public] /put

    // put a value referring a branch
    POST -d "key=XXX&branch=XXX&value=XXX"

    // put a value referring an existing version
    POST -d "key=XXX&version=XXX&value=XXX"
  [public] /merge

    // merge target branch to a refering branch
    POST -d "key=XXX&tgt_branch=XXX&ref_branch=XXX&value=XXX"

    // merge target branch to a refering version
    POST -d "key=XXX&tgt_branch=XXX&ref_version1=XXX&value=XXX"

    // merge two existing versions
    POST -d "key=XXX&ref_version1=XXX&ref_version2=XXX&value=XXX"
  [public] /branch

    // create a new branch which points to the head of a branch
    POST -d "key=XXX&old_branch=XXX&new_branch=XXX"

    // create a new branch which points to an existing version
    POST -d "key=XXX&version=XXX&new_branch=XXX"
  [public] /rename

    // rename an existing branch
    POST -d "key=XXX&old_branch=XXX&new_branch=XXX"
  [public] /delete

    // delete an existing branch
    POST -d "key=XXX&branch=XXX"
  [public] /list

    // list all keys
    GET
    // list all branches of a key
    POST -d "key=XXX"
  [public] /head

    // get head version of a branch
    POST -d "key=XXX&branch=XXX"
  [public] /latest

    // get all latest versions of a key
    POST -d "key=XXX"