cancel
Showing results for 
Search instead for 
Did you mean: 

How to execute SQL query in Search Resource Endpoints

Gabino_Reyes
Champ in-the-making
Champ in-the-making

Hi Eveybody Im triying execute the next endpoint http://localhost:8080/nuxeo/api/v1/search/lang/(psq,sql,potsgressql,etc)l/execute?query=SELECT * FROM documento_base But the execute return a Exception: ... "infos": [], "statusCode": 400, "originalMessage": "invalid query language", "message": "invalid query language", "localizedMessage": "invalid query language", "suppressed": []

It's posibble execute pure SQL wiht the endpoint?

Note: I use the endpoint with Page Provider (default nuxeo "nxql_search") http://localhost:8080/nuxeo/api/v1/search/pp/nxql_search/execute?currentPageIndex=0&offset=0&pageSiz... * FROM Document WHERE ecm:mixinType != 'HiddenInNavigation' AND ecm:isProxy = 0 AND ecm:isVersion = 0 AND ecm:isTrashed = 0

But is not possible get only columns (attributes) example select dc:title from document the request is successfully but the content is null

Regards!

1 REPLY 1

Gregory_Carlin
Elite Collaborator
Elite Collaborator

Hello,

Why do you need to retrieve only specific columns? Why not using NXQL? That's the way to go when quering for documents.

Regards