Jump to content
pconkie

Datastore

Recommended Posts

Is there a way to filter by creation date when getting entries?

FrogOS.fdp({
                url: 'datastore/get',
                path: '/api/fdp/2/',
                type: 'GET',
                data: {
                    target_uuid: myid,
                    created_on: {from: '1557579988', until: '1557589988'}
                }

Something like the above returns entries without error but only entries created on 1557579988 NOT between those two date-times. Similarly leaving out the 'until' portion altogether.

Thanks

Share this post


Link to post
Share on other sites
On 11/05/2019 at 14:25, pconkie said:

Is there a way to filter by creation date when getting entries?


FrogOS.fdp({
                url: 'datastore/get',
                path: '/api/fdp/2/',
                type: 'GET',
                data: {
                    target_uuid: myid,
                    created_on: {from: '1557579988', until: '1557589988'}
                }

Something like the above returns entries without error but only entries created on 1557579988 NOT between those two date-times. Similarly leaving out the 'until' portion altogether.

Thanks

Sure, try this:

FrogOS.fdp({
                url: 'datastore/get',
                path: '/api/fdp/2/',
                type: 'GET',
                data: {
                    target_uuid: myid,
                    created_on_after: '1557579988',
                    created_on_before:'1557589988'
                }

 

You should also be able to use, created_on_after_inclusive and created_on_before_inclusive, which does as the name implies.

 

  • Thanks 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...