REST examples
listMethods
curl -X GET -H "accept: application/json" -H "X-Road-Client: ee-dev/GOV/70008799/pohak" "http://10.0.13.90/r1/ee-dev/GOV/70008799/pohak/listMethods" | json_pp
HTTPS with cert and key
curl --cert nextcloud.bgp.12.berylia.org_cert.crt --key nextcloud.bgp.12.berylia.org_key.crt -X GET -H "accept: application/json" -H "X-Road-Client:BERYLIA/GOV/1003/recon" "https://xroad-securityserver.bgp.12.berylia.org/r1/BERYLIA/GOV/1002/satellite/listMethods" | json_pp
getOpenAPI
curl -k -X GET -H "accept: application/json" -H "X-Road-Client: ee-dev/GOV/70008799/pohak" "https://10.0.13.90/r1/ee-dev/GOV/70008799/pohak/getOpenAPI?serviceCode=adverse-event" | json_pp
POST
curl -k -X POST "https://10.0.14.26/r1/ee-test/GOV/70001969/tookeskk/digitaalne_teatis/api/v1/digitaalne_teatis" -H "accept: application/json" -H "Content-Type: application/json" -H "X-Road-Client: ee-test/GOV/70001969/tookeskk" \
--data '{
"noticeId": "",
"employeeIdCode": "",
"employeeFirstName": "",
"employeeLastName": "",
"employeePhone": ""
}'
More help: https://x-tee.ee/docs/live/xroad/pr-rest_x-road_message_protocol_for_rest.html#64-post-request-and-response