General Technical Discussions for Service

Get Involved. Join the Conversation.

Topic

    Brian Carver
    Oracle Service Cloud Rest API - ReportsAnswered
    Topic posted July 30, 2015 by Brian Carver 
    1123 Views, 7 Comments
    Title:
    Oracle Service Cloud Rest API - Reports
    Content:

    Is it possible to access reports through the new service cloud rest api?

     

    Brian

    Best Comment

    Vikram Kaledhonkar

    Folks,

    Ability to execute reports is available only on November 2015 (and onwards) release of Oracle Service cloud. This ability has been exposed via a REST resource 'analyticsReportResults'. In order to execute a report, invoke POST operation on this resource with appropriate input.

    For example:

    POST https://<SiteInterface>/services/rest/connect/latest/analyticsReportResults

    with input JSON

    {

    “id”:124

    }

    You can also provide following sample inputs for invoking report by lookupname, to pass filters and to support pagination:

    Invoke using lookupName (instead of Id):

    {

    "lookupName":"Contact Information"

    }

    Pass pagination parameters:

    {

    “id”:124,

    “limit”:50,

    “offset”:51

    }

    Pass report filters:

    {

    "id":124,

    "filters":[ {   

            "name": "Name“,          "values":"Flintstone"    

            }       

         ]

    }

     

    Thanks,

    Vikram Kaledhonkar

     

    Comment

     

    • Michel Jilderda

      Hey Brian, 

      according to the documentation it should be possible.. 

      http://documentation.custhelp.com/euf/assets/devdocs/may2015/Connect_REST_API/wwhelp/wwhimpl/js/html/wwhelp.htm#href=connect_rest_api.1.11.html

      The list of resources available as part of the Connect REST API can be retrieved using the metadata catalog. The following resources are available in the metadata in the current version of REST API:

    • James Hanson

      I was having a similar issue and found to get the report data you need to call: https://<your-site)/services/rest/connect/v1.3/analyticsReportResults/<report id>, at least this is with the Nov 15 release.

      http://documentation.custhelp.com/euf/assets/devdocs/november2015/Connect_REST_API/wwhelp/wwhimpl/js/html/wwhelp.htm#href=Connect_REST_API.1.09.html

    • Vikram Kaledhonkar

      Folks,

      Ability to execute reports is available only on November 2015 (and onwards) release of Oracle Service cloud. This ability has been exposed via a REST resource 'analyticsReportResults'. In order to execute a report, invoke POST operation on this resource with appropriate input.

      For example:

      POST https://<SiteInterface>/services/rest/connect/latest/analyticsReportResults

      with input JSON

      {

      “id”:124

      }

      You can also provide following sample inputs for invoking report by lookupname, to pass filters and to support pagination:

      Invoke using lookupName (instead of Id):

      {

      "lookupName":"Contact Information"

      }

      Pass pagination parameters:

      {

      “id”:124,

      “limit”:50,

      “offset”:51

      }

      Pass report filters:

      {

      "id":124,

      "filters":[ {   

              "name": "Name“,          "values":"Flintstone"    

              }       

           ]

      }

       

      Thanks,

      Vikram Kaledhonkar

       

    • Michel Jilderda

      Excellent guys, we are on the Aug15 release, but will give it a go when we upgrade to Nov15+!

       

    • Mohana Gopal Selvam

      Hi Vikram,

       

      Thanks for the post i followed the same for getting the values from the report using filter but i am getting the below response.

      Request:

      URL:-

      https:/myinterface/services/rest/connect/v1.3/analyticsReports

      Body:-

      {
      "id": 100483,
      "filters": [{
          "name": "Contact_id",
          "values": "258334"
          }]
      }

      Response

      {
          "type": "https://myinterface/services/rest/connect/exceptions/OSC-CREST-00006",
          "title": "An attempt to write a resource failed",
          "status": 400,
          "detail": "Error attempting to update resource: analyticsReports does not have create visibility.",
          "instance": "https://myinterface/services/rest/connect/v1.3/analyticsReports",
          "o:errorCode": "OSC-CREST-00006"
      }

    • Dietrik

      This is an old post, you 'd better create a new one.

      use:  /services/rest/connect/v1.3/analyticsReportResults

    • Pankaj Andhale

      Hi Dietrik,

      I am using /services/rest/connect/v1.3/analyticsReportResults this endpoint in the POST request. Also providing report id. 

      But I am getting the following error:

      {
        "type": "https://membercare.xxxx.com/services/rest/connect/exceptions/OSC-CREST-00013",
        "title": "Unrecognized resource",
        "status": 404,
        "detail": "Unrecognized resource: analyticsReportResults",
        "instance": "https://membercare.xxxxx.com/services/rest/connect/v1.3/analyticsReportResults",
        "o:errorCode": "OSC-CREST-00013"
      }

      Can anyone let me know what I may be missing?

      Appreciate your help

      Thanks

      -Pankaj