Ask Your Question
0

Expand in Image Queries in SMLA [closed]

asked 2022-12-07 13:29:16 -0600

updated 2022-12-07 16:25:03 -0600

When attempting to add the $expand directive, we are met witha “400: Bad Request” response. We can verify that it is specifically the $expand request triggering this response as we can perform the exact response minus this one directive with complete success.

200: Success

post_data = {:$filter=>"ListingId eq '507686'", :$select=>"ListingId,ListingKey,PhotosCount,PhotosChangeTimestamp", :$count=>"true", :$top=>1000} URL Request: https://smlsa.paragonrels.com/OData/S...

400: Bad request

post_data = {:$filter=>"ListingId eq '507686'", :$select=>"ListingId,ListingKey,PhotosCount,PhotosChangeTimestamp", :$count=>"true", :$top=>1000, :$expand=>"Media"} URL Request: https://smlsa.paragonrels.com/OData/S...

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by BKFS_Customer_Care
close date 2022-12-12 11:00:15.422329

1 Answer

Sort by » oldest newest most voted
0

answered 2022-12-07 14:21:05 -0600

We do not currently support the expand attribute.
But SMLSA does contain a WebAPI Media resource that you can used to get image URLS.
If you don't have access to "Media" you can request access through the MLS.

edit flag offensive delete link more

Comments

We got this when trying to access the Media resource. Is this what you meant about needing to request access to the MLS? I ask because it doesn't mention permissions.

message" => "It is not allowed to request the Media resource in v2 of our API. Use expand by adding &$expand=Media to your property requests to retrieve media records.",

MoxiWorks gravatar imageMoxiWorks ( 2022-12-07 15:35:13 -0600 )edit

From what I can tell, Media is enabled for your profile.
I don't think that is an error from our OData servers.
I am able to pull Media records in Postman without issue using the same profile.
What application or library are you using to pull data?

bwolven gravatar imagebwolven ( 2022-12-07 15:54:32 -0600 )edit

No ListingKey, ListingKeyNumeric only in this one...

JF gravatar imageJF ( 2022-12-08 08:27:09 -0600 )edit

In Media ListingKey and ListingKeyNumeric would correspond to ResourceRecordKey and ResourceRecordKeyNumeric.

bwolven gravatar imagebwolven ( 2022-12-08 17:02:02 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2022-12-07 13:29:16 -0600

Seen: 20 times

Last updated: Dec 07 '22