Logbook-query: REST API using Power BI - j5 - 28.0 - Reference - Hexagon

j5 Framework IndustraForm API Reference

Language
English
Product
j5
Search by Category
Reference
j5 Version
2019

To process your query's data in Power BI, you'll need to return it in csv format (rather than json). To do this, create a new advanced web datasource in Power BI with the following HTTPS request header parameter:

Accept text/csv

You are prompted for your j5 user name and password the first time you run the query.

  • It is not possible to get the last modified datetime for a whole IndustraForm, the function only works for a specific cell. If you want to return this information using the REST API, you'll need to retrieve it within the IndustrForm (as a hidden cell) and then pull that cell.

  • It is not possible to get the datetime a section was submitted or the user who did the submission.

  • If you query for fields, then the API only returns data from IndustraForms that have those fields. You can use the .IsDefined syntax to check for whether fields are present, and if this is present then the data includes IndustraForms that don’t have those fields.

  • There are no specific timeouts for this API, although the Apache load balancer times out after 5 minutes, by default. This is configurable via the j5 System Management Console, refer to Apache proxy timeout for details.

Example queries

  1. Retrieves the Permit Titles and Permit No of all the permits stored on the j5 Enterprise demo site.

    https://[j5 Server URL]/restserver/28.0/industraform/logbook-query/permits?attribute_names=Text2,PermitNo

  2. Returns the Permit No and the number of sections waiting for submission for all of the permits on the j5 Enterprise demo site.

    https://[j5 Server URL]/restserver/28.0/industraform/logbook-query/permits?attribute_names=PermitNo,$Form.SectionsWaitingForSubmission

  3. As above, but limiting the number of records to 4.

    https://[j5 Server URL]/restserver/28.0/industraform/logbook-query/permits?attribute_names=PermitNo,$Form.SectionsWaitingForSubmission&limit=4

  4. Fetches the Status of all the Work Overview records that have a Start Time between 2019-09-01 and 2019-09-12

    https://[j5 Server URL]/restserver/28.0/industraform/logbook-query/work_overview?attribute_names=status&pretty=true&from_date_time=2019-09-01T00:00:00Z&to_date_time=2019-09-12T00:00:00Z

When you have a query that returns the data you need, you can use Power BI to manipulate it into a different format, which allows you to produce the report that you need. For example, you can convert the data returned by the first example query above into a count of the different permit types and produce the graph below: