Building API requests (POST, GET)


I want to build queries like the one below and get the result back in my webpage. Is this possible by defining a the link of a button stack? Or what is best practice to get this done? Thanks for helping.

curl -X GET \
  '' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {{oauth_token}}' \

Cheers, Rudolf