Available in Classic and VPC
Get details of a deployment project.
Request
This section describes the request format. The method and URI are as follows:
Method | URI |
---|---|
GET | /api/v1/project/{projectId} |
Request headers
For information about the headers common to all SourceBuild APIs, see SourceBuild request headers.
Request path parameters
You can use the following path parameters with your request:
Field | Type | Required | Description |
---|---|---|---|
projectId |
String | Required | Project ID
|
Request example
The request example is as follows:
curl --location --request GET 'https://sourcebuild.apigw.ntruss.com/api/v1/project/20***' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'
Response
This section describes the response format.
Response body
The response body includes the following data:
Field | Type | Required | Description |
---|---|---|---|
result |
Object | - | Response result |
result.id |
Number | - | Project ID |
result.name |
String | - | Project name |
result.description |
String | - | Project description |
result.created |
Object | - | Project creation information |
result.created.timestamp |
Number | - | Project creation date and time
|
result.created.user |
String | - | Creator ID |
result.source |
Object | - | Source storage information |
result.source.type |
String | - | Source storage type
|
result.source.config |
Object | - | Source storage repository information |
result.source.config.repository |
String | - | Source storage repository name
|
result.source.config.branch |
String | - | Source storage repository branch name
|
result.source.config.workspace.id |
String | - | Bitbucket workspace ID
|
result.source.config.workspace.name |
String | - | Bitbucket workspace name
|
owner |
String | - | Github Enterprise Server owner
|
url |
String | - | Git repository URL
|
serverUrl |
String | - | Server URL
|
result.env |
Object | - | Build environment information |
result.env.timeout |
Number | - | Build execution timeout (minute) |
result.env.envVars |
Array | - | Build environment variable information |
result.env.compute |
Object | - | Computing type information |
result.env.compute.id |
Number | - | Computing type ID |
result.env.compute.cpu |
Number | - | Number of vCPUs |
result.env.compute.mem |
Number | - | Memory capacity (GB) |
result.env.platform |
Object | - | Build environment platform information |
result.env.platform.type |
String | - | Image storage type
|
result.env.platform.config |
Object | - | Build environment configuration information |
result.env.platform.config.os |
Object | - | Operating system information
|
result.env.platform.config.os.id |
Number | - | Operating system ID |
result.env.platform.config.os.name |
String | - | Operating system name |
result.env.platform.config.os.version |
String | - | Operating system version |
result.env.platform.config.os.archi |
String | - | Operating system architecture |
result.env.platform.config.runtime |
Object | - | Runtime information
|
result.env.platform.config.runtime.id |
Number | - | Runtime type ID |
result.env.platform.config.runtime.name |
String | - | Runtime name |
result.env.platform.config.runtime.version |
Object | - | Runtime version information |
result.env.platform.config.runtime.version.id |
Number | - | Runtime version ID |
result.env.platform.config.runtime.version.name |
String | - | Runtime version name |
result.env.platform.config.registry |
Object | - | Registry information
|
result.env.platform.config.image |
String | - | Image name
|
result.env.platform.config.tag |
String | - | Image tag name
|
result.env.docker |
Object | - | Docker engine information |
result.env.docker.use |
Boolean | - | Whether to include Docker engine
|
result.env.docker.id |
Number | - | Docker engine version ID
|
result.env.docker.name |
String | - | Docker engine name
|
result.cmd |
Object | - | Build command information |
result.cmd.pre |
Array | - | Command before build |
result.cmd.build |
Array | - | Command during build |
result.cmd.post |
Array | - | Command after build |
result.cmd.dockerbuild |
Object | - | Docker image build information
|
result.cmd.dockerbuild.use |
Boolean | - | Whether to use Docker image build settings
|
result.cmd.dockerbuild.dockerfile |
String | - | dockerfile path |
result.cmd.dockerbuild.registry |
String | - | Container Registry name |
result.cmd.dockerbuild.image |
String | - | Image name |
result.cmd.dockerbuild.tag |
String | - | Image tag name |
result.cmd.dockerbuild.latest |
Boolean | - | Whether to set latest tag
|
result.artifact |
Object | - | Build result information
|
result.artifact.use |
Boolean | - | Whether to save build results
|
result.artifact.path |
String | - | Build result storage path |
result.artifact.storage |
Object | - | Result storage information |
result.artifact.storage.bucket |
String | - | Object Storage bucket name to save the results |
result.artifact.storage.path |
String | - | The path within the Object Storage bucket to save the results |
result.artifact.storage.filename |
String | - | File name to save the results |
result.artifact.backup |
Boolean | - | Whether to back up results
|
result.cache |
Object | - | Post-build image storage information
|
result.cache.use |
Boolean | - | Whether to store image after build completion
|
result.cache.registry |
String | - | Container Registry name |
result.cache.image |
String | - | Image name |
result.cache.tag |
String | - | Image tag name |
result.cache.latest |
Boolean | - | Whether to set latest tag
|
result.linked |
Object | - | Integrated service information |
result.linked.FileSafer |
Boolean | - | File Safer integration
|
result.linked.CloudLogAnalytics |
Boolean | - | Cloud Log Analytics integration
|
result.lastBuild |
Object | - | Latest build job information |
result.lastBuild.id |
String | - | Build number
|
result.lastBuild.timestamp |
Number | - | Build date and time
|
result.lastBuild.status |
String | - | Build status
|
envVars
The following describes envVars
.
Field | Type | Required | Description |
---|---|---|---|
key |
String | - | Environment variable key |
value |
String | - | Environment variable value |
Response status codes
For information about the response status codes common to all SourceBuild APIs, see SourceBuild response status codes.
Response example
The response example is as follows:
{
"result": {
"id": 20***,
"name": "Build001",
"description": "Build001",
"created": {
"timestamp": 1747294359000,
"user": "nb******"
},
"source": {
"type": "SourceCommit",
"config": {
"repository": "repository001",
"branch": "master"
}
},
"env": {
"timeout": 60,
"envVars": [
{
"key": "env1",
"value": "value1"
}
],
"compute": {
"id": 1,
"cpu": 2,
"mem": 4
},
"platform": {
"type": "SourceBuild",
"config": {
"os": {
"id": 1,
"name": "ubuntu",
"version": "16.04",
"archi": "x64"
},
"runtime": {
"id": 5,
"name": "python",
"version": {
"id": 27,
"name": "3.10-1.0.0"
}
}
}
},
"docker": {
"use": true,
"id": 1,
"name": "Docker:18.09.1"
}
},
"cmd": {
"pre": [],
"build": [],
"post": [],
"dockerbuild": {
"use": false
}
},
"artifact": {
"use": false
},
"cache": {
"use": false
},
"linked": {
"FileSafer": false,
"CloudLogAnalytics": false
},
"lastBuild": {
"id": "4e3c7860-****-****-****-4db7e2de2984",
"timestamp": 1747363743000,
"status": "success"
}
}
}