# Cloud

### [![Response_Cloud_get_Attribute.png](https://simlab-soft.com/help/uploads/images/gallery/2024-09/response-cloud-get-attribute.png)](https://simlab-soft.com/help/uploads/images/gallery/2024-08/response-value-number-add.png) Get Cloud Attribute

![Ceiling Node.png](https://simlab-soft.com/help/uploads/images/gallery/2024-09/scaled-1680-/plqimage.png)

<div class="flex-shrink-0 flex flex-col relative items-end" id="bkmrk--7"><div><div class="pt-0"><div class="gizmo-bot-avatar flex h-8 w-8 items-center justify-center overflow-hidden rounded-full"><div class="relative p-1 rounded-sm flex items-center justify-center bg-token-main-surface-primary text-token-text-primary h-8 w-8">  
</div></div></div></div></div>The **Get Cloud Attribute** node enables the user to retrieve saved progress for a specific VR Experience by assigning the attribute in the Attribute Name field. The progress can be saved for either the scene, the user, or both. Once the node is executed, the retrieved value can be acquired through the **Result** port.

#### Example

![image.png](https://simlab-soft.com/help/uploads/images/gallery/2024-09/scaled-1680-/hALimage.png)

In this example, a **Get Cloud Attribute** node is used to retrieve stored data from Cloud. When the user enters the object named FinishLine, the object named Scoreboard will be shown. The data saved for this specific scene for all users is retrieved and stored in a variable named Scoreboard, which can then be displayed during the VR Experience.

---

### [![Response_Cloud_get_Attribute.png](https://simlab-soft.com/help/uploads/images/gallery/2024-09/response-cloud-get-attribute.png)](https://simlab-soft.com/help/uploads/images/gallery/2024-08/response-value-number-add.png) Set Cloud Attribute

![Ceiling Node.png](https://simlab-soft.com/help/uploads/images/gallery/2024-09/scaled-1680-/JyBimage.png)

<div class="flex-shrink-0 flex flex-col relative items-end" id="bkmrk--15"><div><div class="pt-0"><div class="gizmo-bot-avatar flex h-8 w-8 items-center justify-center overflow-hidden rounded-full"><div class="relative p-1 rounded-sm flex items-center justify-center bg-token-main-surface-primary text-token-text-primary h-8 w-8">  
</div></div></div></div></div>The **Set Cloud Attribute** node enables the user to store data for a specific VR Experience by assigning the attribute in the Attribute Name field then set the value of it. the data can be stored for either the user, the scene, or both. Once the node is executed, the specified data is saved accordingly.

#### Example

![image.png](https://simlab-soft.com/help/uploads/images/gallery/2024-09/scaled-1680-/orJimage.png)

In this example, a **Set Cloud Attribute** node is used to store data in Cloud. When the user enters the object named **FinishLine**, the value of the variable **Time** will be converted to String and stored under the **attribute named Time** for the **Scene Only**, meanwhile the value of the variable **Coins\_Count** will be converted to String and then stored under **the attribute Score** for the **User Only**.

**Note:** To retrieve the Cloud data, the experience must be run from a logged-in account in SimLab VR Viewer.

---

## HTTP Requests

These two nodes let your scene talk to a web service over the internet — for example to fetch some information from a server, send a result to one, or call an online tool. You give the node a web address and a few details about the request; it contacts the server, waits for the reply, and hands you back whatever the server sent. The two nodes are identical except for one thing — **the form the reply comes back in**:

- **Http Request** — gives the reply back as a **JSON object**. Use this when the server answers with JSON.
- **Http Request (String)** — gives the reply back as **plain text**. Use this for raw text, or when you'd rather read the text yourself later.

### Things to know before you start

These points apply to **both** nodes.

#### They wait for the request to finish before carrying on

Talking to a server isn't instant — it can take a moment for the reply to come back. These nodes handle that waiting for you. The node's **Execute** output does *not* fire the moment the request is sent; it fires only once the request has finished — that is, once the server has answered *or* the attempt has failed. So **the nodes you wire after this one run when the request comes back**, not the instant it goes out, and you don't need to add any delay of your own. The rest of your scene keeps running in the meantime — only this branch waits.

Because the **Execute** output fires whether the request succeeded or not, always check the result before trusting the reply — see below.

#### Always check Success before using the reply

A request can go wrong for many reasons — a mistyped address, no internet connection, or the server itself reporting a problem (such as “not found”). That is what the **Success** output is for. It is **Yes** only when the server was reached *and* answered normally; otherwise it is **No** and the **Response** comes back empty. Always send **Success** into a **Branch** node and only use the **Response** on the “Yes” side.

#### The request, in four parts

Every request you send is built from the same few pieces. You set these on the inputs of both nodes:

- **Verb** — what kind of request it is, chosen from a drop-down. **GET** (the default) asks the server *for* something and is by far the most common. **POST** sends new information to the server; **PUT** and **PATCH** update something that already exists; **DELETE** removes something. (**REQUEST** is a general-purpose option for unusual cases.) If you are just reading data, leave this on GET.
- **URL** — the web address to contact, for example `https://api.example.com/status`. This is required.
- **Header** (optional) — extra details about the request, given as a JSON object of name-and-value pairs (text values). It is most often used to pass a key or token that proves who you are, such as `{"Authorization": "Bearer abc123"}`.
- **Body** (optional) — the information you are sending *to* the server, given as a JSON object. It is used with POST, PUT, and PATCH. A GET request never carries a body, so anything you connect here is ignored when the verb is GET.

#### Which one should I use?

Most modern web services answer with **JSON**. If yours does, use **Http Request** and you'll get a JSON object you can read straight away with the **JSON Object** nodes. If the server sends back plain text, or you aren't sure of the format and want the exact text, use **Http Request (String)**. You can always turn text into a JSON object afterwards with **Create Json Object From String**.

### Http Request

Sends a request to a web address and gives you the server's reply as a **JSON object**.

#### What it does

This is the node to reach for when the server answers with JSON, which most web services do. It contacts the address you give it, waits for the reply, and reads that reply into a **JSON object** — so you can pull values straight out of it with the **Get Json Object Field** nodes on the **JSON Objects** page. Only the reply's content comes back; this node doesn't hand you the technical status number separately. Remember to check **Success** first: if the request failed, or the reply wasn't valid JSON, Success is **No** and the Response is empty.

#### Inputs

<table id="bkmrk-port-type-what-to-co"><thead><tr><th style="white-space: nowrap;">Port</th><th style="white-space: nowrap;">Type</th><th>What to connect</th></tr></thead><tbody><tr><td style="white-space: nowrap;">**Execute**</td><td style="white-space: nowrap;">Trigger</td><td>Wire this from the previous node's **Execute** output.</td></tr><tr><td style="white-space: nowrap;">**Verb**</td><td style="white-space: nowrap;">Choice</td><td>The kind of request: GET, POST, DELETE, PUT, REQUEST, or PATCH. Defaults to **GET**.</td></tr><tr><td style="white-space: nowrap;">**URL**</td><td style="white-space: nowrap;">Text</td><td>The web address to contact.</td></tr><tr><td style="white-space: nowrap;">**Header**</td><td style="white-space: nowrap;">JSON object</td><td>*Optional.* Extra request details as name-and-value pairs, such as an authorization key.</td></tr><tr><td style="white-space: nowrap;">**Body**</td><td style="white-space: nowrap;">JSON object</td><td>*Optional.* The information to send to the server. Used with POST, PUT, and PATCH; ignored for GET.</td></tr></tbody></table>

#### Outputs

<table id="bkmrk-port-type-what-you-g"><thead><tr><th style="white-space: nowrap;">Port</th><th style="white-space: nowrap;">Type</th><th>What you get</th></tr></thead><tbody><tr><td style="white-space: nowrap;">**Execute**</td><td style="white-space: nowrap;">Trigger</td><td>Fires once the request finishes — whether it succeeded or not.</td></tr><tr><td style="white-space: nowrap;">**Success**</td><td style="white-space: nowrap;">True / false</td><td>**Yes** if the server was reached, answered normally, and the reply could be read as JSON; **No** otherwise.</td></tr><tr><td style="white-space: nowrap;">**Response**</td><td style="white-space: nowrap;">JSON object</td><td>The server's reply, as a JSON object. Empty when **Success** is No.</td></tr></tbody></table>

#### Example

<table id="bkmrk-verb-input-get-url-i"><tbody><tr><td style="white-space: nowrap;">**Verb** input</td><td>`GET`</td></tr><tr><td style="white-space: nowrap;">**URL** input</td><td>`https://api.example.com/weather?city=Dubai`</td></tr><tr><td style="white-space: nowrap;">**Header** input</td><td>`{"Accept": "application/json"}` — optional</td></tr><tr><td style="white-space: nowrap;">**Success** output</td><td>**Yes**</td></tr><tr><td style="white-space: nowrap;">**Response** output</td><td>`{"city": "Dubai", "temperature": 41, "unit": "C"}`</td></tr></tbody></table>

#### Tips

- **Check Success first.** Wire **Success** into a **Branch** node and only read the **Response** when it's Yes. A server error such as “not found” counts as No.
- **Read one value out.** Wire the **Response** into a **Get Json Object Field** node with the field name to pull a single value (for example `temperature`) out of the reply.
- **Sending data?** Fill in the **Body** and choose **POST** (or PUT / PATCH). When a body is sent, the request is automatically marked as JSON for you.
- **Reply isn't JSON?** If the server sends plain text rather than JSON, use **Http Request (String)** below instead.

### Http Request (String)

Sends the same kind of request, but gives you the server's reply as **plain text**.

#### What it does

Works exactly like **Http Request**, with one difference: the reply comes back as a piece of **text**, exactly as the server sent it, instead of being read into a JSON object. Use this when the server returns plain text, when the reply isn't JSON, or when you simply want the raw text to store, display, or read yourself later. As with the other node, check **Success** first; if the request failed, Success is **No** and the text comes back empty.

#### Inputs

<table id="bkmrk-port-type-what-to-co-0"><thead><tr><th style="white-space: nowrap;">Port</th><th style="white-space: nowrap;">Type</th><th>What to connect</th></tr></thead><tbody><tr><td style="white-space: nowrap;">**Execute**</td><td style="white-space: nowrap;">Trigger</td><td>Wire this from the previous node's **Execute** output.</td></tr><tr><td style="white-space: nowrap;">**Verb**</td><td style="white-space: nowrap;">Choice</td><td>The kind of request: GET, POST, DELETE, PUT, REQUEST, or PATCH. Defaults to **GET**.</td></tr><tr><td style="white-space: nowrap;">**URL**</td><td style="white-space: nowrap;">Text</td><td>The web address to contact.</td></tr><tr><td style="white-space: nowrap;">**Header**</td><td style="white-space: nowrap;">JSON object</td><td>*Optional.* Extra request details as name-and-value pairs, such as an authorization key.</td></tr><tr><td style="white-space: nowrap;">**Body**</td><td style="white-space: nowrap;">JSON object</td><td>*Optional.* The information to send to the server. Used with POST, PUT, and PATCH; ignored for GET.</td></tr></tbody></table>

#### Outputs

<table id="bkmrk-port-type-what-you-g-0"><thead><tr><th style="white-space: nowrap;">Port</th><th style="white-space: nowrap;">Type</th><th>What you get</th></tr></thead><tbody><tr><td style="white-space: nowrap;">**Execute**</td><td style="white-space: nowrap;">Trigger</td><td>Fires once the request finishes — whether it succeeded or not.</td></tr><tr><td style="white-space: nowrap;">**Success**</td><td style="white-space: nowrap;">True / false</td><td>**Yes** if the server was reached and answered normally; **No** otherwise.</td></tr><tr><td style="white-space: nowrap;">**Response**</td><td style="white-space: nowrap;">Text</td><td>The server's reply, as plain text. Empty when **Success** is No.</td></tr></tbody></table>

#### Example

<table id="bkmrk-verb-input-get-url-i-0"><tbody><tr><td style="white-space: nowrap;">**Verb** input</td><td>`GET`</td></tr><tr><td style="white-space: nowrap;">**URL** input</td><td>`https://api.example.com/version`</td></tr><tr><td style="white-space: nowrap;">**Success** output</td><td>**Yes**</td></tr><tr><td style="white-space: nowrap;">**Response** output</td><td>`v2.4.1`</td></tr></tbody></table>

#### Tips

- **Check Success first.** Wire **Success** into a **Branch** node and only read the **Response** when it's Yes. A server error such as “not found” counts as No.
- **Good for non-JSON replies.** Plain text, a version number, a short status word, or a line of CSV all come back cleanly as text.
- **Text that's really JSON?** If the reply happens to be JSON and you want to read fields out of it, pass the **Response** into **Create Json Object From String** — or just use **Http Request** above, which does that step for you.

### Related

- **JSON Objects** — build the **Header** and **Body** objects you send, and read values out of the reply from **Http Request**.
- **Create Json Object From String** — turn the text from **Http Request (String)** into a JSON object.
- **Branch** — use the **Success** output to decide what happens next.