Skip to content

Latest commit

 

History

History
458 lines (259 loc) · 16.5 KB

RequestServiceApi.md

File metadata and controls

458 lines (259 loc) · 16.5 KB

\RequestServiceApi

All URIs are relative to http://api.madana.io/rest

Method HTTP request Description
add_data post /requests/{uuid}/data Is used to upload and park the data till the AnalysisRequest gets processed.
cancel_processing post /requests/{uuid}/cancel Endpoint is called from the Analysis Processing entity to submit the result.
create_new_request post /requests Endpoint used to create a new Analysis Request.
get_actions get /requests/actions
get_agent get /requests/{uuid}/agent Is called from the APE to request all parked datasets.
get_all_requests get /requests Returns UUIDs of existing analyses.
get_data get /requests/{uuid}/data Is called from the APE to request all parked datasets.
get_request get /requests/{uuid} Returns the details for certain Request.
get_result get /requests/{uuid}/result Can be called from creator to request the AnalysisResult.
get_status get /requests/stats
give_consent post /requests/{uuid}/consent Used to give consent for request.
init_request_parameters post /requests/{uuid} Endpoint used initialized addition datacollection parameters for requester.
set_agent post /requests/{uuid}/agent Is called from the APE to request all parked datasets.
set_result post /requests/{uuid}/result Endpoint is called from the Analysis Processing entity to submit the result.

add_data

std::path::PathBuf add_data(uuid, authorization, body) Is used to upload and park the data till the AnalysisRequest gets processed.

Is used to upload and park the data till the AnalysisRequest gets processed

Parameters

Name Type Description Required Notes
uuid String [required]
authorization Option<String> Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
body Option<JsonSignedData>

Return type

std::path::PathBuf

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

cancel_processing

std::path::PathBuf cancel_processing(uuid, authorization, body) Endpoint is called from the Analysis Processing entity to submit the result.

Endpoint is called from the Analysis Processing entity to submit the result

Parameters

Name Type Description Required Notes
uuid String [required]
authorization Option<String> Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
body Option<JsonSignedData>

Return type

std::path::PathBuf

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_new_request

String create_new_request(authorization, body) Endpoint used to create a new Analysis Request.

Endpoint used to create a new Analysis Request

Parameters

Name Type Description Required Notes
authorization Option<String> Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
body Option<JsonSignedData>

Return type

String

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_actions

std::path::PathBuf get_actions(limit, offset)

Parameters

Name Type Description Required Notes
limit Option<String> [default to 30]
offset Option<String> [default to 0]

Return type

std::path::PathBuf

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_agent

std::path::PathBuf get_agent(uuid, authorization) Is called from the APE to request all parked datasets.

Is called from the APE to request all parked datasets. Returns the transmitted data for certain Request. When requesting the data, the status of the request is automatically set to processing.

Parameters

Name Type Description Required Notes
uuid String [required]
authorization Option<String> Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

Return type

std::path::PathBuf

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_all_requests

std::path::PathBuf get_all_requests(authorization, created, history, limit, new, offset, preview, ready) Returns UUIDs of existing analyses.

Returns UUIDs of existing analyses.

Parameters

Name Type Description Required Notes
authorization Option<String> Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
created Option<String> - if Queryparam "created=true" only the UUIDs of own Requests are shown [default to false]
history Option<String> - if queryparam "history" is set to true, endpoint returns all user actions. False per default. [default to false]
limit Option<String> Used for offset pagination. Limit/Offset Paging would look like GET /request?limit=20&offset=100. This query would return the 20 rows starting with the 100th row [default to 30]
new Option<String> - if Queryparam "new=true" only the UUIDs of new Requests ( Requests the user has not participated in and still allow participation) are shown [default to true]
offset Option<String> Used for offset pagination. Limit/Offset Paging would look like GET /request?limit=20&offset=100. This query would return the 20 rows starting with the 100th row [default to 0]
preview Option<String> [default to false]
ready Option<String> [default to false]

Return type

std::path::PathBuf

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_data

crate::models::JsonSignedData get_data(uuid, authorization) Is called from the APE to request all parked datasets.

Is called from the APE to request all parked datasets. Returns the transmitted data for certain Request. When requesting the data, the status of the request is automatically set to processing.

Parameters

Name Type Description Required Notes
uuid String [required]
authorization Option<String> Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

Return type

crate::models::JsonSignedData

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_request

std::path::PathBuf get_request(uuid, authorization) Returns the details for certain Request.

Returns the details for certain Request. When requesting an analysis a view of the analysis is stored in the database

Parameters

Name Type Description Required Notes
uuid String [required]
authorization Option<String> Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

Return type

std::path::PathBuf

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_result

std::path::PathBuf get_result(uuid, authorization) Can be called from creator to request the AnalysisResult.

Can be called from creator to request the AnalysisResult.

Parameters

Name Type Description Required Notes
uuid String [required]
authorization Option<String> Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

Return type

std::path::PathBuf

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_status

std::path::PathBuf get_status()

Parameters

This endpoint does not need any parameter.

Return type

std::path::PathBuf

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

give_consent

std::path::PathBuf give_consent(uuid, authorization) Used to give consent for request.

Used to give consent for request. If the Endpoint is called from the creator of the Analysis, the status of the request is set to completed. If called by another is interpreted as giving consent to participate.

Parameters

Name Type Description Required Notes
uuid String [required]
authorization Option<String> Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

Return type

std::path::PathBuf

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

init_request_parameters

String init_request_parameters(uuid, authorization, body) Endpoint used initialized addition datacollection parameters for requester.

Endpoint used initialized addition datacollection parameters for requester

Parameters

Name Type Description Required Notes
uuid String [required]
authorization Option<String> Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
body Option<String>

Return type

String

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

set_agent

std::path::PathBuf set_agent(uuid, authorization) Is called from the APE to request all parked datasets.

Is called from the APE to request all parked datasets. Returns the transmitted data for certain Request. When requesting the data, the status of the request is automatically set to processing.

Parameters

Name Type Description Required Notes
uuid String [required]
authorization Option<String> Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

Return type

std::path::PathBuf

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

set_result

std::path::PathBuf set_result(uuid, authorization, body) Endpoint is called from the Analysis Processing entity to submit the result.

Endpoint is called from the Analysis Processing entity to submit the result

Parameters

Name Type Description Required Notes
uuid String [required]
authorization Option<String> Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
body Option<JsonSignedData>

Return type

std::path::PathBuf

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]