tree: d54b5fa7cecd3a5e7fa1928644d8192bf78f6298 [path history] [tgz]
  1. README.md
  2. __init__.py
  3. api_proto/
  4. api_service.py
  5. converters.py
  6. features_servicer.py
  7. issues_servicer.py
  8. monorail_servicer.py
  9. projects_servicer.py
  10. sitewide_servicer.py
  11. test/
  12. test_call
  13. users_servicer.py
appengine/monorail/api/README.md

Monorail API v2

This directory holds all the source for the Monorail API v2. This API is implemented using .proto files to describe a gRPC interface (services, methods, and request/response messages). It then uses a shim which converts the gRPC server (which doesn't work on AppEngine, due to lack of support for HTTP/2) into a pRPC server which supports communication over HTTP/1.1, as well as text and JSON IO.

Regenerating Python from Protocol Buffers

In order to regenerate the python server and client stubs from the .proto files, run this command:

$ make prpc_proto

Manually Exercising the API

You can make anonymous requests to a server running locally like this:

$ ./api/test_call monorail.Users GetUser '{"email": "test@example.com"}'

Requests that require a signed-in user can be tested locally like this:

$ ./api/test_call monorail.Issues GetIssue \
  '{"issue_ref": {"project_name": "rutabaga", "local_id": 1}}' \
  --test-account=test@example.com