Protocol
The MyCloud API is a RESTful API implemented using the HTTP protocol. Over the HTTP protocol, a communication protocol is utilized to exchange the data necessary to fulfill any API request. The protocol uses two separate standards to implement the data exchange:
-
Upstream: multipart/form-data
-
Downstream: JSON
Upstream
The upstream data is the data sent from the API client to the API server. This data is exchanged using the 'multipart/form-data' standard defined by RFC7578. This is the standard data format that is used by web browsers to submit data from a <form> on a webpage. The format is support by most modern programming languages, and provides support for sending files as well as fields.
If you are using the PHP SDK, you will not have to deal with the upstream data. The SDK handles all of the data conversions for you. You will work with the model classes provided by the SDK, and the SDK will create the multipart/form-data data that will be sent to the server for you.
Downstream
The downstream data is the data that is sent from the API server to the API client. This data is exchanged using the JSON standard defined by RFC7159. This is JavaScript Object Notation, which is supported by most modern programming languages, specifically JavaScript. JSON provides a very convenient format for encoding object data, which makes it well suited for exhanging object models.
If you are using the PHP SDK, you will not have to deal with the downstream data. The SDK handles all of the data conversions for you. The SDK will read all of the JSON data sent from the API server, and convert that into the model objects for you.