Skip to content

SessionLimitAPI

All URIs are relative to https://use1-omada-northbound.tplinkcloud.com

Method HTTP request Description
CreateSessionLimitRule Post /openapi/v1/{omadacId}/sites/{siteId}/session-limit/rules Create session limit rule
DeleteSessionLimitRule Delete /openapi/v1/{omadacId}/sites/{siteId}/session-limit/rules/{ruleId} Delete session limit rule
GetGridSessionLimitRule Get /openapi/v1/{omadacId}/sites/{siteId}/session-limit/rules Get session limit rule list
GetSessionLimit Get /openapi/v1/{omadacId}/sites/{siteId}/session-limit Get session limit
ModifySessionLimit Patch /openapi/v1/{omadacId}/sites/{siteId}/session-limit Modify session limit
ModifySessionLimitRule Patch /openapi/v1/{omadacId}/sites/{siteId}/session-limit/rules/{ruleId} Modify session limit rule
ModifySessionLimitRuleIndex Patch /openapi/v1/{omadacId}/sites/{siteId}/session-limit/rules Modify session limit rule index

CreateSessionLimitRule

OperationResponseWithoutResult CreateSessionLimitRule(ctx, omadacId, siteId).SessionLimitRuleOpenApiVO(sessionLimitRuleOpenApiVO).Execute()

Create session limit rule

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Tohaker/omada-go-sdk/omada"
)

func main() {
    omadacId := "omadacId_example" // string | Omada ID
    siteId := "siteId_example" // string | Site ID
    sessionLimitRuleOpenApiVO := *openapiclient.NewSessionLimitRuleOpenApiVO(int32(123), "Name_example", int32(123), false) // SessionLimitRuleOpenApiVO | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.SessionLimitAPI.CreateSessionLimitRule(context.Background(), omadacId, siteId).SessionLimitRuleOpenApiVO(sessionLimitRuleOpenApiVO).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SessionLimitAPI.CreateSessionLimitRule``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CreateSessionLimitRule`: OperationResponseWithoutResult
    fmt.Fprintf(os.Stdout, "Response from `SessionLimitAPI.CreateSessionLimitRule`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
omadacId string Omada ID
siteId string Site ID

Other Parameters

Other parameters are passed through a pointer to a apiCreateSessionLimitRuleRequest struct via the builder pattern

Name Type Description Notes

sessionLimitRuleOpenApiVO | SessionLimitRuleOpenApiVO | |

Return type

OperationResponseWithoutResult

Authorization

AccessToken

HTTP request headers

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

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

DeleteSessionLimitRule

OperationResponseWithoutResult DeleteSessionLimitRule(ctx, omadacId, siteId, ruleId).Execute()

Delete session limit rule

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Tohaker/omada-go-sdk/omada"
)

func main() {
    omadacId := "omadacId_example" // string | Omada ID
    siteId := "siteId_example" // string | Site ID
    ruleId := "ruleId_example" // string | Session limit rule ID

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.SessionLimitAPI.DeleteSessionLimitRule(context.Background(), omadacId, siteId, ruleId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SessionLimitAPI.DeleteSessionLimitRule``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DeleteSessionLimitRule`: OperationResponseWithoutResult
    fmt.Fprintf(os.Stdout, "Response from `SessionLimitAPI.DeleteSessionLimitRule`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
omadacId string Omada ID
siteId string Site ID
ruleId string Session limit rule ID

Other Parameters

Other parameters are passed through a pointer to a apiDeleteSessionLimitRuleRequest struct via the builder pattern

Name Type Description Notes

Return type

OperationResponseWithoutResult

Authorization

AccessToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

GetGridSessionLimitRule

OperationResponseSessionLimitRuleGridOpenApiVOQuerySessionLimitRuleOpenApiVO GetGridSessionLimitRule(ctx, omadacId, siteId).Page(page).PageSize(pageSize).Execute()

Get session limit rule list

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Tohaker/omada-go-sdk/omada"
)

func main() {
    omadacId := "omadacId_example" // string | Omada ID
    siteId := "siteId_example" // string | Site ID
    page := int32(56) // int32 | Start page number. Start from 1.
    pageSize := int32(56) // int32 | Number of entries per page. It should be within the range of 1–1000.

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.SessionLimitAPI.GetGridSessionLimitRule(context.Background(), omadacId, siteId).Page(page).PageSize(pageSize).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SessionLimitAPI.GetGridSessionLimitRule``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetGridSessionLimitRule`: OperationResponseSessionLimitRuleGridOpenApiVOQuerySessionLimitRuleOpenApiVO
    fmt.Fprintf(os.Stdout, "Response from `SessionLimitAPI.GetGridSessionLimitRule`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
omadacId string Omada ID
siteId string Site ID

Other Parameters

Other parameters are passed through a pointer to a apiGetGridSessionLimitRuleRequest struct via the builder pattern

Name Type Description Notes

page | int32 | Start page number. Start from 1. | pageSize | int32 | Number of entries per page. It should be within the range of 1–1000. |

Return type

OperationResponseSessionLimitRuleGridOpenApiVOQuerySessionLimitRuleOpenApiVO

Authorization

AccessToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

GetSessionLimit

OperationResponseSessionLimitEntity GetSessionLimit(ctx, omadacId, siteId).Execute()

Get session limit

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Tohaker/omada-go-sdk/omada"
)

func main() {
    omadacId := "omadacId_example" // string | Omada ID
    siteId := "siteId_example" // string | Site ID

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.SessionLimitAPI.GetSessionLimit(context.Background(), omadacId, siteId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SessionLimitAPI.GetSessionLimit``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetSessionLimit`: OperationResponseSessionLimitEntity
    fmt.Fprintf(os.Stdout, "Response from `SessionLimitAPI.GetSessionLimit`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
omadacId string Omada ID
siteId string Site ID

Other Parameters

Other parameters are passed through a pointer to a apiGetSessionLimitRequest struct via the builder pattern

Name Type Description Notes

Return type

OperationResponseSessionLimitEntity

Authorization

AccessToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

ModifySessionLimit

OperationResponseWithoutResult ModifySessionLimit(ctx, omadacId, siteId).SessionLimitEntity(sessionLimitEntity).Execute()

Modify session limit

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Tohaker/omada-go-sdk/omada"
)

func main() {
    omadacId := "omadacId_example" // string | Omada ID
    siteId := "siteId_example" // string | Site ID
    sessionLimitEntity := *openapiclient.NewSessionLimitEntity(false) // SessionLimitEntity | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.SessionLimitAPI.ModifySessionLimit(context.Background(), omadacId, siteId).SessionLimitEntity(sessionLimitEntity).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SessionLimitAPI.ModifySessionLimit``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ModifySessionLimit`: OperationResponseWithoutResult
    fmt.Fprintf(os.Stdout, "Response from `SessionLimitAPI.ModifySessionLimit`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
omadacId string Omada ID
siteId string Site ID

Other Parameters

Other parameters are passed through a pointer to a apiModifySessionLimitRequest struct via the builder pattern

Name Type Description Notes

sessionLimitEntity | SessionLimitEntity | |

Return type

OperationResponseWithoutResult

Authorization

AccessToken

HTTP request headers

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

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

ModifySessionLimitRule

OperationResponseWithoutResult ModifySessionLimitRule(ctx, omadacId, siteId, ruleId).SessionLimitRuleOpenApiVO(sessionLimitRuleOpenApiVO).Execute()

Modify session limit rule

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Tohaker/omada-go-sdk/omada"
)

func main() {
    omadacId := "omadacId_example" // string | Omada ID
    siteId := "siteId_example" // string | Site ID
    ruleId := "ruleId_example" // string | Session limit rule ID
    sessionLimitRuleOpenApiVO := *openapiclient.NewSessionLimitRuleOpenApiVO(int32(123), "Name_example", int32(123), false) // SessionLimitRuleOpenApiVO | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.SessionLimitAPI.ModifySessionLimitRule(context.Background(), omadacId, siteId, ruleId).SessionLimitRuleOpenApiVO(sessionLimitRuleOpenApiVO).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SessionLimitAPI.ModifySessionLimitRule``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ModifySessionLimitRule`: OperationResponseWithoutResult
    fmt.Fprintf(os.Stdout, "Response from `SessionLimitAPI.ModifySessionLimitRule`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
omadacId string Omada ID
siteId string Site ID
ruleId string Session limit rule ID

Other Parameters

Other parameters are passed through a pointer to a apiModifySessionLimitRuleRequest struct via the builder pattern

Name Type Description Notes

sessionLimitRuleOpenApiVO | SessionLimitRuleOpenApiVO | |

Return type

OperationResponseWithoutResult

Authorization

AccessToken

HTTP request headers

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

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

ModifySessionLimitRuleIndex

OperationResponseWithoutResult ModifySessionLimitRuleIndex(ctx, omadacId, siteId).TransmissionDragSortIndexOpenapiVO(transmissionDragSortIndexOpenapiVO).Execute()

Modify session limit rule index

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Tohaker/omada-go-sdk/omada"
)

func main() {
    omadacId := "omadacId_example" // string | Omada ID
    siteId := "siteId_example" // string | Site ID
    transmissionDragSortIndexOpenapiVO := *openapiclient.NewTransmissionDragSortIndexOpenapiVO(map[string]int32{"key": int32(123)}) // TransmissionDragSortIndexOpenapiVO | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.SessionLimitAPI.ModifySessionLimitRuleIndex(context.Background(), omadacId, siteId).TransmissionDragSortIndexOpenapiVO(transmissionDragSortIndexOpenapiVO).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SessionLimitAPI.ModifySessionLimitRuleIndex``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ModifySessionLimitRuleIndex`: OperationResponseWithoutResult
    fmt.Fprintf(os.Stdout, "Response from `SessionLimitAPI.ModifySessionLimitRuleIndex`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
omadacId string Omada ID
siteId string Site ID

Other Parameters

Other parameters are passed through a pointer to a apiModifySessionLimitRuleIndexRequest struct via the builder pattern

Name Type Description Notes

transmissionDragSortIndexOpenapiVO | TransmissionDragSortIndexOpenapiVO | |

Return type

OperationResponseWithoutResult

Authorization

AccessToken

HTTP request headers

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

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