Collection Operations

Add Collection

  • Request: POST https://host:port/ace-am/rest/collection
  • Request Body: XML or JSON

    {
    "digestAlgorithm":"SHA-256",
    "directory":"/export/gluster/chronopolis/sio-gdc/SSDB",
    "group":"sio-gdc",
    "name":"SSDB",
    "settings":{"proxy.data":"false",
    			"email.recipients":"thatslackemail@ucsd.edu",
    			"audit.period":"182",
    			"audit.tokens":"true"},
    "storage":"local"
    }
  • Response: 200 (on success), 500 (server error), 400 (bad request - duplicate collection)

  • Response Body: JSON

    { "id": 14 }

Modify Collection

  • Request: POST https://host:port/ace-am/rest/collection/modify/{id}
    • id - The identifier of the collection
  • Request Body: JSON

    Collection modify
    {
    "digestAlgorithm":"SHA-256",
    "directory":"/export/gluster/chronopolis/sio-gdc/SSDB-irods",
    "group":"sio-gdc-irods",
    "name":"SSDB",
    "settings":{"proxy.data": "true",
    			"email.recipients": "updatedslackemail@ucsd.edu",
    			"audit.period": "181",
    			"audit.tokens": "true"},
    "storage":"irods"
    }
  • Response: 200 (on success), 400 (bad request)
  • Response Body: None


Audit Collection

  • Request: POST https://host:port/ace-am/rest/collection/audit/{id}
    • id - The identifier of the collection
  • Request Body: None
  • Response: 200 (on success)
  • Response Body: None


Get Collection

  • Request: GET https://host:port/ace-am/rest/collection/settings/by-id/{id}
  • Request: GET https://host:port/ace-am/rest/collection/settings/by-name/{name}
  • Request: GET https://host:port/ace-am/rest/collection/settings/by-name/{name}/{group}
    • id - The identifier of the collection
    • name - The name of the collection
    • group - The group of the collection. If not included, no group will be used
  • Response: 200 (on success)
  • Response Body: JSON

    {
    "digestAlgorithm":"SHA-256",
    "directory":"/export/gluster/chronopolis/acadis/acadis_datasets_01-31-2013",
    "group":"acadis",
    "id":"111",
    "lastSync":"2015-08-13T15:46:03-04:00",
    "name":"acadis_datasets_01-31-2013",
    "settings":{"audit.tokens":"true",
    			"audit.period":"182",
    			"proxy.data":"false"},
    "state":"65",
    "storage":"local"}
Discovery Operations

List Groups

  • Request: GET https://host:port/ace-am/rest/groups
  • Response: 200 (on success)
  • Response Body: JSON

    ["rci-baru","ncar-lib","cdl","sio-gdc","ncstate","cadis","acadis","rci-wagner","rci-siogeocoll","duracloud_statenorthcarolina","chronopolis","rci-annese","ucsd-lib","ncar","ucsdtest"]

List Collection In A Group

  • Request: GET https://host:port/ace-am/rest/collections/by-group
  • Request: GET https://host:port/ace-am/rest/collection/by-group/{group}
    • group: The group to query on. If not included, collection with no group will be searched.
  • Response: 200 (on success)
  • Response Body: JSON

    [
       {"digestAlgorithm":"SHA-256",
        "directory":"/export/gluster/chronopolis/chronopolis/umiacs-ace_2015-08-03",
        "group":"chronopolis",
        "id":"180",
        "lastSync":"2015-08-25T11:17:01-04:00",
        "name":"umiacs-ace_2015-08-03",
        "settings":{"audit.tokens":"true",
                    "audit.period":"90",
    			    "proxy.data":"false"},
        "state":"65",
        "storage":"local"},
      {"digestAlgorithm":"SHA-256",
        "directory":"/export/gluster/chronopolis/chronopolis/ucsd-ace_2015-07-31",
        "group":"chronopolis",
        "id":"179",
        "lastSync":"2015-08-25T11:17:18-04:00",
        "name":"ucsd-ace_2015-07-31",
        "settings":{"audit.tokens":"true",
    			    "audit.period":"90",
    			    "proxy.data":"false"},
        "state":"65",
        "storage":"local"},
      {"digestAlgorithm":"SHA-256",
        "directory":"/export/gluster/chronopolis/chronopolis/ncar-ace_2015-08-03",
    	"group":"chronopolis",
    	"id":"178",
    	"lastSync":"2015-08-25T11:17:21-04:00",
    	"name":"ncar-ace_2015-08-03",
    	"settings":{"audit.tokens":"true",
    				"audit.period":"90",
    				"proxy.data","value":"false"},
    	"state":"65",
    	"storage":"local"}
    ]

List All Collections

  • Request: GET https://host:port/ace-am/rest/collections
    • group: The group to query on
    • active: Query for collections with a state of ACTIVE
    • corrupt: Query for collections with a state of ERROR
  • Bugs
    • group query parameter does not get used
    • stateEnum should be titled state
  • Response: 200 (on success)
  • Response Body: JSON

    [
      {
        "id": 106,
        "name": "acadis_database_02-02-2013",
        "directory": "/fs/chron-scratch/active/acadis/acadis_database_02-02-2013",
        "lastSync": 1539224706000,
        "storage": "local",
        "state": "A",
        "group": "acadis",
        "digestAlgorithm": "SHA-256",
        "settings": {
          "proxy.data": "false",
          "email.recipients": "shake@umiacs.umd.edu",
          "audit.period": "182",
          "audit.tokens": "true"
        },
        "stateEnum": "ACTIVE"
      },
      {
        "id": 111,
        "name": "acadis_datasets_01-31-2013",
        "directory": "/fs/chron-scratch/active/acadis/acadis_datasets_01-31-2013",
        "lastSync": 1539236444000,
        "storage": "local",
        "state": "A",
        "group": "acadis",
        "digestAlgorithm": "SHA-256",
        "settings": {
          "audit.tokens": "true",
          "audit.period": "182",
          "proxy.data": "false"
        },
        "stateEnum": "ACTIVE"
      },
      {
        "id": 52,
        "name": "Atmosphere",
        "directory": "/fs/chron-scratch/active/cadis/Atmosphere",
        "lastSync": 1539220654000,
        "storage": "local",
        "state": "A",
        "group": "cadis",
        "digestAlgorithm": "SHA-256",
        "settings": {
          "proxy.data": "false",
          "email.recipients": "shake@umiacs.umd.edu",
          "audit.period": "182",
          "audit.tokens": "true"
        },
        "stateEnum": "ACTIVE"
      }
    ]

List Collection Monitored Items

  • Request: GET https://host:port/ace-am/rest/collections/{id}/items
    • id: The id of the collection
  • Response: 200 (on success)
  • Response Body: JSON

    [
      {
        "id": 23032414,
        "path": "/bag-info.txt",
        "state": "A",
        "fileDigest": "7a32937a6492f0de109781bcd54f193061bf9cb6dcc0560c173518c209eba6db",
        "size": 113,
        "lastSeen": 1539661459000,
        "stateChange": 1524080414000,
        "lastVisited": 1539661459000
      },
      {
        "id": 23032418,
        "path": "/bagit.txt",
        "state": "A",
        "fileDigest": "e91f941be5973ff71f1dccbdd1a32d598881893a7f21be516aca743da38b1689",
        "size": 55,
        "lastSeen": 1539661459000,
        "stateChange": 1524080414000,
        "lastVisited": 1539661459000
      }
    ]
TokenStore

Load TokenStore

  • Request: POST https://host:port/ace-am/rest/tokenstore/{collectionId}
    • collectionId - The identifier of the collection
  • Request Body: Multipart-Encoded File
  • Response Code: 200 (on success)
  • Response Body: None
  • No labels