"similar to" filter generates "Invalid API Call" error

Not applicable

I am using a filter querying the analytics api and getting an error. What am I doing wrong? (I would like to use regex's to match multiple targets, e.g. as "mytarget.*")

Here's my filter:

filter=(target similar to 'mytarget')

I get an error like this:

Invalid API Call - \nLiterals of type 'TO' are currently not supported

Note the SQL that is generated:

(target LIKE to 'mytarget')

Full error message:

{  
 "code":"analytics.dataapi.service.ClientError",
 "message":"Invalid API Call - \nLiterals of type 'TO' are currently not supported.(line 1, pos 313)\n\n== SQL ==\nSELECT sum(message_count) AS sum_message_count ,developer_app as developer_app , concat ((FROM_UNIXTIME(client_received_start_timestamp/1000,'yyyy-MM')),'-01 00:00:00') AS monthly FROM _temp1498578883527 WHERE (client_received_start_timestamp BETWEEN 1491004800000 AND 1491091200000) AND ( (target LIKE to 'mytarget') ) GROUP BY developer_app,3 ORDER BY monthly ASC LIMIT 14400\n-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^^^\n",
 "contexts":[  

 ]
}

Full url (with some obfuscation):

https://api.enterprise.apigee.com/v1/o/{yourorg}/environments/prod/stats/apps?select=sum(message_cou... similar to 'searchapi')

Thanks in advance!

0 2 235
2 REPLIES 2

Not applicable

Kevin, I think you have identified a bug in our api to sql translation. We will fix this.

Not applicable

Awesome, will there be a post back here when it's fixed or a ticket to track?

Thanks for the quick reply.