Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

    • Find webpages whose title is either Customer Experience Agent or Customer Experience Supervisor. This can be done in two ways:

      Code Pro
      curl -X GET 'http://localhost:8080/magnoliaAuthor/.rest/delivery/website/v1?title=Customer%20Experience%20Agent|Customer%20Experience%20Supervisor' \
      -u superuser:superuser
      Code Pro
      curl -X GET 'http://localhost:8080/magnoliaAuthor/.rest/delivery/website/v1?title\[like\]=Customer%20Experience%20%25' \
      -u superuser:superuser

      (The brackets have been escaped with the backslash character ( \ ) for the command to work correctly in bash.)

      Expand
      titleClick to see the resulting JSON
      Code Pro
      languagejs
      linenumberstrue
      {
        "results": [
          {
            "@name": "customer-experience-agent",
            "@path": "/travel/about/careers/customer-experience-agent",
            "@id": "1f8af166-258f-4351-a543-3d0fc8bb00c0",
            "@nodeType": "mgnl:page",
            "hideInNav": "false",
            "title": "Customer Experience Agent",
            "title_de": "Kundenerlebnisvermittler",
            "@nodes": []
          },
          {
            "@name": "customer-experience-supervisor",
            "@path": "/travel/about/careers/customer-experience-supervisor",
            "@id": "c8e6902a-499a-44d7-9de9-45fd93d60a6b",
            "@nodeType": "mgnl:page",
            "hideInNav": "false",
            "title": "Customer Experience Supervisor",
            "title_de": "Kundenerlebnisteamleiter",
            "@nodes": []
          }
        ]
      }

      The result is returned for the following configuration:

      Code Block
      languageyaml
      class: info.magnolia.rest.delivery.jcr.v1.JcrDeliveryEndpointDefinition
      params:
        website:
          rootPath: /
          includeSystemProperties: false
          nodeTypes:
            - mgnl:page
      Info

      Due to the use of %25 a wildcard character (%25) in the URL with the [like] filter the number of results is potentially higher. For example, if the website contained also a page called Customer Experience Manager, it would be also included in the response.

...