Quickstart: Query API
curl
command-line utility to demonstrate how to make the test request. Detailed information about the steps are available in these topics:Medallia Experience Cloud
list_alt
curl
command-line utility to demonstrate how to make the test request. Detailed information about the steps are available in these topics:Create an application account and create an OAuth account for you application (per Create an OAuth client for API access). You need the client ID and client secret to authorize access and provide an access token.
Identify the resource endpoint to use to make queries. Verify the query URL and endpoint (for details about this URL and for determining the URL for the sandbox, see API hosts).
$ curl https://instance.medallia.com/oauth/company/token \
> -X POST \
> -u 'clientID:clientSecret' \
> -d grant_type=client_credentials
{"access_token":"40d182e5dcbef32ce34b737ba5d4","token_type":"Bearer","expires_in":3600}
Once you have the access token (access_token
value), you can make a query request.
instance-company.apis.medallia.com
:$ curl -H 'Authorization: Bearer 40d182e5dcbef32ce34b737ba5d4' \
> -H 'Content-Type: application/json' \
> "https://instance-company.apis.medallia.com/data/v0/query" \
> --data '{"query":"query {me {roles {id name}}}\n","variables":{}}'
{"data":{"me":{"roles":[{"id":"139085","name":"API User"}]}},"errors":null,"_links":null,"_allowed":["POST","GET"]}
Medallia®, the Medallia logo, and the names and marks associated with Medallia’s products are trademarks of Medallia and/or its affiliates. All other trademarks are the property of their respective owners.