API¶
The REST based API’s can be used to configure archiver using curl command or other http clients.
Following are the API’s provided by EDA configurator tool with examples showing details required by it.
configure-archiver
This API helps to configure archiver using yaml file and options[“add_update”/”remove”].
http verb allowed :POSTContent-Type:multipart/form-dataheader:accept:application/jsoncurl -X 'POST' \ 'http://<IP>:8003/configure-archiver' \ -H 'accept: application/json' \ -H 'Content-Type: multipart/form-data' \ -F 'file=@<YAML FILE>;type=application/x-yaml' \ -F 'option=add_update'
curl -X 'POST' \ 'http://<IP>:8003/configure-archiver' \ -H 'accept: application/json' \ -H 'Content-Type: multipart/form-data' \ -F 'file=@<YAML FILE>;type=application/x-yaml' \ -F 'option=remove'
download-configuration
This API accepts eventsubscriber name and provides yaml file with current attributes archived into the system.
http verb allowed :GETheader:accept:application/jsoncurl -X 'GET' \ 'http://<IP>:8003/download-configuration/?eventsubscriber=mid-eda%2Fes%2F01' \ -H 'accept: application/json'
[GET]configurations
This API provides history of all the operations performed in the system.
http verb allowed :GETheader:accept:application/jsoncurl -X 'GET' \ 'http://<IP>:8003/configurations' \ -H 'accept: application/json'
[DELETE]configurations
This API deletes history of operations performed.
http verb allowed :DELETEheader:accept:application/jsoncurl -X 'DELETE' \ 'http://<IP>:8003/configurations' \ -H 'accept: application/json'