SpagoBI で Tuleap REST API を使用しようとしましたが、情報が見つかりません。
では、SpagoBI で REST API からデータを取得することは可能ですか?
ご回答有難うございます、
サンドラ
SpagoBI で Tuleap REST API を使用しようとしましたが、情報が見つかりません。
では、SpagoBI で REST API からデータを取得することは可能ですか?
ご回答有難うございます、
サンドラ
REST 2.0 API を使用することは可能ですが、SpagoBI の FIWARE バージョンが必要です。FIWARE に REST API サービスがあることを除いて、バージョンは同じです。
このリンクを確認してください:
http://catalogue.fiware.org/enablers/data-visualization-spagobi/documentation
養蜂場: http://docs.spagobi.apiary.io/#reference/0/the-content-subresource/return-the-document-content
はい、可能です。これを機能させるためにしばらく時間を費やしました。以下は、私のために働いたテクニックへのリンクです。
要するに、私は Script Data-Set、Groovy 言語、および Groovy WSLite Web サービス ライブラリを使用しています。これには、SpagoBI に同梱されている Groovy のバージョンを更新し、Groovy WSLite ライブラリをドロップする必要がありました。
Groovy 経由の SpagoBI DataSet REST Web サービス
//Sample code: Using Groovy and Groovy WSLite to call a RESTful web service
//Then, the response is parsed and returned in SpagoBI DataSet's XML format
import wslite.rest.*
def param_ip = parameters['param_ip'] ?: ''
def client = new RESTClient("http://ip-api.com/json/${param_ip.toString()}")
def response = client.get()
assert response.statusCode == 200
def str = response.json
"""
<ROWS>
<ROW
params="${parameters['param_ip'].toString()}"
status="${str.status.toString()}"
country="${str.country.toString()}"
countryCode="${str.countryCode.toString()}"
region="${str.region.toString()}"
regionName="${str.regionName.toString()}"
city="${str.city.toString()}"
zip="${str.zip.toString()}"
lat="${str.lat.toString()}"
lon="${str.lon.toString()}"
timezone="${str.timezone.toString()}"
isp="${str.isp.toString()}"
org="${str.org.toString()}"
as="${str.as.toString()}"
/>
</ROWS>
""".toString()