Skip to content
Last updated

Maintain

api-version: 4.0

Retrieves the list of pools.

GET  /_sysadmin/_admin/_api/rest/maintain/{pool}

Parameters

NameInRequiredTypeDescription
poolpathfalsestringThe ID of the pool.

Responses

Success 200

NameTypeDescription
countintegerThe number of returned values.
valuesPoolsThe list of pools.

Error 4xx

NameTypeDescription
messagestringThe error message.
outputOperationResultOutputThe result output.
typeOperationResultTypeThe result type.
dataOperationErrorThe list of errors.

Examples

Maintain all available pools

Request

GET https://demo.symbioworld.com/_sysadmin/_admin/_api/rest/maintain/

Response (200 OK)

{
    "count": 1,
    "values": [
        {
            "item1": "E5E85FED-BD69-49DF-ADC0-3CA4DAED5305",
            "item2": true
        }
    ]    
}

Example Powershell

$headers = @{}
$headers.Add("accept","application/json")
$headers.Add("symbio-auth-token","mytoken")
$result = Invoke-RestMethod -Uri https://sampleinstance.symbioweb.com/_sysadmin/_admin/_api/rest/maintain/ -Headers $headers -UseBasicParsing
$succeded = $result.values | Where-Object item2 -eq $true
$failed = $result.values | Where-Object item2 -eq $false
if (($failed | measure).Count -gt 0) {
    $failedIds = [string]::Join(', ', ($failed | select -ExpandProperty item1))
    $message = 'The following pools could not successful maintained: ' + $failedIds
    Write-Error $message
}
if (($succeded | measure).Count -gt 0) {
    $succededIds = [string]::Join(', ', ($succeded | select -ExpandProperty item1))
    $message = 'The following pool was successful maintained: ' + $succededIds
    Write-Verbose $message
}

Definitions

Pool

NameTypeDescription
poolIdstringThe ID of the pool.
successboolTrue if it is succeded, otherwise it is false.

OperationResultOutput

NameType
volatilestring
permanentstring
dialogstring
inlinestring

OperationResultType

NameType
criticalstring
errorstring
warningstring
successstring
unauthorizedstring

OperationError

NameTypeDescription
errorstringThe error message.