How To
Documentation
    Learn More

      Fusion REST APIs

      API Objective:

      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>:6764/api/<servicename>/<endpoint>
      How to access the Swagger UI
      https://<fusion-host>:6764/api/<servicename>/swagger-ui.html
      How to access API specs (in JSON format)
      https://<fusion-host>:6764/api/<servicename>/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 (default port 6764). All applications should use this method to access the API service:

      http://<fusion-host>:6764/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 user:pass http://fusion-host:6764/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 admin:password http://127.0.0.1:6764/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 6764 (#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:6764
      > 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 admin:password http://127.0.0.1:6764/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 6764 (#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:6764
      > 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 log file dashboards by the request ID