Are Azure DevOps APIs language agnostic? - c#

I've written small programs in C# that integrate with Azure DevOps and perform actions on WorkItems and complete other small tasks. I accomplished this using the APIs provided by Microsoft as well as the NuGet packages they provide in order to successfully integrate with DevOps.
I want to create a similar application using Dart/Flutter, largely as a practical exercise that has a useful product. However I'm unsure whether doing this in a language that is not C# is actually feasible. Since the integration with DevOps required the NuGet packages provided by Microsoft, and the fact that these don't exist for Dart, would I still be able to write a Dart app that could communicate with DevOps?
Azure DevOps APIs: https://learn.microsoft.com/en-us/rest/api/azure/devops/?view=azure-devops-rest-5.1
NuGet: Microsoft.VisualStudio.Services.Client etc.

Given that the API is referred to as a REST API returning XML or JSON data, and there are client libraries in a number of different languages (https://learn.microsoft.com/en-us/rest/api/azure/devops/?view=azure-devops-rest-5.1#client-libraries) this should be possible.
Worst-case is you'll end up talking to the HTTP endpoints directly, rather than via some helpful wrapper library, as is your case with C#.

Related

Firebase Cloud Messaging with Google client library

I'm currently trying to migrate an existing server-side application which uses Firebase Cloud Messaging. To my understanding, this NuGet package is suitable for that; I have successfully referenced it in the existing C# project.
However, the documentation available here is indeed a very documented, but does not give a step-by-step example on how to initiate a call. How can I formulate a call to the API? I have done so in the past successuflly with a customized HTTP request, but don't understand how to do this with the API.
Has anyone successully used this API before and could give some insights? Although I use C#, any experience already made with a different language will be appreciated.

run databrick workspace from .net console app

I've got a databricks workspace that runs some python scripts to query some data. Is there a way to trigger this script in the workspace from the console app and have it output the data to azure blob storage? If so, can i pass parameters to the workspace from my app to use in the query?
Unfortunately, you cannot run Databricks workspace from the .net console app.
I would suggest you to provide feedback on the same:
https://databricks.com/feedback
All of the feedback you share in these forums will be monitored and reviewed by the Microsoft engineering teams responsible for building Azure.
If you are interested in deploying your app to Databricks, make sure your app is .NET Standard compatible and that you use .NET Core compiler to compile your app.
This tutorial teaches you how to deploy your app to the cloud through Azure Databricks, an Apache Spark-based analytics platform with one-click setup, streamlined workflows, and interactive workspace that enables collaboration.
You can achieve this via REST API. This could be done via Jobs API, either by:
Creating the job for your existing notebooks or Python scripts, and then triggering the job via Run now command
Using Runs Submit call - in this case you won't need to create a job, but it looks like that you can't pass parameters to a job (that's quite strange, maybe the documentation is missing)
to use REST API you need to authenticate, but this is well described in the documentation

How To Create a gRPC Service In C# For Google Assistant SDK?

I want to communicate with the Google Assistant SDK via C#, and the SDK website said that for languages other than Python, I need to setup gRPC. Are there any good tutorials on this that I can use to get started? Thanks :)
https://developers.google.com/assistant/sdk/reference/rpc/
It should be possible to use assistant API SDK from any language that support gRPC (including C#), but if there is not pre-build assistant SDK available (looks like there is one for python, not sure about other languages), it is a bit more involved to do that.
In short:
The .proto API definitions for all public Google APIs (including assistant API) live in "googleapis/googleapis" github repo:
https://github.com/googleapis/googleapis/tree/master/google/assistant/embedded/v1alpha1
In short, here's what you need to do:
grab .proto definitions for the API from github
generate proto messages/stubs in language of your choice (basically the same as in gRPC tutorials on grpc.io).
authenticate with google using an auth library
(http://www.grpc.io/docs/guides/auth.html)
invoke API calls using a client stub generated in step 2.
Btw, the Google API client libraries are basically a pre-packaged result of these steps, sometimes with a bit of convenience layer on top of it improve the user friendliness of a given API.
Also, usually support for more languages is added to new APIs over time (so at some point there might be and official C# client library).

Can we replace Azure Portal by our enterprise Client app to perform all tasks that we perform on azure protal

Does Azure offer full APIs to accomplish all tasks without opening azure portal.
I heard some REST APIs are available but not sure about their coverage.
My questions is can we replace Azure portal completely by our customized enterprise App which actually calls REST APIs provided by Azure.
here is Why I need this strange thing
We need this as our organization is developing a Internal Unified App to manage our resources on all three cloud Azure,AWS and Google Cloud from single point..
The answer to your question is yes. You can certainly do that. As Alex mentioned in his comments, take a look at Azure Service Management API to begin with.
However there are a few things I would like to point out:
As you know there are two portals right now (Live and Preview). Unfortunately both of these portals use different sets of API. Live one uses Service Management API and the Preview one uses Azure Resource Manager (ARM) API. So you have to make sure that you use both of these APIs in your application. Though Microsoft is pushing very hard to make all the APIs exposed through ARM API but there's still a lot of work that needs to be done.
Another thing I noticed is that at times documentation for REST API for certain services is missing though there are ways to find that information. Just keep that in mind if you're building support for these services and not able to find documentation.
I would suggest you start here: https://msdn.microsoft.com/en-us/library/azure/mt420159.aspx and then find out REST APIs for the services you're interested in supporting in your application.

Accessing azure storage services

There are couple of ways to access azure storage services. And I wanted to know from the experts:
Which is the recommended way for accessing azure storage services?
What are the pros/cons of either? (like performance, no of
requests…)
Windows Azure Storage Client Library Class Library
OR
Windows Azure Storage Services REST API
If you are familiar with .NET and feel more comfortable in coding in e.g. C# then the Storage Client Library abstracts all the REST API calls from you and makes your life easier :)
Storage Client Library
Pros - easy of use, .NET, good community support
Cons - none that I'm aware of
The REST interface is excellent and can give you a more native way to write interoperable code at the REST/HTTP layer
Pros - interop e.g. devices, platforms, languages
Cons - complexity IMO
HTH
The other answers are helpful, but on a technical note, there's exactly one way to access Windows Azure storage, and that's via its only API (REST). The .NET storage client library is one of many available libraries you can use to call that API.
This depends on your environment. If you're using .NET, Node, Java, PHP or Python I suggest you take a look on the Windows Azure website since there's an SDK for all these environments, which is much easier than using the REST api (underneath the SDK still uses the REST api):
You don't have to handle the low level REST API
The SDK is built by the Windows Azure team, they have the most knowledge of how to best use the REST API
For the number of requests, most of the time you are in control in both scenarios (batching for table storage, getting multiple messages from queue, ...).
Now, keep in mind that the REST api will always have the new features first, and it can take a while before these are implemented in the SDKs. But still, you can follow the repositories on GitHub to get the newest versions (the 1.7.1 .NET SDK is here while the 'official' release is still 1.7).
If you just want to access your Azure Storage, just download FREE 3rd party application and configure your Azure Storage using "Storage Name" and "Storage Key" and you are good to go. Here is a list of a few applications:
Azure Storage Explorer
CloudXplorer
CloudBerry Azure Storage Explorer
If you want to get your hands dirty and use Azure Storage Client API, here is a full example code.

Categories

Resources