Version deployed on Dec 12, 2017.

Bump Api

This is the official Bump API documentation. Obviously created with Bump. Note that this is an experimental API on which everything could change.

This is the documentation for version 1.0 of the API. Last update on Dec 12, 2017.

Base URL
https://bump.sh/api/v1

Authentication

Api token authentication

Use the token from your documentation settings as the username of the basic auth, with no password.

Example: curl https://bump.sh/api/v1/docs/1/versions -u DOC_TOKEN:

Note that adding a colon after your token prevents cURL from asking for a password.


Doc

Create a new version

Create a new version for a given documentation, which will become the current version. Updated doc is defined through the authentication.

Body
  • format string

    Format of the definition.

    Values are yaml and json.

  • definition Required / string

    Serialized definition of the version. This should be an OpenApi 2.0 (Swagger) file serialized as a string, in YAML or JSON.

Responses
  • 204

    No content

  • default object

    Unexpected error

    • message string

      Human readable error message

Definition
POST https://bump.sh/api/v1/doc/versions
Example request
$ curl \ -X POST https://bump.sh/api/v1/doc/versions \ -H "Content-Type: application/json" \ -d '{"format":"yaml","definition":"{swagger: \"2.0\", \"info\": { \"title: ... }}\n"}'
Example response (204)
No content
Example response (default)
{ "message": "Invalid OpenApi definition" }

Docs

Create a new version

Create a new version for a given documentation, which will become the current version.

URL parameters
  • id Required / string

    Documentation's id

Body
  • format string

    Format of the definition.

    Values are yaml and json.

  • definition Required / string

    Serialized definition of the version. This should be an OpenApi 2.0 (Swagger) file serialized as a string, in YAML or JSON.

Responses
  • 204

    No content

  • default object

    Unexpected error

    • message string

      Human readable error message

Definition
POST https://bump.sh/api/v1/docs/{:id}/versions
Example request
$ curl \ -X POST https://bump.sh/api/v1/docs/{:id}/versions \ -H "Content-Type: application/json" \ -d '{"format":"yaml","definition":"{swagger: \"2.0\", \"info\": { \"title: ... }}\n"}'
Example response (204)
No content
Example response (default)
{ "message": "Invalid OpenApi definition" }

Validate a documentation definition

Validate a definition against the OpenApi v2.0 schema and return errors without creating a new version. This is useful in a CI process, to validate that a changed definition file is valid and won't fail when being updated on Bump.

URL parameters
  • id Required / string

    Documentation's id

Body
  • format string

    Format of the definition.

    Values are yaml and json.

  • definition Required / string

    Serialized definition of the version. This should be an OpenApi 2.0 (Swagger) file serialized as a string, in YAML or JSON.

Responses
  • 200

    Definition is valid.

  • 422 object

    Definition is not valid.

    • raw_definition array[]
Definition
POST https://bump.sh/api/v1/docs/{:id}/validations
Example request
$ curl \ -X POST https://bump.sh/api/v1/docs/{:id}/validations \ -H "Content-Type: application/json" \ -d '{"format":"yaml","definition":"{swagger: \"2.0\", \"info\": { \"title: ... }}\n"}'
Example response (200)
No content
Example response (422)
{ "raw_definition": [ "string" ] }