Skip to content

Latest commit

 

History

History
219 lines (137 loc) · 5.44 KB

File metadata and controls

219 lines (137 loc) · 5.44 KB

ReportsAPI

All URIs are relative to https://api.reveng.ai

Method HTTP request Description
CreatePdfReport Post /v3/analyses/{analysis_id}/pdf Start PDF report generation
DownloadPdfReport Get /v3/analyses/{analysis_id}/pdf Download generated PDF report
GetPdfReportStatus Get /v3/analyses/{analysis_id}/pdf/status Get PDF report workflow status

CreatePdfReport

GeneratePDFOutputBody CreatePdfReport(ctx, analysisId).Execute()

Start PDF report generation

Example

package main

import (
	"context"
	"fmt"
	"os"
	revengai "github.com/RevEngAI/sdk-go/v3"
)

func main() {
	analysisId := int64(789) // int64 | Analysis ID

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
analysisId int64 Analysis ID

Other Parameters

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

Name Type Description Notes

Return type

GeneratePDFOutputBody

Authorization

APIKey, bearerAuth

HTTP request headers

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

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

DownloadPdfReport

DownloadPdfReport(ctx, analysisId).Execute()

Download generated PDF report

Example

package main

import (
	"context"
	"fmt"
	"os"
	revengai "github.com/RevEngAI/sdk-go/v3"
)

func main() {
	analysisId := int64(789) // int64 | Analysis ID

	configuration := revengai.NewConfiguration()
	apiClient := revengai.NewAPIClient(configuration)
	r, err := apiClient.ReportsAPI.DownloadPdfReport(context.Background(), analysisId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ReportsAPI.DownloadPdfReport``: %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.
analysisId int64 Analysis ID

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

APIKey, bearerAuth

HTTP request headers

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

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

GetPdfReportStatus

WorkflowProgress GetPdfReportStatus(ctx, analysisId).Execute()

Get PDF report workflow status

Example

package main

import (
	"context"
	"fmt"
	"os"
	revengai "github.com/RevEngAI/sdk-go/v3"
)

func main() {
	analysisId := int64(789) // int64 | Analysis ID

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
analysisId int64 Analysis ID

Other Parameters

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

Name Type Description Notes

Return type

WorkflowProgress

Authorization

APIKey, bearerAuth

HTTP request headers

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

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