Skip to content

Instantly share code, notes, and snippets.

@LeKovr
Created January 5, 2018 20:13
Show Gist options
  • Save LeKovr/0d094c83c22b6cc2055d97938e6e60ae to your computer and use it in GitHub Desktop.
Save LeKovr/0d094c83c22b6cc2055d97938e6e60ae to your computer and use it in GitHub Desktop.
dbrpc sample function docs

Sample function docs

Method

$ curl -gs http://localhost:8081/rpc/index?a_nsp=public

{
  "success": true,
  "result": [
    {
      "anno": "Concatenate two strings",
      "code": "concat",
      "is_ro": true,
      "max_age": 10,
      "nspname": "public",
      "proname": "concat",
      "sample": "{\"a_arg1\":\"prefix\", \"a_arg2\":\"suffix\"}"
    }
  ]
}

Arguments

$ curl -gs http://localhost:8081/rpc/func_args?a_code=concat

{
  "success": true,
  "result": [
    {
      "anno": "Argument 1",
      "arg": "a_arg1",
      "def_val": null,
      "required": true,
      "type": "text"
    },
    {
      "anno": "Argument 2",
      "arg": "a_arg2",
      "def_val": "",
      "required": false,
      "type": "text"
    }
  ]
}

Result

$ curl -gs http://localhost:8081/rpc/func_result?a_code=concat

{
  "success": true,
  "result": [
    {
      "anno": null,
      "arg": null,
      "type": "SINGLE"
    },
    {
      "anno": "Result string",
      "arg": "-",
      "type": "text"
    }
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment