Search code examples
tapkey

using $filter on tapkey endpoints


I'm making a call to this endpoint /api/v1/Owners/{ownerAccountId}/BoundLocks to get boundLocks associated with an ownerAccount, but I would like to filter those based on title,

This is what I'm doing but it still returns all the locks:

        `${this.baseUrl}/owners/${this.ownerAccountId}/BoundLocks?filter=title eq '${lockId}`,
        {
          headers: {
            'Authorization': `Bearer ${token}`
          }
        }
      )
      return boundLocks

Solution

  • Is this the original code? The code uses filter not $filter as query parameter and the lockId seems not to be quoted correctly.

    https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-odata/72d4ebf9-5480-49a4-b88b-c5782f726c87