CINXE.COM

OData - the Best Way to REST

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <title> OData - the Best Way to REST </title> <meta name="description" content="OData, short for Open Data Protocol, is an open protocol to allow the creation and consumption of queryable and interoperable RESTful APIs in a simple and standard way. "> <meta name="keywords" content="odata, open data, open data protocol, rest, restful, rest api, rest apis, restful api, restful apis, rest service, rest services, restful service, restful services, http, oasis, oasis tc"> <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.0.0.min.js"></script> <script> // Fallback to loading jQuery from a local path if the CDN is unavailable (window.jQuery || document.write('<script src="/public/jquery-3.0.0.min.js"><\/script>')); </script> <!-- <script> $(document).ready(function(){ $.getJSON("http://ipinfo.io/?callback=?", function(data) { if (data.country=="CN") { $("#GeoResults").html('<embed src="https://player.youku.com/player.php/sid/XMTU5MzU2MDU0NA==/v.swf" allowFullScreen="true" quality="high" width=100% height="230" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash"></embed>'); } else $("#GeoResults").html('<iframe width=100% height=230px src="https://www.youtube.com/embed/wH5TUwzlaWI"></iframe>'); }); }); </script> --> <link rel="stylesheet" href="https://www.odata.org/public/css/bootstrap.min.css"> <link rel="stylesheet" href="https://www.odata.org/public/css/site.css"> <link rel="stylesheet" href="https://www.odata.org/public/css/syntax.css"> <link rel="stylesheet" href="https://www.odata.org/public/css/autocomplete.css"> <!--Below is for the adopters page--> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.0.7/css/swiper.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.0.0/magnific-popup.min.css"> <!-- end --> </head> <body data-spy="scroll" data-target="nav"> <div role="banner"> <a class="sr-only sr-only-focusable" href="#main-content"> <p role="presentation">Skip to main content</p> </a> <nav class="navbar navbar-default" role="navigation" aria-label="Main Navigation"> <div class="container container-fluid"> <div class="navbar-header"> <ul class="nav navbar-nav"> <li> <a class="brand" href="/"> <img class="img-responsive" alt="OData logo" src="https://www.odata.org/assets/OData-logo-e1393393068350.png"> </a> </li> </ul> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#odata-navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <div class="collapse navbar-collapse" id="odata-navbar-collapse" role="navigation"> <ul class="nav navbar-nav" role="menubar"> <li role="none"> <a role="menuitem" href="/blog">Blog</a> </li> <li class="dropdown" role="none"> <a role="menuitem" aria-haspopup="true" aria-expanded="false" class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="#"> Developers <b class="caret"></b> </a> <ul class="dropdown-menu" role="menu" aria-label="Developers dropdown."> <li role="none"> <a role="menuitem" href="/getting-started">Getting Started</a> </li> <li role="none"> <a role="menuitem" href="/documentation">Documentation</a> </li> <li role="none"> <a role="menuitem" href="/libraries">Libraries</a> </li> <li role="none"> <a role="menuitem" href="/odata-services">Reference Services</a> </li> <li role="none"> <a role="menuitem" href="/odata-icon-usage-guidelines/">Icon Usage</a> </li> </ul> </li> <li class="dropdown" role="none"> <a role="menuitem" aria-haspopup="true" aria-expanded="false" class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="#"> Tools <b class="caret"></b> </a> <ul class="dropdown-menu" role="menu" aria-label="Tools dropdown."> <li role="none"> <a role="menuitem" href="https://marketplace.visualstudio.com/items?itemName=stansw.vscode-odata" target="_blank"> OData for Visual Studio Code </a> </li> <li role="none"> <a role="menuitem" href="https://pragmatiqa.com/xodata/" target="_blank">XOData</a> </li> </ul> </li> <li role="none"> <a role="menuitem" href="/ecosystem">Ecosystem</a> </li> <li role="none"> <a role="menuitem" href="/contribution">Getting Involved</a> </li> </ul> <form class="navbar-form navbar-left" role="search"> <div class="form-group combobox combobox-list"> <input id="main-search-input" type="text" aria-label="Search" class="form-control st-default-search-input" placeholder="Search" role="combobox" aria-autocomplete="list" aria-controls="search-results" aria-expanded="false"> <button hidden aria-hidden="true" id="cb1-button" class="fa-search" tabindex="-1" aria-expanded="false" aria-controls="search-results"> </button> </div> </form> </div> </div> </nav> </div> <main id="main-content"> <div class="container"> <div id="myCarousel" class="carousel slide row" data-ride="carousel"> <!-- Indicators --> <ol class="carousel-indicators"> <li data-target="#myCarousel" data-slide-to="0" class="active"></li> <li data-target="#myCarousel" data-slide-to="1"></li> </ol> <!-- Wrapper for slides --> <div class="carousel-inner zero-side-margin" aria-label="OData Description"> <div class="item active"> <img src="https://www.odata.org/assets/homepage_1.jpg" alt="Home"> <div class="carousel-caption jumbotron transparent-background"> <h1 class="text-center">OData - the best way to REST</h1> <p class="text-center">An <b>open protocol</b> to allow the creation and consumption of <b>queryable</b> and <b>interoperable RESTful APIs</b> in a <b>simple</b> and <b>standard</b> way.</p> </div> </div> <div class="item"> <img src="https://www.odata.org/assets/homepage_2.jpg" alt="Blog" style="opacity:1.0"> <div class="carousel-caption jumbotron" style="background-color: rgba(255,255,255,0.5)"> <h1 class="text-center bottom-margin">Recent Posts</h1> <div class="row transparent-background"> <div class="col-md-3 text-left"> <h4><a href='/blog/OData-401-Committee-Spec-Published/'>OData 4.01 Committee Spec Approved</a></h4> By <em>Michael Pizzo</em> </div> <div class="col-md-3 text-left"> <h4><a href='/blog/Whats-new-in-REST-APIs-Seminar-December-5-2017/'>Whats New in REST APIs Seminar December 5 2017</a></h4> By <em>Sumit Sarkar</em> </div> <div class="col-md-3 text-left"> <h4><a href='/blog/Visual-Studio-Code-Knows-OData/'>Visual Studio Code Knows OData</a></h4> By <em>Michael Pizzo</em> </div> <div class="col-md-3 text-left"> <h4><a href='/blog/OData-Published-as-an-ISO-Standard/'>OData Published as an ISO Standard</a></h4> By <em>Michael Pizzo</em> </div> </div> </div> </div> </div> <!-- Left and right controls --> <a class="left carousel-control" href="#myCarousel" onclick="$('#myCarousel').carousel('pause');" role="button" data-slide="prev"> <svg xmlns="https://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-left" viewBox="0 0 16 16" aria-hidden="true"> <path fill-rule="evenodd" d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z" /> </svg> <span class="sr-only">Previous</span> </a> <a class="right carousel-control" href="#myCarousel" onclick="$('#myCarousel').carousel('pause');" role="button" data-slide="next"> <svg xmlns="https://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-right" viewBox="0 0 16 16"> <path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z" /> </svg> <span class="sr-only">Next</span> </a> </div> <div class="row"> <!-- <div class="col-md-7"> <p id="GeoResults"><iframe width=100% height=230px src="https://www.youtube.com/embed/wH5TUwzlaWI"></iframe></p> </div> <div class="col-md-5"> --> <p>OData (Open Data Protocol) is an <a href="https://www.oasis-open.org/news/pr/iso-iec-jtc-1-approves-oasis-odata-standard-for-open-data-exchange">ISO/IEC approved</a>, <a href="https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=odata">OASIS standard</a> that defines a set of best practices for building and consuming RESTful APIs. OData helps you focus on your business logic while building RESTful APIs without having to worry about the various approaches to define request and response headers, status codes, HTTP methods, URL conventions, media types, payload formats, query options, etc. OData also provides guidance for tracking changes, defining functions/actions for reusable procedures, and sending asynchronous/batch requests.</p> <p>OData RESTful APIs are easy to consume. The OData metadata, a machine-readable description of the data model of the APIs, enables the creation of powerful generic client proxies and tools. </p> <!-- </div> --> </div> <!-- <div id="CustomerQuotation" class="carousel slide row" data-ride="carousel"> <ol class="carousel-indicators"> <li data-target="#myCarousel" data-slide-to="0" class="active"></li> <li data-target="#myCarousel" data-slide-to="1"></li> <li data-target="#myCarousel" data-slide-to="2"></li> </ol> <div class="carousel-inner" role="listbox"> <div class="item active" style="background-color:orange; color:black; padding:50px;"> <h1>"Blah blah blah blah blah"</h1> <h2 class="text-right">-- Author Name, author title, company</h2> </div> <div class="item" style="background-color:orange; color:black; padding:50px;"> <h1>"Blah blah blah blah blah"</h1> <h2 class="text-right">-- Author Name, author title, company</h2> </div> <div class="item" style="background-color:orange; color:black; padding:50px;"> <h1>"Blah blah blah blah blah blah blah blah"</h1> <h2 class="text-right">-- Author Name, author title, company</h2> </div> </div> </div> <div> <h2 class="text-center">OData has a rich <strong>Ecosystem</strong>. <strong><a href='/ecosystem/'>Click Here</a></strong> to find more!</h2> </div> --> <!-- customer logos <div class="row icon"> <div class="col-md-2"> <img src="/assets/ODataLogo-150.png" alt="Icon1"> </div> <div class="col-md-2"> <img src="/assets/ODataLogo-150.png" alt="Icon1"> </div> <div class="col-md-2"> <img src="/assets/ODataLogo-150.png" alt="Icon1"> </div> <div class="col-md-2"> <img src="/assets/ODataLogo-150.png" alt="Icon1"> </div> <div class="col-md-2"> <img src="/assets/ODataLogo-150.png" alt="Icon1"> </div> <div class="col-md-2"> <img src="/assets/ODataLogo-150.png" alt="Icon1"> </div> </div> --> <div class="row floating-box"> <div class="col-md-6 margin-bottom"> <h2 class="text-left theme-font">Tools</h2> <table> <tr> <td width="40%"><img src="https://www.odata.org/assets/vs_code_for_odata.gif" alt="Visual Studio Code for OData" width = 90%></td> <td> <h3><a href="https://marketplace.visualstudio.com/items?itemName=stansw.vscode-odata ">Visual Studio Code for OData</a></h3> <p>OData for Visual Studio Code is a Visual Studio Code extension that adds rich support for the OData query language</p> </td> </tr> <!-- <tr> <td width="40%"><img src="https://www.odata.org/assets/odata_validator.jpg" alt="odata_validator" width = 90%></td> <td> <h3><a href="https://services.odata.org/validation/">OData Validator</a></h3> <p>A tool to enable OData service authors to ensure that their service interoperates well with any OData client. It also enables consumers to test OData services.</p> </td> </tr> --> <tr> <td width="40%"><img src="https://www.odata.org/assets/xodata_tool.jpg" alt="xodata" width="90%"></td> <td> <h3><a href="https://pragmatiqa.com/xodata/">XOData</a></h3> <p>XOData is a generic online OData API/Service visualizer and explorer. It assists in rapid prototyping, verification, testing, and documentation of OData APIs. With XOData Chrome App it's also possible to explore OData Services deployed locally or on private networks.</p> </td> </tr> </table> </div> <div class="col-md-6"> <h2 class="text-left theme-font">Resources</h2> <div class="row"> <div class="col-md-4"> <img src="https://www.odata.org/assets/howtouse-03.png" alt="Getting Started" width="120px"> </div> <div class="col-md-8"> <h4><a href="/getting-started/"> Getting Started </a></h4> <p>To get started, take a look at <a href="/getting-started/understand-odata-in-6-steps/">Understanding OData in 6 steps</a>. And then the <a href="/getting-started/basic-tutorial/">Basic Tutorial</a>, <a href="/getting-started/advanced-tutorial/">Advanced Tutorial</a> and <a href="/getting-started/learning-odata-on-postman/">Postman Tutorial</a> will provide practical samples to learn OData.</p> </div> </div> <div class="row"> <div class="col-md-4"> <img src="https://www.odata.org/assets/howtouse-01.png" alt="Documentation" width="120px"> </div> <div class="col-md-8"> <h4><a href="/documentation/">Standard</a></h4> <p>OData v4 is standardized by OASIS, including <a href="https://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part1-protocol.html">Protocol Specification</a>, <a href="https://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part2-url-conventions.html">URL Conversions</a>, <a href="https://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part3-csdl.html">Common Schema Definition Language</a>, <a href="https://docs.oasis-open.org/odata/odata-json-format/v4.0/odata-json-format-v4.0.html">JSON Format Specification, <a href="https://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/abnf/">ABNF</a>, <a href="https://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/vocabularies/">Standardized Vocabularies</a>, and <a href="https://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/odata-data-aggregation-ext-v4.0.html">Aggregation Extension</a>. OData v4 can also be ordered from ISO/IEC as <a href="https://www.iso.org/iso/catalogue_detail.htm?csnumber=69208">ISO/IEC 20802-1:2016</a> (OData 4.0 Protocol) and <a href="https://www.iso.org/iso/catalogue_detail.htm?csnumber=69209">ISO/IEC 20802-2:2016</a> (OData 4.0 JSON Format)</p> </div> </div> <div class="row"> <div class="col-md-4"> <img src="https://www.odata.org/assets/howtouse-02.png" alt="Libraries" width="120px"> </div> <div class="col-md-8"> <h4><a href="/libraries/">Libraries</a></h4> <p>There are several of libraries to facilitate building and consuming OData service. <a href="https://odata.github.io/RESTier/">Restier</a> is the main library for .NET framework. <a href="https://olingo.apache.org/">Apache Olingo</a> is for Java platform to build OData service.</p> </div> </div> <div class="row"> <div class="col-md-4"> <img src="https://www.odata.org/assets/howtouse-04.png" alt="Presentations" width="120px"> </div> <div class="col-md-8"> <h4><a href="https://www.odata.org/odata-services/">Sample Services</a></h4> <p>There are several OData sample services to help you practice with OData API. <a href="https://services.odata.org/TripPinRESTierService/">TripPin Service</a> is the main sample service.</p> </div> </div> </div> </div> </div> </div> <script> $(function(){ var myCarousel = $("#myCarousel"); $('#myCarousel.slide').carousel({ interval: 5000, pause: "hover" }); $('input').focus(function(){ myCarousel.carousel('pause'); }).blur(function() { myCarousel.carousel('cycle'); }); var carousel = document.getElementById('myCarousel'); var liveRegion = document.createElement('span'); liveRegion.setAttribute('aria-live', 'polite'); liveRegion.setAttribute('aria-atomic', 'true'); liveRegion.setAttribute('class', 'live-region sr-only'); carousel.appendChild(liveRegion); var headers = $(myCarousel).find('div.carousel-inner > div > div > h1'); myCarousel.on('slid.bs.carousel', function () { var activeSlide = $('#myCarousel > div.carousel-inner > div.active > div > h1'); var captionText = activeSlide.text(); var position = headers.index(activeSlide) + 1 liveRegion.textContent = 'Slide ' + position + ' of ' + headers.length + ' - ' + captionText; }); }); </script> </main> <script src="https://code.jquery.com/jquery-2.1.0.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <script src="https://www.odata.org/public/tabs.js"></script> <script src="https://www.odata.org/public/combobox-autocomplete.js"></script> <script src="https://www.odata.org/public/site.js"></script> <script type="text/javascript" src="https://www.odata.org/public/jquery.swiftype.search.js"></script> <script type="text/javascript" src="https://www.odata.org/public/jquery.swiftype.autocomplete.js"></script> <script> $(document).ready(function() { var dropdown = $( '<div class="autocomplete__segment">' + '<ul id="search-results" class="autocomplete__segment-header" role="listbox"\n' + ' aria-label="Search Results"></ul>' + '</div>'); var target = $("body")[0]; var MutationObserver = window.MutationObserver || window.WebKitMutationObserver; var myObserver = new MutationObserver(mutationHandler); var obsConfig = { childList: true, characterData: false, attributes: false, subtree: true }; myObserver.observe(target, obsConfig); function mutationHandler(mutationRecords) { mutationRecords.forEach(function(mutation) { var newNodes = mutation.addedNodes; // DOM NodeList if (newNodes !== null) { // If there are new nodes added var $nodes = $(newNodes); // jQuery set $nodes.each(function() { var $node = $(this); if ($node.hasClass("swiftype-widget")) { $node.children().first().children().first().html(dropdown); myObserver.disconnect(); } }); } }); } var search = $('#main-search-input'); var renderResults = function(ctx, data) { var results = []; $.each(data, function(docType, opts) { $.each(opts, function(idx, result) { // Specify a valid Swiftype field/meta tag. results.FIELD == VALUE results.push(result); }); }); // Create a reusable function to render results. function renderResult(result) { var title = result.title, section = result.sections[0], url = result['url']; if (result.title == null || title === undefined) { title = result.highlight.sections; section = result.sections[1] || ''; } return $( '<li role="option" id="' + result['id'] + '" class="autocomplete-result" aria-label="' + title + '"><a href="' + url + '">' + '<span\n class="autocomplete-result__title">' + section + '</span> <br>' + '<small class="autocomplete-result__description muted" aria-label="' + title + '">' + title + '</small>' + '</a>\n</li>' ); } // append the items to the first child which is the search-results var child = dropdown.children()[0]; $.each(results, function(idx, item) { ctx.registerResult(renderResult(item).appendTo(child), item); }); if (results.length > 0) { dropdown.appendTo(ctx.list); } search.attr('aria-expanded', true); var button = document.getElementById('cb1-button'); var cba = new ComboboxAutocomplete(document.getElementById('main-search-input'), button, document.getElementById('search-results')); cba.init(); button.click(); }; search.swiftype({ resultRenderFunction: renderResults, suggestionListType: 'div', resultLimit: 10, resultListSelector: '.autocomplete-result', resultContainingElement: '#st-results-container', // Points to our results content division element. engineKey: 'Xk5RQZP53Ry3gEkcFvYK', fetchFields: ['url', 'title', 'type', 'body'] }); search.swiftypeSearch({ engineKey: 'Xk5RQZP53Ry3gEkcFvYK', resultLimit: 10, }); }); // Listen for "resize" events and also check if the page is loaded when already zoomed. window.addEventListener("resize", handleResizeEvent); window.addEventListener("load", handleResizeEvent); // --------------------------------------------------------------------------- // var isReflowed = false; // Handle window resize events. function handleResizeEvent(event) { // Zoom >= 300% if (window.innerWidth <= 640 && !isReflowed) { // Transpose the headers $('table.reflows').find('th').each(function(index, value) { var $this = $(this), title = '<b class="cell-label">' + $this.html() + '</b>'; // add titles to cells $('table.reflows') .find('tr').find('td:eq(' + index + ')').wrapInner('<span class="cell-content"></span>').prepend(title); }); isReflowed = true; } // Zoom < 300% else if (isReflowed && window.innerWidth > 640) { isReflowed = false; $("b.cell-label").remove(); $("span.cell-content").contents().unwrap(); } } $(".dropdown").on("show.bs.dropdown", function(event){ $(this).children('a[role=menuitem]').attr('aria-expanded', true); }); $(".dropdown").on("hide.bs.dropdown", function(event){ $(this).children('a[role=menuitem]').attr('aria-expanded', false); }); // open the modal function openModal() { document.getElementById("screenshot1").style.display = "block"; } // Close the modal function closeModal() { document.getElementById("screenshot1").style.display = "none"; } // show the selected image. function currentSlide(n) { showSlides(slideIndex = n); } function showSlides(n) { var slides = document.getElementsByClassName("screenshot1Lightbox"); slides[slideIndex-1].style.display = "block"; } window.onkeyup = function (event) { // On pressing escape close blown out image. if (event.keyCode == 27 && document.getElementById('screenshot1').style.display=='block') { document.getElementById('screenshot1').style.display='none'; } // On click enter open blown out image. if (event.keyCode == 13 && event.target.id == "postmanCollection-small") { document.getElementById('screenshot1').style.display='block'; } } </script> </body> <footer class="content-info" role="contentinfo"> <div class="container" style=" text-align: center" aria-label="content-info"> <p>&copy; 2015-2023 OData – The Protocol for REST APIs </p> </div> </footer> </html>

Pages: 1 2 3 4 5 6 7 8 9 10