The Amazon CodeGuru Reviewer API lets you associate, list, retrieve, and disassociate source code repositories, create and query code review jobs (including branch‑wide analyses), and fetch the resulting recommendations, feedback, and tags for those reviews.
Use to associate an Amazon Web Services CodeCommit repository or a repository managed by Amazon Web Services CodeStar Connections with Amazon CodeGuru Reviewer. When you associate a repository, CodeGuru Reviewer reviews source code changes in the repository's pull requests and provides automatic recommendations. You can view recommendations using the CodeGuru Reviewer console. For more information, see Recommendations in Amazon CodeGuru Reviewer in the Amazon CodeGuru Reviewer User Guide. If you associate a CodeCommit or S3 repository, it must be in the same Amazon Web Services Region and Amazon Web Services account where its CodeGuru Reviewer code reviews are configured. Bitbucket and GitHub Enterprise Server repositories are managed by Amazon Web Services CodeStar Connections to connect to CodeGuru Reviewer. For more information, see Associate a repository in the Amazon CodeGuru Reviewer User Guide. You cannot use the CodeGuru Reviewer SDK or the Amazon Web Services CLI to associate a GitHub repository with Amazon CodeGuru Reviewer. To associate a GitHub repository, use the console. For more information, see Getting started with CodeGuru Reviewer in the CodeGuru Reviewer User Guide.
GET
/associations
Returns a list of RepositoryAssociationSummary objects that contain summary information about a repository association. You can filter the returned list by ProviderType , Name , State , and Owner .
ProviderType(query) — List of provider types to use as a filter.
State(query) — List of repository association states to use as a filter. The valid repository association states are: Associated : The repository association is complete. Associating : CodeGuru Reviewer is: Setting up pull request notifications. This is required for pull requests to trigger a CodeGuru Reviewer review. If your repository ProviderType is GitHub , GitHub Enterprise Server , or Bitbucket , CodeGuru Reviewer creates webhooks in your repository to trigger CodeGuru Reviewer reviews. If you delete these webhooks, reviews of code in your repository cannot be triggered. Setting up source code access. This is required for CodeGuru Reviewer to securely clone code in your repository. Failed : The repository failed to associate or disassociate. Disassociating : CodeGuru Reviewer is removing the repository's pull request notifications and source code access. Disassociated : CodeGuru Reviewer successfully disassociated the repository. You can create a new association with this repository if you want to review source code in it later. You can control access to code reviews created in anassociated repository with tags after it has been disassociated. For more information, see Using tags to control access to associated repositories in the Amazon CodeGuru Reviewer User Guide .
Name(query) — List of repository names to use as a filter.
Owner(query) — List of owners to use as a filter. For Amazon Web Services CodeCommit, it is the name of the CodeCommit account that was used to associate the repository. For other repository source providers, such as Bitbucket and GitHub Enterprise Server, this is name of the account that was used to associate the repository.
MaxResults(query, limit) — The maximum number of repository association results returned by ListRepositoryAssociations in paginated output. When this parameter is used, ListRepositoryAssociations only returns maxResults results in a single page with a nextToken response element. The remaining results of the initial request can be seen by sending another ListRepositoryAssociations request with the returned nextToken value. This value can be between 1 and 100. If this parameter is not used, ListRepositoryAssociations returns up to 100 results and a nextToken value if applicable.
NextToken(query) — The nextToken value returned from a previous paginated ListRepositoryAssociations request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. Treat this token as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
POST
/codereviews
Use to create a code review with a CodeReviewType of RepositoryAnalysis . This type of code review analyzes all code under a specified branch in an associated repository. PullRequest code reviews are automatically triggered by a pull request.
GET
/codereviews/{CodeReviewArn}
Returns the metadata associated with the code review along with its status.
CodeReviewArn(path, required) — The Amazon Resource Name (ARN) of the CodeReview object.
GET
/feedback/{CodeReviewArn}#RecommendationId
Describes the customer feedback for a CodeGuru Reviewer recommendation.
CodeReviewArn(path, required) — The Amazon Resource Name (ARN) of the CodeReview object.
RecommendationId(query, required) — The recommendation ID that can be used to track the provided recommendations and then to collect the feedback.
UserId(query) — Optional parameter to describe the feedback for a given user. If this is not supplied, it defaults to the user making the request. The UserId is an IAM principal that can be specified as an Amazon Web Services account ID or an Amazon Resource Name (ARN). For more information, see Specifying a Principal in the Amazon Web Services Identity and Access Management User Guide .
GET
/associations/{AssociationArn}
Returns a RepositoryAssociation object that contains information about the requested repository association.
AssociationArn(path, required) — The Amazon Resource Name (ARN) of the RepositoryAssociation object. You can retrieve this ARN by calling ListRepositoryAssociations .
DELETE
/associations/{AssociationArn}
Removes the association between Amazon CodeGuru Reviewer and a repository.
AssociationArn(path, required) — The Amazon Resource Name (ARN) of the RepositoryAssociation object. You can retrieve this ARN by calling ListRepositoryAssociations .
GET
/codereviews#Type
Lists all the code reviews that the customer has created in the past 90 days.
ProviderTypes(query) — List of provider types for filtering that needs to be applied before displaying the result. For example, providerTypes=[GitHub] lists code reviews from GitHub.
States(query) — List of states for filtering that needs to be applied before displaying the result. For example, states=[Pending] lists code reviews in the Pending state. The valid code review states are: Completed : The code review is complete. Pending : The code review started and has not completed or failed. Failed : The code review failed. Deleting : The code review is being deleted.
RepositoryNames(query) — List of repository names for filtering that needs to be applied before displaying the result.
Type(query, required) — The type of code reviews to list in the response.
MaxResults(query, limit) — The maximum number of results that are returned per call. The default is 100.
NextToken(query) — If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged.
GET
/feedback/{CodeReviewArn}/RecommendationFeedback
Returns a list of RecommendationFeedbackSummary objects that contain customer recommendation feedback for all CodeGuru Reviewer users.
NextToken(query) — If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged.
MaxResults(query, limit) — The maximum number of results that are returned per call. The default is 100.
CodeReviewArn(path, required) — The Amazon Resource Name (ARN) of the CodeReview object.
UserIds(query) — An Amazon Web Services user's account ID or Amazon Resource Name (ARN). Use this ID to query the recommendation feedback for a code review from that user. The UserId is an IAM principal that can be specified as an Amazon Web Services account ID or an Amazon Resource Name (ARN). For more information, see Specifying a Principal in the Amazon Web Services Identity and Access Management User Guide .
RecommendationIds(query) — Used to query the recommendation feedback for a given recommendation.
GET
/codereviews/{CodeReviewArn}/Recommendations
Returns the list of all recommendations for a completed code review.
NextToken(query) — Pagination token.
MaxResults(query, limit) — The maximum number of results that are returned per call. The default is 100.
CodeReviewArn(path, required) — The Amazon Resource Name (ARN) of the CodeReview object.
GET
/tags/{resourceArn}
Returns the list of tags associated with an associated repository resource.
resourceArn(path, required) — The Amazon Resource Name (ARN) of the RepositoryAssociation object. You can retrieve this ARN by calling ListRepositoryAssociations .
POST
/tags/{resourceArn}
Adds one or more tags to an associated repository.
resourceArn(path, required) — The Amazon Resource Name (ARN) of the RepositoryAssociation object. You can retrieve this ARN by calling ListRepositoryAssociations .
PUT
/feedback
Stores customer feedback for a CodeGuru Reviewer recommendation. When this API is called again with different reactions the previous feedback is overwritten.
DELETE
/tags/{resourceArn}#tagKeys
Removes a tag from an associated repository.
resourceArn(path, required) — The Amazon Resource Name (ARN) of the RepositoryAssociation object. You can retrieve this ARN by calling ListRepositoryAssociations .
tagKeys(query, required) — A list of the keys for each tag you want to remove from an associated repository.
14 endpoints auto-detected
Authentication
This API uses an API key, passed in the "Authorization" header. No OAuth required.
curl -X POST \
"https://github.com/mermade/aws2openapi/associations" \
-H "Authorization: YOUR_API_KEY"