CombineArchiveWeb

Web interface to create/modify/share CombineArchives -- see also https://github.com/binfalse/CombineArchive

View the Project on GitHub

CombineArchive Web API

The WebInterface exposes a lot of RESTful APIs. Mostly designed for internal purpose, are they also available for 3rd party developers. This document describes these interfaces, without any warranty to be up-to-date.

In the following, http://cat.web/ is used as an example base URL of CombineArchive Web.

Import and Share API

The share and import API allows the user to use simple links to share a workspace or import an archive form another webserver.

Import an archive

To import a CombineArchive from a remote location, the user simple has to call following URL. In case of an error the web interface will show a simple text hint, otherwise the user gets redirected to his workspace.

http://cat.web/rest/import?remote=REMOTEURL&name=NAME&type=TYPE

Possible types:

Advanced Import

It is also possible to POST a json String to the end point, to utelize more advanced import features. Whereby the endpoint URL is the same, the /Content-Type should be either application/json or multipart/form-data. When using the multipart request it is also possible to upload an archive as well as files, which should be packed into the !CombineArchive. However it is mandatory to send a json string following these pattern:

{
  "archiveName" : "Advanced POST Import Test",
  "ownVCard" : true,
  /* "type" : "http", */
  /* "remoteUrl" : "http://taylor.informatik.uni-rostock.de/blubb3.omex", */
  "vcard" : {
    "familyName" : "Test",
    "givenName" : "Test",
    "email" : "test@example.org",
    "organization" : "Uni Rostock"
  },
  "additionalFiles" : [
    {
      "remoteUrl" : "post://optimus.jpg",
      "archivePath" : "test/optimus.jpg",
      "fileFormat" : "http://purl.org/NET/mediatypes/image/jpeg",
      "metaData" : [
        {
          "type" : "omex",
          "creators" : [],
          "created" : "2020-09-30T00:00:00.000+0000",
          "modified" : ["2020-09-30T00:01:00.000+0000", "2020-09-30T02:00:00.000+0000"],
          "description" : "meta test"
        }
      ]
    },
    {
      "remoteUrl" : "http://localhost/octopus.svg",
      "archivePath" : "test/octo.svg",
      "metaData" : [
        {
          "type" : "omex",
          "creators" : [{
            "familyName" : "Wurst",
            "givenName" : "Hans",
            "email" : "hanswurst@example.org",
            "organization" : "TU Wurststadt"
          }],
          "created" : "2020-09-30T00:00:00.000+0000",
          "modified" : ["2020-09-30T00:01:00.000+0000", "2020-09-30T02:00:00.000+0000"],
          "description" : "beer rules"
        }
      ]
    }
  ]
}

In case of a multipart request following naming scheme is expected:

Root Fields
"vcard" : {
  "familyName" : "Test",
  "givenName" : "Test",
  "email" : "test@example.org",
  "organization" : "Uni Rostock"
}

additionalFiles: List of files, to be added to the archive.

additionalFiles Fields
metaData Fields
omex metaData Fields

Sharing a workspace

The sharing URL enables user to share workspaces with colleagues and is always shown at the start page for the current active workspace.

http://cat.web/rest/share/WORKSPACE-ID

REST Interfaces

TODO Meanwhile take a look into RestApi.java