All URIs are relative to https://api.opal.dev/v1
Method | HTTP request | Description |
---|---|---|
Sessions | Get /sessions |
SessionsList Sessions(ctx).ResourceId(resourceId).UserId(userId).Execute()
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)
}
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. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]