We have created a search form to search on "Name" attribute and below is the SemQL Condition for the same:
(:SEARCH_PARAM_NAME is null OR UPPER(Name) LIKE '%' || UPPER(:SEARCH_PARAM_NAME) || '%')
We need to expose this search form via REST Client API or Named Queries. Can you let us know how to achieve the same.
Best Answer
B
Bharat Joshi
said
8 months ago
The details in this article were called from this doc where a variety of ways to query your data via the REST API are spelled out in some detail. In addition, there is a new, very good, tutorial on the same subject located here.
You would need to replace the IP address, data location and entity name with your own. This query is looking for Golden Company records like ‘HARLEY’. I recommend the upper as it will remove the case sensitivity of your search.
This query is looking for Golden Companies with a name like ‘General’ and a state like ‘MI’ The fastest way to determine how your query should look is to go to the application and apply a filter to a Browse Business View action. If you're looking at a Browse Business View action in the app you'll see an filter icon in the upper right corner, it looks like this:
Click that and for search type select SemQL, in the filter condition, create your wildcard query, or any query for that matter. Here I filtered on company name like 'General' and state like 'MI'.
When you apply this filter, you will see how it needs to be rendered to include the control characters so it can be sent to the rest API. In the resulting URL you will see something like this:
Everything inside the double quotes after "semqlCondition" is what you'll need to send to the API using the ?$f= syntax that I show above. Alternatively, you can google each control character you need and build your query using them directly. For example, we can infer that:
%20 is a space
%27 is a single quote
%25 is a % sign (somewhat ironically, I might add)
and so on..
1 Comment
B
Bharat Joshi
said
8 months ago
Answer
The details in this article were called from this doc where a variety of ways to query your data via the REST API are spelled out in some detail. In addition, there is a new, very good, tutorial on the same subject located here.
You would need to replace the IP address, data location and entity name with your own. This query is looking for Golden Company records like ‘HARLEY’. I recommend the upper as it will remove the case sensitivity of your search.
This query is looking for Golden Companies with a name like ‘General’ and a state like ‘MI’ The fastest way to determine how your query should look is to go to the application and apply a filter to a Browse Business View action. If you're looking at a Browse Business View action in the app you'll see an filter icon in the upper right corner, it looks like this:
Click that and for search type select SemQL, in the filter condition, create your wildcard query, or any query for that matter. Here I filtered on company name like 'General' and state like 'MI'.
When you apply this filter, you will see how it needs to be rendered to include the control characters so it can be sent to the rest API. In the resulting URL you will see something like this:
Everything inside the double quotes after "semqlCondition" is what you'll need to send to the API using the ?$f= syntax that I show above. Alternatively, you can google each control character you need and build your query using them directly. For example, we can infer that:
%20 is a space
%27 is a single quote
%25 is a % sign (somewhat ironically, I might add)
Sumetha JEEVAA
Hi Team,
We have created a search form to search on "Name" attribute and below is the SemQL Condition for the same:
(:SEARCH_PARAM_NAME is null OR UPPER(Name) LIKE '%' || UPPER(:SEARCH_PARAM_NAME) || '%')
We need to expose this search form via REST Client API or Named Queries. Can you let us know how to achieve the same.
The details in this article were called from this doc where a variety of ways to query your data via the REST API are spelled out in some detail. In addition, there is a new, very good, tutorial on the same subject located here.
You would need to replace the IP address, data location and entity name with your own. This query is looking for Golden Company records like ‘HARLEY’. I recommend the upper as it will remove the case sensitivity of your search.
http://13.56.77.82/semarchy/api/rest/query/DLOC2/Company/GD/?$f=Upper(CompanyName)%20LIKE%20%27HARLEY%25%27
To add additional parameters, it would look like this:
http://13.56.77.82/semarchy/api/rest/query/DLOC2/Company/GD/?$f=Upper(CompanyName)%20%20like%20%27%25GENERAL%25%27%20and%20Upper(RawAddress.StateProvince)%20%20like%20%27%25MI%25%27
This query is looking for Golden Companies with a name like ‘General’ and a state like ‘MI’ The fastest way to determine how your query should look is to go to the application and apply a filter to a Browse Business View action. If you're looking at a Browse Business View action in the app you'll see an filter icon in the upper right corner, it looks like this:
Click that and for search type select SemQL, in the filter condition, create your wildcard query, or any query for that matter. Here I filtered on company name like 'General' and state like 'MI'.
When you apply this filter, you will see how it needs to be rendered to include the control characters so it can be sent to the rest API. In the resulting URL you will see something like this:
Everything inside the double quotes after "semqlCondition" is what you'll need to send to the API using the ?$f= syntax that I show above. Alternatively, you can google each control character you need and build your query using them directly. For example, we can infer that:
and so on..
Bharat Joshi
The details in this article were called from this doc where a variety of ways to query your data via the REST API are spelled out in some detail. In addition, there is a new, very good, tutorial on the same subject located here.
You would need to replace the IP address, data location and entity name with your own. This query is looking for Golden Company records like ‘HARLEY’. I recommend the upper as it will remove the case sensitivity of your search.
http://13.56.77.82/semarchy/api/rest/query/DLOC2/Company/GD/?$f=Upper(CompanyName)%20LIKE%20%27HARLEY%25%27
To add additional parameters, it would look like this:
http://13.56.77.82/semarchy/api/rest/query/DLOC2/Company/GD/?$f=Upper(CompanyName)%20%20like%20%27%25GENERAL%25%27%20and%20Upper(RawAddress.StateProvince)%20%20like%20%27%25MI%25%27
This query is looking for Golden Companies with a name like ‘General’ and a state like ‘MI’ The fastest way to determine how your query should look is to go to the application and apply a filter to a Browse Business View action. If you're looking at a Browse Business View action in the app you'll see an filter icon in the upper right corner, it looks like this:
Click that and for search type select SemQL, in the filter condition, create your wildcard query, or any query for that matter. Here I filtered on company name like 'General' and state like 'MI'.
When you apply this filter, you will see how it needs to be rendered to include the control characters so it can be sent to the rest API. In the resulting URL you will see something like this:
Everything inside the double quotes after "semqlCondition" is what you'll need to send to the API using the ?$f= syntax that I show above. Alternatively, you can google each control character you need and build your query using them directly. For example, we can infer that:
and so on..
-
Import Data Into Entities via Azure Data Lake
-
Recover Deleted(soft Delete) Record and Configure in Application
-
Data Quality in batch mode and real-time integration
-
Integration with analytics tools
-
Query/Load/Delete data with the REST API
-
Does the Done Tab in Inbox have a limit?
-
How Can I Trigger Enricher or Sql Procedure when deleting?
-
Matching Rules But Only The Latest Record Creates a Golden Record
-
Unstructured and Semi Structured Data in Semarchy?
-
Read CSV files from AWS S3
See all 73 topics