Versions Compared

Key

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

...

    • Find webpages in the Travel Demo which were last modified before or on June 3, 2015: 

      Code Pro
      languagebash
      curl -X GET 'http://localhost:8080/magnoliaAuthor/.rest/delivery/website/v1?mgnl:lastModified\[lte\]=2015-06-03' \
      -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": "meta",
          "@path": "/travel/meta",
          "@id": "7ebd74f1-c6f7-4307-9953-afd549118a56",
          "@nodeType": "mgnl:page",
          "jcr:createdBy": "admin",
          "hideInNav": "true",
          "mgnl:template": "travel-demo:pages/standard",
          "mgnl:lastActivatedBy": "superuser",
          "jcr:created": "2018-03-09T13:47:38.468+01:00",
          "mgnl:lastActivated": "2018-03-09T13:47:50.329+01:00",
          "mgnl:created": "2015-02-02T20:58:23.939+01:00",
          "mgnl:createdBy": "superuser",
          "title": "Container for meta pages",
          "mgnl:lastModified": "2015-06-03T20:37:49.283+02:00",
          "mgnl:activationStatus": "true",
          "mgnl:lastModifiedBy": "superuser",
          "@nodes": []
        }]
      }

      The result is returned for the following configuration:

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

      Please note that the logic of the "equal" filtering operation before the release of REST 2.1 was slightly different. In order to obtain the above response you would have to send the following request:

      Code Pro
      curl -X GET 'http://localhost:8080/magnoliaAuthor/.rest/delivery/website/v1?mgnl:lastModified\[lte\]=2015-06-04' \
       -u superuser:superuser

      (

      Jira
      serverMagnolia - Issue tracker
      columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
      serverId500b06a6-e204-3125-b989-2d75b973d05f
      keyMGNLREST-170
      )

...