All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
CreateResource | Post /api/resources | Create an API resource |
CreateResourceScope | Post /api/resources/{resourceId}/scopes | Create API resource scope |
DeleteResource | Delete /api/resources/{id} | Delete API resource |
DeleteResourceScope | Delete /api/resources/{resourceId}/scopes/{scopeId} | Delete API resource scope |
GetResource | Get /api/resources/{id} | Get API resource |
ListResourceScopes | Get /api/resources/{resourceId}/scopes | Get API resource scopes |
ListResources | Get /api/resources | Get API resources |
UpdateResource | Patch /api/resources/{id} | Update API resource |
UpdateResourceIsDefault | Patch /api/resources/{id}/is-default | Set API resource as default |
UpdateResourceScope | Patch /api/resources/{resourceId}/scopes/{scopeId} | Update API resource scope |
CreateResource(ctx).CreateResourceRequest(createResourceRequest).Execute()
Create an API resource
package main
import (
"context"
"fmt"
"os"
logto "github.com/mostafa/go-api-client"
)
func main() {
createResourceRequest := *logto.NewCreateResourceRequest("Name_example", "Indicator_example") // CreateResourceRequest |
configuration := logto.NewConfiguration()
apiClient := logto.NewAPIClient(configuration)
r, err := apiClient.ResourcesAPI.CreateResource(context.Background()).CreateResourceRequest(createResourceRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.CreateResource``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Other parameters are passed through a pointer to a apiCreateResourceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
createResourceRequest | CreateResourceRequest |
(empty response body)
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateResourceScope(ctx, resourceId).CreateResourceScopeRequest(createResourceScopeRequest).Execute()
Create API resource scope
package main
import (
"context"
"fmt"
"os"
logto "github.com/mostafa/go-api-client"
)
func main() {
resourceId := "resourceId_example" // string | The unique identifier of the resource.
createResourceScopeRequest := *logto.NewCreateResourceScopeRequest("Name_example") // CreateResourceScopeRequest |
configuration := logto.NewConfiguration()
apiClient := logto.NewAPIClient(configuration)
r, err := apiClient.ResourcesAPI.CreateResourceScope(context.Background(), resourceId).CreateResourceScopeRequest(createResourceScopeRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.CreateResourceScope``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
resourceId | string | The unique identifier of the resource. |
Other parameters are passed through a pointer to a apiCreateResourceScopeRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
createResourceScopeRequest | CreateResourceScopeRequest | |
(empty response body)
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteResource(ctx, id).Execute()
Delete API resource
package main
import (
"context"
"fmt"
"os"
logto "github.com/mostafa/go-api-client"
)
func main() {
id := "id_example" // string | The unique identifier of the resource.
configuration := logto.NewConfiguration()
apiClient := logto.NewAPIClient(configuration)
r, err := apiClient.ResourcesAPI.DeleteResource(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.DeleteResource``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | The unique identifier of the resource. |
Other parameters are passed through a pointer to a apiDeleteResourceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteResourceScope(ctx, resourceId, scopeId).Execute()
Delete API resource scope
package main
import (
"context"
"fmt"
"os"
logto "github.com/mostafa/go-api-client"
)
func main() {
resourceId := "resourceId_example" // string | The unique identifier of the resource.
scopeId := "scopeId_example" // string | The unique identifier of the scope.
configuration := logto.NewConfiguration()
apiClient := logto.NewAPIClient(configuration)
r, err := apiClient.ResourcesAPI.DeleteResourceScope(context.Background(), resourceId, scopeId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.DeleteResourceScope``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
resourceId | string | The unique identifier of the resource. | |
scopeId | string | The unique identifier of the scope. |
Other parameters are passed through a pointer to a apiDeleteResourceScopeRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetJwtCustomizer200ResponseOneOfContextSampleUserRolesInnerScopesInnerResource GetResource(ctx, id).Execute()
Get API resource
package main
import (
"context"
"fmt"
"os"
logto "github.com/mostafa/go-api-client"
)
func main() {
id := "id_example" // string | The unique identifier of the resource.
configuration := logto.NewConfiguration()
apiClient := logto.NewAPIClient(configuration)
resp, r, err := apiClient.ResourcesAPI.GetResource(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.GetResource``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetResource`: GetJwtCustomizer200ResponseOneOfContextSampleUserRolesInnerScopesInnerResource
fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.GetResource`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | The unique identifier of the resource. |
Other parameters are passed through a pointer to a apiGetResourceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
GetJwtCustomizer200ResponseOneOfContextSampleUserRolesInnerScopesInnerResource
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ListResources200ResponseInnerScopesInner ListResourceScopes(ctx, resourceId).Page(page).PageSize(pageSize).Execute()
Get API resource scopes
package main
import (
"context"
"fmt"
"os"
logto "github.com/mostafa/go-api-client"
)
func main() {
resourceId := "resourceId_example" // string | The unique identifier of the resource.
page := int32(56) // int32 | Page number (starts from 1). (optional) (default to 1)
pageSize := int32(56) // int32 | Entries per page. (optional) (default to 20)
configuration := logto.NewConfiguration()
apiClient := logto.NewAPIClient(configuration)
resp, r, err := apiClient.ResourcesAPI.ListResourceScopes(context.Background(), resourceId).Page(page).PageSize(pageSize).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.ListResourceScopes``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListResourceScopes`: []ListResources200ResponseInnerScopesInner
fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.ListResourceScopes`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
resourceId | string | The unique identifier of the resource. |
Other parameters are passed through a pointer to a apiListResourceScopesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
page | int32 | Page number (starts from 1). | [default to 1] pageSize | int32 | Entries per page. | [default to 20]
[]ListResources200ResponseInnerScopesInner
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ListResources200ResponseInner ListResources(ctx).IncludeScopes(includeScopes).Page(page).PageSize(pageSize).Execute()
Get API resources
package main
import (
"context"
"fmt"
"os"
logto "github.com/mostafa/go-api-client"
)
func main() {
includeScopes := "includeScopes_example" // string | If it's provided with a truthy value (`true`, `1`, `yes`), the scopes of each resource will be included in the response. (optional)
page := int32(56) // int32 | Page number (starts from 1). (optional) (default to 1)
pageSize := int32(56) // int32 | Entries per page. (optional) (default to 20)
configuration := logto.NewConfiguration()
apiClient := logto.NewAPIClient(configuration)
resp, r, err := apiClient.ResourcesAPI.ListResources(context.Background()).IncludeScopes(includeScopes).Page(page).PageSize(pageSize).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.ListResources``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListResources`: []ListResources200ResponseInner
fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.ListResources`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListResourcesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
includeScopes | string | If it's provided with a truthy value (`true`, `1`, `yes`), the scopes of each resource will be included in the response. | |
page | int32 | Page number (starts from 1). | [default to 1] |
pageSize | int32 | Entries per page. | [default to 20] |
[]ListResources200ResponseInner
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetJwtCustomizer200ResponseOneOfContextSampleUserRolesInnerScopesInnerResource UpdateResource(ctx, id).UpdateResourceRequest(updateResourceRequest).Execute()
Update API resource
package main
import (
"context"
"fmt"
"os"
logto "github.com/mostafa/go-api-client"
)
func main() {
id := "id_example" // string | The unique identifier of the resource.
updateResourceRequest := *logto.NewUpdateResourceRequest() // UpdateResourceRequest |
configuration := logto.NewConfiguration()
apiClient := logto.NewAPIClient(configuration)
resp, r, err := apiClient.ResourcesAPI.UpdateResource(context.Background(), id).UpdateResourceRequest(updateResourceRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.UpdateResource``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateResource`: GetJwtCustomizer200ResponseOneOfContextSampleUserRolesInnerScopesInnerResource
fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.UpdateResource`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | The unique identifier of the resource. |
Other parameters are passed through a pointer to a apiUpdateResourceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
updateResourceRequest | UpdateResourceRequest | |
GetJwtCustomizer200ResponseOneOfContextSampleUserRolesInnerScopesInnerResource
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetJwtCustomizer200ResponseOneOfContextSampleUserRolesInnerScopesInnerResource UpdateResourceIsDefault(ctx, id).UpdateResourceIsDefaultRequest(updateResourceIsDefaultRequest).Execute()
Set API resource as default
package main
import (
"context"
"fmt"
"os"
logto "github.com/mostafa/go-api-client"
)
func main() {
id := "id_example" // string | The unique identifier of the resource.
updateResourceIsDefaultRequest := *logto.NewUpdateResourceIsDefaultRequest(false) // UpdateResourceIsDefaultRequest |
configuration := logto.NewConfiguration()
apiClient := logto.NewAPIClient(configuration)
resp, r, err := apiClient.ResourcesAPI.UpdateResourceIsDefault(context.Background(), id).UpdateResourceIsDefaultRequest(updateResourceIsDefaultRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.UpdateResourceIsDefault``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateResourceIsDefault`: GetJwtCustomizer200ResponseOneOfContextSampleUserRolesInnerScopesInnerResource
fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.UpdateResourceIsDefault`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | The unique identifier of the resource. |
Other parameters are passed through a pointer to a apiUpdateResourceIsDefaultRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
updateResourceIsDefaultRequest | UpdateResourceIsDefaultRequest | |
GetJwtCustomizer200ResponseOneOfContextSampleUserRolesInnerScopesInnerResource
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListResources200ResponseInnerScopesInner UpdateResourceScope(ctx, resourceId, scopeId).UpdateResourceScopeRequest(updateResourceScopeRequest).Execute()
Update API resource scope
package main
import (
"context"
"fmt"
"os"
logto "github.com/mostafa/go-api-client"
)
func main() {
resourceId := "resourceId_example" // string | The unique identifier of the resource.
scopeId := "scopeId_example" // string | The unique identifier of the scope.
updateResourceScopeRequest := *logto.NewUpdateResourceScopeRequest() // UpdateResourceScopeRequest |
configuration := logto.NewConfiguration()
apiClient := logto.NewAPIClient(configuration)
resp, r, err := apiClient.ResourcesAPI.UpdateResourceScope(context.Background(), resourceId, scopeId).UpdateResourceScopeRequest(updateResourceScopeRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.UpdateResourceScope``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateResourceScope`: ListResources200ResponseInnerScopesInner
fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.UpdateResourceScope`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
resourceId | string | The unique identifier of the resource. | |
scopeId | string | The unique identifier of the scope. |
Other parameters are passed through a pointer to a apiUpdateResourceScopeRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
updateResourceScopeRequest | UpdateResourceScopeRequest | |
ListResources200ResponseInnerScopesInner
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]