SwissOpenEM / ScopeMArchiver

0 stars 0 forks source link

[Feature] Finalize API endpoint for Scicat to call #80

Closed phwissmann closed 2 months ago

phwissmann commented 3 months ago

Description Scicat needs to execute an URL action in order to notifiy the archiver backend about a new job. The flows need to fetch the dataset list of the respective jobs to create the subflows.

Solution proposals

Definition of Done Scicat can trigger archive and retrieve jobs on the archiver

phwissmann commented 2 months ago
phwissmann commented 2 months ago

Example Job templates:

 {
      "jobType": "archive",
      "create": {
        "auth": "#all",
        "actions": [
          {
            "actionType": "log"
          },
          {
            "actionType": "url",
            "url": "http://scopem-openem.ethz.ch/api/v1/jobs",
            "headers": {
              "accept": "application/json",
              "storage-volume": "test-lts-share"
            },
            "method": "POST",
            "body": {
              "type": "{{type}}",
              "id": "{{id}}"
            }
          }
        ]
      },
      "statusUpdate": {
        "auth": "#all"
      }
    },
    {
      "jobType": "retrieve",
      "create": {
        "auth": "#all",
        "actions": [
          {
            "actionType": "log"
          },
          {
            "actionType": "url",
            "method": "POST",
            "url": "http://scopem-openem.ethz.ch/api/v1/jobs",
            "headers": {
              "accept": "application/json",
              "storage-volume": "test-lts-share"
            },
            "body": {
              "type": "{{type}}",
              "id": "{{id}}"
            }
          }
        ]
      },
      "statusUpdate": {
        "auth": "#all"
      }
    },