Return to enstrayed.com

api.enstrayed.com Documentation

This page was last updated 2024-06-26.

All GET endpoints are read-only unless otherwise noted. Recommended to use CTRL+F to find the endpoint you're looking for since I didn't feel like setting up anchors.

Source Code & Issue Tracker: github.com/enstrayed/enstrayedapi

Permalinks to this page:

https://etyd.cc/apidocs

GET /

index.js:27

Returns the commit the container is running in HTML format.

GET /blogposts

blog.js:6

By default, this will return a JSON array with all of the blog posts on my website, however, if ?format=html is used in the URL it will return the same but in HTML.

The result will only include posts in the directory set in the servers config.json that match a naming convention.

GET /nowplaying

nowplaying.js:14

Returns whatever I'm listening to via the Last.fm API in JSON. If ?format=html is used in the URL it will return the same but in HTML. If nothing is playing the JSON response will just have "playing": false.

GET /etyd

Internal use only: Requests to etyd.cc have their request rewritten to this endpoint.

POST /etyd/*

etyd.js:80

Creates a new redirect for etyd.cc. Replace * in the URL for the target (eg. etyd.cc/target), and urlValue in the body with the URL to be redirected to.

Required Headers: Required Body (JSON):
{
        "url": "urlValue"
}

DELETE /etyd/*

etyd.js:28

Deletes an existing redirect for etyd.cc. Replace * in the URL for the target (eg. etyd.cc/target)

Required Headers:

GET /ip

ip.js:3

Returns JSON containing the IP, Country and Cloudflare Ray IDs as present in the request headers.

GET /headers

ip.js:13

Returns JSON containing all the headers received by the server.

POST /sendemail

mailjet.js:3

Sends an email to the specified recipient, intended for application & automation use.

Required Headers: Required Body (JSON):
{
        "recipient": "recipientEmailHere",
        "subject": "emailSubjectHere",
        "message": "emailBodyHere"
}