All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
TasksCreateTask | Post /api/tasks/v1/Tasks | Create a new task |
TasksDeleteTask | Delete /api/tasks/v1/Tasks/{taskId} | Delete a task from a storage |
TasksGet | Get /api/tasks/v1/Tasks/{taskId} | Get a task by a specified id |
TasksGetList | Get /api/tasks/v1/Tasks | Get tasks list |
TasksGetPermissions | Get /api/tasks/v1/Tasks/{id}/permissions | Get all Task permissions |
TasksRenameTask | Put /api/tasks/v1/Tasks/{taskId}/rename | Rename a task |
TasksRunTask | Post /api/tasks/v1/Tasks/run | Run a task from request body |
TasksRunTaskById | Post /api/tasks/v1/Tasks/{taskId}/run | Run a task by id |
TasksUpdatePermissions | Post /api/tasks/v1/Tasks/{id}/permissions | Update permissions |
TasksUpdateTask | Put /api/tasks/v1/Tasks/{taskId} | Update a task |
TaskBaseVM TasksCreateTask(ctx).CreateTaskBaseVM(createTaskBaseVM).Execute()
Create a new task
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/fastreports/gofrcloud"
)
func main() {
createTaskBaseVM := *openapiclient.NewCreateTaskBaseVM("T_example") // CreateTaskBaseVM | task's view model. You have to specify task type (type: \"ExportTemplate\") (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TasksAPI.TasksCreateTask(context.Background()).CreateTaskBaseVM(createTaskBaseVM).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TasksAPI.TasksCreateTask``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TasksCreateTask`: TaskBaseVM
fmt.Fprintf(os.Stdout, "Response from `TasksAPI.TasksCreateTask`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiTasksCreateTaskRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
createTaskBaseVM | CreateTaskBaseVM | task's view model. You have to specify task type (type: "ExportTemplate") |
- Content-Type: application/json, text/json, application/*+json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TasksDeleteTask(ctx, taskId).Execute()
Delete a task from a storage
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/fastreports/gofrcloud"
)
func main() {
taskId := "taskId_example" // string | deleting task id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.TasksAPI.TasksDeleteTask(context.Background(), taskId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TasksAPI.TasksDeleteTask``: %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. | |
taskId | string | deleting task id |
Other parameters are passed through a pointer to a apiTasksDeleteTaskRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TaskBaseVM TasksGet(ctx, taskId).Execute()
Get a task by a specified id
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/fastreports/gofrcloud"
)
func main() {
taskId := "taskId_example" // string | a task id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TasksAPI.TasksGet(context.Background(), taskId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TasksAPI.TasksGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TasksGet`: TaskBaseVM
fmt.Fprintf(os.Stdout, "Response from `TasksAPI.TasksGet`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
taskId | string | a task id |
Other parameters are passed through a pointer to a apiTasksGetRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TasksVM TasksGetList(ctx).Skip(skip).Take(take).SubscriptionId(subscriptionId).SearchPattern(searchPattern).Execute()
Get tasks list
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/fastreports/gofrcloud"
)
func main() {
skip := int32(56) // int32 | number of tasks, that have to be skipped (optional) (default to 0)
take := int32(56) // int32 | number of tasks, that have to be returned (optional) (default to 10)
subscriptionId := "subscriptionId_example" // string | subscription id (optional)
searchPattern := "searchPattern_example" // string | (optional) (default to "")
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TasksAPI.TasksGetList(context.Background()).Skip(skip).Take(take).SubscriptionId(subscriptionId).SearchPattern(searchPattern).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TasksAPI.TasksGetList``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TasksGetList`: TasksVM
fmt.Fprintf(os.Stdout, "Response from `TasksAPI.TasksGetList`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiTasksGetListRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
skip | int32 | number of tasks, that have to be skipped | [default to 0] |
take | int32 | number of tasks, that have to be returned | [default to 10] |
subscriptionId | string | subscription id | |
searchPattern | string | [default to ""] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TaskPermissionsVM TasksGetPermissions(ctx, id).Execute()
Get all Task permissions
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/fastreports/gofrcloud"
)
func main() {
id := "id_example" // string | task id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TasksAPI.TasksGetPermissions(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TasksAPI.TasksGetPermissions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TasksGetPermissions`: TaskPermissionsVM
fmt.Fprintf(os.Stdout, "Response from `TasksAPI.TasksGetPermissions`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | task id |
Other parameters are passed through a pointer to a apiTasksGetPermissionsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TaskBaseVM TasksRenameTask(ctx, taskId).NewName(newName).Execute()
Rename a task
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/fastreports/gofrcloud"
)
func main() {
taskId := "taskId_example" // string | renaming task id
newName := "newName_example" // string | task's new Name (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TasksAPI.TasksRenameTask(context.Background(), taskId).NewName(newName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TasksAPI.TasksRenameTask``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TasksRenameTask`: TaskBaseVM
fmt.Fprintf(os.Stdout, "Response from `TasksAPI.TasksRenameTask`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
taskId | string | renaming task id |
Other parameters are passed through a pointer to a apiTasksRenameTaskRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
newName | string | task's new Name |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TasksRunTask(ctx).RunTaskBaseVM(runTaskBaseVM).Execute()
Run a task from request body
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/fastreports/gofrcloud"
)
func main() {
runTaskBaseVM := *openapiclient.NewRunTaskBaseVM("T_example") // RunTaskBaseVM | task's view model (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.TasksAPI.TasksRunTask(context.Background()).RunTaskBaseVM(runTaskBaseVM).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TasksAPI.TasksRunTask``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Other parameters are passed through a pointer to a apiTasksRunTaskRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
runTaskBaseVM | RunTaskBaseVM | task's view model |
(empty response body)
- Content-Type: application/json, text/json, application/*+json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TasksRunTaskById(ctx, taskId).Execute()
Run a task by id
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/fastreports/gofrcloud"
)
func main() {
taskId := "taskId_example" // string | task id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.TasksAPI.TasksRunTaskById(context.Background(), taskId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TasksAPI.TasksRunTaskById``: %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. | |
taskId | string | task id |
Other parameters are passed through a pointer to a apiTasksRunTaskByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TasksUpdatePermissions(ctx, id).UpdateTaskPermissionsVM(updateTaskPermissionsVM).Execute()
Update permissions
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/fastreports/gofrcloud"
)
func main() {
id := "id_example" // string | task id
updateTaskPermissionsVM := *openapiclient.NewUpdateTaskPermissionsVM(openapiclient.TaskAdministrate(0), *openapiclient.NewTaskPermissionsCRUDVM("T_example"), "T_example") // UpdateTaskPermissionsVM | new permissions (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.TasksAPI.TasksUpdatePermissions(context.Background(), id).UpdateTaskPermissionsVM(updateTaskPermissionsVM).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TasksAPI.TasksUpdatePermissions``: %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 | task id |
Other parameters are passed through a pointer to a apiTasksUpdatePermissionsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
updateTaskPermissionsVM | UpdateTaskPermissionsVM | new permissions |
(empty response body)
- Content-Type: application/json, text/json, application/*+json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TaskBaseVM TasksUpdateTask(ctx, taskId).UpdateTaskBaseVM(updateTaskBaseVM).Execute()
Update a task
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/fastreports/gofrcloud"
)
func main() {
taskId := "taskId_example" // string | updating task id
updateTaskBaseVM := *openapiclient.NewUpdateTaskBaseVM("T_example") // UpdateTaskBaseVM | task's view model. You have to specify task type (type: \"ExportTemplate\") (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TasksAPI.TasksUpdateTask(context.Background(), taskId).UpdateTaskBaseVM(updateTaskBaseVM).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TasksAPI.TasksUpdateTask``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TasksUpdateTask`: TaskBaseVM
fmt.Fprintf(os.Stdout, "Response from `TasksAPI.TasksUpdateTask`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
taskId | string | updating task id |
Other parameters are passed through a pointer to a apiTasksUpdateTaskRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
updateTaskBaseVM | UpdateTaskBaseVM | task's view model. You have to specify task type (type: "ExportTemplate") |
- Content-Type: application/json, text/json, application/*+json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]