REST API - j5 - 30 - Reference - Hexagon

j5 Framework IndustraForm API Reference

Language
English
Product
j5
Search by Category
Reference
j5 Version
30

IndustraForm entries are always linked to a logbook form entry. The IndustraForm REST API provides a method to query a logbook for data in associated IndustraForm entries over HTTP.

The logbook-query and logbook-query-v2 methods provide a logbook name, a list of attribute names, and optionally, date/time or area filters. It returns a list of results with the values of the requested attributes for their matching entries.

The logbook-query method can return a maximum number of 1000 results, while the logbook-query-v2 method can return any number of results.

curl -X GET "https://[j5 Server URL]/restserver/30/industraform/logbook-query-v2/linked_industraforms_eg

?attribute_names=EntryNumber,ResponsiblePerson,Priority,StartedTime,DueDate,EstimatedDuration,

EstimatedEndDate&pretty=true" -H "accept: application/json" -H

"authorization: Basic [Base 64 encoded username and password]"

json

{

"values": [

{

"ResponsiblePerson": "johns",

"EntryNumber": "EG1",

"EstimatedEndDate": "2020-07-01",

"StartedTime": "2020-06-29T10:19:18Z",

"Priority": "High",

"DueDate": "2020-06-30T22:00:00Z",

"EstimatedDuration": 2.0

},

{

"ResponsiblePerson": "jamesr",

"EntryNumber": "EG2",

"EstimatedEndDate": "2020-07-03",

"StartedTime": "2020-06-30T10:23:59Z",

"Priority": null,

"DueDate": "2020-07-06T22:00:00Z",

"EstimatedDuration": 3.0

}

]

}

The URL for accessing the method is http(s)://<j5server[:port]>/restserver/<j5_version>/industraform/logbook-query (or logbook-query-v2)/<logbook_name>. Please use the HTTP GET method and the HTTP Basic Authentication to provide credentials. The logbook name parameter is included in the URL, and all of the other parameters are provided as URL query components.

When filtering by time, the REST API filters against the primary_time_field, which varies from logbook to logbook. It defaults to start_time in Ops Bundle and valid_start in CoW. It can be overidden in the logbook.yml, but each logbook can only be filtered by one time field.

There is also a set of attributes that give information about an IndustraForm instance as a whole. They are queried using the attribute name "$Form.<FormAttribute>".

If the data for an attribute is stored as a code/hash in the database, and is displayed differently in the user interface, you can retrieve the user interface version by using DisplayValue.