Jump to content
Ultimaker Community of 3D Printing Experts
  • Sign Up
jlavistory

API Cura Engine and Firmware communication

Recommended Posts

Posted · API Cura Engine and Firmware communication

Hello,

 

I wish know :

  1. If it exists an API Documentation (aka. http://<printer ip>/api/MethodsGET-MethodesSET OR Attributes like temperature and other stuffsonline or offline where i could look  for understand and learn how to sendind directly to the UM S5 printer the GCode generated by Cura Engine Backend. If not, is the Cura Engine Backend able to sending GCode directly without go over an API.
  2. Is the CURA Engine is able to blending some GCode for several pieces into a single one GCode ?
  3. If it exists a printer log file generated by  the printer somewhere, if Yes, How/Where  to get this printer log file.

 

Thanks in advance.

Best Regards.

Share this post


Link to post
Share on other sites
Posted · API Cura Engine and Firmware communication
2 hours ago, jlavistory said:
  1. If it exists an API Documentation (aka. http://<printer ip>/api/MethodsGET-MethodesSET OR Attributes like temperature and other stuffsonline or offline where i could look  for understand and learn how to sendind directly to the UM S5 printer the GCode generated by Cura Engine Backend. If not, is the Cura Engine Backend able to sending GCode directly without go over an API.

https://support.ultimaker.com/hc/en-us/articles/360012087619-Using-the-Ultimaker-APIs

The engine is not able to send g-code. It only generates it.

 

2 hours ago, jlavistory said:

Is the CURA Engine is able to blending some GCode for several pieces into a single one GCode ?

Nope

 

2 hours ago, jlavistory said:

If it exists a printer log file generated by  the printer somewhere, if Yes, How/Where  to get this printer log file.

There is an API endpoint for that.

Share this post


Link to post
Share on other sites
Posted · API Cura Engine and Firmware communication

A shame that https://support.ultimaker.com/hc/en-us/articles/360012087619-Using-the-Ultimaker-APIs misses some of the API's on the printer.


Each of the API's has a swagger based description and generated documentation on the printer,  we currently have 4 API's on the printer that I'm aware off:

  1. printer API - base URL http://<printer-ip>/api/v1/ - documentation in: http://<printer-ip>/docs/api/
    More info on the authentication on this: Auth is only needed to set data and start print-jobs, etc.
    Though if you only use the cluster API to queue/start print jobs then you will not need to do  authentication.
    The next ones have the base URL and documentation in the same place.
  2. cluster API: http://<printer-ip>/cluster-api/v1/
  3. material station API: http://<printer-ip>/material-station-api/v1/
    This one is only available when you have a material station attached.
  4. fault API: http://<printer-ip>/fault-api/v1/
    This shows any error/warning messages that may be blocking the screen of the printer.

the Cura questions I would trust @nallath on that.

  • Thanks 1

Share this post


Link to post
Share on other sites
Posted (edited) · API Cura Engine and Firmware communication
2 hours ago, robinmdh said:

A shame that https://support.ultimaker.com/hc/en-us/articles/360012087619-Using-the-Ultimaker-APIs misses some of the API's on the printer.


Each of the API's has a swagger based description and generated documentation on the printer,  we currently have 4 API's on the printer that I'm aware off:

  1. printer API - base URL http://<printer-ip>/api/v1/ - documentation in: http://<printer-ip>/docs/api/
    More info on the authentication on this: Auth is only needed to set data and start print-jobs, etc.
    Though if you only use the cluster API to queue/start print jobs then you will not need to do  authentication.
    The next ones have the base URL and documentation in the same place.
  2. cluster API: http://<printer-ip>/cluster-api/v1/
  3. material station API: http://<printer-ip>/material-station-api/v1/
    This one is only available when you have a material station attached.
  4. fault API: http://<printer-ip>/fault-api/v1/
    This shows any error/warning messages that may be blocking the screen of the printer.

the Cura questions I would trust @nallath on that.

So I take it that the material station is not accessible via the cluster? Will this ever be implemented in the future?

 

EDIT: I spoke too soon. I realized that within the printers endpoint that it returns the attached material station with material attributes.

Edited by alkekmakerspace
  • Thanks 1

Share this post


Link to post
Share on other sites
Posted (edited) · API Cura Engine and Firmware communication
16 hours ago, alkekmakerspace said:

So I take it that the material station is not accessible via the cluster? Will this ever be implemented in the future?

It is already implemented, the cluster API can(if a material station is connected) have a material station section in it's printers API which lists all the slots and copies most of that info from the aforementioned material station API.
As is documented in the cluster API interface http://<insert.your.printer.IP>/cluster-api/v1/#!/printers/list_printers it's in the example value but more obvious if you click model, just obove/next to that

 

The error API is also repeated in the cluster API, since everything that is shown in the digital factory(aka cluster, "cura connect" or "ultimaker connect")  has to be included in that API because of cross site scripting and page load speed considerations you wouldn't want to get this data from multiple printers in your network directly from the front-end.

On a side-note all those documentation pages are generated via swagger documentation which can be found at the documentation url/swagger.json or in the case of the printer api it's docs/api/api_documentation.json so if programming against these API's using the swagger file you can generate interface code automatically if you want. you can also paste them into editor.swagger.io which can give you a different visualization of the API.

You can use that same editor to check out the cloud API's  you canget the data here: https://api.ultimaker.com/cura/v1/spec and https://api.ultimaker.com/connect/v1/spec

 

Edited by robinmdh
added cloud API's

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

×
×
  • Create New...