SourceCommit overview

Prev Next

Available in Classic and VPC

SourceCommit is a NAVER Cloud Platform service that provides a private Git repository for securely storing source code and various files. The SourceCommit service provides APIs for creating and managing repositories in RESTful format.

Common SourceCommit settings

The following describes commonly used request and response formats in SourceCommit APIs.

Request

The following describes the common request format.

API URL

The request API URL is as follows:

https://sourcecommit.apigw.ntruss.com

Request headers

The following describes the request headers.

Field Required Description
x-ncp-apigw-timestamp Required This is the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC.
  • Request is considered invalid if the timestamp differs from the current time by more than 5 minutes.
  • Unix timestamp format
x-ncp-iam-access-key Required Access key issued on NAVER Cloud Platform
x-ncp-apigw-signature-v2 Required Base64-encoded signature that encrypts the request information with a secret key that maps to the access key issued on NAVER Cloud Platform, using the HMAC encryption algorithm (HmacSHA256)
x-ncp-region_code Optional Code of Region to use the service
  • KR (default)
Content-type Optional Request data format
  • application/json

Response

The following describes the common response format.

Response body

The response body includes the following data:

error
error defines the API call failure information. The following describes error.

Field Type Required Description
error Object - Error code and message
error.errorCode String Required Error code
error.message String Required Error message
error.details String Required Error message detailed description

Response status codes

SourceCommit APIs use NAVER Cloud Platform's common response status codes. For response status codes common to NAVER Cloud Platform, see Ncloud API response status codes.

Response example

For response examples when a call is successful, see each API specification. The following is a sample response upon a failed call.

{
    "error": {
        "errorCode": "200",
        "message": "Authentication Failed",
        "details": "Invalid authentication information."
    }
}

SourceCommit API

The following describes the APIs provided by the SourceCommit service.

API Description
Create repository Create a repository.
Get repository list Get the repository list.
Get repository Get repository details.
Get repository (by ID) Get repository details using repository ID.
Get branch list Get the branch list.
Get tag list Get the tag list.
Default branch settings Set up default branch.
Edit repository Change repository settings.
Edit repository (by ID) Change repository settings using repository ID.
Delete repository Delete a repository.
Delete repository (by ID) Delete a repository using repository ID.

SourceCommit related resources

NAVER Cloud Platform provides a variety of related resources to help users better understand SourceCommit APIs.