I want to fetch the campaigns sorted by lastModified through REST API | Community
Skip to main content
September 22, 2017
Solved

I want to fetch the campaigns sorted by lastModified through REST API

  • September 22, 2017
  • 1 reply
  • 2596 views

I want to fetch the campaigns sorted by lastModified. Nowhere in the wiki/documentation it has mentioned. So thought of asking here.

I have tried these query params.

https://XXX-JLV-319.mktorest.com/rest/asset/v1/programs.json?sort=last_modified&dir=DESC&direction=DESC

Anybody knows what are the correct params.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

I am sure, yes.

Retrieve the assets and sort them client-side.

1 reply

SanfordWhiteman
New Participant
September 23, 2017

Why would you assume there are such parameters, as they're not in the docs/Swagger? You can't just invent an API....

September 25, 2017

Its not about inventing an API.

I didn't get much information in the docs/Swagger API, so asking here.

And these query parameters sort=last_modified&dir=DESC&direction=DESC were used from the UI portal. So thought of using for REST API as well. But didn't work.

Are you sure that the REST APIs doesn't provide any 'sort by' functionality as its not there in docs/Swagger ?

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
September 25, 2017

I am sure, yes.

Retrieve the assets and sort them client-side.