Search program by name LIKE %% | Community
Skip to main content
October 18, 2018
Question

Search program by name LIKE %%

  • October 18, 2018
  • 1 reply
  • 1984 views

Hello,

I need to search programs by name using a query parameter that may not be exactly the name of the program.
Example: Program name is "Search test" and the search name parameter is "Search".

Currently it only finds the program when I input exactly the same name, which is odd, because here http://developers.marketo.com/rest-api/assets/programs/#by_name you can clearly see an example with an incomplete parameter given.

Thanks.

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

1 reply

SanfordWhiteman
Level 10
October 18, 2018

Numerous examples don't actually work, unfortunately (it seems like some are just the wild imaginings of the tech writer as opposed to being dropped-in code!).

I don't see your example of the partial match. It seems more like request and response are incorrectly paired.

October 18, 2018

Request:
GET /rest/asset/v1/program/byName.json?name=Search&includeTags=true

Response:

{

  • success: true,
  • errors: [ ],
  • requestId: "16c73#1668935e89e",
  • warnings: [
    • "No assets found for the given search criteria."
    ]

}

Expected response:

{

  • success: true,
  • errors: [ ],
  • requestId: "134ed#16689359fcc",
  • warnings: [ ],
  • result:

    [

    • {
      • id: 1055,
      • name: "Search test",
      • description: "",
      • createdAt: "2018-09-04T14:06:13Z+0000",
      • updatedAt: "2018-10-18T21:42:34Z+0000",
      • url: "https://app-ab24.marketo.com/#ME1055A1",
      • type: "Event",
      • channel: "Live Event",
      • folder: {},
        • type: "Folder",
        • value: 132,
        • folderName: "Marketo Company Int"
      • status: "",
      • workspace: "Default",
      • tags: [ ],
      • costs: [ ],
      • startDate: "2018-09-04T14:00:00.000Z",
      • endDate: "2018-09-04T22:00:00.000Z"
      }

    ]

}

What it seems is that Marketo doesn't have any searching feature for programs. Is that correct?

SanfordWhiteman
Level 10
October 18, 2018

Correct. I'm saying there's no example that specifically shows otherwise (example response is not a partial match to the request, it's a total disjunction).