Jump to content
Ultimaker Community of 3D Printing Experts

Problem with REST API - UM3

Recommended Posts



I got a problem with the API. I registered my application, got my id+key and verified it with the the proper API commands (Timestamps differ!).




After that I wanted to change the LED Color like in the "Inside the Ultimaker 3 - Day 3 - Remote access (part 2)". So I tried

{"brightness": 120.0, "saturation": 100.0, "hue": 100.0}

  even if the "Example Value" said "value" instead of brightness. (Postman API call returned (/printer/led) returned "brightness")




The problem was that the color didn't change. Reboot. Again nothing. I logged up the log after the reboot  and found this in the log:

Jun 08 06:51:30 ultimakersystem-ccbdd3004c87 systemd[1]: Time has been changed
Jan 01 00:00:59 ultimakersystem-ccbdd3004c87 connmand[254]: ntp: time slew +1528440630.651671 s
Jan 01 00:00:53 ultimakersystem-ccbdd3004c87 flipflop_wsgi.py[413]: 00:00:53 - WAR - app.libs.printer_api:189 - Failed to set the LED color for printer at
Jan 01 00:00:43 ultimakersystem-ccbdd3004c87 flipflop_wsgi.py[413]: 00:00:43 - WAR - app.libs.printer_api:189 - Failed to set the LED color for printer at


Why is the IP different? Or is this just coincidence?  The IP changed indeed from 14 to 31, mhhhh


Anyway I tried another command, which was also mentioned in the forum post => Changing the name. The example name was "MyUltimaker3", I tried "Ultimaker3" instead.




Does anyone got an idea why this is a bad request?


Another thing is the old firmware. The log says:

 Jan 01 00:00:29 ultimakersystem-ccbdd3004c87 python3[226]: 1970-01-01 00:00:29,605 INFO systemUpdate Comparing firmware 'stable' old version '' with new version '' with result: False 


Are these just bugs? (Updating is not that easy.I have to ask for permission, since I'm not alone exploring the device )


P.S: I'm using Firefox 60.0.2 & Postman 6.1.3


Share this post

Link to post
Share on other sites

With regards to the LED color, I don't think this is supported on the UM3. These LEDs can only produce white. 


The name change : you need to write correct JSON in the request. Something like { "name" :"Ultimaker3" }


(sorry for my short response I 'm on my mobile. Let me know if you want me to elaborate) 

Share this post

Link to post
Share on other sites

Hey, thanks for your answers, but I don't agree, but I like you to elaborate ? But please have a look at "Inside the Ultimaker 3 - Day 3 - Remote access (part 2)". There are two "PUT" examples: LED & Systemname.


I have seen the case glowing red and green, so it is possible. I can't reproduce it, but it tried some weird combinations of /printer/led and /printer/led/blink with postman.




Regarding the name: How do I know the right JSON String (I doubt there is).
In the API Documentation on the printer there are some other examples with JSON and PUT (e.g. /system/display_message). There it is clearly stated, that the input hast to be JSON and how it looks like (Example Value on the left).




Even in the /system/name/ example from the forum post, there is no JSON only the new name (MyUltimaker3)




Thank you anyway ?

Share this post

Link to post
Share on other sites

I've never seen any other color, except for the harsh white, but you may be right. I haven't tried it.


How to know what JSON to send? I don't think there is a good and reliable way, except to try it out. I thought you always needed to send JSON and in case of doubt, just use the parameter name that's mentioned in the docs. So it's weird to see an example that does it differently. Maybe this used to be different and they haven't updated the documentation?

Share this post

Link to post
Share on other sites

@inba If you want to change the color, it's fairly easy to do with gcode. If you've enabled developer mode, you can ssh into the printer using


 and then

sendgcode M142 r[0-255] g[0-255] b[0-255] w[0-255]


Last I tried, the REST API for changing colors didn't work for me either. Did you authenticate using  




Also, to change the name, it wants a string. so put "MyUltimaker3" in quotes and it should work just fine (after you authenticate your id+key of course).

Share this post

Link to post
Share on other sites

@pbackx: The screens from my inital post are directly taken from the online documentation, which is located on the printer. On each command there is a "Try out" button, where you can test the command. Both commands are not working, although I got authenticated. I'm pretty sure the LED & name should be easily set, since it's well documented (post) and it worked once (green LEDs)


There is an old version of the api documentation online, just to see how it looks like => Swagger UI


@starbuck: Thanks for the help. Anyway SSH is no option for me at this time ?. Yes I did authenticate (first post, first bluish image). But why are the LED's not working? Is it a bug or a wrong api call? I'll try to change the name with quotation marks the next time.


Some background info: I'm working on a project to control the printer. After some time I finally got the digest authentication working, which I successfully tested with /auth/verify. But I wanted to do a "real" simple test like setting a value. So I tried these two PUT-Commands (LED+Name), described in the "Inside the Ultimaker 3".

Share this post

Link to post
Share on other sites

Another interesting thing: GET /printer/status => "maintenance".


In the "Inside the Ultimaker 3 - Day 2 - Remote access (part 1)" it says "maintenance: Someone is actively doing things with the printer, for example changing materials or PrintCores."

I'm only accessing the printer through the WebGUI, why is the status "maintenance"? Could this be the problem?

Share this post

Link to post
Share on other sites
On 6/12/2018 at 2:31 PM, inba said:

I'm only accessing the printer through the WebGUI, why is the status "maintenance"? Could this be the problem?

That's a good question. I only see it go to "Maintenance" when we're changing filament or leveling the bed or things like that. Usually it says "Idle" or "Printing"

Share this post

Link to post
Share on other sites
On 6/13/2018 at 8:05 PM, inba said:

I solved the problems. As @starbuck said, for renaming I had to quote the name.

This is because you need to provide it with valid JSON. "newname" <- valid string, newname <- not a valid string.

"maintenance" is a state it goes into when you're changing material / print cores.

The RGB of the leds can be changed, but people didn't like how it looked (It was seen as damaging to the brand), so we don't use them. Personally I like them, but i understand that there are other factors at play.

Share this post

Link to post
Share on other sites

Nallath, how can the LED color be changed through the gcode?

(These blue/white lights are brutal on the eyes)

I have tried entering:


"M142 r255g140b000w000"


Inside a print file and on its own, but nothing that I've tried has worked.

Can you guys please add LED color control from the system menu?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Our picks

    • Introducing Ultimaker Cura 3.6 | Beta
      Ultimaker Cura 3.6 | Beta is available. It comes with new features, bug fixes, and UX improvements. We would really like to have your feedback on it to make our stable release as good as it can be. As always, you can download the beta for free from our website, for Windows, MacOS, and Linux.
        • Like
      • 95 replies
    • Print Core CC | Red for Ruby
      Q: For some users, abrasive materials may be a new subject matter. Can you explain what it is that makes a material abrasive when you are not sure which print core to use?
      A: Materials which are hard in a solid piece (like metals, ceramics and carbon fibers) will generally also wear down the nozzle. In general one should assume...
        • Like
      • 30 replies
    • "Back To The Future" using Generative Design & Investment Casting
      Designing for light-weight parts is becoming more important, and I’m a firm believer in the need to produce lighter weight, less over-engineered parts for the future. This is for sustainability reasons because we need to be using less raw materials and, in things like transportation, it impacts the energy usage of the product during it’s service life.
        • Like
      • 12 replies

Important Information

Welcome to the Ultimaker Community of 3D printing experts. Visit the following links to read more about our Terms of Use or our Privacy Policy. Thank you!