Skip to content

Latest commit

 

History

History
77 lines (47 loc) · 1.92 KB

SessionsApi.md

File metadata and controls

77 lines (47 loc) · 1.92 KB

\SessionsApi

All URIs are relative to https://api.opal.dev/v1

Method HTTP request Description
Sessions Get /sessions

Sessions

SessionsList Sessions(ctx).ResourceId(resourceId).UserId(userId).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    resourceId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The ID of the resource.
    userId := "32acc112-21ff-4669-91c2-21e27683eaa1" // string | The ID of the user you wish to query sessions for. (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.SessionsApi.Sessions(context.Background()).ResourceId(resourceId).UserId(userId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SessionsApi.Sessions``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `Sessions`: SessionsList
    fmt.Fprintf(os.Stdout, "Response from `SessionsApi.Sessions`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
resourceId string The ID of the resource.
userId string The ID of the user you wish to query sessions for.

Return type

SessionsList

Authorization

BearerAuth

HTTP request headers

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

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