Search API not returning asset when searching using public ID

Comments

3 comments

  • Avatar
    Eric Pasos

    Hi Jess,

    The search API could return the asset information that you are querying as long as the actions (e.g., upload, moderation approval, etc) has been completed. And checking the source code you shared, I am now able to get the expected result (i.e., after the asset has been approved):

    {
      total_count: 1,
      time: 2,
      resources: [
        {
          asset_id: 'dde1de5456443d18fcdbe49b03b85eaf',
          public_id: 'Merchandising/WOR03XX/Gallery/H2_PDP_Assets_9',
          folder: 'Merchandising/WOR03XX/Gallery',
          filename: 'H2_PDP_Assets_9',
          format: 'jpg',
          version: 1661942541,
          resource_type: 'image',
          type: 'upload',
          created_at: '2022-08-31T10:42:21+00:00',
          uploaded_at: '2022-08-31T10:42:21+00:00',
          bytes: 710328,
          backup_bytes: 0,
          width: 3000,
          height: 1688,
          aspect_ratio: 1.77725,
          pixels: 5064000,
          pages: 1,
          url: 'http://media.rapha.cc/rapha-test/image/upload/v1661942541/Merchandising/WOR03XX/Gallery/H2_PDP_Assets_9.jpg',
          secure_url: 'https://media.rapha.cc/rapha-test/image/upload/v1661942541/Merchandising/WOR03XX/Gallery/H2_PDP_Assets_9.jpg',
          status: 'active',
          moderation_kind: 'manual',
          moderation_status: 'approved',
          access_mode: 'public',
          access_control: null,
          etag: '058a3a8a18133ba874924e1ca7d9ad7f',
          created_by: [Object],
          uploaded_by: [Object]
        }
      ],
      rate_limit_allowed: 5000,
      rate_limit_reset_at: 2022-09-01T06:00:00.000Z,
      rate_limit_remaining: 4998
    }

    Please take a look and see if that would address your use case requirements and do let me know if you have any additional questions.

    0
    Comment actions Permalink
  • Avatar
    Jess Kane

    Hi Eric, 

    Thanks for getting back to me.

    You're right, the issue was that the assets hadn't been marked as approved after moderation. I didn't realise that this would effect which assets appeared in the search results. Does Cloudinary moderate all assets that are uploaded?

    Thanks

    0
    Comment actions Permalink
  • Avatar
    Loic Verger Del Bove

    Hi Jess,

    As mentioned in the internal ticket you also created, this file has been uploaded with an upload preset that has been set up so any files uploaded with this preset will have to be manually moderated by someone from your side.

    Hope that helps.

    Best,

    Loic

    0
    Comment actions Permalink

Please sign in to leave a comment.