Skip to content

Content Formatting

Cory Gehr edited this page Apr 24, 2020 · 1 revision

Defaults

Every API endpoint will accept AND respond using Protocol Buffers (protobuf) unless otherwise specified in request headers.

For debugging purposes, you may also use JSON; however, this is only recommended for testing the API. Protobufs are much more efficient than JSON and will provide dramatic performance and latency improvements at scale. Unless JSON is a hard requirement, please do not adjust this behavior.

Protocol Buffers

Accept

Specified on every API request where protobuf content is desired.

  • application/x-protobuf

Content-Type

Specified on any API request where protobuf content is provided in the request body.

  • application/x-protobuf

JSON

Because protobuf is the default, these headers need to be provided with all requests.

Accept

Specified on every API request where JSON formatted content is desired.

  • application/json

Content-Type

Specified on any API request where JSON formatted content is provided in the request body.

  • application/json

Data Model

Please see the 'proto' project within this GitHub organization for the latest data model used in this project (interactions.proto).

A copy will always be kept in this repository to convey the exact proto file used to generate Interactions.cs. However, both projects will not merge proto changes into master until the Backend has been updated to reflect them.

Contents

  1. Home

Deployment

  1. Quickstart

Usage

  1. API Usage
  2. Content Formatting

Advanced Topics

  1. Changing DBMS
  2. Load Balancing
Clone this wiki locally