Data Formats Flashcards
What are the three popular standard formats for exchanging information with remote APIs
XML, JSON and YAML
What is the first step in interacting with a REST interface
Authenticate, usually by POSTing a user/password combination and retrieving an expiring token for use in authenticating subsequent requests.
What is the second step in interacting with a REST interface
Execute a GET request to a given endpoint (authenticating as required) to retrieve the state of a resource, requesting XML, JSON, or YAML as the output format.
What is the third step in interacting with a REST interface
Modify the returned XML, JSON, or YAML.
What is the fourth step in interacting with a REST interface
Execute a POST (or PUT) to the same endpoint (again, authenticating as required) to change the state of the resource, again requesting XML, JSON, or YAML as the output format and interpreting it as needed to determine if the operation was successful.
What is Extensible Markup Language (XML)
is a derivative of Structured, Generalized Markup Language (SGML), and also the parent of HyperText Markup Language (HTML). XML is a generic methodology for wrapping textual data in symmetrical tags to indicate semantics. XML filenames typically end in “.xml”.
What type of data format is this an example of
0101af9811012 t1.nano 0102bg8908023 t1.micro
XML
Which data format is user defined tag based?
XML
In XML what is the prologue abd what does it contain
The first line in an XML file and contains the tag name xml and attributes
EX.
How do you write a comment in XML
In XML what are three things to know about attributes
Attribute values must always be included in single or double quotes.
An element may have multiple attributes, but only one attribute with a specific name.
If an element has no content, we can use a shorthand notation in which we put the slash inside the open tag, rather than including a closing tag.
In XML why should you use namespace references
to specify particular tagnames and how they should be used in various contexts
What is this an example of
A reference to a namespace
In XML what is this an example of vms [ { {"vmid": "0101af9811012"}, {"type": "t1.nano"} }, { {"vmid": "0102bg8908023"}, {"type": "t1.micro"} } ]
An instance which is just an a dictionary in XML
What is JSON JavaScript Object Notation
a data format derived from the way complex object literals are written in JavaScript (which is in turn, similar to how object literals are written in Python)