- TOPdesk API Username and Key
- User-defined variables:
topdeskBaseUrl,topdeskApiUsernameandtopdeskApiSecretcreated in your HelloID portal.
This code snippet will update an change within TOPdesk and executes the following tasks:
- Define a hash table
$formObject. The keys of the hash table represent the properties necessary to update an change withinTOPdesk, while the values represent the values entered in the form.
To view an example of the form output, please refer to the JSON code pasted below.
{
"id": "dfa38bc0-5ca6-4222-8cbe-8ab071c58f9d",
"number": "W2312 030",
"updates": [
{
"op": "replace",
"path": "/briefDescription",
"value": "Change example - updated"
},
{
"op": "replace",
"path": "/externalNumber",
"value": "12345678"
},
{
"op": "remove",
"path": "/subcategory"
}
]
}❗ It is important to note that the names of your form fields might differ. Ensure that the
$formObjecthash table is appropriately adjusted to match your form fields. See the TOPdesk API Docs page
-
Creates authorization headers using the provided API key and secret.
-
Update an change using the:
Invoke-RestMethodcmdlet. The hash table called:$formObjectis passed to the body of the:Invoke-RestMethodcmdlet as a JSON object.