Skip to content

Latest commit

 

History

History
215 lines (139 loc) · 5.86 KB

ActivityReportsAPI.md

File metadata and controls

215 lines (139 loc) · 5.86 KB

\ActivityReportsAPI

All URIs are relative to https://api.aptible.com

Method HTTP request Description
GetActivityReport Get /activity_reports/{id} show activity_report
GetActivityReportDownload Get /activity_reports/{activity_report_id}/download download activity_report
ListActivityReportsForAccount Get /accounts/{account_id}/activity_reports list activity_reports

GetActivityReport

ActivityReport GetActivityReport(ctx, id).Execute()

show activity_report

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/aptible/aptible-api-go/aptibleapi"
)

func main() {
	id := int32(56) // int32 | id

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id int32 id

Other Parameters

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

Name Type Description Notes

Return type

ActivityReport

Authorization

token

HTTP request headers

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

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

GetActivityReportDownload

GetActivityReportDownload(ctx, activityReportId).Execute()

download activity_report

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/aptible/aptible-api-go/aptibleapi"
)

func main() {
	activityReportId := int32(56) // int32 | activity_report_id

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
activityReportId int32 activity_report_id

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

token

HTTP request headers

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

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

ListActivityReportsForAccount

ListActivityReportsForAccount200Response ListActivityReportsForAccount(ctx, accountId).Page(page).Execute()

list activity_reports

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/aptible/aptible-api-go/aptibleapi"
)

func main() {
	accountId := int32(56) // int32 | account_id
	page := int32(56) // int32 | current page of results for pagination (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.ActivityReportsAPI.ListActivityReportsForAccount(context.Background(), accountId).Page(page).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ActivityReportsAPI.ListActivityReportsForAccount``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ListActivityReportsForAccount`: ListActivityReportsForAccount200Response
	fmt.Fprintf(os.Stdout, "Response from `ActivityReportsAPI.ListActivityReportsForAccount`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
accountId int32 account_id

Other Parameters

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

Name Type Description Notes

page | int32 | current page of results for pagination |

Return type

ListActivityReportsForAccount200Response

Authorization

token

HTTP request headers

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

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