洗涤心灵是什么意思| 外阴瘙痒用什么洗液| o是什么元素| 口腔医学学什么| 嗜碱性粒细胞偏高是什么原因| 久站腰疼是什么原因| 供奉财神爷有什么讲究| 什么是低密度脂蛋白胆固醇| 睡觉手麻是什么原因引起的女人| acei是什么意思| 网络是什么意思| 2岁什么都听懂但不说话| 断更是什么意思| 什么叫公租房| 向日葵花代表什么意思| 夏吃姜有什么好处| 板栗不能和什么一起吃| 吃什么补气补血最见效| 私生饭是什么意思| 小孩老是肚子疼是什么原因| 阴宅是什么意思| 椎间盘膨隆是什么意思| 静脉曲张是什么样子| 宫寒应该吃什么怎样调理| 碳酸氢钠俗称什么| 海关是什么意思| 红斑狼疮是什么原因引起的| 做完磁共振要注意什么| 酒量越来越差什么原因| 胃胀打嗝吃什么药| 祖坟冒青烟是什么意思| 疑难杂症是什么意思| 非洲人吃什么主食| 马的守护神是什么菩萨| 辅警政审主要审些什么| 吃莲雾有什么好处| 九寨沟在什么地方| 明五行属什么| 世界上最坚硬的东西是什么| g750和au750有什么区别| 内膜厚是什么原因| 要强的女人是什么性格| 家里养什么动物吃蟑螂| 嘴巴发苦吃什么药| 属鼠的幸运色是什么颜色| 男士内裤买什么牌子好| 回族不能吃什么| 么么什么意思| 拉黑一个人意味着什么| 孔子的父亲叫什么| 男性生殖器官叫什么| 94年的属什么| 诸神黄昏什么意思| 胃酸是什么症状| 手上螺纹多少代表什么| 宝宝反复发烧是什么原因| 安全起见是什么意思| 肉身成圣是什么意思| 神什么活什么| 三七和田七有什么区别| 张力是什么意思| 懒觉什么意思| 右眼皮跳是什么意思| 为什么会梦游| 老年人嘴唇发紫是什么原因| 史努比是什么意思| 早上跑步有什么好处| 丙肝是什么病严重吗| 妙手回春是什么意思| 月经第二天是什么期| 七月与安生讲的是什么| 今年养殖什么最挣钱| 绿是什么| 0706是什么星座| 1991年属羊是什么命| 局气什么意思| 什么的意思| 丫丫的老公叫什么| low什么意思| 渠道货是什么意思| 十一月份出生的是什么星座| 血压下午高是什么原因| 淋巴细胞绝对值偏低说明什么| 湿疹用什么药最有效| 水肿是什么| 白露节气的含义是什么| 画是什么结构| 妊娠是什么意思啊| 眼肿是什么原因| 为什么会掉头发| 表哥的孩子叫我什么| 前羽念什么| 脑梗死吃什么药| 爱情是什么| 钾是什么| 心脾两虚吃什么食物补最快| 脚起皮干裂是什么原因| 什么叫流产| 肿大淋巴结是什么意思| 藏在我回忆里的那个人什么歌| 2017年什么年| 尿常规能检查出什么| 头不由自主的轻微晃动是什么病| 铁剂是什么| 人体出汗多是什么原因| 梨的功效与作用是什么| 女人吃猪肝有什么好处| act是什么| 海马有什么功效作用| 手脚麻是什么原因| 心电图是检查什么的| 什么的教学楼| 做照影是检查什么| 什么是u| 6月6日什么星座| 三月十三是什么星座| 奎宁是什么药| 脑血管堵塞会有什么后果| 天蝎座是什么象星座| 早上口干舌燥是什么原因| 腊梅什么时候开花| 吃完饭就想吐是什么原因| 械字号产品是什么意思| 周瑜是什么生肖| 撩 是什么意思| 静态纹用什么除皱| 集成灶什么品牌最好| 甲骨文是什么朝代的| 湿邪是什么意思| 血热吃什么药好得快| cri是什么意思| 孕反什么时候结束| 鲣鱼是什么鱼| 麦芒是什么| 括约肌是什么| 左耳耳鸣是什么原因| 舌炎吃什么药| 阳痿早泄用什么药| 人体缺少蛋白质会有什么症状| 男人艾灸什么地方壮阳| 前列腺彩超能查出什么| 穿什么颜色显白| 一个家庭最重要的是什么| 考试前吃什么好| 杨五行属什么| versace什么牌子| 什么海翻江| 吃什么长高| 顺丰到付是什么意思| 福星是什么意思| 妇科湿疹用什么药膏最有效| 尹是什么意思| 风调雨顺是什么生肖| 儿童病毒感染吃什么药| 手表五行属什么| 什么药治尿酸高最有效| 威士忌属于什么酒| 吃槟榔有什么危害| 第一顺位是什么意思| 办理身份证需要带什么| ct是什么单位| 心脏早搏吃什么药好| 一什么枣| 人出现幻觉是什么原因| 农历六月初六是什么节| 食少便溏是什么意思| 肺部有问题一般会出现什么症状| 政协主席什么级别| 出气不顺畅是什么原因| 什么是白肺| 养老金什么时候可以领取| 口舌生疮吃什么药最见效| 阿奇霉素治疗什么| 175是什么码| bp是什么意思医学上面| 箔是什么意思| 12月2号什么星座| 女人缺铁性贫血吃什么好| 看腋窝挂什么科| 恐龙生活在什么时代| 八字五行属什么| 吃花生米有什么好处| 9月24日是什么星座| 表象是什么意思| 天天射精对身体有什么危害| 乾隆的名字叫什么| 乔治白属于什么档次| 什么药可以缩阴紧致| 口腔溃疡为什么那么痛| 再接再厉后面接什么好| 橄榄枝象征着什么| 牛肉和什么蔬菜搭配好| 不来月经是什么原因| 尿囊素是什么| asmr是什么| diff什么意思| 狄仁杰为什么才三品| 尿液弱阳性什么意思| 满族不吃什么肉| 脂蛋白磷脂酶a2高说明什么| 容易口腔溃疡什么原因| 内分泌失调挂什么科| 6月6日是什么星座| 伸筋草主治什么病| 5月9号什么星座| 咽喉炎吃什么药最好| 着痹是什么意思| 肃穆是什么意思| 减肥可以吃什么| 为什么手机会发烫| 孕妇查凝血是检查什么| 午时银花露有什么功效| 脾虚是什么原因引起的| 贲门ca是什么意思| aba是什么意思| 西游记是什么生肖| 肚脐眼疼吃什么药| 反流性咽喉炎吃什么药| 十月十五号是什么星座| 车迟国的三个妖怪分别是什么| 宝宝风热感冒吃什么药| 菠萝为什么要用盐水泡| 为什么要做肠镜检查| ENBD手术全称是什么| 县委副书记是什么级别| 为所当为什么意思| 5月30号是什么星座| 3.19是什么星座| 脸上发红是什么原因| 什么情况下安装心脏起搏器| 去威海玩需要准备什么| 缺镁吃什么食物补充最快| 护理假是什么意思| 热辐射是什么| 婀娜多姿是什么意思| 子宫脱落有什么症状| 黄体回声是什么意思| mop是什么意思| 哥弟属于什么档次| 2月22是什么星座| 公积金缴存基数是什么| usc是什么意思| 烧裆是什么原因| 前是什么偏旁| 2001年属什么生肖| 燕子吃什么| 蛇床子是什么| 大口鱼是什么鱼| 美业是做什么的| 疥疮用什么药| 血常规主要检查什么| 梨涡是什么意思| 假牛肉干是什么做的| 一个人在家无聊可以做什么| 胃疼吃什么药管用| 绀是什么意思| 梦到认识的人死了是什么意思| 羽字五行属什么的| 慢性支气管炎吃什么药好| yy是什么| 蜜袋鼯吃什么| 苦瓜煮水喝有什么功效| 什么是高纤维食物| 嘴唇上火起泡用什么药| 百度Jump to content

借款百万为炒股的真实案例 散户赚钱要绕过多少坑

Checked
Page protected with pending changes
From Wikipedia, the free encyclopedia
(Redirected from REST API)

REST (Representational State Transfer) is a software architectural style that was created to describe the design and guide the development of the architecture for the World Wide Web. REST defines a set of constraints for how the architecture of a distributed, Internet-scale hypermedia system, such as the Web, should behave. The REST architectural style emphasizes uniform interfaces, independent deployment of components, the scalability of interactions between them, and creating a layered architecture to promote caching to reduce user-perceived latency, enforce security, and encapsulate legacy systems.[1]

REST has been employed throughout the software industry to create stateless, reliable, web-based applications. An application that adheres to the REST architectural constraints may be informally described as RESTful, although this term is more commonly associated with the design of HTTP-based APIs and what are widely considered best practices regarding the "verbs" (HTTP methods) a resource responds to, while having little to do with REST as originally formulated—and is often even at odds with the concept.[2]

Principle

[edit]

The term representational state transfer was introduced and defined in 2000 by computer scientist Roy Fielding in his doctoral dissertation. It means that a server will respond with the representation of a resource (today, it will most often be an HTML document) and that resource will contain hypermedia links that can be followed to make the state of the system change. Any such request will in turn receive the representation of a resource, and so on.

An important consequence is that the only identifier that needs to be known is the identifier of the first resource requested, and all other identifiers will be discovered. This means that those identifiers can change without the need to inform the client beforehand and that client and server must be inherently loosely coupled.

History

[edit]
Roy Fielding speaking at OSCON 2008

The Web began to enter everyday use in 1993–1994, when websites for general use started to become available.[3] At the time, only a fragmented description existed of the Web's architecture, and there was pressure within the industry to agree on a standard for the Web interface protocols. For instance, several experimental extensions had been added to the communication protocol (HTTP) to support proxies, and more extensions were being proposed, but there was a need for a formal Web architecture with which to evaluate the impact of these changes.[4]

The W3C and IETF working groups together started work on creating formal descriptions of the Web's three primary standards: URI, HTTP, and HTML. Roy Fielding was involved in the creation of these standards (specifically HTTP 1.0 and 1.1, and URI), and during the next six years he created the REST architectural style, testing its constraints on the Web's protocol standards and using it as a means to define architectural improvements — and to identify architectural mismatches. Fielding defined REST in his 2000 PhD dissertation "Architectural Styles and the Design of Network-based Software Architectures"[1][5] at UC Irvine.

To create the REST architectural style, Fielding identified the requirements that apply when creating a world-wide network-based application, such as the need for a low entry barrier to enable global adoption. He also surveyed many existing architectural styles for network-based applications, identifying which features are shared with other styles, such as caching and client–server features, and those which are unique to REST, such as the concept of resources. Fielding was trying to both categorise the existing architecture of the current implementation and identify which aspects should be considered central to the behavioural and performance requirements of the Web.

By their nature, architectural styles are independent of any specific implementation, and while REST was created as part of the development of the Web standards, the implementation of the Web does not obey every constraint in the REST architectural style. Mismatches can occur due to ignorance or oversight, but the existence of the REST architectural style means that they can be identified before they become standardised. For example, Fielding identified the embedding of session information in URIs as a violation of the constraints of REST which can negatively affect shared caching and server scalability. HTTP cookies also violate REST constraints[4] because they can become out of sync with the browser's application state, making them unreliable; they also contain opaque data that can be a concern for privacy and security.

Architectural properties

[edit]

The REST architectural style is designed for network-based applications, specifically client-server applications. But more than that, it is designed for Internet-scale usage, so the coupling between the user agent (client) and the origin server must be as loose as possible to facilitate large-scale adoption.

The strong decoupling of client and server together with the text-based transfer of information using a uniform addressing protocol provided the basis for meeting the requirements of the Web: extensibility, anarchic scalability[6] and independent deployment of components, large-grain data transfer, and a low entry-barrier for content readers, content authors and developers.

An entity–relationship model of the concepts expressed in the REST architectural style

The constraints of the REST architectural style affect the following architectural properties:[1][7]

  • Performance in component interactions, which can be the dominant factor in user-perceived performance and network efficiency;[8]
  • Scalability allowing the support of large numbers of components and interactions among components;
  • Simplicity of a uniform interface;
  • Modifiability of components to meet changing needs (even while the application is running);
  • Visibility of communication between components by service agents;
  • Portability of components by moving program code with the data;
  • Reliability in the resistance to failure at the system level in the presence of failures within components, connectors, or data.[8]

Architectural constraints

[edit]

The REST architectural style defines six guiding constraints.[7][9] When these constraints are applied to the system architecture, it gains desirable non-functional properties, such as performance, scalability, simplicity, modifiability, visibility, portability, and reliability.[1]

The formal REST constraints are as follows:[10]

  • Client/Server – Clients are separated from servers by a well-defined interface
  • Stateless – A specific client does not consume server storage when the client is "at rest"
  • Cache – Responses indicate their own cacheability
  • Uniform interface
  • Layered system – A client cannot ordinarily tell whether it is connected directly to the end server, or to an intermediary along the way
  • Code on demand (optional) – Servers are able to temporarily extend or customize the functionality of a client by transferring logic to the client that can be executed within a standard virtual machine

Uniform interface

[edit]

The uniform interface constraint is fundamental to the design of any RESTful system.[1] It simplifies and decouples the architecture, which enables each part to evolve independently. The four constraints for this uniform interface are:

  • Resource identification in requests: Individual resources are identified in requests using URIs. The resources themselves are conceptually separate from the representations that are returned to the client. For example, the server could send data from its database as HTML, XML or as JSON—none of which are the server's internal representation.
  • Resource manipulation through representations: When a client holds a representation of a resource, including any metadata attached, it has enough information to modify or delete the resource's state.
  • Self-descriptive messages: Each message includes enough information to describe how to process the message. For example, which parser to invoke can be specified by a media type.[1]
  • Hypermedia as the engine of application state (HATEOAS) – Having accessed an initial URI for the REST application—analogous to a human Web user accessing the home page of a website—a REST client should then be able to use server-provided links dynamically to discover all the available resources it needs. As access proceeds, the server responds with text that includes hyperlinks to other resources that are currently available. There is no need for the client to be hard-coded with information regarding the structure of the server.[11]

Classification models

[edit]

Several models have been developed to help classify REST APIs according to their adherence to various principles of REST design, such as

See also

[edit]

References

[edit]
  1. ^ a b c d e f Fielding, Roy Thomas (2000). "Chapter 5: Representational State Transfer (REST)". Architectural Styles and the Design of Network-based Software Architectures (Ph.D.). University of California, Irvine. Archived from the original on 2025-08-06. Retrieved 2025-08-06.
  2. ^ Fielding, Roy T. (2025-08-06). "REST APIs must be hypertext driven". roy.gbiv.com. Archived from the original on 2025-08-06. Retrieved 2025-08-06.
  3. ^ Couldry, Nick (2012). Media, Society, World: Social Theory and Digital Media Practice. London: Polity Press. p. 2. ISBN 9780745639208. Archived from the original on 2025-08-06. Retrieved 2025-08-06.
  4. ^ a b Fielding, Roy Thomas (2000). "Chapter 6: Experience and Evaluation". Architectural Styles and the Design of Network-based Software Architectures (Ph.D.). University of California, Irvine. Archived from the original on 2025-08-06. Retrieved 2025-08-06.
  5. ^ "Fielding discussing the definition of the REST term". groups.yahoo.com. Archived from the original on November 5, 2015. Retrieved 2025-08-06.
  6. ^ Fielding, Roy Thomas (2000). "Chapter 4: Designing the Web Architecture: Problems and Insights". Architectural Styles and the Design of Network-based Software Architectures (Ph.D.). University of California, Irvine. Retrieved 2025-08-06.{{cite thesis}}: CS1 maint: url-status (link)
  7. ^ a b Erl, Thomas; Carlyle, Benjamin; Pautasso, Cesare; Balasubramanian, Raj (2012). "5.1". SOA with REST: Principles, Patterns & Constraints for Building Enterprise Solutions with REST. Upper Saddle River, New Jersey: Prentice Hall. ISBN 978-0-13-701251-0.
  8. ^ a b Fielding, Roy Thomas (2000). "Chapter 2: Network-based Application Architectures". Architectural Styles and the Design of Network-based Software Architectures (Ph.D.). University of California, Irvine. Archived from the original on 2025-08-06. Retrieved 2025-08-06.
  9. ^ Richardson, Leonard; Ruby, Sam (2007). RESTful Web Services. Sebastopol, California: O'Reilly Media. ISBN 978-0-596-52926-0.
  10. ^ "What is REST API?". www.visual-paradigm.com. Archived from the original on 2025-08-06. Retrieved 2025-08-06.
  11. ^ Gupta, Lokesh (2 June 2018). "REST HATEOAS". REST API Tutorial. RESTfulAPI.net. Archived from the original on 7 April 2019. Retrieved March 10, 2019.
  12. ^ "Classification of HTTP APIs". algermissen.io. Archived from the original on 2025-08-06. Retrieved 2025-08-06.
  13. ^ Ivan Salvadori, Frank Siqueira (June 2015). "A Maturity Model for Semantic RESTful Web APIs". Conference: Web Services (ICWS), 2015 IEEE International Conference OnAt. New York. Archived from the original on 2025-08-06. Retrieved 2025-08-06 – via ResearchGate.


Further reading

[edit]
lbs什么意思 尿液有白色絮状物是什么原因 奶篓子是什么意思 1月25号什么星座 10月底是什么星座
淮山和山药有什么区别 一岁宝宝发烧吃什么药 毛尖属于什么茶 冠状沟有溃疡是什么病 三人死亡属于什么事故
什么是阴道炎 保卡是什么意思 申是什么生肖 持续发烧不退是什么原因 爱生气的人容易得什么病
借鸡生蛋是什么意思 妇科炎症用什么药好 吃什么头发长得快 姜子牙为什么没有封神 川字属于五行属什么
铁是补什么的mmeoe.com is是什么组织hcv9jop5ns2r.cn 急性扁桃体发炎吃什么药hcv8jop0ns0r.cn 准确值是什么意思hcv8jop5ns8r.cn 戒的部首是什么hcv7jop9ns5r.cn
耳朵后面长痘痘是什么原因hcv9jop6ns8r.cn 血压低吃什么东西好hcv9jop0ns9r.cn 胎菊和金银花一起泡水有什么效果hanqikai.com 澳门买什么最便宜sscsqa.com 黄芪的读音是什么gysmod.com
动脉硬化吃什么hcv9jop4ns6r.cn 漂洗什么意思hcv9jop1ns5r.cn 睾丸肿大是什么原因hcv8jop6ns4r.cn 四个金念什么hcv8jop4ns1r.cn 贫血吃什么水果补血最快hcv8jop2ns4r.cn
怕冷是什么原因hcv8jop0ns8r.cn 玄女是什么意思chuanglingweilai.com 大堤是什么意思hcv9jop3ns0r.cn 皮蛋与什么食物相克hcv8jop2ns8r.cn hpv疫苗什么时候打最好hcv9jop4ns4r.cn
百度