ListBuildsForProject - AWS CodeBuild

ListBuildsForProject

Gets a list of build identifiers for the specified build project, with each build identifier representing a single build.

Request Syntax

{ "nextToken": "string", "projectName": "string", "sortOrder": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

Note

In the following list, the required parameters are described first.

projectName

The name of the AWS CodeBuild project.

Type: String

Length Constraints: Minimum length of 1.

Required: Yes

nextToken

During a previous call, if there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a nextToken. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.

Type: String

Required: No

sortOrder

The order to sort the results in. The results are sorted by build number, not the build identifier. If this is not specified, the results are sorted in descending order.

Valid values include:

  • ASCENDING: List the build identifiers in ascending order, by build number.

  • DESCENDING: List the build identifiers in descending order, by build number.

If the project has more than 100 builds, setting the sort order will result in an error.

Type: String

Valid Values: ASCENDING | DESCENDING

Required: No

Response Syntax

{ "ids": [ "string" ], "nextToken": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

ids

A list of build identifiers for the specified build project, with each build ID representing a single build.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Length Constraints: Minimum length of 1.

nextToken

If there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a nextToken. To get the next batch of items in the list, call this operation again, adding the next token to the call.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors.

InvalidInputException

The input value that was provided is not valid.

HTTP Status Code: 400

ResourceNotFoundException

The specified AWS resource cannot be found.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: