Skip to main content
Open

Rest API response update

Related products:FME Flow
danilo_fme
warrendev
vxn43
gboquin
  • danilo_fme
    danilo_fme
  • warrendev
    warrendev
  • vxn43
    vxn43
  • gboquin
    gboquin

gboquin
Contributor

Can you update the API call to enable us to see who ran a job? I am trying to better support my users but I would like to be able to include the user that ran the automation into  an email that I receive when a job fails.

2 replies

rylanatsafe
Safer
Forum|alt.badge.img+13

@gboquin depending on how you have your workflow setup to send the email, you can leverage the Flow REST API endpoint that supplies this information.

 

In the V4 Flow API, the /jobs endpoint will return runtimeUserName. You can apply sourceType=automations to help filter the results or use sourceID=<Automation UID> for the specific Automation. The Job id is also returned to help with filtering the response if that is available to you.

In the V3 Flow API, /transformations/jobs/completed will provide the same information (and filtering options), though the value is more difficult to parse as runtimeUserName is nested in the response—see documentation for details. An example snippet is below:

"request": {

        "NMDirectives": {

          "directives": [

            { "name": "input_notification",

              "value": "{\"source\":\"schedule\",\"time\":\"2024-04-01T17:53:58Z\",\"runtimeUserName\”:\”<username>\”}”

 

It is definitely easier when using the V4 /jobs endpoint! I’m not sure if it is feasible in your current workflow—so any more information how you are constructing the email body could be helpful.

Hope this helps.


LizAtSafe
Safer
Forum|alt.badge.img+15
  • Safer
  • July 16, 2024
NewOpen

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings