You are not logged in.
Pages: 1
Please tell me what I am doing wrong in this API call.
{"apiVersion": "1.0.1",
"action": "Search.AdvancedSearch",
"inParams": {"sessionId": "dChQvA2,FT,aktILAFJ509qkOyQ6EKpU",
"query": {"fieldID": 21, "ConditionID": 36, "value": ""},
"fields": {"metadata": "true"}
}
}
The result is:
{
"result": {
"api": "OK",
"action": "SEARCH_QUERY_MISSING_FIELD_CONDITION"
}
}
The relevant part of GetSearchConfiguration is:
[
"GPS Position",
21,
[
[
"IS WITHIN 10 km of",
31,
8
],
......
[
"IS MISSING",
23,
4
],
[
"IS PRESENT",
36,
4
]
],
5,
[],
7,
"IMS Metadata"
],
I read this as GPS Position has fieldID = 21 and if I need to know that data is present the ConditionID = 36 and should have a value of "Blank" (4)
Am I reading this incorrectly?
The reply is the same if I just leave out the "value" parameter. (It should not be required)
I am trying to get a list of all files that have embedded GPS data and I need the metadata for those files returned. Right now there are only a few of these in our system. If I can make this work, I will then add other filters to narrow down the results. However this does lead to another question: How many images are too many for the system to return an answer? I imagine that if there are a million images to be returned, something will break?
Offline
Where you have:
"query": {"fieldID": 21, "ConditionID": 36, "value": ""}
I think it should be:
"query": [{"fieldId": 21, "conditionId": 36, "value": ""}]
That is, query should be an array of hashes, and within each the keys are case-sensitive (with fieldId and conditionId being the correct versions).
Offline
Thanks Dominic. I now have it working - sort of. I thought the GPS data would be returned as part of the Metadata, but it is not. I need to create a list of all the fileReferences returned by AdvancedSearch then Run files.GetLocationDetails to get the lat and long.
Do you have any idea what the limit is to this type of search - at what point will I break something if I am looking at all photos, and if the list is too long. Will it actually tell me that there are some that I am missing? (Initially we will have about 20,000 photos with GPS info but soon that will be millions)
Last edited by mdyason (2015-07-09 23:49:55)
Offline
The search configuration page allows the maximum number of results returned to be configured - the result set would be truncated at that point. It is generally best to be as specific as possible, though, for performance; when using the API to maintain data in another system then the 'last changed' field is often a good one to filter on, since you can then keep it down to just those files that may have changed since the last time the job ran.
Offline
Pages: 1