Skip to content

Commit

Permalink
Merge pull request #684 from webbnh/REST-corrections
Browse files Browse the repository at this point in the history
Small corrections to REST article
  • Loading branch information
allmightyspiff authored Sep 4, 2024
2 parents 9cacaef + d0149f7 commit fc84238
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions content/article/rest.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ https://api.softlayer.com/rest/v3/SoftLayer_Account/getHardware.json?objectMask=
```


This URL gets an account's hardware records along with that hardware's associated datacenter, operating system, and network component records. Note that these relational items are separate by semicolons.
This URL gets an account's hardware records along with that hardware's associated datacenter, operating system, and network component records. Note that these relational items are separate by commas.

```bash
https://api.softlayer.com/rest/v3/SoftLayer_Account/getHardware.json?objectMask=mask[datacenter,operatingSystem,networkComponents]
Expand All @@ -189,7 +189,7 @@ This URL gets an account's hardware records along with that hardware's associate
https://api.softlayer.com/rest/v3/SoftLayer_Account/Hardware.json?objectMask=mask[datacenter,operatingSystem[passwords],networkComponents]
```

>There are some other ways of specifying object mask, just as `objectMask=datacenter;operatingSystem.passwords;networkComponents`, but for clarity I use the `mask[datacenter,operatingSystem[passwords],networkComponents]` format.
>There are some other ways of specifying object mask, just as `objectMask=datacenter;operatingSystem.passwords;networkComponents`, but for clarity I use the `objectMask=mask[datacenter,operatingSystem[passwords],networkComponents]` format.

Selecting a `local` property in your objectMask will remove all other local properties on that level of your objectMask.

Expand Down Expand Up @@ -243,8 +243,8 @@ returns the error:
</root>
```

<p>While it's JSON equivalent:</p>
```
While it's JSON equivalent:
```bash
https://@api.softlayer.com/rest/v3/Nonexistent.json
```
Expand Down Expand Up @@ -275,4 +275,4 @@ curl -g -u $SL_USER:$SL_APIKEY -X POST -d '{"parameters": [SoftLayer_User_Custom
* `-d '{"parameters": [` tells CURL what data you want to send in. This is a JSON formatted string, and should start with the 'parameters' object. The parameters are in an array, in the order they appear in the documentation.
* `SoftLayer_User_Customer` This method takes in as its first parameter a user object. This is marked in the documentation as the base class that the API expects. You would replace this with a JSON object that fills out all the User_Customer data you want for this new user
* `string, string, boolean` this is the rest of the parameters, they are simple types so just fill out the information as required.
* `'https://api.softlayer.com/rest/v3.1/SoftLayer_Account/createUser'` The API url to send the request to.
* `'https://api.softlayer.com/rest/v3.1/SoftLayer_Account/createUser'` The API url to send the request to.

0 comments on commit fc84238

Please sign in to comment.