Gets a list of commits of a branch of a repository
4 Authentication
Authentication for the App Repository API uses a personal access token (PAT).
4.1 Generating a PAT
To generate a PAT, see the Personal Access Tokens section in User Settings. When you define the new PAT, you need to choose at least this scope: mx:modelrepository:repo:read.
Store the generated value {GENERATED_PAT} somewhere safe so you can use it to authorize your Mendix Cloud App Repository API calls.
4.2 Using the PAT
Each request must contain an Authorization header with the value MxToken {GENERATED_PAT}. For example:
This is the generic error response format. The payload example format applies to any error as listed per request.
5.1.1 Heading
Name
Value
Content-Type
application/json; charset=utf-8
5.1.2 Payload
Name
Type
Description
errorCode
String
A code that can be used to look up the error.
errorMessage
String
A short, human-readable message explaining the error.
Payload Example:
1
2
3
4
{"errorCode":"RS400","errorMessage":"Please provide valid input to execute this request. Invalid app id"}
5.2 Error Codes
The service can return the following errors. In general, 4xx errors indicate that something was wrong with the client’s request, and 5xx errors indicate that something went wrong at the server side.
HTTP Status
Title
Detail
400
Bad Request
Invalid app ID or branch name
401
Unauthorized
Invalid token
403
Forbidden
Access denied
404
Not Found
Repository or branch not found
500
Internal Server Error
Something went wrong
6 API Calls
6.1 Retrieve Repository Info
1
2
HTTP Method: GET
URL: https://repository.api.mendix.com/v1/repositories/<AppId>/info
6.1.1 Request
Returns information about the version control repository for a Mendix app.
6.1.1.1 Path Parameters
Name
Type
Required
Description
AppId
String
Yes
The App ID of the Mendix app for which the repository information should be returned. You can find this in the General settings tab of your app in the Developer Portal.
Returns information about the branches of the version control repository for a Mendix app.
The response is paginated using cursor-based pagination.
1
2
HTTP Method: GET
URL: https://repository.api.mendix.com/v1/repositories/<AppId>/branches
6.2.1 Request
6.2.1.1 Path Parameter
Name
Type
Required
Description
AppId
String
Yes
The App ID of the Mendix app for which the repository information should be returned.
6.2.1.2 Query Parameter
Name
Type
Required
Description
limit
Integer
No
The number of items to return per result page. Defaults to 20 items. Maximum is 100 items.
cursor
String
No
A cursor specifying which page to retrieve. To obtain a cursor value, see the cursors property of the response payload of this operation. If no cursor is specified, the first page is returned.
To the user of this API, a cursor is an opaque value that can only be obtained from a previous API response.
Returns information about the commits of a specific branch of the version control repository for a Mendix app.
Commits are returned in reverse chronological order, starting from the head of the branch all the way to the first commit of the repository.
The response is paginated using cursor-based pagination.
1
2
HTTP Method: GET
URL: https://repository.api.mendix.com/v1/repositories/<AppId>/branches/<Name>/commits
6.4.1 Request
6.4.1.1 Path Parameters
Name
Type
Required
Description
AppId
String
Yes
The App ID of the Mendix app for which the repository information should be returned.
Name
String
Yes
The name of the branch for which to return information. The name of the branch should be URL-encoded.
6.4.1.2 Query Parameters
Name
Type
Required
Description
limit
Integer
No
The number of items to return per result page. Defaults to 20 items. Maximum is 100 items.
cursor
String
No
A cursor specifying which page to retrieve. To obtain a cursor value, see the cursors property of the response payload of this operation. If no cursor is specified, the first page is returned.
To the user of this API, a cursor is an opaque value that can only be obtained from a previous API response.