API Endpoints
To help others build out features for the site, all the endpoints are described below.
Currently, our public API sits on the development Material Design Icons server. This will change in the future as we bring all existing properties under the Pictogrammers umbrella.
Base URL: https://dev.materialdesignicons.com/
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 api/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 api/package/:packageId
Search through a package of icons.
GET api/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 api/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 api/:packageId/tag
A list of tags used to group icons in the system. If count is 0 the item will not be returned.
GET api/user GET api/package/:packageId/user GET api/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 api/user/:userId GET api/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 api/: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 api/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 api/download
This endpoint is overloaded to allow downloading a single icon or a package of icons as a zip archive.
GET api/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 api/admin/package/:package_id/font
Retrieve an array of fonts for a given package.
GET api/admin/icon/:iconId/modification
Every modification to an icon property is tracked. This returns a list of those modifications.
isVisible = false
hides a modification from the public.
POST api/admin/icon/name
Update icon.name
to rename an icon.
POST api/admin/icon/description
Update icon.description
in a Markdown string.
POST api/admin/icon/data
Update icon.data
.
POST api/admin/icon/optimize
Optimize icon.data
with SVGO. This is used to preview the change and will not touch the database.
POST api/admin/icon/tag
Inserts tag
into the database for an icon.
POST api/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 api/admin/icon/style
Toggle icon.styles
on or off. For instance an icon called account-outline
should have the outline
style.
POST api/admin/user
Insert a new user
into the database. These users are readonly and cannot be logged into.