197033227d43475194acf9eca16.../README.md
2025-06-25 13:06:12 +00:00

2.0 KiB

Creation of an ILI report

A function that will create a ILI report asset and sequence.

Input

Arguments

  • org_id: as string which should be a valid uuid for the organization
  • project_id: the id of the data project where the pipeline data is found
  • pipeline_id: a array each item of which should be a valid uuid for a pipeline.
  • date: a string formatted as an ISO date representing the date of the inspection.
  • vendor_name: a string the company who conducted the ILI inspection
  • report_type: a string the type of the report possible values:
    • final
    • preliminary
  • inspection_type: a string the type of technology used possible values:
    • mfl
    • tfi
    • ut
    • emat
    • caliper
    • combo_mfl_and_tfi
    • combo_mfl_and_ut
    • combo_mfl_and_ec
  • file_details: a array of file detail objects
  • wall_thickness_source: optional string to configure the wall source in the ILI report calculations
  • pipebody_tolerances: an object representing the tolerances for the pipebody
  • haz_tolerances: an object representing the tolerances for the heat affected zone (HAZ)

Creating the function on the platform

To create this function on the platform using the cli set up the port forwarding as shown in README.

Then run the following command to create the function.

cargo run functions create \
  -f functions/ili_creation \
  -d "Processes an ILI file and create the sequences and assets associated with that report" \
  -i org_id=string \
  -i project_id=string \
  -i pipeline_id=string \
  -i date=string \
  -i vendor_name=string \
  -i report_type=string \
  -i wall_thickness_source=string \
  -i inspection_type=string \
  -i file_details=object \
  -i pipebody_tolerances=object \
  -i haz_tolerances=object

Testing the function locally

You can run and test the function locally by running

cargo run

Then you can check it work with curl as follows

jq '. | tojson' functions/ili_creation/example_input.json | curl -d '@-' localhost:8080