Connect Ignition to a web datasource through its API

I am looking to connect a dashboard in Ignition to the MaintainX CMMS system through its API (MaintainX – Rest API v1). I would assume I would need to create a driver in Ignition to connect?
I already have the connection setup in Power Query (Here is a sample of the code)

let
Source = Csv.Document(
Web.Contents(
"https://app.getmaintainx.com/api/rest/v1/workorders/workorders.csv",
[Headers = [Authorization = "Bearer " & Token]]
),
[Delimiter = ",", Encoding = 65001, QuoteStyle = QuoteStyle.Csv]
),
#"WorkOrders Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars = true]),
#"WorkOrders Change Type" = Table.TransformColumnTypes(
#"WorkOrders Promoted Headers",
{
{"ID", Int64.Type},
{"Title", type text},
{"Status", type text},
{"Priority", type text},
{"Description", type text},
{"URL", type text},
{"Global ID", Int64.Type},
{"Assigned to", type text},
{"Teams Assigned to", type text},
{"Requested by", type text},
{"Requested on", type datetime},
{"Created by", type text},
{"Created on", type datetime} ......

Can anyone help ?

You might be able to get what you need with an HTTP binding:
HTTP Bindings in Perspective - Ignition User Manual 8.1 - Ignition Documentation, if you're using Perspective.

Or, for more control, you can use system.net.httpClient:
https://docs.inductiveautomation.com/display/DOC81/system.net.httpClient

Thank you for your response Paul. We don't have a resource to achieve this. Is this something we could contract for ?

That's up to you. If you contact our Sales team, they'll probably be able to recommend you some integrators.

Thanks Paul. We have Vision but not Perspective.
Is a driver created by using system.net.httpClient or are the objects put directly into a Project?
Thanks again for your help

If you only have Vision then you'll most likely need to use the more control option.

1 Like

'Driver' is typically used in Ignition to refer to a device driver, e.g. a source of tags.

There's no generic way to do that for an arbitrary HTTP service. So if you want the results of your API call to be written out to tags for use elsewhere in the system, the only way to do that currently is with scripting.
If you truly want a 'device driver', you will need a custom module developed using our SDK. That requires a significant amount of engineering time from someone well versed in Java - scripting will be much more approachable.

2 Likes