Skip to main content

Workflow sample - Update a driver's definition

Available since 2021 Update 9

This workflow sample demonstrates how to update a driver's definition.

tip

Obtain the authorization token needed to execute the request using POST /api/auth/login.

Obtain the driver's ID needed to execute the request using GET /api/drivers.

info

To use this API, the user should have the privilege of "Create configuration objects" and "Configure gateways and drivers".

Currently, we only support updating a driver's "enabled" status.

Update a driver's definition PATCH /api/drivers/{id}

Sample Request Header:

"accept": "application/json"
"X-MSTR-AuthToken": "pisu5dkkutqfblaamdomgr00ch"

Sample Request Body:

{
"operationList": [
{
"op": "replace",
"path": "/enabled",
"value": true
}
]
}

Sample Curl:

  curl -X 'PATCH' \
'https://demo.microstrategy.com/MicroStrategyLibrary/api/drivers/7358B0B8264A4B6198520B2BC0B6248B' \
-H 'accept: application/json' \
-H 'X-MSTR-AuthToken: pisu5dkkutqfblaamdomgr00ch ' \
-H 'Content-Type: application/json' \
-d '{
"operationList": [
{
"op": "replace",
"path": "/enabled",
"value": false
}
]
}'

Sample Response Body:

You can get the updated driver's definition.

{
"enabled": false,
"id": "7358B0B8264A4B6198520B2BC0B6248B",
"isODBC": false,
"name": "com.microstrategy.jdbc.db2.TestDriver"
}

Sample Response Code: 200