Integrations and APIs for Service

Get Involved. Join the Conversation.

Topic

    jagadeesh gattupalli
    Access Service cloud Managed tables through REST API and...Answered
    Topic posted November 6, 2019 by jagadeesh gattupalliBlue Ribbon: 750+ Points, tagged Connect PHP, REST 
    15 Views, 1 Comment
    Title:
    Access Service cloud Managed tables through REST API and ROQL
    Summary:
    How to access Service cloud Managed tables into REST API and ROQL
    Content:

    HI ,

    Can any one help me how to access Managed tables from REST API and  through ROQL ?

    SurveyQuestions

    SurveySession

    ContentRatingSummaries

    ...... (more)

    From ROQL when I execute below query I am getting error "Invalid object name: Survey".

    SELECT SurveyQuestions.* FROM Survey WHERE ID=3;

     

    Kind Regards

    Jagadeesh G

    Version:
    19B

    Best Comment

    Robert Surujbhan

    Hi Jagadeesh, are you running these queries using the Connect Object Explorer in the Customer Portal admin interface?  If so, they will not work there and you will get that "Invalid object name" error. You need to use ROQL within PHP scripts (make sure you specify at least 1.3 of the CCOM library in your code).

    For the REST API, you need to change the object names slightly (e.g., from Survey to Surveys).  Below is a basic example of a working query (assuming 123 is a valid ID for a Survey).  You can refer to the documentation here for more examples using the right resource names recognized by the REST API.

    /queryResults?query=SELECT * FROM surveys WHERE ID=123;
    

    Comment

     

    • Robert Surujbhan

      Hi Jagadeesh, are you running these queries using the Connect Object Explorer in the Customer Portal admin interface?  If so, they will not work there and you will get that "Invalid object name" error. You need to use ROQL within PHP scripts (make sure you specify at least 1.3 of the CCOM library in your code).

      For the REST API, you need to change the object names slightly (e.g., from Survey to Surveys).  Below is a basic example of a working query (assuming 123 is a valid ID for a Survey).  You can refer to the documentation here for more examples using the right resource names recognized by the REST API.

      /queryResults?query=SELECT * FROM surveys WHERE ID=123;