REST API Encoding Methods - CCNA Exam 200-301: Cisco Solutions

Supported Encoding Methods for REST APIs

Question

Which two encoding methods are supported by REST APIs? (Choose two.)

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

CD.

The Application Policy Infrastructure Controller (APIC) REST API is a programmatic interface that uses REST architecture.

The API accepts and returns HTTP (not enabled by default) or HTTPS messages that contain JavaScript Object Notation (JSON) or Extensible Markup Language (XML) documents.

https://www.cisco.com/c/en/us/td/docs/switches/datacenter/aci/apic/sw/2-x/rest_cfg/2_1_x/b_Cisco_APIC_REST_API_Configuration_Guide/

REST APIs (Representational State Transfer Application Programming Interface) are used to communicate between client and server applications over the HTTP protocol. When data is exchanged between the client and server through REST APIs, it needs to be encoded and decoded into a format that both client and server understand.

There are various encoding methods available for REST APIs, but only two of them are supported by REST APIs, as mentioned in the question. Here are the explanations for each of the supported encoding methods:

  1. JSON (JavaScript Object Notation): JSON is a lightweight data-interchange format that is easy for humans to read and write, and easy for machines to parse and generate. It is a text format that is completely language independent, which makes it ideal for use with REST APIs. JSON is used to encode structured data like arrays, objects, numbers, and strings, and it is supported by most programming languages.

  2. XML (eXtensible Markup Language): XML is a markup language that is used to encode documents in a format that can be read by both humans and machines. It is a more complex encoding method than JSON, but it provides more flexibility and extensibility. XML is used to encode structured data like elements, attributes, and values, and it is supported by most programming languages.

The other answer choices in the question are not supported encoding methods for REST APIs, and here's a brief explanation of each:

A. SGML (Standard Generalized Markup Language): SGML is a markup language that is used for describing the structure of a document. It is a predecessor of HTML and XML, but it is not a supported encoding method for REST APIs.

E. EBCDIC (Extended Binary Coded Decimal Interchange Code): EBCDIC is a character encoding used mainly on IBM mainframe and IBM midrange computer operating systems. It is not a supported encoding method for REST APIs.

In summary, the two supported encoding methods for REST APIs are JSON and XML.