如何使用REST API查询IBM Watson Discovery News?

问题描述 投票:0回答:1

IBM Watson Discovery News中是否有机会仅使用我可以在其中指定关键字,api等的URL查询新闻。如果有人可以共享此类REST请求的模板,将不胜感激。我创建了帐户,启动了Discovery,但是随后完全丢失了IBM Cloud API文档https://cloud.ibm.com/apidocs/discovery。据我所知,这里所有内容都是通过命令行访问的,但这不是我想要的...

这是我用于炼金术的方法:

https://access.alchemyapi.com/calls/data/GetNews?apikey=&return = enriched.url.title&start = 1477008000&end = now&q.enriched.url.cleanedTitle = InsertTitle&count = 100&outputMode = xml

最好,拉达

api rest ibm-watson watson-discovery
1个回答
0
投票

有时您要做的只是阅读文档-https://cloud.ibm.com/apidocs/discovery#query-a-collection-get


curl -u "apikey":"{apikey}" "https://gateway.watsonplatform.net/discovery/api/v1/environments/system/collections/news-en/query?version=2019-04-30&natural_language_query=corvid&count=10&return=text"

变成

https://apikey:{apikey}@gateway.watsonplatform.net/discovery/api/v1/environments/system/collections/news-en/query?version=2019-04-30&natural_language_query=corvid&count=100&return=text

您可能需要修改url端点以反映您拥有发现服务实例的区域。

© www.soinside.com 2019 - 2024. All rights reserved.