Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small corrections to REST article #684

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.