RESTFul APIs

Nitro is a set of APIs that can be accessed via any programming language supporting HTTPS protocol. These API calls are used to leverage all the capabilities of the Nitro platform such as logging actions, generating leaderboards, crediting and debiting points, user manipulation, and more.

Note: All APIs require UTF-8 encoding when sending data to Nitro.

RESTFul APIs use the API Gateway to authenticate requests. They authenticate using OAuth and JWT tokens and support modern REST standards around headers and structure.

Sample Code

Copy
curl -X POST "https://api.bunchball.com/groups/123/users/67" -H "accept: application/json" -H "authorization: Bearer <access_token>" -H "Content-Type: application/json" -d "{}"

API Documentation

RESTFul APIs are documented via an auto-generated framework (Swagger) that provides direct access to the API Gateway where you can view and test APIs. For the list of available APIs in production and sandbox, visit:

The following APIs are not documented on the API documentation site.

Run an API

Each method on the API site is expandable. Click the API name to view the API's description and its parameters.

  1. Open Nitro Studio > Tools > API Documentation. You are automatically authorized on the RESTFul API site for that environment.
  2. Click the name of the API you want to run.
  3. Click Try it out (Try It Out Button).
  4. Enter the parameters and click Execute.

The request and response are generated.

Error Handling

It's important to implement robust error handling when using Nitro APIs to ensure reliability and resolution of issues. Errors should log with sufficient detail for troubleshooting and alert your team to any errors that occur.

Status Codes

When working with APIs, the following status codes may be returned:

See also

Blocks

Create a custom user experience