[Iplant-api-dev] what's wrong with this notifications block?

Khalfan, Mohammed mkhalfan at cshl.edu
Mon Dec 9 10:17:09 MST 2013


Hi Rion,

I am still having difficulties. I am now using the sample on bitbucket to guide me. Here is my error and json below. Please help me with this I have been trying to get this working for days! Thank you.

Array
(
    [status] => error
    [message] => Failed to parse json input. Invalid value for notifications.
    [version] => 2.1.8-SNAPSHOT-r${buildNumber}
)


{
                "jobName": "job-12",
                "softwareName": "wca-1.00",
                "processorCount": 1,
                "requestedTime": "00:05:00",
                "maxMemory": 1,
                "archive": true,
                "archivePath": "/dnalc_testuser/apiv2log/job-12",
                "inputs": {
                                "query1": "/dnalc_testuser/words.txt"
                },
                "notifications" : [
                                 {
                                                 "url" : "https://genepro.cshl.edu/v2/callback.php?api_job_id=${JOB_ID}&status=${JOB_STATUS}",
                                                "event" : "QUEUED",
                                                 "persistent": true
                                  }, {
                                                "url" : "https://genepro.cshl.edu/v2/callback.php?api_job_id=${JOB_ID}&status=${JOB_STATUS}",
                                                "event" : "RUNNING",
                                               "persistent": true
                                }, {
                                                "url" : "https://genepro.cshl.edu/v2/callback.php?api_job_id=${JOB_ID}&status=${JOB_STATUS}",
                                                 "event" : "FINISHED",
                                                "persistent": true
                                }
                ]

}

From: Rion Dooley [mailto:dooley at tacc.utexas.edu]
Sent: Saturday, December 07, 2013 2:18 PM
To: Khalfan, Mohammed
Cc: iPlant API Developers Mailing List
Subject: Re: [Iplant-api-dev] what's wrong with this notifications block?

Good catch. I updated the dev site job management page to match the example on the quick start job submission page and the https://bitbucket.org/taccaci/agave-samples project. The notifications objects should have "url", "event", and an options "persistent" field stating whether the notification should remain active for reuse after it fires the first time.


--
Rion



On Dec 7, 2013, at 1:01 PM, Khalfan, Mohammed <mkhalfan at cshl.edu<mailto:mkhalfan at cshl.edu>> wrote:


Hi,

Can you please tell me what is wrong with this JSON for my job request?



It seems to not like the notifications block. As far as I can see, i'm using the same style as what is shown here: http://agaveapi.co/job-management/



I ran it through my JSON validator, I am getting an error at line 12 (notifications), but I get this same error using the sample code from the link above. I'm not sure where the problem is. Here is my JSON:



{
   "jobName": "job-2",
   "softwareName": "wca-1.00",
   "processorCount": 1,
   "requestedTime": "00:05:00",
   "maxMemory": 1,
   "archive": true,
   "archivePath": "/dnalc_testuser/apiv2log/job-2",
   "inputs": {
       "query1": "/dnalc_testuser/words.txt"
   },
   "notifications" : {
       {
           "url" : "https://genepro.cshl.edu/v2/callback.php?api_job_id=${JOB_ID}&status=${JOB_STATUS}<https://genepro.cshl.edu/v2/callback.php?api_job_id=$%7bJOB_ID%7d&status=$%7bJOB_STATUS%7d>",
           "trigger" : "QUEUED"
       }, {
           "url" : "https://genepro.cshl.edu/v2/callback.php?api_job_id=${JOB_ID}&status=${JOB_STATUS}<https://genepro.cshl.edu/v2/callback.php?api_job_id=$%7bJOB_ID%7d&status=$%7bJOB_STATUS%7d>",
           "trigger" : "RUNNING"
       }, {
           "url" : "https://genepro.cshl.edu/v2/callback.php?api_job_id=${JOB_ID}&status=${JOB_STATUS}<https://genepro.cshl.edu/v2/callback.php?api_job_id=$%7bJOB_ID%7d&status=$%7bJOB_STATUS%7d>",
           "trigger" : "FINISHED"
       }
   }
}



If I remove the notifications block, the job submits successfully.



Thank you,

Mohammed

_______________________________________________
Iplant-api-dev Mailing List: Iplant-api-dev at iplantcollaborative.org<mailto:Iplant-api-dev at iplantcollaborative.org>
List Info and Archives: http://mail.iplantcollaborative.org/mailman/listinfo/iplant-api-dev
One-click Unsubscribe: http://mail.iplantcollaborative.org/mailman/options/iplant-api-dev/dooley%40tacc.utexas.edu?unsub=1&unsubconfirm=1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iplantcollaborative.org/pipermail/iplant-api-dev/attachments/20131209/74b20702/attachment.html 


More information about the Iplant-api-dev mailing list