[Iplant-api-dev] what's wrong with this notifications block?
Rion Dooley
dooley at tacc.utexas.edu
Mon Dec 9 12:08:47 MST 2013
Hi Mohammed,
I think you’re still trying to call the api on the iplant-dev box, which is not where you should be pointing. If you’re using the cli, please make sure you are on the 2.0.0 branch. Just in case you were not, I went ahead and merged the 2.0.0 branch back into the master branch so you can’t check out the wrong version anymore.
The reason I think this is probably what’s happening because when I request a list of apps and systems from Agave for you, I get back no apps and no execution systems. I think you were just working against the wrong server.
$> apps-list -V
Calling curl -sk -H "Authorization: Bearer sadflkajsdf98sa7df98as7dfa" https://agave.iplantc.org/apps/2.0/?pretty=true
{
"status" : "success",
"message" : null,
"version" : "2.0.0-SNAPSHOT-rf64a967",
"result" : [ ]
}
$> systems-list -V
Calling curl -sk -H "Authorization: Bearer sadflkajsdf98sa7df98as7dfa" https://agave.iplantc.org/systems/2.0/?type=execution&pretty=true
{
"status" : "success",
"message" : null,
"version" : "2.0.0-SNAPSHOT-rf64a967",
"result" : [ ]
}
--
Rion
On Dec 9, 2013, at 11:17 AM, Khalfan, Mohammed <mkhalfan at cshl.edu<mailto:mkhalfan at cshl.edu>> wrote:
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/ceb3d5a8/attachment-0001.html
More information about the Iplant-api-dev
mailing list