Skip to content

Instantly share code, notes, and snippets.

@conatus
Last active April 13, 2023 19:32
Show Gist options
  • Save conatus/cc665f917d5558c123bc to your computer and use it in GitHub Desktop.
Save conatus/cc665f917d5558c123bc to your computer and use it in GitHub Desktop.
Ello API

Ello API

This is a basic exploration of the Ello API. Completely unofficial, your mileage my vary, don't smash their servers as they are likely very busy.

Methods return HTML for their representation where appropriate which is a nice little pattern. Everything returns application/json.

Like this:

{
   "id": <new post ID>,
   "content": <encoded HTML for display>
}

Authentication

Is session and cookie based. Grab the '_ello_session' cookie in an active Ello browser session.

Streams

Internally the Noise and Friends bit seem to be called "streams" but I can't see how to obtain them.

Obtaining A Single Post

GET https://ello.co/api/v1/posts/post_id.json

Failure 404 Not found, obviously.

Posting Posts

## Simple

POST https://ello.co/api/v1/posts.json

With a multipart/form-data input. One field must be "unsanitized_body", which should look like this:

[
   {
      "kind":"text",
      "data":"test"
   }
]

Links are sent in HTML and Markdown in Markdown.

## Image

Ello automatically uploads images to S3 for display, chucking them to ello-direct-uploads.s3.amazonaws.com - after it knows the image is done, it sends the following.

[
   {
      "kind":"image",
      "data":{
         "url":"some url",
         "via":"direct",
         "alt":"filename.png - though it probably can be a proper alt"
      }
   }
]

Success 200 Failure 422 - Unprocessable Entity

Clearly one can add more than one post to this array.

Editing Posts

PUT https://ello.co/api/v1/posts/[ID of post].json

Success 200 Failure 404 - Not found.

Same format as posting a post above.

Deleting Posts

DELETE https://ello.co/api/v1/posts/[ID of post]

Success 204 Failure 404 - Not found.

Friends List

GET /api/v1/followerships

Adding Comments

POST https://ello.co/api/v1/comments

Same format as posts, but with the addition of parent_post_id as an additional form field.

Removing Comments

PUT https://ello.co/api/v1/comments/

Same format as posts.

Getting Comments

GET https://ello.co/api/v1/comments?parent_post_id=parent_id_of_the_post

@KonradIT
Copy link

KonradIT commented Jan 1, 2015

Post a text URI is now: https://ello.co/api/v1/posts

@Tridy
Copy link

Tridy commented Feb 14, 2015

If anyone had luck getting cookie from the enter page using .net HttpClient, could you please help me with that?

using (var client = new HttpClient())
{
_httpResponse = await client.GetAsync("https://ello.co/enter");
_httpResponse.EnsureSuccessStatusCode();
}

after that I get status code 416 'Requested Range Not Satisfiable'

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment