• #29833
    Salesforce | Sanjana Sanjana #13
    Forcetalks

    What is a resource in Restful web services in Salesforce?

    What is a resource in Restful web services in Salesforce?

    Tagged: , , , , , , , ,

    #29838
    Salesforce | suniti suniti #17
    Forcetalks

    Hello Sanjana

    REST architecture treats every content as a resource. These resources can be Text Files, Html Pages, Images, Videos or Dynamic Business Data. REST Server simply provides access to resources and REST client accesses and modifies the resources. Here each resource is identified by URIs/ Global IDs. REST uses various representations to represent a resource where Text, JSON, XML. The most popular representations of resources are XML and JSON.

    #34239
    Salesforce | Parul Parul #2
    Forcetalks

    The @RestResource annotation to expose it as a REST resource. Similarly, add annotations to your methods to expose them through REST. For example, you can add the @HttpGet annotation to your method to expose it as a REST resource that can be called by an HTTP GET request.

     

    Thanks

    #34388
    Salesforce | shariq shariq #1
    Forcetalks

    Hi,

    For more clarity –

    You can expose your Apex class and methods so that external applications can access your code and your application through the REST architecture. This is done by defining your Apex class with the @RestResource annotation to expose it as a REST resource. Similarly, add annotations to your methods to expose them through REST. For example, you can add the @HttpGet annotation to your method to expose it as a REST resource that can be called by an HTTP GET request.

    Six new annotations have been added that enable you to expose an Apex class as a RESTful Web [email protected](urlMapping=’/yourUrl’)
    @HttpDelete
    @HttpGet
    @HttpPatch
    @HttpPost
    @HttpPut

    Hope this helps.

Viewing 4 posts - 1 through 4 (of 4 total)

Please to reply to this topic.

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2018 Forcetalks. All Right Reserved.

Log in with your credentials

or    

Forgot your details?