REST API

 






Identify Endpoints and Keys

An endpoint that allows an application to use the service is defined when you provision an Azure AI services service resource in your Azure subscription. To consume the service through the endpoint, applications require the following information:

  • The Endpoint URI- This is the HTTP address at which the REST interface for the service can be accessed. Most AI services software development kits (SDKs) use the endpoint URI to initiate a connection to the endpoint.

  • A Subscription Key- Access to the endpoint is restricted based on a subscription key. Client applications must provide a valid key to consume the service. When you provision an AI services resource, two keys are created and applications can use either key. You can also regenerate the keys as required to control access to your resource.

  • The Resource Location- When you provision a resource in Azure, you generally assign it to a location, which determines the Azure data center in which the resource is defined. While most SDKs use the endpoint URI to connect to the service, some require the location.

Use a REST API

Client apps can leverage the REST application programming interfaces (APIs) offered by Azure AI services to consume services. The majority of the time, service functions can be called by sending data in JSON format via an HTTP request. Depending on the particular function being called, this request may be a POST, PUT, or GET request.

The client receives the function's results as an HTTP response, frequently with JSON contents that provide the function's output data. AI services can be consumed using any programming language or tool that can send and receive JSON over HTTP thanks to the use of REST interfaces with an HTTP endpoint. Common programming languages like Microsoft C#, Python, and JavaScript can be used, along with testing-related tools like Postman and cURL.

Use an SDK

Although you can utilize REST interfaces to create an application that makes use of Azure AI services, leveraging native libraries for the programming language you're using will make it easier to create more complicated solutions.

The REST interfaces for the majority of AI services are abstracted by software development kits (SDKs) for popular programming languages. Although the availability of SDKs varies depending on the AI provider, most services include SDKs for languages like Microsoft C# (.NET Core), Python, JavaScript (Node.js), Go, and Java.

Each SDK comes with online documentation to assist you in identifying the proper classes, methods, and parameters used to interact with the service, as well as packages that you may install to use service-specific libraries in your code.

Conclusion

We have successfully learnt about REST API and SDK.

 

 

 

 











Comments

Popular posts from this blog

Information Protection Scanner: Resolve Issues with Information Protection Scanner Deployment

How AMI Store & Restore Works?

Create A Store Image Task