Device Registry Management API - Devices - Case-insensitive search - eclipse-hono

How to make case-insensitive search when searching devices for a tenant with optional filters, paging and sorting options by using Device Registry Management API?

Currently case-insensitive search of devices/tenants is not supported. I think it is nice to have this feature. I would suggest to create a issue (feature request) in Hono github repository (https://github.com/eclipse/hono/issues).
Note: Hono's MongoDB based device registry implementation supports search using optional filters. The search feature is not yet implemented in the JDBC based registry.

Related

Node.js REST API versioning implementation with features

I want to switch my Node.js REST API to use versioning.
Currently, the API uses Swagger (yaml) to display the endpoints.
When the versioning is set up, we want to be able to 1) designate some endpoints to hide for external use but have internally and 2) have the "servers" dropdown in the Swagger have all our different major versions.
Is there a way to do this with Node.js versioning? Thanks!

Guidance Required - Approach to consume ODATA Service

We understand that these are the options available from SDK to connect to ODATA Service
Option 1 - If the ODATA Service is not supported implicitly by SDK, Use com.sap.cloud.sdk.odatav2.connectivity.1.ODataCreateRequestBuilder
Option 2 - If the ODATA Service is not supported implicitly by SDK, Use VDM generation approach.
Call the services using generated Java classes
Option 3 - If the ODATA Service is supported implicitly by SDK, Use the already available class
e.g. 2> com.sap.cloud.sdk.s4hana.datamodel.odata.services.OutboundDeliveryService
Now we have have some questions and need expert guidance here
Question 1 - We have a use case where we need to call oDATA Services from a third party system
which option we should go for Option 1 or Option 2 ?
Question 2 - What are these cases where Option 1 is preferred over Option 2?
Question 3 - We also have a use case where we need to call S4HANA ODATA service related to OutboundDelivery. Service is supported by SDK by class com.sap.cloud.sdk.s4hana.datamodel.odata.services.OutboundDeliveryService
But there is one new field is getting added to the service during current release. We need to update this field
In this case which option is suggested?
Question 4 - How frequently new fields on existing S4HANA odata services are included in SDK?
I hope I can enlighten you a little here:
Regarding 1: Personally, I'd still recommend going with option 2 and generate client code using our generator. This will give you the same convenience that you know from the S/4 services for any other OData service. If, for some reason, the generated code does not work against your third party service, you can still use option 1 as a fallback.
Generally speaking, our generator should work for any OData v2 service, not just SAP services.
Regarding 2: As already mentioned, the generic OData client always works well as a fallback, if the generated client does not work whatever reason.
The other case I can think of (and this should be rather rare), is that you yourself are exposing one service that retrieves it data from several downstream OData services. In this case, the generic client might give you some advantages over the generated one.
Apart from that, I'm not aware of any use cases where I'd personally go with the generic client over the generated one.
Regarding 3 and 4: The VDM packages that we ship as part of the SAP Cloud SDK contain the OData client code for the current release of SAP S/4HANA Cloud. So if the services in SAP S/4HANA Cloud are updated, our packages will reflect that update. If you're working with SAP S/4HANA On-Premise, there's generally a good chance that the service is compatible with the Cloud version. If not, you can still use our generator to generate client code with the metadata of the respective On-Premise service.

Is Odata Filter functions supported in SAP Cloud SDK -Java

I want to use the OData function SubstringOf in our filter expression. As of now I do not see any relevant api against GeneratedEntityName.PROPERTYNAME.
Is there a workaround to use substringOf incase the API is unavailable.
Using Java SAP Cloud SDK version 3.7.0
Unfortunately the feature you are requesting is currently not implemented. Due to dependency restrictions the SAP Cloud SDK will not be able to provide a native solution to use custom filter expressions.
new DefaultGeneratedService()
.getAllEntities()
.select(Entity.PROPERTY_NAME)
.withQueryParameter("$filter", "substringof('SAP', CompanyName)")
You will not be able to use other filter expressions by the VDM. So you have to construct the query string yourself.
We are planning to enable custom and type based filters sometime this year.

How to enable Vulnerability alerts through the GitHub API or GraphQL

I have searched high and low, but I can't find anything telling me how to enable GitHub Vulnerability alerts through their API. I conversely can't find anything saying it's not supported.
Does anyone know where I can find the API documentation if it is supported, or can someone tell me it's not? I have just completed a migration to GitHub for my origination and we have ~750 repositories so enabling them all manually is... less than ideal.
we released an API for this scenario a while back, so you can now enable or disable security alerts in bulk using that. We also published a sample which calls that API for all the repositories in an organization.
API: https://developer.github.com/v3/previews/#enable-or-disable-vulnerability-alerts-for-a-repository
Sample: https://github.com/github/enable-security-alerts-sample
#Russ looks like it's only available according to the UI. I am in the same position in needing to enable this for a very large number of repos.
Take a look at: https://github.community/t5/GitHub-API-Development-and/Security-vulnerability-alerts/td-p/15846
I got this from my companies GitHub service rep:
Enable security vulnerability via API (v3 or v4)
I've raised this and currently in conversations with the team that is responsible for
this feature to see when this could be addressed. I have to say this
is an exception to the GitHub rule of API/Platform first. I apologise
for that.

What is the "Flow_type" attribute in Microsoft's Azure ARM Template for Application Insights?

It's described as a non-required field, but it's an enum (without any other listed options) and the description is vague: Used by the Application Insights system to determine what kind of flow this component was created by. This is to be set to 'Bluefield' when creating/updating a component via the REST API. - Bluefield.
My rule of thumb is don't include anything extra (KISS) that doesn't break my application, but if there's some benefit I can get out of it, I'd like to know. Thanks!
Reference: https://learn.microsoft.com/en-us/azure/templates/Microsoft.insights/components?toc=%2Fen-us%2Fazure%2Fazure-resource-manager%2Ftoc.json&bc=%2Fen-us%2Fazure%2Fbread%2Ftoc.json
Flow_Type and Request_Source Do not have any effect in the current version, and they might be deprecated in future versions of App Insights API

Resources