Versions Compared

Key

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

API Docs for RESTful Ingest

 

Panel
titleGeneral Operations

Create Bag

  • Purpose: Notifies the Ingest Server that a bag is ready to be created
  • Request: POST https://host:port/api/bags
  • Request Body: JSON in format:

    Code Block
    {
        "depositor": "dartmouth",
        "name": "8e55f5c4-a65c-4eb1-9aa4-a9c3742af8b3",
        "location": "dartmouth/8e55f5c4-a65c-4eb1-9aa4-a9c3742af8b3",
    }
    
  • Response Code: 200 (on success)
  • Response Body: JSON:

    Code Block
    {
            "replicationID": 4,
            "status": "STARTED",
            "bagID": 1,
            "bagLink": "chrono@chronopolis-stage:/export/bags/test-bag-0",
            "tokenLink": "chrono@chronopolis-stage:/export/tokens/test-bag-0-tokens",
            "protocol": "rsync",
            "receivedTagFixity": "",
            "receivedTokenFixity": ""
    }
    

Get All Bags

  • Purpose: Provides the current version of the Bridge App
  • Request: GET https://host:port/api/bags/
  • Response Code: 200 (on success)
  • Response Body: JSON:

    Code Block
    {[{
            "id": 1,
            "name": "bag-0",
            "depositor": "test-depositor",
            "location": "bags/test-bag-0",
            "tokenLocation": "tokens/test-bag-0-tokens",
            "fixityAlgorithm": "SHA-256",
            "size": 14821
    },...
    ]}

Get A Single Bag

  • Purpose: Get information about a single bag
  • Request: GET https://host:port/api/bags/{bagID}
  • Response Code: 200 (on success)
  • Response Body: JSON:

    Code Block
    {
            "id": 1,
            "name": "bag-0",
            "depositor": "test-depositor",
            "location": "bags/test-bag-0",
            "tokenLocation": "tokens/test-bag-0-tokens",
            "fixityAlgorithm": "SHA-256",
            "size": 14821
    }

Get Replication Requests

  • Purpose: Get all replication requests for your node
  • Request: GET https://host:port/api/replications
  • Response Code: 200 (on success)
  • Response Body: JSON:

    Code Block
    {[{
            "id": 1,
            "name": "bag-0",
            "depositor": "test-depositor",
            "location": "bags/test-bag-0",
            "tokenLocation": "tokens/test-bag-0-tokens",
            "fixityAlgorithm": "SHA-256",
            "size": 14821
    },...
    ]}