Skip to content

Latest commit

 

History

History
300 lines (186 loc) · 6.52 KB

SystemAPI.md

File metadata and controls

300 lines (186 loc) · 6.52 KB

\SystemAPI

All URIs are relative to http://localhost:7878

Method HTTP request Description
CreateSystemRestart Post /api/v3/system/restart
CreateSystemShutdown Post /api/v3/system/shutdown
GetSystemRoutes Get /api/v3/system/routes
GetSystemRoutesDuplicate Get /api/v3/system/routes/duplicate
GetSystemStatus Get /api/v3/system/status

CreateSystemRestart

CreateSystemRestart(ctx).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	whisparrClient "github.com/devopsarr/whisparr-go/whisparr"
)

func main() {

	configuration := whisparrClient.NewConfiguration()
	apiClient := whisparrClient.NewAPIClient(configuration)
	r, err := apiClient.SystemAPI.CreateSystemRestart(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SystemAPI.CreateSystemRestart``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

(empty response body)

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

CreateSystemShutdown

CreateSystemShutdown(ctx).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	whisparrClient "github.com/devopsarr/whisparr-go/whisparr"
)

func main() {

	configuration := whisparrClient.NewConfiguration()
	apiClient := whisparrClient.NewAPIClient(configuration)
	r, err := apiClient.SystemAPI.CreateSystemShutdown(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SystemAPI.CreateSystemShutdown``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

(empty response body)

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

GetSystemRoutes

GetSystemRoutes(ctx).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	whisparrClient "github.com/devopsarr/whisparr-go/whisparr"
)

func main() {

	configuration := whisparrClient.NewConfiguration()
	apiClient := whisparrClient.NewAPIClient(configuration)
	r, err := apiClient.SystemAPI.GetSystemRoutes(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SystemAPI.GetSystemRoutes``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

(empty response body)

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

GetSystemRoutesDuplicate

GetSystemRoutesDuplicate(ctx).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	whisparrClient "github.com/devopsarr/whisparr-go/whisparr"
)

func main() {

	configuration := whisparrClient.NewConfiguration()
	apiClient := whisparrClient.NewAPIClient(configuration)
	r, err := apiClient.SystemAPI.GetSystemRoutesDuplicate(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SystemAPI.GetSystemRoutesDuplicate``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

(empty response body)

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

GetSystemStatus

SystemResource GetSystemStatus(ctx).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	whisparrClient "github.com/devopsarr/whisparr-go/whisparr"
)

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

SystemResource

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

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