getBuildLogs
This API operation and its parameters support the request to get the logs for a SAP Commerce Cloud build.
Command
GET https://portalapi.commerce.ondemand.com/v2/subscriptions/{subscriptionCode}/builds/{buildCode}/logs
Here's an example of how to use this API to access the log files:
curl --location --request GET 'https://portalapi.commerce.ondemand.com/v2/subscriptions/<subscriptionCode>/builds/<buildCode>/logs' \ --header 'Accept: application/octet-stream' \ --header 'Authorization: Bearer xxxxxxxxxxxxxxxxxx' \ --output build-logs.zip
Parameters
| Name | Required | Description |
|---|---|---|
|
subscriptionCode string (path) |
Yes | The code of the subscription associated to the build.
You can find the subscription code in the Cloud Portal URL. It appears after subscription/ in the URL. |
|
buildCode string (path) |
Yes | The code of a specific build.
You can find the build code in the Cloud Portal URL. It appears after builds/ in the URL. The code is also displayed on the Build page in the Cloud Portal, in the Basic Information panel. |
Responses
The response content type is application/octet-stream.
| Code | Description |
|---|---|
| 200 | OK
The ZIP file containing the build log is returned when the call is successful. |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |