Skip to content

Latest commit

 

History

History
executable file
·
583 lines (402 loc) · 17.6 KB

GroAdminMiscApi.md

File metadata and controls

executable file
·
583 lines (402 loc) · 17.6 KB

GrommunioAdmin.GrommunioAdmin/Api.GroAdminMiscApi

All URIs are relative to /api/v1

Method HTTP request Description
Invoke-GroAdminCheckFormat GET /chkFormat checkFormat
Invoke-GroAdminDeleteMailq POST /system/mailq/delete deleteMailq
Clear-GroAdminMailq POST /system/mailq/flush flushMailq
Get-GroAdminAbout GET /about getAbout
Get-GroAdminMailq GET /system/mailq getMailq
Get-GroAdminProfile GET /profile getProfile
Get-GroAdminStatus GET /status getStatus
Get-GroAdminUserDomains GET /domains getUserDomains
Submit-GroAdminLogin POST /login postLogin
Submit-GroAdminRequeue POST /system/mailq/requeue postRequeue
Send-GroAdminPasswd PUT /passwd putPasswd
Invoke-GroAdminRemoteCLI POST /system/cli remoteCLI
Sync-GroAdminTop GET /system/sync/top syncTop

Invoke-GroAdminCheckFormat

ChkFormatResponse Invoke-GroAdminCheckFormat
        [-Domain]
        [-Email]

checkFormat

Check format of input

Example

$Domain = "MyDomain" # String | Check format of domain name (optional)
$Email = "MyEmail" # String | Check format of e-mail address (optional)

# checkFormat
try {
    $Result = Invoke-GroAdminCheckFormat -Domain $Domain -Email $Email
} catch {
    Write-Host ("Exception occurred when calling Invoke-GroAdminCheckFormat: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
Domain String Check format of domain name [optional]
Email String Check format of e-mail address [optional]

Return type

ChkFormatResponse (PSCustomObject)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Invoke-GroAdminDeleteMailq

void Invoke-GroAdminDeleteMailq
        [-XCsrfToken]
        [-Queue]

deleteMailq

Delete entries from postfix mail queue

Example

$XCsrfToken = "MyXCsrfToken" # String | CSRF Token (optional)
$Queue = "MyQueue" # String | Comma separated list of postfix queue IDs (optional) (default to "ALL")

# deleteMailq
try {
    $Result = Invoke-GroAdminDeleteMailq -XCsrfToken $XCsrfToken -Queue $Queue
} catch {
    Write-Host ("Exception occurred when calling Invoke-GroAdminDeleteMailq: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
XCsrfToken String CSRF Token [optional]
Queue String Comma separated list of postfix queue IDs [optional] [default to "ALL"]

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Clear-GroAdminMailq

void Clear-GroAdminMailq
        [-Queue]
        [-XCsrfToken]

flushMailq

Flush postfix mail queue

Example

$Queue = "MyQueue" # String | Postfix queue ID
$XCsrfToken = "MyXCsrfToken" # String | CSRF Token (optional)

# flushMailq
try {
    $Result = Clear-GroAdminMailq -Queue $Queue -XCsrfToken $XCsrfToken
} catch {
    Write-Host ("Exception occurred when calling Clear-GroAdminMailq: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
Queue String Postfix queue ID
XCsrfToken String CSRF Token [optional]

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Get-GroAdminAbout

AboutResponse Get-GroAdminAbout

getAbout

Get general information about the backend

Example

# getAbout
try {
    $Result = Get-GroAdminAbout
} catch {
    Write-Host ("Exception occurred when calling Get-GroAdminAbout: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

This endpoint does not need any parameter.

Return type

AboutResponse (PSCustomObject)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Get-GroAdminMailq

SystemMailqResponse Get-GroAdminMailq

getMailq

Retrieve mailq output

Example

# getMailq
try {
    $Result = Get-GroAdminMailq
} catch {
    Write-Host ("Exception occurred when calling Get-GroAdminMailq: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

This endpoint does not need any parameter.

Return type

SystemMailqResponse (PSCustomObject)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Get-GroAdminProfile

ProfileResponse Get-GroAdminProfile

getProfile

Get information about currently logged in user

Example

# getProfile
try {
    $Result = Get-GroAdminProfile
} catch {
    Write-Host ("Exception occurred when calling Get-GroAdminProfile: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

This endpoint does not need any parameter.

Return type

ProfileResponse (PSCustomObject)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Get-GroAdminStatus

StatusResponse Get-GroAdminStatus

getStatus

Check API connectivity and status

Example

# getStatus
try {
    $Result = Get-GroAdminStatus
} catch {
    Write-Host ("Exception occurred when calling Get-GroAdminStatus: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

This endpoint does not need any parameter.

Return type

StatusResponse (PSCustomObject)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Get-GroAdminUserDomains

DomainsResponse Get-GroAdminUserDomains

getUserDomains

Get list of domains the user has access to

Example

# getUserDomains
try {
    $Result = Get-GroAdminUserDomains
} catch {
    Write-Host ("Exception occurred when calling Get-GroAdminUserDomains: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

This endpoint does not need any parameter.

Return type

DomainsResponse (PSCustomObject)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Submit-GroAdminLogin

LoginResponse Submit-GroAdminLogin
        [-ContentType]
        [-User]
        [-Pass]

postLogin

Login user

Example

$ContentType = "application/x-www-form-urlencoded" # String | 
$User = "MyUser" # String | Username (optional)
$Pass = "MyPass" # String | User password (optional)

# postLogin
try {
    $Result = Submit-GroAdminLogin -ContentType $ContentType -User $User -Pass $Pass
} catch {
    Write-Host ("Exception occurred when calling Submit-GroAdminLogin: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
ContentType String
User String Username [optional]
Pass String User password [optional]

Return type

LoginResponse (PSCustomObject)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Submit-GroAdminRequeue

void Submit-GroAdminRequeue
        [-XCsrfToken]
        [-Queue]

postRequeue

Requeue entries from postfix mail queue

Example

$XCsrfToken = "MyXCsrfToken" # String | CSRF Token (optional)
$Queue = "MyQueue" # String | Comma separated list of postfix queue IDs (optional) (default to "ALL")

# postRequeue
try {
    $Result = Submit-GroAdminRequeue -XCsrfToken $XCsrfToken -Queue $Queue
} catch {
    Write-Host ("Exception occurred when calling Submit-GroAdminRequeue: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
XCsrfToken String CSRF Token [optional]
Queue String Comma separated list of postfix queue IDs [optional] [default to "ALL"]

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Send-GroAdminPasswd

void Send-GroAdminPasswd
        [-XCsrfToken]
        [-PutPasswdRequest]

putPasswd

Change current users password

Example

$XCsrfToken = "MyXCsrfToken" # String | CSRF Token (optional)
$PutPasswdRequest = Initialize-PutPasswdRequest -New "MyNew" -Old "MyOld" -User "MyUser" # PutPasswdRequest |  (optional)

# putPasswd
try {
    $Result = Send-GroAdminPasswd -XCsrfToken $XCsrfToken -PutPasswdRequest $PutPasswdRequest
} catch {
    Write-Host ("Exception occurred when calling Send-GroAdminPasswd: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
XCsrfToken String CSRF Token [optional]
PutPasswdRequest PutPasswdRequest [optional]

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Invoke-GroAdminRemoteCLI

SystemCliResponse Invoke-GroAdminRemoteCLI
        [-RemoteCLIRequest]
        [-XCsrfToken]

remoteCLI

Remote CLI invocation

Example

$Mode = Initialize-Mode 
$RemoteCLIRequest = Initialize-RemoteCLIRequest -Command "MyCommand" -Mode $Mode -Color $false -Fs @{ key_example = "MyInner" } # RemoteCLIRequest | 
$XCsrfToken = "MyXCsrfToken" # String | CSRF Token (optional)

# remoteCLI
try {
    $Result = Invoke-GroAdminRemoteCLI -RemoteCLIRequest $RemoteCLIRequest -XCsrfToken $XCsrfToken
} catch {
    Write-Host ("Exception occurred when calling Invoke-GroAdminRemoteCLI: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
RemoteCLIRequest RemoteCLIRequest
XCsrfToken String CSRF Token [optional]

Return type

SystemCliResponse (PSCustomObject)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Sync-GroAdminTop

SystemSyncTopResponse Sync-GroAdminTop
        [-FilterUpdated] <System.Nullable[Int32]>
        [-FilterEnded] <System.Nullable[Int32]>

syncTop

Get current usage. Should be called at least twice to provide useful information.

Example

$FilterUpdated = 56 # Int32 | Maximum number of seconds since the last update (optional)
$FilterEnded = 56 # Int32 | Maximum number of seconds since the process ended (optional)

# syncTop
try {
    $Result = Sync-GroAdminTop -FilterUpdated $FilterUpdated -FilterEnded $FilterEnded
} catch {
    Write-Host ("Exception occurred when calling Sync-GroAdminTop: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
FilterUpdated Int32 Maximum number of seconds since the last update [optional]
FilterEnded Int32 Maximum number of seconds since the process ended [optional]

Return type

SystemSyncTopResponse (PSCustomObject)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]