8. Add Value Accessor Set for SourceΒΆ

The source object is a JObject in the JArray created from the response. The value accessor set defines the values that are available in the JObject.

Note

Refer to the sample object below while configuring the value accessor set.

{
  "source": {
    "id": "lorem",
    "name": "Lorem"
  },
  "author": "Lorem Ipsum",
  "title": "Aliquam volutpat elit turpis, et rhoncus sapien maximus quis",
  "description": "Aliquam lacus velit, eleifend quis leo vitae, condimentum cursus nisi.",
  "url": "https://www.lipsum.com/feed/html",
  "urlToImage": "http://via.placeholder.com/350x150",
  "publishedAt": "2017-11-01T00:00:00Z"
}
  1. In Sitecore, open Content Editor.

  2. Navigate to sitecore > system > Data Exchange > Data Exchange Tenant for News API > Data Access > Value Accessor Sets > Providers.

  3. Add RESTful Value Accessor Sets.

    Hint

    This template is a command template. It does not prompt for the item name. The command template assigns the item name automatically.

  4. Navigate to sitecore > system > Data Exchange > Data Exchange Tenant for News API > Data Access > Value Accessor Sets > Providers > RESTful.

  5. Add Token Value Accessor Set with the following field values:

    Name

    Value

    Name

    Article Values

  6. Navigate to sitecore > system > Data Exchange > Data Exchange Tenant for News API > Data Access > Value Accessor Sets > Providers > RESTful > Article Values.

  7. Add Token Value Accessor with the following field values:

    Name

    Value

    Name

    Source Id

    Path Expression

    source.id

    Note

    The path expression is made up of property names and array indexes separated by periods.

  8. Add Token Value Accessor with the following field values:

    Name

    Value

    Name

    Source Name

    Path Expression

    source.name

  9. Add Token Value Accessor with the following field values:

    Name

    Value

    Name

    Author

    Path Expression

    author

  10. Add Token Value Accessor with the following field values:

Name

Value

Name

Title

Path Expression

title

  1. Add Token Value Accessor with the following field values:

Name

Value

Name

Description

Path Expression

description

  1. Add Token Value Accessor with the following field values:

Name

Value

Name

Url

Path Expression

url

  1. Add Token Value Accessor with the following field values:

Name

Value

Name

Image Url

Path Expression

urlToImage

  1. Add Token Value Accessor with the following field values:

Name

Value

Name

Published At

Path Expression

publishedAt