API Endpoints
To assist others who are building out features for the site, all the endpoints are described below.
The Base URL is still our old developmental server. As we migrate the API, this document will change.
https://dev.materialdesignicons.com/api/
Public endpoints are visible to everyone using the website.
- No Authentication
- Cached results (up to 5 minutes)
- Objects may not contain all properties (ex: user objects)
- Look for the lock symbol in the object definitions below.
[ { "id": "test", "fonts": [ { "test": 1 } ] } ]
GET /packages
A package is a named grouping of icons. Example: Material Design Icons. This endpoint lists the packages, but leaves off the icons object for performance reasons.
GET /package/:packageId
Search through a package of icons.
GET /icon/:iconId
Retrieve a single icon and all public properties at once. Note looping this is very slow as it uses no cache layer to ensure the latest data.
GET /package/:packageId/:iconName
Icon names are unique across a package. This means a package id is also required when making the request as icons across packages share names.
GET /:packageId/tag
A list of tags used to group icons in the system. If count is 0 the item will not be returned.
GET /user GET /package/:packageId/user GET /package/:packageId/user/core
Retrieve all users. An alternative is to get users for only a single package or just the core users assigned to maintain that package.
GET /user/:userId GET /package/:packageId/user/:userId
Retrieve a single user (aka contributor). Using the alternative url with packageId will filter the iconCount to a specific packageId.
GET /:packageId/style
Styles are documented in the icon naming guidelines. Examples include box, circle, outline, off. This endpoint requires the packageId so that it can return the count of each style.
GET /icon/:baseIconId/base
A base icon is the most primative version of an icon. For instance account-plus has the base icon of account. This endpoint will retrieve all the icons with the same baseIconId.
POST /download
This endpoint is overloaded to allow downloading a single icon or a package of icons as a zip archive.
GET /package/:packageId/user
List all user objects associated to a packageId.
While pretty much all data is open to the public, most of the management related API's are restricted to collaborator and admin accounts.
GET /admin/package/:package_id/font
Retrieve an array of fonts for a given package.
GET /admin/icon/:iconId/modification
Every modification to an icon property is tracked. This returns a list of those modifications.
isVisible = falsehides a modification from the public.
POST /admin/icon/name
Update icon.name to rename an icon.
POST /admin/icon/description
Update icon.description in a Markdown string.
POST /admin/icon/data
Update icon.data.
POST /admin/icon/optimize
Optimize icon.data with SVGO. This is used to preview the change and will not touch the database.
POST /admin/icon/tag
Inserts tag into the database for an icon.
POST /admin/icon/alias
Aliasing icons with alternative names allows others to find them. For example account may also be known as user or person.
POST /admin/icon/style
Toggle icon.styles on or off. For instance an icon called account-outline should have the outline style.
POST /admin/user
Insert a new user into the database. These users are readonly and cannot be logged into.