Commit e8a24d2c authored by Alexis Bridoux's avatar Alexis Bridoux
Browse files

Blank configuration and jamf extension attribute request

parent ea2961a8
# Api request - Jamf extension attribute
This request will put a value `#Value#` inside a Jamf extension attribute, using the classic Jamf API.
To use it, add a `SendRequest` action inside an [ActionSet](https://documents.getceremony.app/Actions.html#action-sets), which will for example be executed when the application is launched or when the user clicks a button.
The plist file is given as an example to show you how the Api request can be used.
### To be filled:
- Jamf API URL
- Computer Id
- Extension attribute id
- Value
#### Xml
```xml
<key>JamfBaseURL</key>
<string>https://#JAMF_API_URL#/JSSResource/</string>
<key>Models</key>
<dict>
<key>Endpoint</key>
<string>computers/id/#COMPUTER_ID#</string>
<key>MDMApi</key>
<string>Jamf</string>
<key>Method</key>
<string>PUT</string>
<key>Body</key>
<dict>
<key>computer</key>
<dict>
<key>extension_attributes</key>
<dict>
<key>extension_attribute</key>
<dict>
<key>id</key>
<integer>#EXTENSION_ATTRIBUTE_ID#</integer>
<key>value</key>
<string>#VALUE#</string>
</dict>
</dict>
</dict>
</dict>
</dict>
```
#### Plist Editor
The extension attribute integer value is set to 0 to let you copy and paste into Plist Editor.
```xml
<?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">
<key>JamfBaseURL</key>
<string>https://#JAMF_API_URL#/JSSResource/</string>
<key>Models</key>
<dict>
<key>Endpoint</key>
<string>computers/id/#COMPUTER_ID#</string>
<key>MDMApi</key>
<string>Jamf</string>
<key>Method</key>
<string>PUT</string>
<key>Body</key>
<dict>
<key>computer</key>
<dict>
<key>extension_attributes</key>
<dict>
<key>extension_attribute</key>
<dict>
<key>id</key>
<integer>0</integer>
<key>value</key>
<string>#VALUE#</string>
</dict>
</dict>
</dict>
</dict>
</dict>
</plist>
```
\ No newline at end of file
<?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>Admin</key>
<dict>
<key>IsAdminModeEnabled</key>
<true/>
</dict>
<key>APIRequests</key>
<dict>
<key>JamfBaseURL</key>
<string>https://mycompany.jamfcloud.com/JSSResource/</string>
<key>Models</key>
<dict>
<key>ExtensionAttribute</key>
<dict>
<key>Endpoint</key>
<string>computers/id/2</string>
<key>MDMApi</key>
<string>Jamf</string>
<key>Method</key>
<string>PUT</string>
<key>Body</key>
<dict>
<key>computer</key>
<dict>
<key>extension_attributes</key>
<dict>
<key>extension_attribute</key>
<dict>
<key>id</key>
<integer>5</integer>
<key>value</key>
<string>true</string>
</dict>
</dict>
</dict>
</dict>
</dict>
</dict>
</dict>
<key>Slides</key>
<array>
<dict>
<key>Containers</key>
<array>
<dict>
<key>Components</key>
<array>
<dict>
<key>Type</key>
<string>Spacer</string>
</dict>
<dict>
<key>Type</key>
<string>Button</string>
<key>Style</key>
<string>Simple</string>
<key>Text</key>
<string>Send request</string>
<key>Alignment</key>
<string>Center</string>
<key>OnClick</key>
<dict>
<key>Type</key>
<string>Parallel</string>
<key>Actions</key>
<array>
<dict>
<key>Type</key>
<string>SendRequest</string>
<key>Request</key>
<string>ExtensionAttribute</string>
</dict>
</array>
</dict>
</dict>
<dict>
<key>Type</key>
<string>Spacer</string>
</dict>
</array>
</dict>
</array>
</dict>
</array>
<key>Window</key>
<dict>
<key>OnScreen</key>
<string>Simple</string>
</dict>
</dict>
</plist>
<?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>Admin</key>
<dict>
<key>IsAdminModeEnabled</key>
<true/>
</dict>
<key>Slides</key>
<array>
<dict>
<key>Containers</key>
<array>
<dict>
<key>Components</key>
<array/>
</dict>
</array>
</dict>
</array>
<key>Window</key>
<dict>
<key>OnScreen</key>
<string>Simple</string>
</dict>
</dict>
</plist>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment