Forum Discussion

ashinde's avatar
ashinde
Guide
8 years ago

Accessing the endpoint using http.client not working for hidden category

Hi,

 There are two endpoint.We are accessing a endpoint to other endpoint using "http.client". We are not getting proper response for hidden category. It's working fine for other category. Your help could be appreciated.

 

Thanks

 

  • ashinde- If you are doing this inside lithium, You can achieve the same result with lithium Restd V2 call.

     

    <#assign Resp= http.client.request( liurl+"/test-message?postId=${pid}").get()/>. You are calling other endpoint with this call.

    Could you please also show which call you are using to get categories?

     

    if you are using REST V1 or REST V2, you can get the hidden categories using restadmin call as mentioned by satya.

    However, using the restadmin will bypass all the permission settings.

5 Replies

  • Hi ashinde,

     

    Could you please provide more details on what response you are expecting?

     

    Are you using rest call/ restadmin call? usually, you can use restadmin to access the hidden boards info.

     

     

    Give kudos if you find my posts helpful or mark as solution if it answers your query.

    Thanks,
    Srujana Satya

     

     

  • ashinde's avatar
    ashinde
    Guide
    8 years ago

    The both endpoints are customize.

     

    Below endpoint(name:test-message) which is calling from other endpoint and this endpoint return json response.

    <#assign Resp= http.client.request( liurl+"/test-message?postId=${pid}").get()/>.

     

    we are getting the response below response for hidden category.

    lithium.coreapi.webui.template.models.HttpClientResponseTemplateModel@300501ea 

     

     

  • ashinde- If you are doing this inside lithium, You can achieve the same result with lithium Restd V2 call.

     

    <#assign Resp= http.client.request( liurl+"/test-message?postId=${pid}").get()/>. You are calling other endpoint with this call.

    Could you please also show which call you are using to get categories?

     

    if you are using REST V1 or REST V2, you can get the hidden categories using restadmin call as mentioned by satya.

    However, using the restadmin will bypass all the permission settings.

  • ashinde's avatar
    ashinde
    Guide
    8 years ago

    Thank you all for help.

    Actually its issue with the post of hidden category. we are accessing the custom end point which is created by me. We are calling the endpoint name "test-message" from the endpoint "test-post". For hidden category when we call the api  "test-message" using (http.client) then code inside this api not executed. Both the endpoints are custom and which is created by me. Its working fine for other category which are not hidden.