Setting the status_code in a Oracle Rest Api source type ords.source_type_collection feed service

80 views Asked by At

I have a collection service that fetches all the items linked to an entity and gives a summary for each item with the page functionality given by collection services this works great.

However I have a routine to check if the client running the query has access to the entity searched for on the service. I want to set the status_code to 401 unauthorised if a user searches for an entity they don't have access to, because currently I'm just getting status 200 ok with no records in the query.

Is this even possible with a collection query, if not how do I get the same paged layout without a collection query?

I tried using procedure with an out parameter to bind onto :status_code. However since this isn't a plsql block it's failing.

also tried and :status_code = 401 However it's not picking up the implicit parameter :status_code.

0

There are 0 answers