Tent v0.3-WIP Documentation

Note well: There is no guarantee of API stability until Tent v1.0.

Please contribute by making Pull Requests and Issues on the GitHub repository.

API Endpoints

Concepts

Pagination

All post lists (feed, versions, children, mentions) support pagination. The response to a list request contains a set of links to other pages. These links are just the query part of the URL (“?” followed by zero or more query parameters) and contain all filtering and limiting parameters specified in the request plus additional/updated parameters that specify a page. Links to the current page and pages that do not exist are omitted.

{
  "pages": {
    "first": "?page=1",
    "prev": "?page=1",
    "next": "?page=2",
    "last": "?page=4"
  }
}

Response Envelope

Property Required Type Description
pages Optional Object Links to other pages. Each link contains a relative reference starting with ? and followed by zero or more query parameters.
pages.first Optional String Link to the first page. Omitted if the current page is the first page.
pages.prev Optional String Link to the previous page. Omitted if the current page is the first page.
pages.next Optional String Link to the next page. Omitted if the current page is the last page.
pages.last Optional String Link to the last page. Omitted if the current page is the last page.
posts Optional Array of Objects A list of posts.
mentions Optional Array of Objects A list of mentions.
versions Optional Array of Objects A list of versions.
post Optional Object A single post.
refs Optional Array of Objects An array of referenced posts for each post in the posts array.
profiles Optional Object Profile details for each publishing entity and/or mentioned entity in the posts, mentions, and refs arrays.

new_post

POST new_post
POST /posts HTTP/1.1
Authorization: Hawk id="7jDXOUbw4mePeVRGkI6nkA", mac="V+2utEkZA0XmRR2MHB0vd+eRBK/8xm5+jk3SN5uQkUA=", ts="1372435713", nonce="G3Qqc14k", hash="p4qMTogPUGE1eSCxvpqpGqfTjcTxflzepmq/CL5P1A4=", app="KAS0j1n7pSsik8uub0QM7A"
Content-Type: application/vnd.tent.post.v0+json; type="https://tent.io/types/status/v0#"
{
  "type": "https://tent.io/types/status/v0#",
  "content": {
    "text": "example post 5577006791947779410"
  }
}
HTTP/1.1 200 OK
Cache-Control: private, must-revalidate
Content-Type: application/vnd.tent.post.v0+json; type="https://tent.io/types/status/v0#"
Server-Authorization: Hawk mac="ds79goCUhUQhaphzJ19Or4Wgv+/FUTwquTF5ZqYTlEk=", hash="hVHvVGtF7SIwBiUbSSXb4q+BEG5luTZ5JK+50E93uWA="
{
  "post": {
    "app": {
      "id": "KAS0j1n7pSsik8uub0QM7A",
      "name": "Example App",
      "url": "https://app.example.com"
    },
    "content": {
      "text": "example post 5577006791947779410"
    },
    "entity": "http://bb216a47d970.alpha.attic.is",
    "id": "q--FIohRwTTqysDeEmxOxQ",
    "published_at": 1372435713273,
    "received_at": 1372435713273,
    "type": "https://tent.io/types/status/v0#",
    "version": {
      "id": "0a29ec9204dd5ea9513a695c2d195c899bed0ad04872657fb4f467c209be2a9a",
      "published_at": 1372435713273,
      "received_at": 1372435713273
    }
  }
}

Attachments

POST new_post
POST /posts HTTP/1.1
Authorization: Hawk id="7jDXOUbw4mePeVRGkI6nkA", mac="nKsKXbmijKRZ3RZqNtPvhNE31N81HRmGhQ3KE6tKlIM=", ts="1372435713", nonce="0aOMzSBF", app="KAS0j1n7pSsik8uub0QM7A"
Content-Type: multipart/form-data; boundary=2e53303c2389dfafb833b16c7474e0a97abae1908d7bc69a66be34871c37
--2e53303c2389dfafb833b16c7474e0a97abae1908d7bc69a66be34871c37
Content-Disposition: form-data; name="post"; filename="post.json"
Content-Type: application/vnd.tent.post.v0+json; type="https://tent.io/types/photo/v0#"
Content-Length: 80

{"type":"https://tent.io/types/photo/v0#","content":{"caption":"example photo"}}
--2e53303c2389dfafb833b16c7474e0a97abae1908d7bc69a66be34871c37
Content-Disposition: form-data; name="photo[0]"; filename="example.jpeg"
Content-Type: image/jpeg
Content-Length: 23

example attachment data
--2e53303c2389dfafb833b16c7474e0a97abae1908d7bc69a66be34871c37--

HTTP/1.1 200 OK
Cache-Control: private, must-revalidate
Content-Type: application/vnd.tent.post.v0+json; type="https://tent.io/types/photo/v0#"
Server-Authorization: Hawk mac="I2wAb7LTLfplVukL+RVFJyVWXmvj2cA98ukcO9yP8kE=", hash="iYLBNb8DDw8hDQ312RKjxSu97LJ647531kClr/081aU="
{
  "post": {
    "app": {
      "id": "KAS0j1n7pSsik8uub0QM7A",
      "name": "Example App",
      "url": "https://app.example.com"
    },
    "attachments": [
      {
        "category": "photo",
        "content_type": "image/jpeg",
        "digest": "9585ac48e055ed498cc8a008201037ba966fb7672270107ed5e4e94fa6cbbcf7",
        "name": "example.jpeg",
        "size": 23
      }
    ],
    "content": {
      "caption": "example photo"
    },
    "entity": "http://bb216a47d970.alpha.attic.is",
    "id": "vrddZdX7D4EV8lLbNoZBlw",
    "published_at": 1372435714531,
    "received_at": 1372435714531,
    "type": "https://tent.io/types/photo/v0#",
    "version": {
      "id": "f9f954f4c9743c80b16174ce4d62301f2ce9a3cf41fbd0a84d016e3003f50186",
      "published_at": 1372435714531,
      "received_at": 1372435714531
    }
  }
}

posts_feed

Sorting

The feed is sorted in descending order by timestamp. The timestamp used to sort is specified with the sort_by parameter, and defaults to received_at. The most recent version of each post is shown, as determined by sorting the versions with the version timestamp equivalent to the one specified in sort_by. For example if sort_by is received_at, the version shown is the most recent as sorted by version.received_at. When there are duplicate timestamps, the natural byte order of the version identifier is used to maintain a deterministic sort.

Parameters

Parameter Value Description
limit Integer The maximum number of posts to return. Defaults to 25.
max_refs Integer The maximum number of refs to return per post. Defaults to 0.
sort_by String Specifies the sort order. One of received_at, published_at, version.received_at or version.published_at. Defaults to received_at.
since String Requests posts published after the specified timestamp. The last post on the page is the first post published after the specified timestamp. The timestamp is in milliseconds since the Unix epoch, and may be optionally followed by a space and a post version.
until String Requests posts published after the specified timestamp. The first post on the page is the most recent post published. Must not be combined with since. The timestamp is in milliseconds since the Unix epoch, and may be optionally followed by a space and a post version.
before String Requests posts published before the specified timestamp. The first post on the page is the most recent post published before the specified timestamp unless combined with since. The timestamp is in milliseconds since the Unix epoch, and may be optionally followed by a space and a post version.
types String Limits posts by comma-separated post types. Types with no fragment match all posts of the specified base type.
entities String Selects posts published by one or more comma-separated entities.
mentions String Selects posts that mention specified entities and posts. One or more comma-separated mentions may be specified. Each mention is a entity url optionally followed by a space and a post ID. Multiple mentions parameters may be specified.

Pagination Diagram

Examples

GET posts_feed
GET /posts?limit=2 HTTP/1.1
Accept: application/vnd.tent.posts-feed.v0+json
Authorization: Hawk id="7jDXOUbw4mePeVRGkI6nkA", mac="PLZtYF06V6wfbwqU4hLmwAecR+qgiM9R6NgMJv4yjik=", ts="1372435715", nonce="4tlFjSAO", app="KAS0j1n7pSsik8uub0QM7A"
HTTP/1.1 200 OK
Cache-Control: private, must-revalidate
Content-Type: application/vnd.tent.posts-feed.v0+json
ETag: "ik5kq1teWgld8BvHZgeIS7egaJX80lfxBGyoG7CV4y4"
Server-Authorization: Hawk mac="q5Pwz1gPNnNqT8dkCCXt5WR6VJtqolwQCgb5DRr5PEI=", hash="Xqhn3sgO3GQ2Fh4IVZfPuHs+z9eUIf8GRd2CnBkkG1U="
{
  "pages": {
    "last": "?before=1372435713273+0a29ec9204dd5ea9513a695c2d195c899bed0ad04872657fb4f467c209be2a9a&limit=2&since=0",
    "next": "?before=1372435713273+0a29ec9204dd5ea9513a695c2d195c899bed0ad04872657fb4f467c209be2a9a&limit=2"
  },
  "posts": [
    {
      "app": {
        "id": "KAS0j1n7pSsik8uub0QM7A",
        "name": "Example App",
        "url": "https://app.example.com"
      },
      "attachments": [
        {
          "category": "photo",
          "content_type": "image/jpeg",
          "digest": "9585ac48e055ed498cc8a008201037ba966fb7672270107ed5e4e94fa6cbbcf7",
          "name": "example.jpeg",
          "size": 23
        }
      ],
      "content": {
        "caption": "example photo"
      },
      "entity": "http://bb216a47d970.alpha.attic.is",
      "id": "vrddZdX7D4EV8lLbNoZBlw",
      "published_at": 1372435714531,
      "received_at": 1372435714531,
      "type": "https://tent.io/types/photo/v0#",
      "version": {
        "id": "f9f954f4c9743c80b16174ce4d62301f2ce9a3cf41fbd0a84d016e3003f50186",
        "published_at": 1372435714531,
        "received_at": 1372435714531
      }
    },
    {
      "app": {
        "id": "KAS0j1n7pSsik8uub0QM7A",
        "name": "Example App",
        "url": "https://app.example.com"
      },
      "content": {
        "text": "example post 5577006791947779410"
      },
      "entity": "http://bb216a47d970.alpha.attic.is",
      "id": "q--FIohRwTTqysDeEmxOxQ",
      "published_at": 1372435713273,
      "received_at": 1372435713273,
      "type": "https://tent.io/types/status/v0#",
      "version": {
        "id": "0a29ec9204dd5ea9513a695c2d195c899bed0ad04872657fb4f467c209be2a9a",
        "published_at": 1372435713273,
        "received_at": 1372435713273
      }
    }
  ]
}

Refs

GET posts_feed
GET /posts?limit=2&max_refs=2 HTTP/1.1
Accept: application/vnd.tent.posts-feed.v0+json
Authorization: Hawk id="7jDXOUbw4mePeVRGkI6nkA", mac="IGcaQYcaAxX6T3bP28VqzjdawD0592PQgBY9AhNLGYs=", ts="1372435719", nonce="z2ENfvQz", app="KAS0j1n7pSsik8uub0QM7A"
HTTP/1.1 200 OK
Cache-Control: private, must-revalidate
Content-Type: application/vnd.tent.posts-feed.v0+json
ETag: "a7Z0ellL8Fng9r3By-TmdZ2oLOqOP24oo6o0KyVNKk0"
Server-Authorization: Hawk mac="XbwdBx9y3mu85Mp0NAh8SCBuurz82QLdxiDWyyfUA3o=", hash="VFor4m1zdlh4k8ZnNieXrH+m1qDIdWeAfgFI2nXbZjE="
{
  "pages": {
    "last": "?before=1372435719357+982f9dc08f10bfe250cd91805f70a94b9e4237cd3aaf1d254174315ba717eb19&limit=2&max_refs=2&since=0",
    "next": "?before=1372435719357+982f9dc08f10bfe250cd91805f70a94b9e4237cd3aaf1d254174315ba717eb19&limit=2&max_refs=2"
  },
  "posts": [
    {
      "app": {
        "id": "KAS0j1n7pSsik8uub0QM7A",
        "name": "Example App",
        "url": "https://app.example.com"
      },
      "content": {
        "text": "example post 2015796113853353331"
      },
      "entity": "http://bb216a47d970.alpha.attic.is",
      "id": "WcnmYQvIfaJfnrvGKEcbNQ",
      "published_at": 1372435719517,
      "received_at": 1372435719517,
      "refs": [
        {
          "post": "zJnyu_g5pMZ6CmXhAlzyvA"
        },
        {
          "post": "KjV6Mjp5oIZthNAZYXksJg"
        },
        {
          "post": "mYr0hjrjYq2Dz19fqeSOQQ"
        },
        {
          "post": "HV97SeUSO1anm5ozhchQIA"
        }
      ],
      "type": "https://tent.io/types/status/v0#",
      "version": {
        "id": "feb681240b75c8a611eb9b5bec6fedda010eed7d32624d2f6f1892ebf3a2f535",
        "published_at": 1372435719517,
        "received_at": 1372435719517
      }
    },
    {
      "app": {
        "id": "KAS0j1n7pSsik8uub0QM7A",
        "name": "Example App",
        "url": "https://app.example.com"
      },
      "content": {
        "text": "example post 6263450610539110790"
      },
      "entity": "http://bb216a47d970.alpha.attic.is",
      "id": "0EorDch3kkaggKvWLV5k4Q",
      "published_at": 1372435719357,
      "received_at": 1372435719357,
      "refs": [
        {
          "post": "fBG998C9GYBcDOha3j6aCw"
        },
        {
          "post": "zJnyu_g5pMZ6CmXhAlzyvA"
        }
      ],
      "type": "https://tent.io/types/status/v0#",
      "version": {
        "id": "982f9dc08f10bfe250cd91805f70a94b9e4237cd3aaf1d254174315ba717eb19",
        "published_at": 1372435719357,
        "received_at": 1372435719357
      }
    }
  ],
  "refs": [
    {
      "app": {
        "id": "KAS0j1n7pSsik8uub0QM7A",
        "name": "Example App",
        "url": "https://app.example.com"
      },
      "content": {
        "text": "example post 2933568871211445515"
      },
      "entity": "http://bb216a47d970.alpha.attic.is",
      "id": "zJnyu_g5pMZ6CmXhAlzyvA",
      "published_at": 1372435718658,
      "received_at": 1372435718658,
      "type": "https://tent.io/types/status/v0#",
      "version": {
        "id": "dd70b81e4372fbce604d779f19f44312778553267cee1ab6d5f3fbe1a99ad05f",
        "published_at": 1372435718658,
        "received_at": 1372435718658
      }
    },
    {
      "app": {
        "id": "KAS0j1n7pSsik8uub0QM7A",
        "name": "Example App",
        "url": "https://app.example.com"
      },
      "content": {
        "text": "example post 4324745483838182873"
      },
      "entity": "http://bb216a47d970.alpha.attic.is",
      "id": "KjV6Mjp5oIZthNAZYXksJg",
      "published_at": 1372435718834,
      "received_at": 1372435718834,
      "type": "https://tent.io/types/status/v0#",
      "version": {
        "id": "1489dafc30f9f87aa2bf6513616fbdf3aac76d3c97c60d0146bb37fbd03cf153",
        "published_at": 1372435718834,
        "received_at": 1372435718834
      }
    },
    {
      "app": {
        "id": "KAS0j1n7pSsik8uub0QM7A",
        "name": "Example App",
        "url": "https://app.example.com"
      },
      "content": {
        "text": "example post 3510942875414458836"
      },
      "entity": "http://bb216a47d970.alpha.attic.is",
      "id": "fBG998C9GYBcDOha3j6aCw",
      "published_at": 1372435718480,
      "received_at": 1372435718480,
      "type": "https://tent.io/types/status/v0#",
      "version": {
        "id": "37d1285afd8a198b85df65ca39d526088af54b59af70ee53f9ca54d11400eba9",
        "published_at": 1372435718480,
        "received_at": 1372435718480
      }
    }
  ]
}

Conditional Request

GET posts_feed
GET /posts?limit=2 HTTP/1.1
Accept: application/vnd.tent.posts-feed.v0+json
Authorization: Hawk id="7jDXOUbw4mePeVRGkI6nkA", mac="ZqyWaVOQnQPtuNbR+2j5ZxFfzLCURP31l4v42HI2AZY=", ts="1372435715", nonce="668v2x5y", app="KAS0j1n7pSsik8uub0QM7A"
If-None-Match: "ik5kq1teWgld8BvHZgeIS7egaJX80lfxBGyoG7CV4y4"
HTTP/1.1 304 Not Modified
ETag: "ik5kq1teWgld8BvHZgeIS7egaJX80lfxBGyoG7CV4y4"
Server-Authorization: Hawk mac="j9kTe7w7+DoWl5bDqf7ktvY2+FOOw+G31GRgkZ/slBE="

HEAD Request (Count)

HEAD posts_feed
HEAD /posts?limit=2 HTTP/1.1
Accept: application/vnd.tent.posts-feed.v0+json
Authorization: Hawk id="7jDXOUbw4mePeVRGkI6nkA", mac="O+thgjbmEKKHpzPbsqWAFGFuPnPhYWVd9dfn1Qb6HTM=", ts="1372435715", nonce="bf/uGiMb", app="KAS0j1n7pSsik8uub0QM7A"
HTTP/1.1 200 OK
Cache-Control: private, must-revalidate
Content-Type: application/vnd.tent.posts-feed.v0+json
Count: 3
ETag: "ik5kq1teWgld8BvHZgeIS7egaJX80lfxBGyoG7CV4y4"
Server-Authorization: Hawk mac="VrUxgo++hfJEROQAOJi/lbYScbXPTJDl8rLdBwEJfgY="

post

Create New Version

PUT post
PUT /posts/http%3A%2F%2Fbb216a47d970.alpha.attic.is/0hI82Wh33QhNRjAFckpoEw HTTP/1.1
Authorization: Hawk id="7jDXOUbw4mePeVRGkI6nkA", mac="eJebAg2KfWQW4NTX/48Fs4t++397iT4oVpOiBZGEjOw=", ts="1372435717", nonce="38Vem1gu", hash="vjtMDu/STmZaI5pjTxzhiUPo0ycZWOzNOaGaAvHlxjY=", app="KAS0j1n7pSsik8uub0QM7A"
Content-Type: application/vnd.tent.post.v0+json; type="https://tent.io/types/status/v0#"
{
  "id": "0hI82Wh33QhNRjAFckpoEw",
  "entity": "http://bb216a47d970.alpha.attic.is",
  "type": "https://tent.io/types/status/v0#",
  "content": {
    "text": "example post 1976235410884491574"
  },
  "version": {
    "parents": [
      {
        "version": "676d04cac456b06fdd7f4ba75a05aaa116fe166e8365e17fca8e42f6c6be8d94"
      }
    ]
  }
}
HTTP/1.1 200 OK
Cache-Control: private, must-revalidate
Content-Type: application/vnd.tent.post.v0+json; type="https://tent.io/types/status/v0#"
Server-Authorization: Hawk mac="kSzwMbH9RkVuCjGnjcMco4p0P2FdF6E1wlEuzC8aeLQ=", hash="T5VMwjGBR02EM3/Zml/3V9Q4YUgwPq6oLWb0kGWNmTE="
{
  "post": {
    "app": {
      "id": "KAS0j1n7pSsik8uub0QM7A",
      "name": "Example App",
      "url": "https://app.example.com"
    },
    "content": {
      "text": "example post 1976235410884491574"
    },
    "entity": "http://bb216a47d970.alpha.attic.is",
    "id": "0hI82Wh33QhNRjAFckpoEw",
    "published_at": 1372435716921,
    "received_at": 1372435716921,
    "type": "https://tent.io/types/status/v0#",
    "version": {
      "id": "a7fe87dc4812d6918a0943ded09fa4a65f82ee617471d4b32b66d1cc032851dd",
      "parents": [
        {
          "version": "676d04cac456b06fdd7f4ba75a05aaa116fe166e8365e17fca8e42f6c6be8d94"
        }
      ],
      "published_at": 1372435717847,
      "received_at": 1372435717847
    }
  }
}

Get (with refs)

GET post
GET /posts/http%3A%2F%2Fbb216a47d970.alpha.attic.is/WcnmYQvIfaJfnrvGKEcbNQ?max_refs=4 HTTP/1.1
Accept: application/vnd.tent.post.v0+json
Authorization: Hawk id="7jDXOUbw4mePeVRGkI6nkA", mac="SG1jvNBUStdPXZrkXSejLgbXqKFYOVKeGOz6Zx+KrqA=", ts="1372435719", nonce="EZrtSbbx", app="KAS0j1n7pSsik8uub0QM7A"
HTTP/1.1 200 OK
Cache-Control: private, must-revalidate
Content-Type: application/vnd.tent.post.v0+json; type="https://tent.io/types/status/v0#"
ETag: "0Sd94EishR35A8_Ma0yHdb-RGXoBj3xRByd86spciQk"
Server-Authorization: Hawk mac="pcSNx/MWLm3z35jXQpXpObM9y1ruh7m8p1OHTS/lb2A=", hash="CVzG6z0eDG13HpXuIcf8uBnMr1yUovAiJJ9byCyCtiI="
Vary: Accept
{
  "post": {
    "app": {
      "id": "KAS0j1n7pSsik8uub0QM7A",
      "name": "Example App",
      "url": "https://app.example.com"
    },
    "content": {
      "text": "example post 2015796113853353331"
    },
    "entity": "http://bb216a47d970.alpha.attic.is",
    "id": "WcnmYQvIfaJfnrvGKEcbNQ",
    "published_at": 1372435719517,
    "received_at": 1372435719517,
    "refs": [
      {
        "post": "zJnyu_g5pMZ6CmXhAlzyvA"
      },
      {
        "post": "KjV6Mjp5oIZthNAZYXksJg"
      },
      {
        "post": "mYr0hjrjYq2Dz19fqeSOQQ"
      },
      {
        "post": "HV97SeUSO1anm5ozhchQIA"
      }
    ],
    "type": "https://tent.io/types/status/v0#",
    "version": {
      "id": "feb681240b75c8a611eb9b5bec6fedda010eed7d32624d2f6f1892ebf3a2f535",
      "published_at": 1372435719517,
      "received_at": 1372435719517
    }
  },
  "refs": [
    {
      "app": {
        "id": "KAS0j1n7pSsik8uub0QM7A",
        "name": "Example App",
        "url": "https://app.example.com"
      },
      "content": {
        "text": "example post 2933568871211445515"
      },
      "entity": "http://bb216a47d970.alpha.attic.is",
      "id": "zJnyu_g5pMZ6CmXhAlzyvA",
      "published_at": 1372435718658,
      "received_at": 1372435718658,
      "type": "https://tent.io/types/status/v0#",
      "version": {
        "id": "dd70b81e4372fbce604d779f19f44312778553267cee1ab6d5f3fbe1a99ad05f",
        "published_at": 1372435718658,
        "received_at": 1372435718658
      }
    },
    {
      "app": {
        "id": "KAS0j1n7pSsik8uub0QM7A",
        "name": "Example App",
        "url": "https://app.example.com"
      },
      "content": {
        "text": "example post 4324745483838182873"
      },
      "entity": "http://bb216a47d970.alpha.attic.is",
      "id": "KjV6Mjp5oIZthNAZYXksJg",
      "published_at": 1372435718834,
      "received_at": 1372435718834,
      "type": "https://tent.io/types/status/v0#",
      "version": {
        "id": "1489dafc30f9f87aa2bf6513616fbdf3aac76d3c97c60d0146bb37fbd03cf153",
        "published_at": 1372435718834,
        "received_at": 1372435718834
      }
    },
    {
      "app": {
        "id": "KAS0j1n7pSsik8uub0QM7A",
        "name": "Example App",
        "url": "https://app.example.com"
      },
      "content": {
        "text": "example post 2610529275472644968"
      },
      "entity": "http://bb216a47d970.alpha.attic.is",
      "id": "mYr0hjrjYq2Dz19fqeSOQQ",
      "published_at": 1372435719009,
      "received_at": 1372435719009,
      "type": "https://tent.io/types/status/v0#",
      "version": {
        "id": "b5186583d31361451e119c0d9e7bda96a35c48e9d5eacc5b83faa287c0e3c049",
        "published_at": 1372435719009,
        "received_at": 1372435719009
      }
    },
    {
      "app": {
        "id": "KAS0j1n7pSsik8uub0QM7A",
        "name": "Example App",
        "url": "https://app.example.com"
      },
      "content": {
        "text": "example post 2703387474910584091"
      },
      "entity": "http://bb216a47d970.alpha.attic.is",
      "id": "HV97SeUSO1anm5ozhchQIA",
      "published_at": 1372435719183,
      "received_at": 1372435719183,
      "type": "https://tent.io/types/status/v0#",
      "version": {
        "id": "aec47c7cf4fb0332994478cfb67ec76d3c5b483f186f2fd827d2cd2c0f00d0d8",
        "published_at": 1372435719183,
        "received_at": 1372435719183
      }
    }
  ]
}

Mentions

GET post
GET /posts/http://bb216a47d970.alpha.attic.is/p2Q9nV2A4iaOBFdf4fvCBw?limit=2 HTTP/1.1
Accept: application/vnd.tent.post-mentions.v0+json
Authorization: Hawk id="7jDXOUbw4mePeVRGkI6nkA", mac="0NTO1Z/ccFo2XPeSvYhDtUL0TTC2kns9tnV3jxEowgI=", ts="1372435716", nonce="obLi2doW", app="KAS0j1n7pSsik8uub0QM7A"
HTTP/1.1 200 OK
Cache-Control: private, must-revalidate
Content-Type: application/vnd.tent.post-mentions.v0+json
ETag: "ahQCD4sHIvTudS8czmJDebr4TxQQVtVc9lbImbGiGgY"
Server-Authorization: Hawk mac="pbyg9slJ7Diblwgn05wp6BFpkvaqV4QW7bR6Z00w7FM=", hash="kQyRfw1EPF+brkyyH7cQxDbH8PyHaKOlO6ZRl+FcCwk="
Vary: Accept
{
  "mentions": [
    {
      "post": "kSbSpSXLGdjfKsiR2a2EPg",
      "type": "https://tent.io/types/status/v0#"
    },
    {
      "post": "-bCTIWc1mhl-KDwkzrcEHA",
      "type": "https://tent.io/types/status/v0#"
    }
  ],
  "pages": {
    "last": "?page=ha-s3PgnATSRb1yAEABPUVpHSHBJQXczUkstdjJ2Wl9wekJn&limit=2",
    "next": "?page=v7Cs3PgnATSRb1yAEABHTDJDMmpqcWFmSDgtWVZDeGt4U0xR&limit=2"
  }
}
HEAD post
HEAD /posts/http://bb216a47d970.alpha.attic.is/p2Q9nV2A4iaOBFdf4fvCBw?limit=2 HTTP/1.1
Accept: application/vnd.tent.post-mentions.v0+json
Authorization: Hawk id="7jDXOUbw4mePeVRGkI6nkA", mac="W+jKQhNXJ8LOqz8psM02UCeOHOqyWiR50ahxTJBbZ5s=", ts="1372435716", nonce="57dvOZt8", app="KAS0j1n7pSsik8uub0QM7A"
HTTP/1.1 200 OK
Cache-Control: private, must-revalidate
Content-Type: application/vnd.tent.post-mentions.v0+json
Count: 5
ETag: "ahQCD4sHIvTudS8czmJDebr4TxQQVtVc9lbImbGiGgY"
Server-Authorization: Hawk mac="JPpYcWjKsNKdMN6BpaZrMUybE9VpITgThYxDN4XPKMU="
Vary: Accept

Versions

GET post
GET /posts/http://bb216a47d970.alpha.attic.is/0hI82Wh33QhNRjAFckpoEw?limit=2 HTTP/1.1
Accept: application/vnd.tent.post-versions.v0+json
Authorization: Hawk id="7jDXOUbw4mePeVRGkI6nkA", mac="JVMJesXd90egfRciZbJBZRGBj2tWgeifBEBERXeVnAo=", ts="1372435717", nonce="zhoRDEqm", app="KAS0j1n7pSsik8uub0QM7A"
HTTP/1.1 200 OK
Cache-Control: private, must-revalidate
Content-Type: application/vnd.tent.post-versions.v0+json
ETag: "GQCfTrCaEFiGRXJrQbcgbQ4yGU4JlJcOAy9NJlPIPnU"
Server-Authorization: Hawk mac="50qI6si1/xeumgNOqWzZ2E4QyyFn8ejEporR2ho3zxc=", hash="uk24bVEPYN6/eQNtWusOdW/blBxF0RnN6I68OaWWq3U="
Vary: Accept
{
  "pages": {
    "last": "?page=57es3PgnXntiuwBY3LN-xRCNxHcSfLJDdjTloUNps5sYfe1yC-o&limit=2",
    "next": "?page=4rqs3PgnwdNnDlzI33grWNWp8AMI1hJ1obiTYG2Fdl9QLB-5xfU&limit=2"
  },
  "versions": [
    {
      "id": "a7fe87dc4812d6918a0943ded09fa4a65f82ee617471d4b32b66d1cc032851dd",
      "parents": [
        {
          "version": "676d04cac456b06fdd7f4ba75a05aaa116fe166e8365e17fca8e42f6c6be8d94"
        }
      ],
      "published_at": 1372435717847,
      "received_at": 1372435717847,
      "type": "https://tent.io/types/status/v0#"
    },
    {
      "id": "0aa2af8dc87b41f53d91ef5daf5bd039a33408b975bcff812d38e0fa0ed7980f",
      "parents": [
        {
          "version": "676d04cac456b06fdd7f4ba75a05aaa116fe166e8365e17fca8e42f6c6be8d94"
        }
      ],
      "published_at": 1372435717647,
      "received_at": 1372435717647,
      "type": "https://tent.io/types/status/v0#"
    }
  ]
}
HEAD post
HEAD /posts/http://bb216a47d970.alpha.attic.is/0hI82Wh33QhNRjAFckpoEw?limit=2 HTTP/1.1
Accept: application/vnd.tent.post-versions.v0+json
Authorization: Hawk id="7jDXOUbw4mePeVRGkI6nkA", mac="W9c2bD571kWZIWqn/WG4oZVUyn89+JxS7pT4hwdc70Q=", ts="1372435718", nonce="GM01nChi", app="KAS0j1n7pSsik8uub0QM7A"
HTTP/1.1 200 OK
Cache-Control: private, must-revalidate
Content-Type: application/vnd.tent.post-versions.v0+json
Count: 6
ETag: "GQCfTrCaEFiGRXJrQbcgbQ4yGU4JlJcOAy9NJlPIPnU"
Server-Authorization: Hawk mac="MYEGTdNPWw+xdQDF5KExNYdHj4+xDkLfGUbqqCeBGSI="
Vary: Accept

Child Versions

GET post
GET /posts/http://bb216a47d970.alpha.attic.is/0hI82Wh33QhNRjAFckpoEw?limit=2&version=676d04cac456b06fdd7f4ba75a05aaa116fe166e8365e17fca8e42f6c6be8d94 HTTP/1.1
Accept: application/vnd.tent.post-children.v0+json
Authorization: Hawk id="7jDXOUbw4mePeVRGkI6nkA", mac="tom1ZgpTKFvX7wBL7BlVqhuIw+Hp+X+c7f9ECFRWQJY=", ts="1372435718", nonce="L2MhZixk", app="KAS0j1n7pSsik8uub0QM7A"
HTTP/1.1 200 OK
Cache-Control: private, must-revalidate
Content-Type: application/vnd.tent.post-children.v0+json
ETag: "GQCfTrCaEFiGRXJrQbcgbQ4yGU4JlJcOAy9NJlPIPnU"
Server-Authorization: Hawk mac="mRIU3tCD+Jdo1yKubVquvvY6AADq3zmKpPPPGEwhTzI=", hash="5il2UMG2wh4H5czJVhRyxA8W1KYdq8iGt7QoHw4ekXc="
Vary: Accept
{
  "pages": {
    "last": "?page=orms3PgnvPuRMUHB_s_xu0LQ3XDbOZXv4V_TnJMyC1CZolSgsDY&limit=2",
    "next": "?page=4rqs3PgnwdNnDlzI33grWNWp8AMI1hJ1obiTYG2Fdl9QLB-5xfU&limit=2"
  },
  "versions": [
    {
      "id": "a7fe87dc4812d6918a0943ded09fa4a65f82ee617471d4b32b66d1cc032851dd",
      "parents": [
        {
          "version": "676d04cac456b06fdd7f4ba75a05aaa116fe166e8365e17fca8e42f6c6be8d94"
        }
      ],
      "published_at": 1372435717847,
      "received_at": 1372435717847,
      "type": "https://tent.io/types/status/v0#"
    },
    {
      "id": "0aa2af8dc87b41f53d91ef5daf5bd039a33408b975bcff812d38e0fa0ed7980f",
      "parents": [
        {
          "version": "676d04cac456b06fdd7f4ba75a05aaa116fe166e8365e17fca8e42f6c6be8d94"
        }
      ],
      "published_at": 1372435717647,
      "received_at": 1372435717647,
      "type": "https://tent.io/types/status/v0#"
    }
  ]
}
HEAD post
HEAD /posts/http://bb216a47d970.alpha.attic.is/0hI82Wh33QhNRjAFckpoEw?limit=2&version=676d04cac456b06fdd7f4ba75a05aaa116fe166e8365e17fca8e42f6c6be8d94 HTTP/1.1
Accept: application/vnd.tent.post-children.v0+json
Authorization: Hawk id="7jDXOUbw4mePeVRGkI6nkA", mac="Jk6/a5pC4SFCruCUb/VAHc8KCNPI//NY+xZyR4zrz7M=", ts="1372435718", nonce="d3vS5FJU", app="KAS0j1n7pSsik8uub0QM7A"
HTTP/1.1 200 OK
Cache-Control: private, must-revalidate
Content-Type: application/vnd.tent.post-children.v0+json
Count: 5
ETag: "GQCfTrCaEFiGRXJrQbcgbQ4yGU4JlJcOAy9NJlPIPnU"
Server-Authorization: Hawk mac="nlLUReG/3Djzt9dEzuKt9uq7BWocK8A4JjFjM8vzRRs="
Vary: Accept

attachment

GET attachment
GET /attachments/http%3A%2F%2Fbb216a47d970.alpha.attic.is/9585ac48e055ed498cc8a008201037ba966fb7672270107ed5e4e94fa6cbbcf7 HTTP/1.1
Authorization: Hawk id="7jDXOUbw4mePeVRGkI6nkA", mac="4wpeLpF2BmuNMbtwizRR3O8kC4Lgmo/44utJuWkT1nI=", ts="1372435714", nonce="La4e8veb", app="KAS0j1n7pSsik8uub0QM7A"
HTTP/1.1 200 OK
Cache-Control: private, max-age=31557600
Content-Disposition: inline; filename="example.jpeg"
Content-Type: image/jpeg
ETag: "lYWsSOBV7UmMyKAIIBA3upZvt2cicBB-1eTpT6bLvPc"
example attachment data

post_attachment

GET post_attachment
GET /posts/http%3A%2F%2Fbb216a47d970.alpha.attic.is/vrddZdX7D4EV8lLbNoZBlw/attachments/example.jpeg HTTP/1.1
Accept: */*
Authorization: Hawk id="7jDXOUbw4mePeVRGkI6nkA", mac="rzKtkO+9vtbBUyIfjT3JSsEYZBk+oIWQwjPHANfF+9E=", ts="1372435714", nonce="IuldGqQd", app="KAS0j1n7pSsik8uub0QM7A"
HTTP/1.1 302 Found
Attachment-Digest: 9585ac48e055ed498cc8a008201037ba966fb7672270107ed5e4e94fa6cbbcf7
Location: /attachments/http%3A%2F%2Fbb216a47d970.alpha.attic.is/9585ac48e055ed498cc8a008201037ba966fb7672270107ed5e4e94fa6cbbcf7

batch

Documentation pending

server_info

Documentation pending

oauth_auth

GET oauth
GET /oauth?client_id=KAS0j1n7pSsik8uub0QM7A&state=d173d2bb868a HTTP/1.1
HTTP/1.1 302 Found
Location: https://app.example.com/oauth?code=m2lQJ-d87ueMyRmdYtcQXw&state=d173d2bb868a

oauth_token

POST oauth_token
POST /oauth/authorization HTTP/1.1
Accept: application/json
Authorization: Hawk id="G8txregRxB98_jnpq030fA", mac="6YX1m3sheOW2yJSDPiI4i1riKNBRu5QOOucZ6q/AQQg=", ts="1372435713", nonce="dwXCGMQ1", hash="YbYsqRXw2fampy1rRk6py+HYjrFH7KzUITZslXwiyXU=", app="KAS0j1n7pSsik8uub0QM7A"
Content-Type: application/json
{
  "code": "m2lQJ-d87ueMyRmdYtcQXw",
  "token_type": "https://tent.io/oauth/hawk-token"
}
HTTP/1.1 200 OK
Cache-Control: private, must-revalidate
Content-Type: application/json; charset=utf-8
Server-Authorization: Hawk mac="GCBbe56vvxaDAiub18i7DILf3Q5P9d8JrNuctZpsfmE=", hash="bSj9G5h2gOzbO1CFaLu8QRLwm8L6GEuWj3/cdN1IQvA="
{
  "access_token": "7jDXOUbw4mePeVRGkI6nkA",
  "hawk_key": "m2lQJ-d87ueMyRmdYtcQXw",
  "hawk_algorithm": "sha256",
  "token_type": "https://tent.io/oauth/hawk-token"
}