Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

Each of the methods below has specific security requirements. See DuraCloud Security for more information

Warning

Due to an issue which does not properly handle requests redirected from http to https, it is recommended that all REST API requests use https directly.


Tip

Examples calling the API defined below with the Unix utility "curl" can be found here

...

Panel
titleManifest REST Methods

Get Manifest

  • Purpose: Returns the manifest for a given space and storeId
  • Request: GET https://host:port/durastore/manifest/{spaceId} ? (storeID) (format)
    • spaceID - ID of the space for which the manifest will be retrieved
    • storeID (optional) - ID of the content storage provider to query (default is primary store)
    • format (optional) - TSV or BAGIT (default is TSV)
  • Response Code: 200 (on success), 404 if manifest was not found.

  • Response Body: TSV in chronological order with the following fields.

    Code Block
    titleTSV results
    space-id	content-id	MD5
    auditlogs	localhost/51/auditlogs/localhost_51_auditlogs-2014-09-10-15-56-07.tsv	6992f8e57dafb17335f766aa2acf5942
    auditlogs	localhost/51/photos/localhost_51_photos-2014-09-10-15-55-01.tsv	820e786633fb495db447dc5d5cf0b2bd
    
    


Generate Manifest

  • Purpose: Asynchronously generates a gzipped manifest for a given space and storeId. This approach may be preferable if you wish to obtain a manifest for a larger space. We recommend considering this option for spaces that are larger than 100K items.
  • Request: POST https://host:port/durastore/manifest/{spaceId} ? (storeID) (format)
    • spaceID - ID of the space for which the manifest will be generated
    • storeID (optional) - ID of the content storage provider to query (default is primary store)
    • format (optional) - TSV or BAGIT (default is TSV)
  • Response Code: 202 (on success), 404 if manifest was not found.

  • Response Body: We are processing your manifest generation request. To retrieve your file, please poll the URI in the Location header of this response

  • Response Headers:

    Code Block
    titleTSV results
    Location: <URI-of-generated-manifest>




Panel
titleStorage Report REST Methods

Get Storage Reports by Space

  • Purpose: Returns storage report summaries for a space. Report values are averaged based on the grouping internal (if groupBy=month, all data points within each month are averaged to provide an aggregate result).
  • Request: GET https://host:port/durastore/report/space/{spaceId} ? (storeID) (start) (end) (groupBy)
    • spaceID - ID of the space for which the storage report will be retrieved
    • storeID (optional) - ID of the content storage provider to query (default is primary store)
    • start (optional) - Timestamp in epoch milliseconds which defines the starting point for results. Any data points which are prior to this value are not included.
    • end (optional) - Timestamp in epoch milliseconds which defines the end point for results. Any data points which are after this value are not included.
      • usage note: To ensure that all expected data points are included, set the end timestamp to the very end of the final interval (e.g. 23:59:59 on the last day of the week/month)
    • groupBy (optional) - Grouping interval which allows for averaged results for days, weeks, and months. Valid values are: "day", "week", and "month" (default is day)
  • Response Code: 200 (on success)

  • Response Body: JSON array of storage report details

    Code Block
    titleJSON results
    [
      {"timestamp":1312588800000,"accountId":"<account-id>","spaceId":"<space-id>","storeId":"<store-id>","byteCount":1000,"objectCount":10},
      {"timestamp":1315008000000,"accountId":"<account-id>","spaceId":"<space-id>","storeId":"<store-id>","byteCount":1000,"objectCount":10},
      {"timestamp":1315526400000,"accountId":"<account-id>","spaceId":"<space-id>","storeId":"<store-id>","byteCount":1000,"objectCount":10}
    ]


Get Storage Reports by Store

  • Purpose: Returns storage report summaries for all content in a storage provider. Report values are averaged based on the grouping internal (if groupBy=month, all data points within each month are averaged to provide an aggregate result).
  • Request: GET https://host:port/durastore/report/store ? (storeID) (start) (end) (groupBy)
    • storeID (optional) - ID of the content storage provider to query (default is primary store)
    • start (optional) - Timestamp in epoch milliseconds which defines the starting point for results. Any data points which are prior to this value are not included.
    • end (optional) - Timestamp in epoch milliseconds which defines the end point for results. Any data points which are after this value are not included.
      • usage note: To ensure that all expected data points are included, set the end timestamp to the very end of the final interval (e.g. 23:59:59 on the last day of the week/month)
    • groupBy (optional) - Grouping interval which allows for averaged results for days, weeks, and months. Valid values are: "day", "week", and "month" (default is day)
  • Response Code: 200 (on success)

  • Response Body: JSON array of storage report details

    Code Block
    titleJSON results
    [
      {"timestamp":1312588800000,"accountId":"<account-id>","storeId":"<store-id>","byteCount":1000,"objectCount":10},
      {"timestamp":1315008000000,"accountId":"<account-id>","storeId":"<store-id>","byteCount":1000,"objectCount":10},
      {"timestamp":1315526400000,"accountId":"<account-id>","storeId":"<store-id>","byteCount":1000,"objectCount":10}
    ]


Get Storage Reports for all Spaces in a Store (in a single day)

  • Purpose: Returns storage report summaries for all spaces in a storage provider on a single day.
  • Request: GET https://host:port/durastore/report/store/{date} ? (storeID)
    • date - Timestamp in epoch milliseconds which specifies the requested day
    • storeID (optional) - ID of the content storage provider to query (default is primary store)
  • Response Code: 200 (on success)

  • Response Body: JSON array of storage report details

    Code Block
    titleJSON results
    [
      {"timestamp":1312588800000,"accountId":"<account-id>","spaceId":"<space-id-1>","storeId":"<store-id>","byteCount":1000,"objectCount":10},
      {"timestamp":1315008000000,"accountId":"<account-id>","spaceId":"<space-id-2>","storeId":"<store-id>","byteCount":1000,"objectCount":10},
      {"timestamp":1315526400000,"accountId":"<account-id>","spaceId":"<space-id-3>","storeId":"<store-id>","byteCount":1000,"objectCount":10}
    ]


...