IBM Cloud API Docs Tone Analyzer

73 views Asked by At

I tried to implement :

curl -u "apikey:{apikey}" "{url}/{method}" resorce:https://console.bluemix.net/apidocs/tone-analyzer

My question what I need to do? I already have the api key, for example 1234, and my url is https://gateway.watsonplatform.net/tone-analyzer/api

First what is the: {method} in the above cURL request and what do I need to do with that? Question 2 this is correct?:

curl -u "apikey:1234" "https://gateway.watsonplatform.net/tone-analyzer/api/{method}

1

There are 1 answers

0
Vidyasagar Machupalli On

In the cURL request below:

curl -X GET -u "apikey:{apikey}" "https://gateway.watsonplatform.net/tone-analyzer/api/v3/tone?version=2017-09-21&text=Team,%20I%20know%20that%20times%20are%20tough!%20Product%20sales%20have%20been%20disappointing%20for%20the%20past%20three%20quarters.%20We%20have%20a%20competitive%20product,%20but%20we%20need%20to%20do%20a%20better%20job%20of%20selling%20it!"

The {URL} is https://gateway.watsonplatform.net/tone-analyzer/api and {method} is /v3/tone. To under the endpoint, check this link

You are making a GET method call and for this, you need to create a service at https://console.bluemix.net/catalog/services/tone-analyzer

For more information on how to get an API key, refer to this link