All URIs are relative to https://api.leaseweb.com/abuse/v1
Method | HTTP request | Description |
---|---|---|
CreateReportMessage | Post /reports/{reportId}/messages | Create new message |
GetReport | Get /reports/{reportId} | Inspect a report |
GetReportAttachmentList | Get /reports/{reportId}/reportAttachments/{fileId} | Inspect a report attachment |
GetReportList | Get /reports | List reports |
GetReportMessageAttachmentList | Get /reports/{reportId}/messageAttachments/{fileId} | Inspect a message attachment |
GetReportMessageList | Get /reports/{reportId}/messages | List report messages |
GetReportResolutionList | Get /reports/{reportId}/resolutions | List resolution options |
ResolveReport | Post /reports/{reportId}/resolve | Resolve a report |
[]string CreateReportMessage(ctx, reportId).CreateReportMessageOpts(createReportMessageOpts).Execute()
Create new message
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/leaseweb/leaseweb-go-sdk/abuse"
)
func main() {
reportId := "abc123" // string | Report Id
createReportMessageOpts := *openapiclient.NewCreateReportMessageOpts("I have resolved this issue.") // CreateReportMessageOpts | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AbuseAPI.CreateReportMessage(context.Background(), reportId).CreateReportMessageOpts(createReportMessageOpts).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AbuseAPI.CreateReportMessage``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateReportMessage`: []string
fmt.Fprintf(os.Stdout, "Response from `AbuseAPI.CreateReportMessage`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
reportId | string | Report Id |
Other parameters are passed through a pointer to a apiCreateReportMessageRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
createReportMessageOpts | CreateReportMessageOpts | |
[]string
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetReportResult GetReport(ctx, reportId).Execute()
Inspect a report
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/leaseweb/leaseweb-go-sdk/abuse"
)
func main() {
reportId := "abc123" // string | Report Id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AbuseAPI.GetReport(context.Background(), reportId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AbuseAPI.GetReport``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetReport`: GetReportResult
fmt.Fprintf(os.Stdout, "Response from `AbuseAPI.GetReport`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
reportId | string | Report Id |
Other parameters are passed through a pointer to a apiGetReportRequest 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]
GetReportAttachmentList(ctx, reportId, fileId).Execute()
Inspect a report attachment
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/leaseweb/leaseweb-go-sdk/abuse"
)
func main() {
reportId := "abc123" // string | Report Id
fileId := "sdfa73-adsfs-4fadf-sdfasdfa" // string | File Id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.AbuseAPI.GetReportAttachmentList(context.Background(), reportId, fileId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AbuseAPI.GetReportAttachmentList``: %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. | |
reportId | string | Report Id | |
fileId | string | File Id |
Other parameters are passed through a pointer to a apiGetReportAttachmentListRequest 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]
GetReportListResult GetReportList(ctx).Limit(limit).Offset(offset).Status(status).Execute()
List reports
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/leaseweb/leaseweb-go-sdk/abuse"
)
func main() {
limit := int32(20) // int32 | Limit the number of results returned. (optional)
offset := int32(10) // int32 | Return results starting from the given offset. (optional)
status := "OPEN,WAITING,CLOSED" // string | Comma separated list of report statuses to filter on. (optional) (default to "OPEN,WAITING,CLOSED")
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AbuseAPI.GetReportList(context.Background()).Limit(limit).Offset(offset).Status(status).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AbuseAPI.GetReportList``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetReportList`: GetReportListResult
fmt.Fprintf(os.Stdout, "Response from `AbuseAPI.GetReportList`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetReportListRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
limit | int32 | Limit the number of results returned. | |
offset | int32 | Return results starting from the given offset. | |
status | string | Comma separated list of report statuses to filter on. | [default to "OPEN,WAITING,CLOSED"] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetReportMessageAttachmentList(ctx, reportId, fileId).Execute()
Inspect a message attachment
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/leaseweb/leaseweb-go-sdk/abuse"
)
func main() {
reportId := "abc123" // string | Report Id
fileId := "sdfa73-adsfs-4fadf-sdfasdfa" // string | File Id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.AbuseAPI.GetReportMessageAttachmentList(context.Background(), reportId, fileId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AbuseAPI.GetReportMessageAttachmentList``: %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. | |
reportId | string | Report Id | |
fileId | string | File Id |
Other parameters are passed through a pointer to a apiGetReportMessageAttachmentListRequest 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]
GetReportMessageListResult GetReportMessageList(ctx, reportId).Limit(limit).Offset(offset).Execute()
List report messages
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/leaseweb/leaseweb-go-sdk/abuse"
)
func main() {
reportId := "abc123" // string | Report Id
limit := int32(20) // int32 | Limit the number of results returned. (optional)
offset := int32(10) // int32 | Return results starting from the given offset. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AbuseAPI.GetReportMessageList(context.Background(), reportId).Limit(limit).Offset(offset).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AbuseAPI.GetReportMessageList``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetReportMessageList`: GetReportMessageListResult
fmt.Fprintf(os.Stdout, "Response from `AbuseAPI.GetReportMessageList`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
reportId | string | Report Id |
Other parameters are passed through a pointer to a apiGetReportMessageListRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
limit | int32 | Limit the number of results returned. | offset | int32 | Return results starting from the given offset. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetReportResolutionListResult GetReportResolutionList(ctx, reportId).Execute()
List resolution options
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/leaseweb/leaseweb-go-sdk/abuse"
)
func main() {
reportId := "abc123" // string | Report Id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AbuseAPI.GetReportResolutionList(context.Background(), reportId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AbuseAPI.GetReportResolutionList``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetReportResolutionList`: GetReportResolutionListResult
fmt.Fprintf(os.Stdout, "Response from `AbuseAPI.GetReportResolutionList`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
reportId | string | Report Id |
Other parameters are passed through a pointer to a apiGetReportResolutionListRequest 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]
ResolveReport(ctx, reportId).ResolveReportResult(resolveReportResult).Execute()
Resolve a report
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/leaseweb/leaseweb-go-sdk/abuse"
)
func main() {
reportId := "abc123" // string | Report Id
resolveReportResult := *openapiclient.NewResolveReportResult([]string{"["CONTENT_REMOVED","SUSPENDED"]"}) // ResolveReportResult | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.AbuseAPI.ResolveReport(context.Background(), reportId).ResolveReportResult(resolveReportResult).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AbuseAPI.ResolveReport``: %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. | |
reportId | string | Report Id |
Other parameters are passed through a pointer to a apiResolveReportRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
resolveReportResult | ResolveReportResult | |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]