Fusion REST APIs
When you install a connector or plug-in on Fusion 5.x.x, you do not need to supply the .zip file. The installation obtains the .zip file from the repository. Fusion 4.x.x and earlier releases required you to supply the .zip file. |
How to access the API in Kubernetes
API endpoints for Kubernetes deployments use different paths than for on-prem deployments.
How to access individual API endpoints
https://FUSION_HOST:FUSION_PORT/SERVICE_NAME/ENDPOINT
How to access the Swagger UI
https://FUSION_HOST:FUSION_PORT/api/SERVICE_NAME/swagger-ui.html
How to access API specs (in JSON format)
https://FUSION_HOST:FUSION_PORT/SERVICE_NAME/v2/api-docs
How to access the on-prem API service
Fusion API services are designed to be accessed via Fusion’s authentication proxy module which is part of the Fusion UI service. All applications should use this method to access the API service:
https://FUSION_HOST:FUSION_PORT/api/ENDPOINT
List all Fusion component services
The Fusion introspect
endpoint lists basic information about endpoints and parameters for all Fusion endpoints,
including the Connectors services endpoints:
curl -u USERNAME:PASSWORD https://FUSION_HOST:FUSION_PORT/api/introspect
Assign Fusion request IDs
Fusion automatically assigns each API request a Fusion request ID. Optionally, you can assign your own Fusion request IDs.
In this example of a search, the request does not set the Fusion request ID. Fusion assigns one, in this case, PdNfxc1V2o
:
curl -v -u USERNAME:PASSWORD http://127.0.0.1:FUSION_PORT/api/apps/Movie_Search/query/Movie_Profile?q=movieId_s:202
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port FUSION_PORT (#0)
* Server auth using Basic with user 'admin'
> GET /api/apps/Movie_Search/query/Movie_Profile?q=movieId_s:202 HTTP/1.1
> Host: 127.0.0.1:FUSION_PORT
> Authorization: Basic YWRtaW46UGFzc3dvcmQxMjM=
> User-Agent: curl/7.54.0
> Accept: */*
> fusion-request-id: Movie202
>
< HTTP/1.1 200 OK
< Server: Jetty(9.3.8.v20160314)
< fusion-request-id: PdNfxc1V2o
< Content-Type: application/json;charset=UTF-8
< x-fusion-query-id: f5KGn9KPvv
< Set-Cookie: id=c114b816-df6f-4b17-97e0-bb87ef815bf0;Path=/;HttpOnly
< Content-Length: 1707
< Connection: close
<
* Closing connection 0
(search result omitted)
Here, we assign the Fusion request ID Movie202
:
curl -v -H 'fusion-request-id: Movie202' -u USERNAME:PASSWORD http://127.0.0.1:FUSION_PORT/api/apps/Movie_Search/query/Movie_Profile?q=movieId_s:202
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port FUSION_PORT (#0)
* Server auth using Basic with user 'admin'
> GET /api/apps/Movie_Search/query/Movie_Profile?q=movieId_s:202 HTTP/1.1
> Host: 127.0.0.1:FUSION_PORT
> Authorization: Basic YWRtaW46UGFzc3dvcmQxMjM=
> User-Agent: curl/7.54.0
> Accept: */*
> fusion-request-id: Movie202
>
< HTTP/1.1 200 OK
< Server: Jetty(9.3.8.v20160314)
< fusion-request-id: Movie202
< Content-Type: application/json;charset=UTF-8
< x-fusion-query-id: f5KGn9KPvv
< Set-Cookie: id=c114b816-df6f-4b17-97e0-bb87ef815bf0;Path=/;HttpOnly
< Content-Length: 1707
< Connection: close
<
* Closing connection 0
(search result omitted)
With a Fusion request ID, you can trace requests in log files and filter a log by request ID