All URIs are relative to https://api.aptible.com
Method | HTTP request | Description |
---|---|---|
CreateCodeScanResult | Post /apps/{app_id}/code_scan_results | create code_scan_result |
DeleteCodeScanResult | Delete /code_scan_results/{id} | delete code_scan_result |
GetCodeScanResult | Get /code_scan_results/{id} | show code_scan_result |
ListCodeScanResultsForApp | Get /apps/{app_id}/code_scan_results | list code_scan_results |
CodeScanResult CreateCodeScanResult(ctx, appId).CreateCodeScanResultRequest(createCodeScanResultRequest).Execute()
create code_scan_result
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/aptible/aptible-api-go/aptibleapi"
)
func main() {
appId := int32(56) // int32 | app_id
createCodeScanResultRequest := *openapiclient.NewCreateCodeScanResultRequest(int32(123), "GitRef_example", "GitCommit_example") // CreateCodeScanResultRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CodeScanResultsAPI.CreateCodeScanResult(context.Background(), appId).CreateCodeScanResultRequest(createCodeScanResultRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CodeScanResultsAPI.CreateCodeScanResult``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateCodeScanResult`: CodeScanResult
fmt.Fprintf(os.Stdout, "Response from `CodeScanResultsAPI.CreateCodeScanResult`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
appId | int32 | app_id |
Other parameters are passed through a pointer to a apiCreateCodeScanResultRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
createCodeScanResultRequest | CreateCodeScanResultRequest | |
- Content-Type: application/json
- Accept: application/hal+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteCodeScanResult(ctx, id).Execute()
delete code_scan_result
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)
r, err := apiClient.CodeScanResultsAPI.DeleteCodeScanResult(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CodeScanResultsAPI.DeleteCodeScanResult``: %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 | int32 | id |
Other parameters are passed through a pointer to a apiDeleteCodeScanResultRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/hal+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CodeScanResult GetCodeScanResult(ctx, id).Execute()
show code_scan_result
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.CodeScanResultsAPI.GetCodeScanResult(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CodeScanResultsAPI.GetCodeScanResult``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCodeScanResult`: CodeScanResult
fmt.Fprintf(os.Stdout, "Response from `CodeScanResultsAPI.GetCodeScanResult`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | int32 | id |
Other parameters are passed through a pointer to a apiGetCodeScanResultRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/hal+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListCodeScanResultsForApp200Response ListCodeScanResultsForApp(ctx, appId).Page(page).Execute()
list code_scan_results
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/aptible/aptible-api-go/aptibleapi"
)
func main() {
appId := int32(56) // int32 | app_id
page := int32(56) // int32 | current page of results for pagination (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CodeScanResultsAPI.ListCodeScanResultsForApp(context.Background(), appId).Page(page).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CodeScanResultsAPI.ListCodeScanResultsForApp``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListCodeScanResultsForApp`: ListCodeScanResultsForApp200Response
fmt.Fprintf(os.Stdout, "Response from `CodeScanResultsAPI.ListCodeScanResultsForApp`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
appId | int32 | app_id |
Other parameters are passed through a pointer to a apiListCodeScanResultsForAppRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
page | int32 | current page of results for pagination |
ListCodeScanResultsForApp200Response
- Content-Type: Not defined
- Accept: application/hal+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]