All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
AddSourceControl | Post /api/v2/sourceControl/{ownerType}/{internalOwnerId} | |
AutomaticRoleAssignment | Post /api/v2/sourceControl/automaticRoleAssignment/{publicId} | |
DeleteSourceControl | Delete /api/v2/sourceControl/{ownerType}/{internalOwnerId} | |
GetSourceControl1 | Get /api/v2/sourceControl/{ownerType}/{internalOwnerId} | |
UpdateSourceControl | Put /api/v2/sourceControl/{ownerType}/{internalOwnerId} |
ApiSourceControlDTO AddSourceControl(ctx, ownerType, internalOwnerId).ApiSourceControlDTO(apiSourceControlDTO).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
ownerType := "ownerType_example" // string | Enter the value for ownerType.
internalOwnerId := "internalOwnerId_example" // string | Enter the value for internal ownerId. Use ROOT_ORGANIZATION_ID for root organization.
apiSourceControlDTO := *sonatypeiq.NewApiSourceControlDTO() // ApiSourceControlDTO | Specify the SCM settings for the ownerId specified above in the request JSON.<ul><li><code>id</code> is the internal owner ID.</li><li><code>repositoryUrl</code> is the http(s) and ssh urls for the application specified in the ownerId.</li><li><code>username</code> is optional, can be provided for Bitbucket Server and Cloud.</li><li><code>token</code> is optional,if inherited. If provided, this value will override the value inherited from the root organization, organization or application level.<li><code>provider</code> is the name of of the SCM system. Allowed values are <code>azure</code>, <code>github</code>, <code>gitlab</code>, and <code>bitbucket</code>.</li><li><code>baseBranch</code> is required for the root organization. Organizations and applications inherit from the root unless overridden.</li><li><code>enablePullRequests</code> has been deprecated in version 124.</li><li><code>remediationPullRequestsEnabled</code> is optional. Set it to `true` to enable the Automated Pull Requests.</li><li><code>enableStatusChecks</code> has been deprecated in version 124.</li><li><code>statusChecksEnabled</code> is an internal field.</li><li><code>pullRequestCommentingEnabled</code> is optional. Set it to `true` to enable the Pull Request Commenting feature.</li><li><code>sourceControlEvaluationsEnabled</code> is set to `true` to enable source control evaluations for the continuous risk profile feature.</li><li><code>sourceControlScanTarget</code> is the path inside the repository.</li><li><code>sshEnabled</code> is set to `true` to enable ssh.</li><li><code>commitStatusEnabled</code> is set to `true` if interaction with the commit statuses on the SCM is enabled.</li></ul> (optional)
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
resp, r, err := apiClient.SourceControlAPI.AddSourceControl(context.Background(), ownerType, internalOwnerId).ApiSourceControlDTO(apiSourceControlDTO).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SourceControlAPI.AddSourceControl``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AddSourceControl`: ApiSourceControlDTO
fmt.Fprintf(os.Stdout, "Response from `SourceControlAPI.AddSourceControl`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
ownerType | string | Enter the value for ownerType. | |
internalOwnerId | string | Enter the value for internal ownerId. Use ROOT_ORGANIZATION_ID for root organization. |
Other parameters are passed through a pointer to a apiAddSourceControlRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
apiSourceControlDTO | ApiSourceControlDTO | Specify the SCM settings for the ownerId specified above in the request JSON.<ul><li><code>id</code> is the internal owner ID.</li><li><code>repositoryUrl</code> is the http(s) and ssh urls for the application specified in the ownerId.</li><li><code>username</code> is optional, can be provided for Bitbucket Server and Cloud.</li><li><code>token</code> is optional,if inherited. If provided, this value will override the value inherited from the root organization, organization or application level.<li><code>provider</code> is the name of of the SCM system. Allowed values are <code>azure</code>, <code>github</code>, <code>gitlab</code>, and <code>bitbucket</code>.</li><li><code>baseBranch</code> is required for the root organization. Organizations and applications inherit from the root unless overridden.</li><li><code>enablePullRequests</code> has been deprecated in version 124.</li><li><code>remediationPullRequestsEnabled</code> is optional. Set it to `true` to enable the Automated Pull Requests.</li><li><code>enableStatusChecks</code> has been deprecated in version 124.</li><li><code>statusChecksEnabled</code> is an internal field.</li><li><code>pullRequestCommentingEnabled</code> is optional. Set it to `true` to enable the Pull Request Commenting feature.</li><li><code>sourceControlEvaluationsEnabled</code> is set to `true` to enable source control evaluations for the continuous risk profile feature.</li><li><code>sourceControlScanTarget</code> is the path inside the repository.</li><li><code>sshEnabled</code> is set to `true` to enable ssh.</li><li><code>commitStatusEnabled</code> is set to `true` if interaction with the commit statuses on the SCM is enabled.</li></ul> |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]string AutomaticRoleAssignment(ctx, publicId).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
publicId := "publicId_example" // string | Enter the public applicationId for automatic role assignment.
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
resp, r, err := apiClient.SourceControlAPI.AutomaticRoleAssignment(context.Background(), publicId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SourceControlAPI.AutomaticRoleAssignment``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AutomaticRoleAssignment`: []string
fmt.Fprintf(os.Stdout, "Response from `SourceControlAPI.AutomaticRoleAssignment`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
publicId | string | Enter the public applicationId for automatic role assignment. |
Other parameters are passed through a pointer to a apiAutomaticRoleAssignmentRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
[]string
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteSourceControl(ctx, ownerType, internalOwnerId).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
ownerType := "ownerType_example" // string | Enter the value for ownerType.
internalOwnerId := "internalOwnerId_example" // string | Enter the value for internal ownerId.
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
r, err := apiClient.SourceControlAPI.DeleteSourceControl(context.Background(), ownerType, internalOwnerId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SourceControlAPI.DeleteSourceControl``: %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. | |
ownerType | string | Enter the value for ownerType. | |
internalOwnerId | string | Enter the value for internal ownerId. |
Other parameters are passed through a pointer to a apiDeleteSourceControlRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiSourceControlDTO GetSourceControl1(ctx, ownerType, internalOwnerId).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
ownerType := "ownerType_example" // string | Enter the value for ownerType.
internalOwnerId := "internalOwnerId_example" // string | Enter the value for internal ownerId. Use ROOT_ORGANIZATION_ID for the root organization
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
resp, r, err := apiClient.SourceControlAPI.GetSourceControl1(context.Background(), ownerType, internalOwnerId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SourceControlAPI.GetSourceControl1``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSourceControl1`: ApiSourceControlDTO
fmt.Fprintf(os.Stdout, "Response from `SourceControlAPI.GetSourceControl1`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
ownerType | string | Enter the value for ownerType. | |
internalOwnerId | string | Enter the value for internal ownerId. Use ROOT_ORGANIZATION_ID for the root organization |
Other parameters are passed through a pointer to a apiGetSourceControl1Request 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]
ApiSourceControlDTO UpdateSourceControl(ctx, ownerType, internalOwnerId).ApiSourceControlDTO(apiSourceControlDTO).Execute()
package main
import (
"context"
"fmt"
"os"
sonatypeiq "github.com/sonatype-nexus-community/nexus-iq-api-client-go"
)
func main() {
ownerType := "ownerType_example" // string | Enter the value for ownerType.
internalOwnerId := "internalOwnerId_example" // string | Enter the internal ownerId. Use ROOT_ORGANIZATION_ID for the root organization.
apiSourceControlDTO := *sonatypeiq.NewApiSourceControlDTO() // ApiSourceControlDTO | Specify the SCM settings for the ownerId specified above in the request JSON.<ul><li><code>id</code> is the internal owner ID.</li><li><code>repositoryUrl</code> is the http(s) and ssh urls for the application specified in the ownerId.</li><li><code>username</code> is optional, can be provided for Bitbucket Server and Cloud.</li><li><code>token</code> is optional if inherited. If provided, this value will override the value inherited from the root organization, organization or application level.<li><code>provider</code> is the name of of the SCM system. Allowed values are <code>azure</code>, <code>github</code>, <code>gitlab</code>, and <code>bitbucket</code>.</li><li><code>baseBranch</code> is required for the root organization. Organizations and applications inherit from the root unless overridden.</li><li><code>enablePullRequests</code> has been deprecated in version 124.</li><li><code>remediationPullRequestsEnabled</code> is optional. Set it to `true` to enable the Automated Pull Requests.</li><li><code>enableStatusChecks</code> has been deprecated in version 124.</li><li><code>statusChecksEnabled</code> is an internal field.</li><li><code>pullRequestCommentingEnabled</code> is optional. Set it to `true` to enable the Pull Request Commenting feature.</li><li><code>sourceControlEvaluationsEnabled</code> is set to `true` to enable source control evaluations for the continuous risk profile feature.</li><li><code>sourceControlScanTarget</code> is the path inside the repository.</li><li><code>sshEnabled</code> is set to `true` to enable ssh.</li><li><code>commitStatusEnabled</code> is set to `true` if interaction with the commit statuses on the SCM is enabled.</li></ul> (optional)
configuration := sonatypeiq.NewConfiguration()
apiClient := sonatypeiq.NewAPIClient(configuration)
resp, r, err := apiClient.SourceControlAPI.UpdateSourceControl(context.Background(), ownerType, internalOwnerId).ApiSourceControlDTO(apiSourceControlDTO).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SourceControlAPI.UpdateSourceControl``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateSourceControl`: ApiSourceControlDTO
fmt.Fprintf(os.Stdout, "Response from `SourceControlAPI.UpdateSourceControl`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
ownerType | string | Enter the value for ownerType. | |
internalOwnerId | string | Enter the internal ownerId. Use ROOT_ORGANIZATION_ID for the root organization. |
Other parameters are passed through a pointer to a apiUpdateSourceControlRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
apiSourceControlDTO | ApiSourceControlDTO | Specify the SCM settings for the ownerId specified above in the request JSON.<ul><li><code>id</code> is the internal owner ID.</li><li><code>repositoryUrl</code> is the http(s) and ssh urls for the application specified in the ownerId.</li><li><code>username</code> is optional, can be provided for Bitbucket Server and Cloud.</li><li><code>token</code> is optional if inherited. If provided, this value will override the value inherited from the root organization, organization or application level.<li><code>provider</code> is the name of of the SCM system. Allowed values are <code>azure</code>, <code>github</code>, <code>gitlab</code>, and <code>bitbucket</code>.</li><li><code>baseBranch</code> is required for the root organization. Organizations and applications inherit from the root unless overridden.</li><li><code>enablePullRequests</code> has been deprecated in version 124.</li><li><code>remediationPullRequestsEnabled</code> is optional. Set it to `true` to enable the Automated Pull Requests.</li><li><code>enableStatusChecks</code> has been deprecated in version 124.</li><li><code>statusChecksEnabled</code> is an internal field.</li><li><code>pullRequestCommentingEnabled</code> is optional. Set it to `true` to enable the Pull Request Commenting feature.</li><li><code>sourceControlEvaluationsEnabled</code> is set to `true` to enable source control evaluations for the continuous risk profile feature.</li><li><code>sourceControlScanTarget</code> is the path inside the repository.</li><li><code>sshEnabled</code> is set to `true` to enable ssh.</li><li><code>commitStatusEnabled</code> is set to `true` if interaction with the commit statuses on the SCM is enabled.</li></ul> |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]