Open terrywbrady opened 3 years ago
From storage this process requires knowing the ark and the node.
This process requires issuing an http request to any storage service with the node and ark. From the json response extract the "obj:numVersions" value.
Once the current version number is known then all the inv database can then be queried based on that value to determine if inventory on this latest version is complete, status of replication and status of audit.
Basic request service/"state"/node/ark"?j=json"
curl -X GET uc3-mrtstore05x2-prd:35121/state/9501/ark%3A%2F13030%2Fqt4wp7186t?t=json | jq
{
"obj:objectState": {
"xmlns:obj": "http://uc3.cdlib.org/ontology/mrt/store/object",
"obj:lastAddVersion": "2018-08-16T06:38:30-07:00",
"obj:identifier": "ark:/13030/qt4wp7186t",
"obj:numFiles": 54,
"obj:versionStates": {
"obj:versionState": [
"http://store-do.cdlib.org:35121/state/9501/ark%3A%2F13030%2Fqt4wp7186t/1",
"http://store-do.cdlib.org:35121/state/9501/ark%3A%2F13030%2Fqt4wp7186t/2",
"http://store-do.cdlib.org:35121/state/9501/ark%3A%2F13030%2Fqt4wp7186t/3",
"http://store-do.cdlib.org:35121/state/9501/ark%3A%2F13030%2Fqt4wp7186t/4",
"http://store-do.cdlib.org:35121/state/9501/ark%3A%2F13030%2Fqt4wp7186t/5"
]
},
"obj:totalActualSize": 1940560,
"obj:numActualFiles": 28,
"obj:currentVersionState": "http://store-do.cdlib.org:35121/state/9501/ark%3A%2F13030%2Fqt4wp7186t/5",
"obj:numVersions": 5,
"obj:nodeID": 9501,
"obj:nodeState": "http://store-do.cdlib.org:35121/state/9501",
"obj:object": "http://store-do.cdlib.org:35121/content/9501/ark%3A%2F13030%2Fqt4wp7186t",
"obj:size": 3224486
}
}
Invoke storage object state command to see the highest version for an object.