Skip to content

ReqMgr2 MicroService APIs

Alan Malta Rodrigues edited this page Apr 9, 2020 · 20 revisions

This wiki will list the RESTP APIs for all WMCore Microservices. They return data in json, so it requires the header "Accept: application/json" to be set.

MSTransferor REST APIs

This microservice is responsible for the workflow input data placement. It has CouchDB as a backend database, where it persists the workflow transfers summary and keeps updating the transfers completion in specified intervals. Once all the data placement requests have been made, the workflow is moved to the next status staging.

Fetch the status of the service

This returns very basic information of the service, like its status and version. One can also provide the detail=true query string in order to retrieve a few more details of the service. This extra information contains data regarding its last execution cycle.

GET /ms-transferor/data/status HTTP/1.1
Accept: application/json
Host: cmsweb.cern.ch

An example of a curl command to read the agent configuration is:

curl --cert $X509_USER_CERT --key $X509_USER_KEY -X GET https://cmsweb.cern.ch/ms-transferor/data/status?detail=true

Fetch information for a given request

This API can be used to retrieve information for a given workflow. The information returned corresponds to the transfer document created when handling the input data to be transferred. It includes the dataset names, transfer request IDs, transfer completion, etc. Note that those documents are only available while the workflow is active, basically between staging and running-* statuses.

GET /ms-transferor/data/info?request=WORKFLOW_NAME HTTP/1.1
Accept: application/json
Host: cmsweb.cern.ch

An example of a curl command to read the agent configuration is:

curl --cert $X509_USER_CERT --key $X509_USER_KEY -X GET https://cmsweb.cern.ch/ms-transferor/data/info?request=pdmvserv_task_B2G-RunIISummer16NanoAODv6-02873__v1_T_200331_212615_94

MSMonitor REST APIs

This microservice is responsible for monitoring the data transfer requests created by MSTransferor. It keeps updating the local couch document with the transfers completion in a periodic cycle (X hours), once transfers have completed, the workflow is moved to the next status staged).

Fetch the status of the service

This returns very basic information of the service, like its status and version. One can also provide the detail=true query string in order to retrieve a few more details of the service. This extra information contains data regarding its last execution cycle.

GET /ms-monitor/data/status HTTP/1.1
Accept: application/json
Host: cmsweb.cern.ch

An example of a curl command to read the agent configuration is:

curl --cert $X509_USER_CERT --key $X509_USER_KEY -X GET https://cmsweb.cern.ch/ms-monitor/data/status?detail=true

Fetch information for a given request

This API is equivalent to the ms-transferor info API. Thus, it can be used to retrieve information for a given workflow. The information returned corresponds to the transfer document created when handling the input data to be transferred. It includes the dataset names, transfer request IDs, transfer completion, etc. Note that those documents are only available while the workflow is active, basically between staging and running-* statuses.

GET /ms-monitor/data/info?request=WORKFLOW_NAME HTTP/1.1
Accept: application/json
Host: cmsweb.cern.ch

An example of a curl command to read the agent configuration is:

curl --cert $X509_USER_CERT --key $X509_USER_KEY -X GET https://cmsweb.cern.ch/ms-monitor/data/info?request=pdmvserv_task_B2G-RunIISummer16NanoAODv6-02873__v1_T_200331_212615_94
Clone this wiki locally