RFC 8522
Looking Glass Command Set
RFC 8522 π Looking Glass Command Set
Okay bestie, here's the deets π
- RFC number: 8522
- Title: Looking Glass Command Set
- Author: M. Stubbig (Independent)
- Stream: Independent Submission
- Category: Informational
- Date: February 2019
- ISSN: 2070-1721
- Obsoletes/updates: the title block doesn't list any RFCs this one obsoletes or updates β¨
Abstract
okay so this doc introduces a command set standard for the web-based "Network Looking Glass" software π¦ The whole point is giving application programmers uniform access to the Looking Glass service, and a standardized response to analyze.
The interface is supposed to show the same level of info as the web-based interfaces, just in a computer-readable format. Robot-friendly and still iconic π€π
Status of This Memo
This document is not an Internet Standards Track specification. It's published for informational purposes, so no pressure πΈ
This is a contribution to the RFC Series, independent of any other RFC stream. The RFC Editor chose to publish it at their discretion and makes no statement about its value for implementation or deployment. Documents approved for publication by the RFC Editor are not candidates for any level of Internet Standard. (See Section 2 of RFC 7841 if you want the full tea β)
Info about the current status, any errata, and how to give feedback lives at https://www.rfc-editor.org/info/rfc8522 π
Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the document authors. All rights reserved. π
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) as in effect on the date of publication. Please read these carefully, bestie, because they spell out your rights and restrictions for this document π
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Background . . . . . . . . . . . . . . . . . . . . . . . 3
1.2. Syntax Notation . . . . . . . . . . . . . . . . . . . . . 3
1.3. Examples . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Operation . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1. Method Parameters . . . . . . . . . . . . . . . . . . . . 4
2.2. Query Parameters . . . . . . . . . . . . . . . . . . . . 5
2.3. Response . . . . . . . . . . . . . . . . . . . . . . . . 6
3. Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.1. Diagnostic Commands . . . . . . . . . . . . . . . . . . . 9
3.2. Informational Commands . . . . . . . . . . . . . . . . . 10
3.3. Organizational Commands . . . . . . . . . . . . . . . . . 14
3.4. Extensible Commands . . . . . . . . . . . . . . . . . . . 16
4. Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . 16
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17
5.1. Well-Known URIs Registry . . . . . . . . . . . . . . . . 17
6. Security Considerations . . . . . . . . . . . . . . . . . . . 17
6.1. Abuse Potential . . . . . . . . . . . . . . . . . . . . . 17
6.2. Authentication . . . . . . . . . . . . . . . . . . . . . 17
6.3. Minimal Information . . . . . . . . . . . . . . . . . . . 17
7. References . . . . . . . . . . . . . . . . . . . . . . . . . 18
7.1. Normative References . . . . . . . . . . . . . . . . . . 18
7.2. Informative References . . . . . . . . . . . . . . . . . 19
Appendix A. JSend . . . . . . . . . . . . . . . . . . . . . . . 20
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 20
1. Introduction β¨
Okay so a bunch of ISPs and IXPs offer a complimentary (aka free!) web-based service to customers and the general public π It gives you insight into the backbone routing table, BGP neighbor info, or offered routes. This service is known as a "Network Looking Glass." The catch is that because it's web-based, it's hard to automate access to it, and that automation doesn't transfer well between different service implementations π
This doc describes a common command set so application programmers get uniform access to Looking Glass services. Main character energy π
The commands are meant to give the same level of info as the web-based interfaces, just in a computer-readable format. The goal is that multiple implementers of Looking Glass services can offer access through these commands, so one application can work with the different implementations. Iconic teamwork π«Ά
The command set is split into three categories: mandatory to support, optional, and additional. The commands are extensible, for new features and for value-add by implementations π
The Looking Glass command set is described as a language-independent concept. So any programming language that satisfies the commands in the following sections is acceptable π§
Also, this work is not the output of the IETF. It's presented in the hope that Looking Glass implementers will offer a common programmable interface πΈ
1.1. Background
Uniform access to a Looking Glass service gets important when multiple Looking Glasses are part of a monitoring system π Writing a web client and HTTP parser for every kind of web-based Looking Glass is a time-consuming workaround, ngl π The Looking Glass command set is a much more viable, compatible, and scalable solution. It's giving efficiency π
1.2. Syntax Notation
This spec uses the JavaScript Object Notation (JSON) of [RFC8259], arranged as JSend-compliant (Appendix A) responses π
1.3. Examples
All URLs in this documentation use the reserved sample domain example.net, as defined in Section 6.5 of [RFC6761] π
The URLs also use the fixed [RFC5785] prefix .well-known/looking-glass, which prevents a collision in the domain's namespace π
IPv4 addresses come from the documentation block 192.0.2.0/24 [RFC5737], and IPv6 addresses live in the reserved prefix 2001:DB8::/32 [RFC3849]. BGP Autonomous System (AS) numbers are chosen from the private AS range defined in [RFC6996]. Everyone's examples stay safely fake π§
The examples skip some required parameters to keep things simple, so don't panic if they look a little incomplete π
2. Operation π¦
A client issues a query using the HTTP GET method to request specific resources from the server. The resource is a URI, and it can be informational or a command execution. The client must present all necessary parameters for the server to execute the command on the selected router. Every call is stateless and independent of the previous one. No memory, no drama π
The path component of the resource URI must use the prefix .well-known/looking-glass (see Section 5.1) to stay namespace neutral π
The "call" is a request from the client that specifies a predefined operation ("function") the server will execute on a selected router. The "command" is a task executed on the router and initiated by the server on behalf of the client. The type and scope of all commands are defined and limited by the server. The client must not be able to execute random commands on the targeting router. There must not be any direct communication between the client and the router. Boundaries, bestie π§
After the command finishes on the selected router, the server replies to the client to say whether the operation succeeded, failed, or timed out. The response goes to the client in JSON format. The communication protocol between the server and router isn't specified by this document. Any method (e.g., Telnet, SSH, NETCONF, serial console) is acceptable π
All parameters and their values are case insensitive. Shouting or whispering, the server doesn't care π£
2.1. Method Parameters
Method parameters are mandatory components of the URI and are placed in the "path" section, in terms of [RFC7320]. Basically, the method parameters specify the call and determine which command the client wants executed on the selected router π―
2.2. Query Parameters
Query parameters are optional components of the URI and are placed in the "query" section, in terms of [RFC7320]. Generally, they're extra instructions for the requested command π§
protocol : Restricts the command and method parameters to use the specified protocol and version. The protocol is selected as an "Address Family Identifier" [IANA-AFN] [RFC4760] and optionally as a "Subsequent Address Family Identifier" [IANA-SAFI], separated by a comma. The default value is 1,1 (IP version 4, unicast). JSON datatype is String. Examples:
protocol=2,1(IP version 6, unicast)protocol=26(MPLS, no SAFI used)
router : Runs the command on the router identified by its name. This is not necessarily the router's hostname, as long as the Looking Glass software recognizes it. The default value is the first router in the list of available routers. JSON datatype is String. Example: router=rbgn06.example.net π₯οΈ
routerindex : Runs the command on this router, identified by its position in the list of available routers. The default value is "0". JSON datatype is Number. Example: routerindex=8 π’
random : Appends a random string to stop the client (or an intermediate proxy) from caching the response. The server must ignore its value. There is no default value. JSON datatype is String. Example: random=517A93B50 π²
vrf : Runs the command from the selected routing table. This parameter is valid only on routers that support "Virtual Routing and Forwarding" (VRF). There is no default value. JSON datatype is String. Example: vrf=mgmt πΈ
runtime : Stops executing the command after the runtime limit (in seconds) is exceeded. A value of 0 disables the limit. The default value is "30". JSON datatype is Number. Example: runtime=60 β±οΈ
format : Asks the server to provide the output (if any) in the selected format. Multiple formats can be specified, separated by a comma, in descending order of preference. See Section 3.3.2 for more details. The default value is "text/plain" (raw/unformatted output). JSON datatype is String. Example: format=application/yang,text/plain π§Ύ
2.3. Response
The HTTP response header contains an appropriate HTTP status code, as defined in [RFC7231], with the Content-Type set to "application/json" π¬
The HTTP body contains details and error descriptions. The response text must comply with the JSend JSON syntax specification, which is briefly explained in Appendix A. Consequently, every response must contain a "status" field of either "success", "fail", or "error", as explained in the following sections π
Part 1 ends here, bestie. Part 2 is next, so stay tuned π¦π
2.3.1. Success β¨
Okay so a successful response MUST set the "status" field to "success", no debate π
. It MUST also contain a "data" object with the following info:
performed_at: the combined date and time in UTC ISO 8601 [iso8601] showing when the operation finished π°οΈ. This info MUST be present.runtime: how many seconds (wallclock) it took to run the command β±οΈ. This info MUST be present.router: the name of the router that executed the command π°οΈ. This info MAY be present.output: the output of the command in whatever format the client asked for. If nothing was requested, it defaults to the raw output exactly as it showed up on the router's command-line interface (CLI) π₯οΈ. It might even be blank if the command didn't produce any output. This info SHOULD be present.format: the output format the server picked π. Clients can request multiple formats, so the "Looking Glass" server has to choose the best option and tell the client which one it went with. This info SHOULD be present (it defaults to"text/plain"if missing).
Adding more info to the response is permitted, and it MUST be placed inside the "data" object π¦. The HTTP status code SHOULD be 200 πΈ.
Example:
HTTP/1.1 200 OK
Content-Type: application/json
{
"status" : "success",
"data" : {
"router" : "route-server.lookingglass.example.net"
"performed_at" : "2014-10-15T17:15:34Z",
"runtime" : 2.63,
"output" : [
"full raw output from the observing router..."
],
"format" : "text/plain"
}
}
2.3.2. Fail π€
A "fail" status means the selected command ran on the router but didn't manage to succeed. The response message MUST set the "status" field to "fail" and MUST contain the "data" object with the command-specific content listed in Section 2.3.1. The HTTP status code SHOULD be 200.
Example:
HTTP/2.0 200 OK
{
"status" : "fail",
"data" : {
"performed_at" : "2014-10-18T20:04:37Z",
"runtime" : 10.37,
"output" : [
"Sending 5, 100-byte ICMP Echos to 192.0.2.5",
".....",
"Success rate is 0 percent (0/5)"
],
"format" : "text/plain",
"router" : "route-server.lookingglass.example.net"
}
}
2.3.3. Error π
The "error" status means either the command timed out or something went wrong while processing the request. The response message MUST set the "status" field to "error" and MUST contain the "message" key, which holds a meaningful message explaining what went wrong π.
The response MAY contain the "data" key with required values listed in Section 2.3.1. It MAY also include a "code" field carrying a numeric code that matches the error.
The HTTP status code SHOULD be 400 for a client-side error, 500 for a server-side error, or 502 for errors occurring on the target router. Code 504 SHOULD be used when a command timed out.
Example:
HTTP/1.1 400 Bad Request
{
"status" : "error",
"message" : "Unrecognized host or address."
}
3. Functions β¨
The Looking Glass command set gives you functions that are either mandatory to support or optional to implement π§. The same principle applies to the web-based Looking Glass π.
It is not possible for any function to modify the server's state π. Therefore, all HTTP methods are GET operations.
Variables are templated and expanded in accordance with [RFC6570] π.
3.1. Diagnostic Commands π©Ί
3.1.1. Ping π
Send echo messages to check whether a remote host is reachable and to measure round-trip time. The host can be a name or an address.
Implementation of the ping command is mandatory.
Syntax: https://example.net/.well-known/looking-glass/v1/ping/{host}
Example query:
GET /.well-known/looking-glass/v1/ping/2001:DB8::35?protocol=2,1
Host: example.net
Example response:
HTTP/1.1 200 OK
{
"status" : "success",
"data" : {
"min" : 40,
"avg" : 41,
"max" : 44,
"rate" : 100,
"output" : [
"Sending 5, 100-byte ICMP Echos to 2001:DB8::35",
"!!!!!",
"Success rate is 100 percent (5/5)"
],
"format" : "text/plain",
"performed_at" : "2014-10-04T14:40:58Z",
"runtime" : 0.77,
"router" : "c2951.lab.lg.example.net"
}
}
3.1.2. Traceroute πΊοΈ
Trace the path from the executing router to the destination host and list all the intermediate hops π€οΈ. The host can be a name or an address.
Implementation of the traceroute command is optional.
Syntax: https://example.net/.well-known/looking-glass/v1/
traceroute/{host}
Example query:
GET /.well-known/looking-glass/v1/traceroute/192.0.2.8?routerindex=5
Host: example.net
Example response:
HTTP/1.1 200 OK
{
"status": "success",
"data": {
"output": [
"Tracing the route to 192.0.2.8",
"",
" 1 198.51.100.77 28 msec 28 msec 20 msec",
" 2 203.0.113.130 52 msec 40 msec 40 msec",
" 3 192.0.2.8 72 msec 76 msec 68 msec"
],
"format": "text/plain",
"performed_at": "2018-06-10T12:09:31Z",
"runtime": 4.21,
"router": "c7206.lab.lg.example.net"
}
}
3.2. Informational Commands π
3.2.1. show route ποΈ
Retrieve information about a specific subnet from the routing table.
Implementation of the "show route" command is mandatory.
Syntax: https://example.net/.well-known/looking-glass/v1/show/
route/{addr}
Example query:
GET /.well-known/looking-glass/v1/show/ [multiline]
route/2001:DB8::/48?protocol=2,1
Host: example.net
Example response:
HTTP/1.1 200 OK
{
"status": "success",
"data": {
"output": [
"S 2001:DB8::/48 [1/0]",
" via FE80::C007:CFF:FED9:17, FastEthernet0/0"
],
"format": "text/plain",
"performed_at": "2018-06-11T17:13:39Z",
"runtime": 1.39,
"router": "c2951.lab.lg.example.net"
}
}
3.2.2. show bgp π
Display a matching record from the BGP routing table. This SHOULD include networks and the next hop, and it MAY include metric, local preference, path list, weight, etc.
Implementation of the "show bgp" command is optional.
Syntax: https://example.net/.well-known/looking-glass/v1/show/
bgp/{addr}
Example query:
GET /.well-known/looking-glass/v1/show/bgp/192.0.2.0/24
Host: example.net
Example response:
HTTP/1.1 200 OK
{
"status": "success",
"data": {
"output": [
"BGP routing table entry for 192.0.2.0/24, version 2",
"Paths: (2 available, best #2, table default)",
" Advertised to update-groups:",
" 1",
" Refresh Epoch 1",
" Local",
" 192.0.2.226 from 192.0.2.226 (192.0.2.226)",
" Origin IGP, metric 0, localpref 100, valid, internal",
"[...]"
],
"format": "text/plain",
"performed_at": "2018-06-11T21:47:17Z",
"runtime": 2.03,
"router": "c2951.lab.lg.example.net"
}
}
3.2.3. show bgp summary π
Print a summary of BGP neighbor status. This MAY include the neighbor BGP ID, autonomous system number, duration of peering, number of received prefixes, etc.
Implementation of the "show bgp summary" command is optional.
Syntax: https://example.net/.well-known/looking-glass/v1/show/bgp/
summary
Example:
GET /.well-known/looking-glass/v1/show/bgp/summary? [multiline]
protocol=2&routerindex=3
Host: example.net
Example response:
HTTP/1.1 200 OK
{
"status": "success",
"data": {
"output": [
"BGP router identifier 192.0.2.18, local AS number 64501",
"BGP table version is 85298, main routing table version 85298",
"50440 network entries using 867568 bytes of memory",
"[...]",
"Neighbor V AS MsgRcvd MsgSent TblVer Up/Down",
"2001:DB8:91::24 4 64500 481098 919095 85298 41w5d"
],
"format": "text/plain",
"performed_at": "2018-06-11T21:59:21Z",
"runtime": 1.91,
"router": "c2951.lab.lg.example.net"
}
}
3.2.4. show bgp neighbors π€
Provide detailed information on BGP neighbor connections. Available details MAY include neighbor BGP ID, advertised networks, learned networks, autonomous system number, capabilities, protocol, statistics, etc.
Implementation of the "show bgp neighbors" command is optional.
Syntax: https://example.net/.well-known/looking-glass/v1/show/bgp/
neighbors/{addr}
Example query:
GET /.well-known/looking-glass/v1/show/bgp/neighbors/192.0.2.226
Host: example.net
Example response:
HTTP/1.1 200 OK
{
"status": "success",
"data": {
"output": [
"BGP neighbor is 192.0.2.226, remote AS 64500, internal link",
" BGP version 4, remote router ID 198.51.100.31",
" BGP state = Established, up for 01:24:06",
"[...]"
],
"format": "text/plain",
"performed_at": "2018-06-11T21:41:17Z",
"runtime": 1.87,
"router": "c2951.lab.lg.example.net"
}
}
3.3. Organizational Commands ποΈ
The following organizational commands MUST be included in the implementation.
3.3.1. router list π
Provides a full list of routers that are available for command execution. This list includes the router ID and its name. It's equivalent to the common "router" HTML drop-down form element and contains the same information.
Syntax: https://example.net/.well-known/looking-glass/v1/routers
Example response:
{
"status" : "success",
"data" : {
"routers" : [
"route-server.lookingglass.example.net",
"customer-edge.lookingglass.example.net",
"provider-edge.lookingglass.example.net"
],
"performed_at" : "2014-10-19T20:07:01Z",
"runtime" : 0.73
}
}
3.3.2. router details π
Lists additional information about the selected router, specified by its router index. The response MUST contain the router's hostname and router index. The response MAY contain more details like output format, country code, city, administrative contact, vendor, and model.
Available output formats are specified by Internet media type as of [RFC6838] and listed in [IANA-MT]. If the routers support multiple formats, they are separated by a comma.
The router might provide output formats that are not yet registered or listed in [IANA-MT]. For example, output in NETCONF format could use "text/x.netconf". [RFC6838] provides a tree for unregistered subtypes.
A missing output format defaults to "text/plain", which is a copy of the raw command-line output.
Syntax: https://example.net/.well-known/looking-glass/v1/
routers/{number}
Example query:
GET /.well-known/looking-glass/v1/routers/1
Host: example.net
Example response:
{
"status" : "success",
"data" : {
"id" : 1,
"name" : "customer-edge.lookingglass.example.net",
"format" : "text/plain,text/x.netconf",
"country" : "de",
"autonomous_system" : 64512
}
}
3.3.3. commands β¨
okay bestie, this one is the full menu π It lists every command you can actually run. It's basically the same info as the "command" dropdown or radio buttons on the web form, just in a machine-readable shape π . The menu covers the mandatory commands to support, the "optional" ones, and the extra ones from Section 3.4 π§.
The list comes back as a "commands" array with one object per command. Each object holds informative strings about that command: href, arguments, description, and command π.
Syntax: https://example.net/.well-known/looking-glass/v1/cmd
Here's what a response looks like π
{
"status" : "success",
"data" : {
"commands" : [
{
"href" : "https://example.net/.well-known/ [multiline]
looking-glass/v1/show/route",
"arguments" : "{addr}",
"description" : "Print records from IP routing table",
"command" : "show route"
},
{
"href" : "https://example.net/.well-known/ [multiline]
looking-glass/v1/traceroute",
"arguments" : "{addr}",
"description" : "Trace route to destination host",
"command" : "traceroute"
}
]
}
}
3.4. Extensible Commands π¦
okay so the menu from Section 3.3.3 can grow π± It can get new items as long as the principles of this document are observed, so no going rogue π
For example, a Looking Glass provider might not offer BGP-related commands because their network runs OSPF instead. That's totally valid, lowkey iconic π
Here's what a sample OSPF command could look like π
GET /.well-known/looking-glass/v1/show/ospf/database
Host: example.net
4. Miscellaneous πΈ
this section is a little grab bag, but it's important ngl π«Ά
The network traffic sent by a "Looking Glass" is not appropriate when you're measuring Service Level Agreements or checking Quality of Service settings. So don't use it for that π
If a monitoring system uses the Looking Glass command set for reachability checks, it should not rely on the HTTP status codes. Instead, it should look at the "status" message field inside the HTTP body π
5. IANA Considerations π
5.1. Well-Known URIs Registry π§
this spec registers a Well-Known URI [RFC5785] β¨ Here are the details:
URI Suffix: looking-glass
Change Controller: M. Stubbig
Reference : This document, Section 2
6. Security Considerations π₯
β οΈ big moment, bestie. Please read this section fully.
The use of HTTPS is required to keep things secure, private, and confidential while data is in transit π No skipping this one π
6.1. Abuse Potential π
The main goal of the Looking Glass command set is automated use of the Looking Glass service. That lets people script API calls, and those calls could be used as a Distributed Denial of Service (DDoS) attack π± It is recommended that implementers of the Looking Glass API take steps to mitigate the abuse described above. The strategy can include blocking or rate-limiting by client IP address or by target IP network π‘οΈ
6.2. Authentication π
Authentication is not a requirement here, because the current Looking Glass web services are usable without authentication π Requests to the proposed API service may be authenticated by any method. The decision is up to the implementer's security requirements, so it's their call π
6.3. Minimal Information π
some of the commands give a detailed look into the provider's network, which is a lot of info, honestly π So it's up to the implementer's security policy to dismiss commands that are marked as "optional" or to restrict commands that are marked as "mandatory" π
7. References π
7.1. Normative References πΈ
[IANA-AFN] IANA, "Address Family Numbers", <https://www.iana.org/
assignments/address-family-numbers/>.
[IANA-MT] IANA, "Media Types",
<https://www.iana.org/assignments/media-types/>.
[IANA-SAFI]
IANA, "Subsequent Address Family Identifiers (SAFI)
Parameters",
<https://www.iana.org/assignments/safi-namespace/>.
[JSend] OmniTI Labs, "JSend", 2014,
<https://labs.omniti.com/labs/jsend>.
[RFC4760] Bates, T., Chandra, R., Katz, D., and Y. Rekhter,
"Multiprotocol Extensions for BGP-4", RFC 4760,
DOI 10.17487/RFC4760, January 2007,
<https://www.rfc-editor.org/info/rfc4760>.
[RFC5785] Nottingham, M. and E. Hammer-Lahav, "Defining Well-Known
Uniform Resource Identifiers (URIs)", RFC 5785,
DOI 10.17487/RFC5785, April 2010,
<https://www.rfc-editor.org/info/rfc5785>.
[RFC6570] Gregorio, J., Fielding, R., Hadley, M., Nottingham, M.,
and D. Orchard, "URI Template", RFC 6570,
DOI 10.17487/RFC6570, March 2012,
<https://www.rfc-editor.org/info/rfc6570>.
[RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
Protocol (HTTP/1.1): Semantics and Content", RFC 7231,
DOI 10.17487/RFC7231, June 2014,
<https://www.rfc-editor.org/info/rfc7231>.
[RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data
Interchange Format", STD 90, RFC 8259,
DOI 10.17487/RFC8259, December 2017,
<https://www.rfc-editor.org/info/rfc8259>.
7.2. Informative References π¦
[iso8601] International Organization for Standardization, "Data
elements and interchange formats - Information interchange
- Representation of dates and times", December 2004.
[RFC3849] Huston, G., Lord, A., and P. Smith, "IPv6 Address Prefix
Reserved for Documentation", RFC 3849,
DOI 10.17487/RFC3849, July 2004,
<https://www.rfc-editor.org/info/rfc3849>.
[RFC5737] Arkko, J., Cotton, M., and L. Vegoda, "IPv4 Address Blocks
Reserved for Documentation", RFC 5737,
DOI 10.17487/RFC5737, January 2010,
<https://www.rfc-editor.org/info/rfc5737>.
[RFC6761] Cheshire, S. and M. Krochmal, "Special-Use Domain Names",
RFC 6761, DOI 10.17487/RFC6761, February 2013,
<https://www.rfc-editor.org/info/rfc6761>.
[RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type
Specifications and Registration Procedures", BCP 13,
RFC 6838, DOI 10.17487/RFC6838, January 2013,
<https://www.rfc-editor.org/info/rfc6838>.
[RFC6996] Mitchell, J., "Autonomous System (AS) Reservation for
Private Use", BCP 6, RFC 6996, DOI 10.17487/RFC6996, July
2013, <https://www.rfc-editor.org/info/rfc6996>.
[RFC7320] Nottingham, M., "URI Design and Ownership", BCP 190,
RFC 7320, DOI 10.17487/RFC7320, July 2014,
<https://www.rfc-editor.org/info/rfc7320>.
Appendix A. JSend π
according to [JSend], JSend is a spec that sets some rules for how JSON responses from web servers should be formatted π It focuses on application-level messaging, as opposed to protocol- or transport-level stuff, which makes it perfect for REST-style apps and APIs β¨
A basic JSend-compliant response must contain a "status" key and should contain "data", "message", and "code" keys, depending on the status value. Here's the table of required and optional keys π
+---------+-----------------+---------------+
| Type | Required keys | Optional keys |
+---------+-----------------+---------------+
| success | status, data | |
| fail | status, data | |
| error | status, message | code, data |
+---------+-----------------+---------------+
Table 1: Type and Keys in JSend Response
Author's Address π
Markus Stubbig
Independent
Germany
Email: stubbig.ietf@gmail.com
π¦ where this page comes from
- ietf: rfc8522 2019-02
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms