Using /reports

Although EOSC Performance administrators review benchmarks and site uploads, it is not feasible nor recommended to review all uploaded results as it might impact the usage experience. Therefore, it relies in the hands of the community the responsibility to report any result that might create confusion or might seem not correct. In this example we are going to explore deeply the options available when reporting results at EOSC Performance. This example was created using Jupyter notebook, click here to the original notebook file.

Create the environment

To do so, we select an API endpoint and collect a token from our configuration. We also need an access token, in this example we use oidc-agent to get one.

[1]:
eosc_perf_api="https://performance.services.fedcloud.eu/api/v1/"
access_token=$(oidc-token egi-prod)

(Conditional) Register, if not done already

To use our service as user, first we need to accept the terms of usage and register. Make sure to read the terms and conditions.

[ ]:
curl -X 'POST' \
  "$eosc_perf_api/users:register" \
  -H "Authorization: Bearer $access_token"

Evaluate result details

You can access to the result details using the json field on a /results response. For more information about how to filter and search for results, see the example on how to use /results.

[3]:
results=$(curl -X 'GET' "$eosc_perf_api/results")
echo $results | jq '.items[0].id'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 77177  100 77177    0     0   746k      0 --:--:-- --:--:-- --:--:--  746k
"7a3fa35c-2ab8-40fe-837c-e8c81fbcc657"

Report the result

You can create a result claim with a POST request to the /results/{id}:claim endpoint. To do so, you need the id of the result to report and attach as body a json with message field where explaining the reasons for the claim.

[4]:
result_id='7a3fa35c-2ab8-40fe-837c-e8c81fbcc657'
curl -X 'POST' "$eosc_perf_api/results/$result_id:claim" \
  -H 'accept: application/json' \
  -H "Authorization: Bearer $access_token" \
  -H 'Content-Type: application/json' \
  -d '{"message": "This is a claim example"}' | jq  '.uploader = "..."'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   456  100   418  100    38    533     48 --:--:-- --:--:-- --:--:--   582
{
  "id": "d5ca59a4-d7e6-45ad-9887-9a60fbf094ea",
  "message": "This is a claim example",
  "resource_id": "7a3fa35c-2ab8-40fe-837c-e8c81fbcc657",
  "resource_type": "result",
  "upload_datetime": "2022-02-23T11:14:05.722832",
  "uploader": "..."
}

Once the claim is submitted the result will remain hidden for the community when using the default searches and list methods. The result will remain hidden until the administrators review the result and the claim. If the result is legitimate, it will be restored otherwise it will be continue hidden from the community.

Note that results cannot be edited. If claimed results is hidden due to simple mistakes the best way to fix them is to create a new result.