Skip to content

Instantly share code, notes, and snippets.

@philsturgeon
Last active June 8, 2017 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philsturgeon/64f7b611a035084b39673853c7e43f0d to your computer and use it in GitHub Desktop.
Save philsturgeon/64f7b611a035084b39673853c7e43f0d to your computer and use it in GitHub Desktop.
Janky Quick Example of RPC API being cool

POST /check-v1

Request

{
  "user_uuid" : "12345",
  "policy_action" : "do-a-thing"
}

Response

{
  "result" : true
}

POST /check-all-v1

Request

{
  "user_uuid" : "12345",
  "policy_actions" : [
    "do-a-thing",
    "and-this",
    "what-about-that"
  ]
}

Response

{
  "result" : true
}

POST /check-matrix-v1

Request

{
  "user_uuid" : "12345",
  "policy_actions" : [
    "do-a-thing",
    "and-this",
    "what-about-that"
  ]
}

Response

{
  "result" : {
    "do-a-thing": true,
    "and-this": false,
    "what-about-that": true
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment