You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@manifoldcf.apache.org by "Mcguinness, Cathal" <Ca...@fmr.com.INVALID> on 2016/12/20 13:43:25 UTC

Programmatic Operation - jobs POST

Hi Karl,
I am working with the programmatic operation api of MCF 2.5 and have come across 2 issues:


*         There is no field for Maximum recrawl interval in the job object

*         When I try an post a job which has an email notification stage, a HTTP Status 400 - Found an unexpected node type: 'stage_id'

Are these know issues?


Here is the notification section of the job JSON ( I have masked out the email details)
"notificationstage": {
      "stage_id": "0",
      "stage_connectionname": "NOTIFICATION",
      "stage_specification": {
        "to": {
          "_value_": "",
          "_attribute_value": "xxx@y.com"
        },
        "from": {
          "_value_": "",
          "_attribute_value": "xxx@y.com"
        },
        "subject": {
          "_value_": "",
          "_attribute_value": "NOTIFICATION"
        },
        "body": {
          "_value_": "",
          "_attribute_value": "This is a continuous job and should not be stopped outside scheduling window,"
        }
      }
    }

Re: Programmatic Operation - jobs POST

Posted by Karl Wright <da...@gmail.com>.
Hi Cathal,

Yes, you are right.  The output is incorrect and should not include a
stage_id field.  Ticket is CONNECTORS-1362.

Karl


On Tue, Dec 20, 2016 at 10:18 AM, Mcguinness, Cathal <
Cathal.Mcguinness@fmr.com.invalid> wrote:

> Hi  Karl,
> So what I have done is created a new job manually in UI, this job has a
> Notification stage.
> I have then used the programmatic operation api to GET  the job.
> I have then deleted the job manually in the UI.
> I then try to recreate the job using POST  with the JSON I got from the
> GET action (after removing the id field) but get the 400 error.
>
> The notificationstage does contain a stage_id field and this is causing
> the POST to fail.  Are you saying that stage_id should not appear under
> notificationstage?
>
> "notificationstage": {
>       "stage_id": "0",
>       "stage_connectionname": "NOTIFICATION",
>       "stage_specification": {
>         "finished": {
>           "_value_": "",
>           "to": {
>             "_value_": "",
>             "_attribute_value": ""
>           },
>           "from": {
>             "_value_": "",
>             "_attribute_value": ""
>           },
>           "subject": {
>             "_value_": "",
>             "_attribute_value": ""
>           },
>           "body": {
>             "_value_": "",
>             "_attribute_value": ""
>           }
>         },
>         "erroraborted": {
>           "_value_": "",
>           "to": {
>             "_value_": "",
>             "_attribute_value": ""
>           },
>           "from": {
>             "_value_": "",
>             "_attribute_value": ""
>           },
>           "subject": {
>             "_value_": "",
>             "_attribute_value": ""
>           },
>           "body": {
>             "_value_": "",
>             "_attribute_value": ""
>           }
>         },
>         "manualaborted": {
>           "_value_": "",
>           "to": {
>             "_value_": "",
>             "_attribute_value": ""
>           },
>           "from": {
>             "_value_": "",
>             "_attribute_value": ""
>           },
>           "subject": {
>             "_value_": "",
>             "_attribute_value": ""
>           },
>           "body": {
>             "_value_": "",
>             "_attribute_value": ""
>           }
>         },
>         "manualpaused": {
>           "_value_": "",
>           "to": {
>             "_value_": "",
>             "_attribute_value": ""
>           },
>           "from": {
>             "_value_": "",
>             "_attribute_value": ""
>           },
>           "subject": {
>             "_value_": "",
>             "_attribute_value": ""
>           },
>           "body": {
>             "_value_": "",
>             "_attribute_value": ""
>           }
>         },
>         "schedulepaused": {
>           "_value_": "",
>           "to": {
>             "_value_": "",
>             "_attribute_value": ""
>           },
>           "from": {
>             "_value_": "",
>             "_attribute_value": ""
>           },
>           "subject": {
>             "_value_": "",
>             "_attribute_value": ""
>           },
>           "body": {
>             "_value_": "",
>             "_attribute_value": ""
>           }
>         },
>         "restarted": {
>           "_value_": "",
>           "to": {
>             "_value_": "",
>             "_attribute_value": ""
>           },
>           "from": {
>             "_value_": "",
>             "_attribute_value": ""
>           },
>           "subject": {
>             "_value_": "",
>             "_attribute_value": ""
>           },
>           "body": {
>             "_value_": "",
>             "_attribute_value": ""
>           }
>         }
>       }
>     }
>
>
>
>
>
> Regards
> Cathal.
>
> -----Original Message-----
> From: Karl Wright [mailto:daddywri@gmail.com]
> Sent: 20 December 2016 3:06
> To: dev
> Subject: Re: Programmatic Operation - jobs POST
>
> Hi Cathal,
>
> First of all, notification connections do not have pipeline stages --
> they're present for the job as a whole, not for any specific sequence of
> activity within the job.  That's why "stage_id" is not meaningful for
> them.  There are only three notification stage JSON fields that are
> meaningful: stageconnectionname, stagedescription, and stagespecification.
>
> Second, it looks like "max interval" was indeed overlooked. I will create a
> ticket to add that in and will try to get it done for 2.6.
>
> Thanks,
> Karl
>
>
> On Tue, Dec 20, 2016 at 8:43 AM, Mcguinness, Cathal <
> Cathal.Mcguinness@fmr.com.invalid> wrote:
>
> > Hi Karl,
> > I am working with the programmatic operation api of MCF 2.5 and have come
> > across 2 issues:
> >
> >
> > *         There is no field for Maximum recrawl interval in the job
> object
> >
> > *         When I try an post a job which has an email notification stage,
> > a HTTP Status 400 - Found an unexpected node type: 'stage_id'
> >
> > Are these know issues?
> >
> >
> > Here is the notification section of the job JSON ( I have masked out the
> > email details)
> > "notificationstage": {
> >       "stage_id": "0",
> >       "stage_connectionname": "NOTIFICATION",
> >       "stage_specification": {
> >         "to": {
> >           "_value_": "",
> >           "_attribute_value": "xxx@y.com"
> >         },
> >         "from": {
> >           "_value_": "",
> >           "_attribute_value": "xxx@y.com"
> >         },
> >         "subject": {
> >           "_value_": "",
> >           "_attribute_value": "NOTIFICATION"
> >         },
> >         "body": {
> >           "_value_": "",
> >           "_attribute_value": "This is a continuous job and should not be
> > stopped outside scheduling window,"
> >         }
> >       }
> >     }
> >
>

RE: Programmatic Operation - jobs POST

Posted by "Mcguinness, Cathal" <Ca...@fmr.com.INVALID>.
Hi  Karl,
So what I have done is created a new job manually in UI, this job has a Notification stage.
I have then used the programmatic operation api to GET  the job. 
I have then deleted the job manually in the UI. 
I then try to recreate the job using POST  with the JSON I got from the GET action (after removing the id field) but get the 400 error. 

The notificationstage does contain a stage_id field and this is causing the POST to fail.  Are you saying that stage_id should not appear under notificationstage?

"notificationstage": {
      "stage_id": "0",
      "stage_connectionname": "NOTIFICATION",
      "stage_specification": {
        "finished": {
          "_value_": "",
          "to": {
            "_value_": "",
            "_attribute_value": ""
          },
          "from": {
            "_value_": "",
            "_attribute_value": ""
          },
          "subject": {
            "_value_": "",
            "_attribute_value": ""
          },
          "body": {
            "_value_": "",
            "_attribute_value": ""
          }
        },
        "erroraborted": {
          "_value_": "",
          "to": {
            "_value_": "",
            "_attribute_value": ""
          },
          "from": {
            "_value_": "",
            "_attribute_value": ""
          },
          "subject": {
            "_value_": "",
            "_attribute_value": ""
          },
          "body": {
            "_value_": "",
            "_attribute_value": ""
          }
        },
        "manualaborted": {
          "_value_": "",
          "to": {
            "_value_": "",
            "_attribute_value": ""
          },
          "from": {
            "_value_": "",
            "_attribute_value": ""
          },
          "subject": {
            "_value_": "",
            "_attribute_value": ""
          },
          "body": {
            "_value_": "",
            "_attribute_value": ""
          }
        },
        "manualpaused": {
          "_value_": "",
          "to": {
            "_value_": "",
            "_attribute_value": ""
          },
          "from": {
            "_value_": "",
            "_attribute_value": ""
          },
          "subject": {
            "_value_": "",
            "_attribute_value": ""
          },
          "body": {
            "_value_": "",
            "_attribute_value": ""
          }
        },
        "schedulepaused": {
          "_value_": "",
          "to": {
            "_value_": "",
            "_attribute_value": ""
          },
          "from": {
            "_value_": "",
            "_attribute_value": ""
          },
          "subject": {
            "_value_": "",
            "_attribute_value": ""
          },
          "body": {
            "_value_": "",
            "_attribute_value": ""
          }
        },
        "restarted": {
          "_value_": "",
          "to": {
            "_value_": "",
            "_attribute_value": ""
          },
          "from": {
            "_value_": "",
            "_attribute_value": ""
          },
          "subject": {
            "_value_": "",
            "_attribute_value": ""
          },
          "body": {
            "_value_": "",
            "_attribute_value": ""
          }
        }
      }
    }





Regards
Cathal.

-----Original Message-----
From: Karl Wright [mailto:daddywri@gmail.com] 
Sent: 20 December 2016 3:06
To: dev
Subject: Re: Programmatic Operation - jobs POST

Hi Cathal,

First of all, notification connections do not have pipeline stages --
they're present for the job as a whole, not for any specific sequence of
activity within the job.  That's why "stage_id" is not meaningful for
them.  There are only three notification stage JSON fields that are
meaningful: stageconnectionname, stagedescription, and stagespecification.

Second, it looks like "max interval" was indeed overlooked. I will create a
ticket to add that in and will try to get it done for 2.6.

Thanks,
Karl


On Tue, Dec 20, 2016 at 8:43 AM, Mcguinness, Cathal <
Cathal.Mcguinness@fmr.com.invalid> wrote:

> Hi Karl,
> I am working with the programmatic operation api of MCF 2.5 and have come
> across 2 issues:
>
>
> *         There is no field for Maximum recrawl interval in the job object
>
> *         When I try an post a job which has an email notification stage,
> a HTTP Status 400 - Found an unexpected node type: 'stage_id'
>
> Are these know issues?
>
>
> Here is the notification section of the job JSON ( I have masked out the
> email details)
> "notificationstage": {
>       "stage_id": "0",
>       "stage_connectionname": "NOTIFICATION",
>       "stage_specification": {
>         "to": {
>           "_value_": "",
>           "_attribute_value": "xxx@y.com"
>         },
>         "from": {
>           "_value_": "",
>           "_attribute_value": "xxx@y.com"
>         },
>         "subject": {
>           "_value_": "",
>           "_attribute_value": "NOTIFICATION"
>         },
>         "body": {
>           "_value_": "",
>           "_attribute_value": "This is a continuous job and should not be
> stopped outside scheduling window,"
>         }
>       }
>     }
>

Re: Programmatic Operation - jobs POST

Posted by Karl Wright <da...@gmail.com>.
CONNECTORS-1361 has a patch.

Karl


On Tue, Dec 20, 2016 at 10:05 AM, Karl Wright <da...@gmail.com> wrote:

> Hi Cathal,
>
> First of all, notification connections do not have pipeline stages --
> they're present for the job as a whole, not for any specific sequence of
> activity within the job.  That's why "stage_id" is not meaningful for
> them.  There are only three notification stage JSON fields that are
> meaningful: stageconnectionname, stagedescription, and stagespecification.
>
> Second, it looks like "max interval" was indeed overlooked. I will create
> a ticket to add that in and will try to get it done for 2.6.
>
> Thanks,
> Karl
>
>
> On Tue, Dec 20, 2016 at 8:43 AM, Mcguinness, Cathal <
> Cathal.Mcguinness@fmr.com.invalid> wrote:
>
>> Hi Karl,
>> I am working with the programmatic operation api of MCF 2.5 and have come
>> across 2 issues:
>>
>>
>> *         There is no field for Maximum recrawl interval in the job object
>>
>> *         When I try an post a job which has an email notification stage,
>> a HTTP Status 400 - Found an unexpected node type: 'stage_id'
>>
>> Are these know issues?
>>
>>
>> Here is the notification section of the job JSON ( I have masked out the
>> email details)
>> "notificationstage": {
>>       "stage_id": "0",
>>       "stage_connectionname": "NOTIFICATION",
>>       "stage_specification": {
>>         "to": {
>>           "_value_": "",
>>           "_attribute_value": "xxx@y.com"
>>         },
>>         "from": {
>>           "_value_": "",
>>           "_attribute_value": "xxx@y.com"
>>         },
>>         "subject": {
>>           "_value_": "",
>>           "_attribute_value": "NOTIFICATION"
>>         },
>>         "body": {
>>           "_value_": "",
>>           "_attribute_value": "This is a continuous job and should not be
>> stopped outside scheduling window,"
>>         }
>>       }
>>     }
>>
>
>

Re: Programmatic Operation - jobs POST

Posted by Karl Wright <da...@gmail.com>.
Hi Cathal,

First of all, notification connections do not have pipeline stages --
they're present for the job as a whole, not for any specific sequence of
activity within the job.  That's why "stage_id" is not meaningful for
them.  There are only three notification stage JSON fields that are
meaningful: stageconnectionname, stagedescription, and stagespecification.

Second, it looks like "max interval" was indeed overlooked. I will create a
ticket to add that in and will try to get it done for 2.6.

Thanks,
Karl


On Tue, Dec 20, 2016 at 8:43 AM, Mcguinness, Cathal <
Cathal.Mcguinness@fmr.com.invalid> wrote:

> Hi Karl,
> I am working with the programmatic operation api of MCF 2.5 and have come
> across 2 issues:
>
>
> *         There is no field for Maximum recrawl interval in the job object
>
> *         When I try an post a job which has an email notification stage,
> a HTTP Status 400 - Found an unexpected node type: 'stage_id'
>
> Are these know issues?
>
>
> Here is the notification section of the job JSON ( I have masked out the
> email details)
> "notificationstage": {
>       "stage_id": "0",
>       "stage_connectionname": "NOTIFICATION",
>       "stage_specification": {
>         "to": {
>           "_value_": "",
>           "_attribute_value": "xxx@y.com"
>         },
>         "from": {
>           "_value_": "",
>           "_attribute_value": "xxx@y.com"
>         },
>         "subject": {
>           "_value_": "",
>           "_attribute_value": "NOTIFICATION"
>         },
>         "body": {
>           "_value_": "",
>           "_attribute_value": "This is a continuous job and should not be
> stopped outside scheduling window,"
>         }
>       }
>     }
>