Add/Remove Cores via API

While messing around with the API (I was trying to change my device’s name), I accidentally called the API using DELETE (aka my dodgy coding)

i.e

DELETE https://api.spark.io/v1/devices/XXXXXXXXXXXXXXXX

Which subsequently removed it from the build IDE. Interestingly the core remained connected to the cloud.

I was able to re-add my core via the build IDE. I was wondering if there was a way to add a device via the API? Neither Add/Remove device seem to be documented (yet ;)).

You will be able to find the API call here:

https://github.com/spark/spark-cli/blob/master/js/lib/ApiClient.js

1 Like

@kennethlimcp This is superb! Has absolutely everything that I need to know. Thanks!!

1 Like