What is DB2 REST Api?

What is DB2 REST Api?

What is REST Api?

A RESTful API is an architectural style for an Application Program Interface (API) that uses HTTP requests to access and use data. That data can be used to GET, PUT, POST and DELETE data types, which refers to the reading, updating, creating and deleting of operations concerning resources.

An API for a website is code that allows two software programs to communicate with each other. The API spells out the proper way for a developer to write a program requesting services from an operating system or other application

Layman's term:

Let’s say you’re trying to find videos about "Java" on Youtube. You open up Youtube, type "Java" into a search field, hit enter, and you see a list of videos about Java. A REST API works in a similar way. You search for something, and you get a list of results back from the service you’re requesting from.

Using the HTTP protocol means REST is a simple request/response mechanism. Each request returns a subsequent response. You can see what a simplified request and response look like below:

No alt text provided for this image


REST Api Commands:

A RESTful API uses commands to obtain resources. The state of a resource at any given timestamp is called a resource representation. A RESTful API uses existing HTTP methodologies defined by the RFC 2616 protocol, such as:

  • GET to retrieve a resource;
  • PUT to change the state of or update a resource, which can be an object, file or block;
  • POST to create that resource; and
  • DELETE to remove it.

With REST, networked components are a resource the user requests access to -- like a black box whose implementation details are unclear. All calls are stateless; nothing can be retained by the RESTful service between executions.

DB2 REST endpoint:

You can set up your Db2? system so that application programmers can create Representational State Transfer (REST) endpoints that can be used to interact with Db2.

Each endpoint is associated with a single SQL statement. Authenticated users of web, mobile, or cloud applications can use these REST endpoints from any REST HTTP client without having to install any Db2 drivers.

The Db2 REST server accepts an HTTP request, processes the request body, and returns results in JavaScript Object Notation (JSON).

Want to know how to use DB2 Rest Api?

Watch the below series of 4 videos from IBM about you can configure the DB2 Rest Api service and how can you use it to access data from web, mobile, or cloud applications.

Part 1: How to set up Db2 for z/OS as a native REST service provider

Part 2: How to create a Db2 for z/OS REST service

Part 3:How to create a Db2 for z/OS REST service using the DSN subcommand

Part 4: How to discover and invoke the Db2 for z/OS REST service


要查看或添加评论,请登录

Abhishek Verma的更多文章

  • Mainframe Migration Trends for 2024: Embracing Modernization, Cloud Adoption, and AI

    Mainframe Migration Trends for 2024: Embracing Modernization, Cloud Adoption, and AI

    Mainframes, the workhorses of the computing industry for decades, continue to play a vital role in many organizations…

    5 条评论
  • Ansible on Mainframe

    Ansible on Mainframe

    What is Ansible? Ansible is an open source automation platform. It is very simple to setup and yet powerful.

  • DevOps for Mainframe: Agile Development

    DevOps for Mainframe: Agile Development

    Can you do DevOps on your mainframe? That might seem like a silly question. DevOps is among the newest trends in IT…

    5 条评论
  • IBM Cloud Pak for Data

    IBM Cloud Pak for Data

    Overview IBM Cloud Pak ? for Data is an integrated solution for implementing a complete analytics environment. This…

    2 条评论
  • IBM DB2 for Data Gate

    IBM DB2 for Data Gate

    The IBM Db2 for z/OS Data Gate service extracts, loads, and synchronizes your mission-critical data from Db2 for z/OS…

  • UrbanCode Deploy

    UrbanCode Deploy

    Application Planning UrbanCode Deploy is used to automate the deployment of apps to different environments, typically…

  • DB2 Z/os: How to find the thread causing deadlock

    DB2 Z/os: How to find the thread causing deadlock

    When you receive a deadlock or time out time abend, go to JESMSGLG of the Db2 master job and the job name will be in…

  • Handle Hex Values in DB2 SQL

    Handle Hex Values in DB2 SQL

    If you have any data which is unicode or contains special characters like German Umlauts (? ? ü) or any special…

  • IBM DB2 - Recursive SQL

    IBM DB2 - Recursive SQL

    Recursive is the process in which the query executes itself. It is used to get results based on the output of base…

    1 条评论
  • IBM DB2 V12 - Incompatibilities and Improvements over V11.

    IBM DB2 V12 - Incompatibilities and Improvements over V11.

社区洞察

其他会员也浏览了