Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.11 KB | None | 0 0
  1. >>> import requests
  2. >>> params = {
  3. ...   "files": [
  4. ...     "olci:s3a_ol_1_err___/2018/06/01/S3A_OL_1_ERR____20180601T064243_20180601T072709_20180602T120605_2666_032_006______LN1_O_NT_002.SEN3",
  5. ...     "olci:s3a_ol_1_err___/2018/06/01/S3A_OL_1_ERR____20180601T082342_20180601T090808_20180602T134158_2666_032_007______LN1_O_NT_002.SEN3",
  6. ...     "olci:s3a_ol_1_err___/2018/06/02/S3A_OL_1_ERR____20180602T061630_20180602T070055_20180603T112456_2665_032_020______LN1_O_NT_002.SEN3",
  7. ...     "olci:s3a_ol_1_err___/2018/06/02/S3A_OL_1_ERR____20180602T075729_20180602T084155_20180603T130328_2666_032_021______LN1_O_NT_002.SEN3",
  8. ...     "olci:s3a_ol_1_err___/2018/06/03/S3A_OL_1_ERR____20180603T073116_20180603T081541_20180604T131030_2665_032_035______LN1_O_NT_002.SEN3",
  9. ...     "olci:s3a_ol_1_err___/2018/06/04/S3A_OL_1_ERR____20180604T070502_20180604T074928_20180605T113904_2666_032_049______LN1_O_NT_002.SEN3",
  10. ...     "olci:s3a_ol_1_err___/2018/06/04/S3A_OL_1_ERR____20180604T084601_20180604T093027_20180605T132217_2666_032_050______LN1_O_NT_002.SEN3",
  11. ...     "olci:s3a_ol_1_err___/2018/06/05/S3A_OL_1_ERR____20180605T063849_20180605T072315_20180606T105941_2666_032_063______LN1_O_NT_002.SEN3",
  12. ...     "olci:s3a_ol_1_err___/2018/06/05/S3A_OL_1_ERR____20180605T081949_20180605T090414_20180606T124642_2665_032_064______LN1_O_NT_002.SEN3",
  13. ...     "olci:s3a_ol_1_err___/2018/06/06/S3A_OL_1_ERR____20180606T061237_20180606T065702_20180607T102126_2665_032_077______LN1_O_NT_002.SEN3",
  14. ...     "olci:s3a_ol_1_err___/2018/06/06/S3A_OL_1_ERR____20180606T075336_20180606T083801_20180607T120703_2665_032_078______LN1_O_NT_002.SEN3",
  15. ...     "olci:s3a_ol_1_err___/2018/06/07/S3A_OL_1_ERR____20180607T072723_20180607T081149_20180608T112750_2666_032_092______LN1_O_NT_002.SEN3",
  16. ...     "olci:s3a_ol_1_err___/2018/06/08/S3A_OL_1_ERR____20180608T070110_20180608T074536_20180609T122155_2666_032_106______LN1_O_NT_002.SEN3",
  17. ...     "olci:s3a_ol_1_err___/2018/06/08/S3A_OL_1_ERR____20180608T084209_20180608T090412_20180609T125843_1322_032_107______LN1_O_NT_002.SEN3",
  18. ...     "olci:s3a_ol_1_err___/2018/06/09/S3A_OL_1_ERR____20180609T063458_20180609T071923_20180610T114323_2665_032_120______LN1_O_NT_002.SEN3",
  19. ...     "olci:s3a_ol_1_err___/2018/06/09/S3A_OL_1_ERR____20180609T081557_20180609T090022_20180610T132208_2665_032_121______LN1_O_NT_002.SEN3"
  20. ...   ],
  21. ...   "resolution": 0.1,
  22. ...   "projection": "latlon",
  23. ...   "boundingbox": [
  24. ...     -5.1,
  25. ...     31.2,
  26. ...     -13.3,
  27. ...     39.4
  28. ...   ],
  29. ...   "timerange": [
  30. ...     "2018-06-01T00:00:00",
  31. ...     "2018-06-04T00:00:00",
  32. ...     "2018-06-08T00:00:00",
  33. ...     "2018-06-12T00:00:00"
  34. ...   ]
  35. ... }
  36. >>> job = requests.post("https://amida-sth.apps.openshift.grasp-cloud.com/api/submit", json=params, auth=("xxx", "xxx")).json()
  37. >>> job
  38. {'uuid': 'd6d72c8d-7e06-4de3-a91e-997deba50330'}
  39. >>> status = requests.get("https://amida-sth.apps.openshift.grasp-cloud.com/api/status/" + job["uuid"], auth=("xxx", "xxx")).json()
  40. >>> status
  41. {'uuid': 'd6d72c8d-7e06-4de3-a91e-997deba50330', 'start': '2019-11-13T10:31:10.033612', 'end': '2019-11-13T10:31:57.134713', 'status': 'finished', 'progress': 0.0}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement