Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. The Developer Center continues to support Commerce 6.13.0 through 7.4.1.Visit new site

Interacting with the Resource Extension

Interacting with the Resource Extension

Make a request to the resource extension using a REST client and get "Hello World" back.

  1. Using a REST client, log into the demo store by following the instructions here: http://api-cortex-developers.docs.elasticpath.com/drupal/content/Generate_a_token_to_access_public_resources
  2. Enter the following fields in your REST client to make a GET request to the helloworld resource:

    HTTP Request Method

    URL

    Header

    GET

    https://localhost:8443/cortex/helloworld/

    Content-type: Application/json

    The response you get should have the following content:
    {
      "self": {
        "type": "application/vnd.mycompany.helloworld",
        "uri": "/helloworld",
        "href": "https://localhost:8443/cortex/helloworld",
        "max-age": 0
      },
      "message": "Hello World""links": [],
    }