Altium DBLib API

REST API that allow easy managment of Altium’s DBLibs.

How it began

Step by step, my electronic designs started to use more and more SMD parts, passives, ICs, connectors, optocouplers, etc… My Altium libraries started growing exponentially and hit a point in when I wasn’t able to maintain them. As soon I need a new component (usually a passive in which the only change with respect to another one it was the value) I created a new one with the value hardcoded in the schematic file. Sometimes, after a little search I discovered that I already had it. Definitely, it was the time to ditch the file-based libraries and start using something that allows me to remove duplicates and allow me to search a component in a centralized manner.

After looking for alternatives it seemed that the best solution was to migrate my file-based libraries to a database one, so I installed MSSQL in a VM and started to develop the initial tables with the structure required by Altium. That change was a big push forward in my way of working and I knew that the new approach was the way to go. All had improved, BOM was an automatic process, as it should be, all the data in the BOM was linked to a proper manufacturer reference, footprints for a same package were homogenized, component duplicates were gone… What an improvement!

However, it was still very laborious to manage the PCBlib and SCHlib files of the library so I thought it was a great opportunity to automate the process of adding a new component, footprint or symbol. From this idea this API was born.

What it offers

The API offers REST endpoints through which it is possible to enter components, symbols and footprints in the database and establish the appropriate relationships between them in order to create a component that can be read by Altium. In addition, since version 1.2.0, it is possible to manage the stock of the components, allowing easy querying of the real stock and setting stock levels and alarms that notifies the user about a component being exhausted.

So far there are no graphical interfaces to interact with the API, so at the moment, the consumption of the API is done through CURL. The API is currently used through CURL or through the Postman client, which makes it relatively easy to use.

Check it out
The source code of this API is available at my Github. If you only want to use it you can simple gather its docker image at DockerHub.Docker Hub.