Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-3939

Add attribute selection option to Content Rest API

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 5.1.0
    • None
    • None
    • Platform Sprint 154, Platform Sprint 155: Bootstrap, Platform Sprint 156: Export, Platform Sprint 157: Finish, Platform 170

    Description

      The output of the CRA on documents and detail level used to fixed, without any selection options. With this change you can determine in the request which properties and child nodes of a document will be part of the result.

      Both resources (document & detail) accept a parameter _attributes now, that can contain a comma separated list of properties and child nodes that must included in the output. The four standard publication properties (pubState, pubwfCreationDate, pubwfLastModificationDate, pubwfPublicationDate) must also be explicitly included in the output if needed. Five properties will always be available in the output, and cannot be skipped: id, name, displayName (if available), type and locale.

      Example: if you want the myhippoproject:title property and the rich text that is stored in a childnode with the name myhippoproject:content then add as request parameter: _attributes=myhippoproject:title,myhippoproject:content.

      The output will be structured like this:

      {
        "id": "b8f5eb45-7200-452a-b26e-3118a0dc60b8",
        "name": "breakfast",
        "displayName": "Breakfast",
        "type": "myhippoproject:eventsdocument",
        "locale": "en",
        "items": {
          "myhippoproject:title": "Breakfast",
          "myhippoproject:content": {
            "type": "hippostd:html",
            "content": "\n \n\n <p>Breakfast is served starting from 8:00 until 9:30.</p>\n\n \n "
          }
        }
      }

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bleunis Bert Leunis (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: