NAV Navbar

Models

Bracket

A whole project is called Bracket. You can have multiple Brackets in an account.

An exmple Bracket object:

{
  id: 00000000-0000-0000-0000-000000000000,
  hrid: "a-perfect-bracket",
  contents: [{
    // see Content...
  }],
  description: "A beautiful bracket description"
}
field type description mandatory default value
id uuid unique id true
hrid string human readable id. MUST be systemwide unique. MUST be only alphanumeric and hyphens. MUST NOT match an uuid regex! false null
contents  Content[] the complete user contents, see Content true
description string user's description for this Bracket false null

Content

A Content is a user generated content wrapper, it can contain different media file types.

An exmple Content object:

{
  id: 11111111-1111-1111-1111-111111111111,
  description: "A beautiful image",
  mime-type: "image/jpeg",
  previewuri: "https://s3.bracket.to.photo/0000000-0000-0000-0000-000000000000/11111111-1111-1111-1111-111111111111.jpeg"
}
field type description mandatory default value
id uuid unique id true
description string user's description for this Bracket false null
mime-type string mime type of the original image (caution: the mime-type of the loaded preview can differ, according to the Accept-header) true

Brackets

Get all Brackets

This endpoint retrieves all Brackets associated with the provided API key.

[
  {
    id: 00000000-0000-0000-0000-000000000000,
    hrid: "a-perfect-bracket",
    contents: [{
      // see Content...
    }],
    description: "A beautiful bracket description"
  },
  {
    // ...
  }
]

HTTP Request

GET https://api.bracket.to.photo/v1/brackets

Response

The response is a Bracket-array, see Models > Bracket for model documentation.

Get a specific Bracket

This endpoint retrieves a specific Bracket identified by its ID.

  {
    id: 00000000-0000-0000-0000-000000000000,
    hrid: "a-perfect-bracket",
    contents: [{
      // see Content...
    }],
    description: "A beautiful bracket description"
  }

HTTP Request

GET https://api.bracket.to.photo/v1/brackets

Response

The response is a Bracket-array, see Models > Bracket for model documentation.

Errors

The Kittn API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The kitten requested is hidden for administrators only.
404 Not Found -- The specified kitten could not be found.
405 Method Not Allowed -- You tried to access a kitten with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The kitten requested has been removed from our servers.
418 I'm a teapot.
429 Too Many Requests -- You're requesting too many kittens! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.