You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

HTTP API

The REST API is split in to two main parts, repair and fulfillment.

Repair API

GET /api/repair/requests?<requested=?,collection=?,depositor=?,offers=?>

GET /api/repair/requests/<id>

POST /api/repair/requests

POST /api/repair/requests/<id>/fulfill

Fulfillment API

GET /api/repair/fulfillments?<to=?,from=?,status=?>

GET /api/repair/fulfillemnts/<id>

PUT /api/repair/fulfillments/<id>/ready

PUT /api/repair/fulfillemnts/<id>/complete

Models

Repair Request

A repair request, sent out by a node who notices they have corrupt files in a collection

{
"depositor": "depositor-with-corrupt-collection",
"collection": "collection-with-corrupt-files",
"files": ["file_0", "file_1", ..., "file_n"]
}


Repair Model

A repair structure, returned by the Ingest server after a repair request is received

{
"id": 1,
"status": "requested|fulfilling|repaired|failed",
"requester": "node-with-corrupt-file",
"depositor": "depositor-with-corrupt-collection",
"fulfillment": 3,
"collection": "collection-with-corrupt-files",
"files": ["file_0", "file_1", ..., "file_n"]
}


Fulfillment Model

A fulfillment for a repair, returned by the Ingest server after a node notifies it can fulfill a repair request. Credentials are only visible to the requesting node and administrators.

{
"id": 3,
"to": "node-with-corrupt-file",
"from": "node-with-valid-file",
"status": "staging|ready|complete|failed",
"credentials": { ... }
"repair": 1
}

Credentials ACE

{
"type": "ace",
"api-key": "ace-api-key",
"url": "https://node_v/ace-am" # ?? Not sure if really needed
}

Credentials Node-to-Node

{
"type": "node-to-node",
"url": "node_i@node_v.edu:/homes/node_i/path/to/repair"
}

Credentials Node-to-Node

{
"type": "ingest",
"url": "node_i@chron.ucsd.edu:/path/to/repair"
}



  • No labels