Skip to content

Latest commit

 

History

History
executable file
·
381 lines (279 loc) · 14.1 KB

GroAdminDomainAdminClassesApi.md

File metadata and controls

executable file
·
381 lines (279 loc) · 14.1 KB

GrommunioAdmin.GrommunioAdmin/Api.GroAdminDomainAdminClassesApi

All URIs are relative to /api/v1

Method HTTP request Description
Invoke-GroAdminDeleteClass DELETE /domains/{domainID}/classes/{ID} deleteClass
Get-GroAdminClass GET /domains/{domainID}/classes/{ID} getClass
Get-GroAdminClasses GET /domains/{domainID}/classes getClasses
Get-GroAdminClassesTree GET /domains/{domainID}/classes/tree getClassesTree
Invoke-GroAdminPatchClass PATCH /domains/{domainID}/classes/{ID} patchClass
Submit-GroAdminClass POST /domains/{domainID}/classes postClass
Test-GroAdminFilter POST /domains/{domainID}/classes/testFilter testFilter

Invoke-GroAdminDeleteClass

void Invoke-GroAdminDeleteClass
        [-DomainID]
        [-ID]
        [-XCsrfToken]

deleteClass

Delete class

Example

$DomainID = 56 # Int32 | ID of the domain
$ID = 56 # Int32 | ID of the object
$XCsrfToken = "MyXCsrfToken" # String | CSRF Token (optional)

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

Parameters

Name Type Description Notes
DomainID Int32 ID of the domain
ID Int32 ID of the object
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-GroAdminClass

ClassRead Get-GroAdminClass
        [-DomainID]
        [-ID]
        [-Level] <System.Nullable[Int32]>

getClass

Get information about class

Example

$DomainID = 56 # Int32 | ID of the domain
$ID = 56 # Int32 | ID of the object
$Level = 56 # Int32 | Set detail level of return value. Usually ranges from 0 to 2. (optional)

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

Parameters

Name Type Description Notes
DomainID Int32 ID of the domain
ID Int32 ID of the object
Level Int32 Set detail level of return value. Usually ranges from 0 to 2. [optional]

Return type

ClassRead (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-GroAdminClasses

DomainsClassesResponse Get-GroAdminClasses
        [-DomainID]
        [-Level] <System.Nullable[Int32]>
        [-Limit] <System.Nullable[Int32]>
        [-Offset] <System.Nullable[Int32]>
        [-Match]
        [-MatchFields]
        [-Sort]
        [-ID] <System.Nullable[Int32][]>
        [-Classname]
        [-Listname]

getClasses

Get list of classes

Example

$DomainID = 56 # Int32 | ID of the domain
$Level = 56 # Int32 | Set detail level of return value. Usually ranges from 0 to 2. (optional)
$Limit = 56 # Int32 | Maximum number of results to return (optional) (default to 50)
$Offset = 56 # Int32 | Index of the first element to return (optional) (default to 0)
$Match = "MyMatch" # String | Match by substring (optional)
$MatchFields = "MyMatchFields" # String | Comma separated list of attributes to restrict matching to. (optional)
$Sort = "MySort" # String | Sort by attribute. Can be given multiple times. (optional)
$ID = 0 # Int32[] | Filter one or more IDs (optional)
$Classname = "MyClassname" # String | Filter by classname (optional)
$Listname = "MyListname" # String | Filter by listname (optional)

# getClasses
try {
    $Result = Get-GroAdminClasses -DomainID $DomainID -Level $Level -Limit $Limit -Offset $Offset -Match $Match -MatchFields $MatchFields -Sort $Sort -ID $ID -Classname $Classname -Listname $Listname
} catch {
    Write-Host ("Exception occurred when calling Get-GroAdminClasses: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
DomainID Int32 ID of the domain
Level Int32 Set detail level of return value. Usually ranges from 0 to 2. [optional]
Limit Int32 Maximum number of results to return [optional] [default to 50]
Offset Int32 Index of the first element to return [optional] [default to 0]
Match String Match by substring [optional]
MatchFields String Comma separated list of attributes to restrict matching to. [optional]
Sort String Sort by attribute. Can be given multiple times. [optional]
ID Int32[] Filter one or more IDs [optional]
Classname String Filter by classname [optional]
Listname String Filter by listname [optional]

Return type

DomainsClassesResponse (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-GroAdminClassesTree

DomainsClassesTreeResponse Get-GroAdminClassesTree
        [-DomainID]

getClassesTree

Generate class hierarchy tree

Example

$DomainID = 56 # Int32 | ID of the domain

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

Parameters

Name Type Description Notes
DomainID Int32 ID of the domain

Return type

DomainsClassesTreeResponse (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-GroAdminPatchClass

ClassRead Invoke-GroAdminPatchClass
        [-DomainID]
        [-ID]
        [-XCsrfToken]
        [-PostClassRequest]

patchClass

Modify class

Example

$DomainID = 56 # Int32 | ID of the domain
$ID = 56 # Int32 | ID of the object
$XCsrfToken = "MyXCsrfToken" # String | CSRF Token (optional)
$PostClassRequest = Initialize-PostClassRequest -Classname "MyClassname" -ParentClasses 0 -Members "MyMembers" -Filters 
$Op = Initialize-Op 
$ClassFilter = Initialize-ClassFilter -Prop "MyProp" -Op $Op -Val "MyVal" # PostClassRequest |  (optional)

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

Parameters

Name Type Description Notes
DomainID Int32 ID of the domain
ID Int32 ID of the object
XCsrfToken String CSRF Token [optional]
PostClassRequest PostClassRequest [optional]

Return type

ClassRead (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]

Submit-GroAdminClass

ClassRead Submit-GroAdminClass
        [-DomainID]
        [-XCsrfToken]
        [-PostClassRequest]

postClass

Create new class

Example

$DomainID = 56 # Int32 | ID of the domain
$XCsrfToken = "MyXCsrfToken" # String | CSRF Token (optional)
$PostClassRequest = Initialize-PostClassRequest -Classname "MyClassname" -ParentClasses 0 -Members "MyMembers" -Filters 
$Op = Initialize-Op 
$ClassFilter = Initialize-ClassFilter -Prop "MyProp" -Op $Op -Val "MyVal" # PostClassRequest |  (optional)

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

Parameters

Name Type Description Notes
DomainID Int32 ID of the domain
XCsrfToken String CSRF Token [optional]
PostClassRequest PostClassRequest [optional]

Return type

ClassRead (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]

Test-GroAdminFilter

DomainsClassesTestFilterResponse Test-GroAdminFilter
        [-DomainID]
        [-XCsrfToken]
        [-ClassFilter] <PSCustomObject[][]>

testFilter

Test class filter specification

Example

$DomainID = 56 # Int32 | ID of the domain
$XCsrfToken = "MyXCsrfToken" # String | CSRF Token (optional)
$ClassFilter = $Op = Initialize-Op 
$ClassFilter = Initialize-ClassFilter -Prop "MyProp" -Op $Op -Val "MyVal" # ClassFilter[][] |  (optional)

# testFilter
try {
    $Result = Test-GroAdminFilter -DomainID $DomainID -XCsrfToken $XCsrfToken -ClassFilter $ClassFilter
} catch {
    Write-Host ("Exception occurred when calling Test-GroAdminFilter: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
DomainID Int32 ID of the domain
XCsrfToken String CSRF Token [optional]
ClassFilter ClassFilter[][] [optional]

Return type

DomainsClassesTestFilterResponse (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]