Classic/VPC環境で利用できます。
パイプラインの詳細情報を照会します。
リクエスト
リクエスト形式を説明します。リクエスト形式は次の通りです。
メソッド | URI |
---|---|
GET | /api/v1/project/{projectId} |
リクエストヘッダ
SourcePipeline APIで共通して使用されるヘッダの詳細は、SourcePipelineのリクエストヘッダをご参照ください。
リクエストパスパラメータ
リクエストパスパラメータの説明は次の通りです。
フィールド | タイプ | 必須の有無 | 説明 |
---|---|---|---|
projectId |
String | Required | パイプライン ID
|
リクエスト例
リクエストのサンプルコードは次の通りです。
curl --location --request GET 'https://vpcsourcepipeline.apigw.ntruss.com/api/v1/project/2***' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'
レスポンス
レスポンス形式を説明します。
レスポンスボディ
レスポンスボディの説明は次の通りです。
フィールド | タイプ | 必須の有無 | 説明 |
---|---|---|---|
result |
Object | - | レスポンス結果 |
result.id |
Number | - | パイプライン ID |
result.name |
String | - | パイプライン名 |
result.description |
String | - | パイプラインの説明 |
result.tasks |
Array | - | タスクリスト |
result.trigger |
Object | - | トリガーの設定 |
result.trigger.repository |
Array | - | Pushトリガーの設定 |
result.trigger.schedule |
Array | - | 予約トリガーの設定 |
result.trigger.sourcepipeline |
Array | - | パイプライントリガーの設定 |
tasks
tasks
の説明は次の通りです。
フィールド | タイプ | 必須の有無 | 説明 |
---|---|---|---|
id |
Number | - | タスク ID |
name |
String | - | タスク名 |
type |
String | - | タスクタイプ
|
linkedTasks |
Array | - | 先行タスクリスト |
config |
Object | - | タスク設定 |
config.projectId |
Number | - | タスクプロジェクト ID |
config.stageId |
Number | - | デプロイステージ ID
|
config.scenarioId |
Number | - | デプロイシナリオ ID
|
config.target |
Object | - | 接続情報 |
config.target.type |
String | - | 接続タイプ
|
config.target.name |
String | - | 接続プロジェクト名
|
config.target.info |
Object | - | 詳細な接続情報 |
config.target.info.repository |
String | - | リポジトリ名
|
config.target.info.workspace |
Object | - | Bitbucketワークスペース情報
|
config.target.info.workspace.id |
String | - | Bitbucketワークスペース ID |
config.target.info.workspace.name |
String | - | Bitbucketワークスペース名 |
config.target.info.branch |
String | - | ブランチ名
|
config.target.info.authType |
String | - | Github Enterprise Serverログインタイプ
|
config.target.info.url |
String | - | Gitリポジトリ URL
|
config.target.info.serverUrl |
String | - | サーバ URL
|
config.target.info.owner |
String | - | Github Enterprise Serverの所有者
|
config.target.info.projectName |
String | - | ビルドプロジェクト名
|
config.target.info.file |
String | - | Object Storage内のファイルの保存場所
|
config.target.info.storageType |
String | - | マニフェストファイルの保存場所
|
config.target.info.repository |
String | - | マニフェストファイルの保存先のリポジトリ
|
config.target.info.branch |
String | - | マニフェストファイルの保存先のリポジトリのブランチ
|
config.target.info.manifest |
String | - | マニフェストファイル
|
config.target.info.fullManifest |
String | - | マニフェストファイルリスト
|
repository
repository
の説明は次の通りです。
フィールド | タイプ | 必須の有無 | 説明 |
---|---|---|---|
type |
String | - | リポジトリの種類
|
name |
String | - | リポジトリ名 |
branch |
String | - | ブランチ名 |
schedule
schedule
の説明は次の通りです。
フィールド | タイプ | 必須の有無 | 説明 |
---|---|---|---|
day |
Array | - | 予約実行曜日リスト
|
time |
String | - | 予約実行時間 |
timeZone |
String | - | 予約トリガーのタイムゾーン |
scheduleOnlyWithChange |
Boolean | - | SourceCommit、SourcePipeline変更時、実行するかどうか
|
sourcepipeline
sourcepipeline
の説明は次の通りです。
フィールド | タイプ | 必須の有無 | 説明 |
---|---|---|---|
id |
Number | - | パイプライン ID |
name |
String | - | パイプライン名 |
レスポンスステータスコード
SourcePipeline APIで共通して使用されるレスポンスステータスコードの詳細は、SourcePipelineのレスポンスステータスコードをご参照ください。
レスポンス例
レスポンスのサンプルコードは次の通りです。
{
"result": {
"id": 2***,
"name": "pipeline1",
"description": "pipeline 1",
"tasks": [
{
"id": 6***,
"name": "task-build",
"type": "SourceBuild",
"linkedTasks": [],
"config": {
"projectId": 20***,
"target": {
"type": "SourceCommit",
"name": "build1",
"info": {
"repository": "rep1",
"branch": "master"
}
}
}
},
{
"id": 6***,
"name": "task-deploy",
"type": "SourceDeploy",
"linkedTasks": [
"task-build"
],
"config": {
"projectId": 2***,
"stageId": 3***,
"scenarioId": 2***,
"target": {
"type": "SourceBuild",
"info": {
"projectName": "build1"
}
}
}
}
],
"trigger": {
"repository": [
{
"type": "sourcecommit",
"name": "rep1",
"branch": "master"
}
],
"schedule": [],
"sourcepipeline": []
}
}
}