Send Request
Octory PRO
Element type: Dictionary
Send an API request.
Keys
Name | Type | Possible values | Required |
---|---|---|---|
Type | String | SendRequest | Required |
Request | Dictionary (Request) | - | Required |
Condition | Dictionary (Condition) | - |
Detail
Type Required
Type: String
Explanation: The type of the component has to be SendRequest
.
Request Required
Type: Dictionary (Request)
Explanation: The request to send.
Condition
Type: Dictionary (Condition)
Explanation: Allows launch the action only based on a boolean expression.
Example
Retrieve the name of the computer with the id 20 from a Jamf MDM server, using the classic Jamf API.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- ... -->
<key>ActionSets</key>
<array>
<dict>
<key>Type</key>
<string>Parallel</string>
<key>Triggers</key>
<array>
<string>NextButtonClick</string>
</array>
<key>Actions</key>
<array>
<dict>
<key>Type</key>
<string>SendRequest</string>
<key>Request</key>
<dict>
<key>Endpoint</key>
<string>https://mycompany.jamfcloud.com/JSSResource/computers/id/20</string>
<key>Method</key>
<string>GET</string>
<key>MDMApi</key>
<string>Jamf</string>
<key>VariableReadingPaths</key>
<dict>
<key>ComputerName</key>
<string>computer->general->name</string>
</dict>
</dict>
</dict>
</array>
</dict>
</array>
<!-- ... -->
</dict>
</plist>