Api monitoring .net - rest

I am novice in Web API. Apologize if any question is not making sense.
I have several Web APIs developed in .NET and hosted on the same sever. These APIs are consumed by different applications. Here I wanted to monitor APIs. Monitoring includes:
How many applications are consuming my API?
How many hit counts to the API by different applications?
Is there any why we can restrict an application to access the application(ex. An application is given only 5 hits to the api per day)?
And also it would be helpful, if there are any tools available to do the same.
Thanks in advance

You can check out Treblle .Net SDK.
Treblle lets you monitor and observe your API and all the features you listed are packed in Treblle.
https://github.com/treblle/treblle-net

Related

Rest/Graphql apis and event driven architecture

I've been looking at the event driven architecture and it's seems it might be the right architecture for a project I'm working on.
But there is one thing I don't really get yet, what is the best practice/common pattern when your micro services are being consumed by front-end applications?
For my project, I have a web app and an iOS and Android app.
Let's take a simple case of a feature letting users create their profile.
Let's say I send the profile data via REST/GraphQL to the api endpoint which triggers microservices (running behind Kafka or Pulsar).
How can I get the result of the profile creation and then maybe use it on the next screen?
Cheers
websocket calls to Pulsar will do most of what you want https://pulsar.apache.org/docs/en/client-libraries-websocket/
You could also call Apache Pulsar via MQTT which is not too uncommon from cell phones.
Or use a REST gateway or microservice between the app and Pulsar services. I use Apache NiFi for that.

How to use REST API's

I know some basic programming languages but im new at using API's.
Can someone please explain how, or where do i run my API's codes?
Will the API's be run on the website i'm trying to get my data from or can it be run on a client or from another different running environment or platform?
Apis should only (I say "should" because I am not sure that something like this can be done on the client side) to run on the server.
when you get information from an api you are not executing it on the client. you are only getting the data you requested for the endpoints you used.
Do you plan to use REST APIs as a consumer or producer? That is, do you want to expose your data, systems and processes as resources for an end consumer, or do you want to be the consumer creating applications that leverage services?
The Producer
To produce REST APIs, you'll need to run your API providers using a web server. Just about any web server will do, so long as it can map resource paths to functions. Some common ones are:
Node.JS with Express.js
Nginx with Python/Flask
Java using Spring
You should be able to run whatever you chose on nearly any hosting provider, cloud VM or wherever else you usually run websites.
The Consumer
You can use Rest APIs anywhere you have network connectivity. You'll find this commonly in mobile applications, web applications, IoT devices, etc where data are combined from multiple providers on to a single application for end users. The key feature as a consumer you'll be looking for is a directory of API providers from which you can build your application.
ProgrammableWeb maintains one such list.

Best practices for limited REST APIs

Hello Stackoverflow community,
I want to build an Android app which uses soccer data. I've found a service that provides soccer information via a REST API. The service is limited to 5,000 request/hour and I want to implement it.
If I have lots of users the app will break.
I've found a way to decrease the number of requests, by using an API-caching middleware. Example:
https://github.com/kwhitley/apicache
Question: What are the best practices when using limited REST APIs?
Best practice is that you implement a server-side application that caches the unique requests with a lifespan and Android application get data from it! Don't get data directly from third-parties.

Recommendation required RESTful web services on Linux

Looking for a recommendation of which framework/web server to go with on Linux. The idea is to build database backed RESTful web services.
I know Java, c++, c# (irrelevant I guess on linux) and C. Okay with developing in any of those.
Here is a table of frameworks that have varying degrees of support for REST and the languages they use.
You might want to check out RESTx. It is multi lingual: You can write code in Java, Python (server-side JavaScript coming soon). RESTx is specifically a platform for the creation of RESTful resources and web services. It is NOT a traditional application framework. DB backed web services are actually a specialty of RESTx: You identify the reusable components you want (in this case a JDBC capable DB access component), and then just configure it through the RESTful API or by filling out a small form in a browser. As a result, you get a new RESTful web service, which encapsulates the query you specified when creating the new resource.
I'm the lead developer on RESTx, so if you have any questions, please contact me or visit our forums.
If I were you I would go with Ruby 1.9.2 + Rails 3
they're fun and you get to learn something new
ubuntu specific install guide: http://web2linux.com/installing-rails-3-on-ubuntu-10-04-lucid-lynx/
official RoR intro: http://edgeguides.rubyonrails.org/getting_started.html

iPhone/iPad apps with backend databases?

We're investigating the iPhone Enterprise Developer Program as a way to develop and distribute in-house apps. Since our backends are all Windows, SQL server and Oracle databases, we have to find out a way to make our data available for the coming in-house apps.
As far as I know that Core Data is mainly based on SQLite as persistent store. I am not sure if there are any APIs available in iPhone SDK for SQL server or Oracle database? Another possibility, or very attractive strategy, is to build our own web-based REST services as CRUD gateway to our databases.
Personally, I prefer to integrate in-house apps with our ASP.NET based web services. I am not sure if this is possible. Are there any examples or documentations about this strategy?
an interesting option is to expose your data from your server using asp.net OData then use this project to generate a client in objective-C to consume your OData service.
As far as I am aware there are no approved API's to access a server based database. The way we do it in our organisation is pretty much the way you are suggesting. In some instances we are using SOAP but typically we just use a custom JSON or XML web service to access the data.
With regards to ASP.NET are you talking about making native iPhone Apps with ASP.NET or getting a native iPhone App to talk to an ASP.NET web service? If its the first then have a look at monotouch (don't know much about it), if its the later then this shouldn't cause issues. Just use NSURLConnection and deal with the resource structure on the App (be it JSON or XML).
The added advantage of using a web service rather than a straight database connection is that you get encryption for free using https.
Hope that helps
There's a product called SUP (Sybase Unwired Platform), it provides a framework to handle access to databases but has the advantage that there doesn't need to be an online access all the time, it stores persistent data locally and then can sync up with the host database using messaging.