Middleware Endpoints

Magic contains a whole range of endpoints, or “middleware” parts, that the system itself relies upon to function. You can play around with these endpoints by using the Endpoints component and ensure you show your system endpoints. Most of these endpoints are for internal use through the Magic dashboard, and should as a general rule of thumb not be consumed directly by you - But some of these endpoints are useful for your own projects.

Screenshot of the Endpoints component

Notice, all endpoints that require authorization of some sort assume a valid JWT token is transmitted in the Authorization HTTP header as a “Bearer” type of token, and if not, the user will not be allowed to invoke the endpoint, and an HTTP status code of 401 will be returned. To retrieve a JWT token use the magic/system/auth/authenticate endpoint. When you use the Endpoint component, it will automatically associate your existing JWT token with your invocations.

Endpoints marked as “not intended for you to consume in your own code” exist for the dashboard itself, and may change between versions of Magic - while endpoints explicitly marked as intended for your own consumption are stable, and safe to build upon.

Endpoint reference

The reference documentation is organised by concept. Each page below documents every endpoint within its category; its URL, HTTP verb, arguments, authorisation requirements, and whether the endpoint is intended for your own consumption.