バージョン管理システム

TDV リソースで実行できる VCS オペレーションは次のとおりです。

GET /branches
GET /branches/{name}
POST /checkin/{name}
GET /connection
GET /connection
GET /content/{name}
POST /discard/{name}
GET /enable
POST /fetch/{name}
GET /history/{name}
GET /latestcontent/{name}
GET /localcontent/{name}
GET /root
GET /root/{name}
POST /root/{name}
DELETE /root/{name}
POST /setCredential/{name}
GET /status/{name}
GET /vcsAdapter/{adapter_name}
GET /vcsAdapters
POST /vcsInstance
GET /vcsInstance/{name}
PUT /vcsInstance/{name}
DELETE /vcsInstance/{name}
GET /vcsInstances

GET /branches

この API は、VCS アダプター名とリモート VCSURL でブランチを取得するために使用されます。GIT 専用です

パラメーター:

名前

説明

パラメーター タイプ

データ タイプ

adapterName

アダプターの名前

query

string

url

 

header

string

user

 

header

string

password

 

header

string

base64Cer

これは、SSL 証明書をサポートする githttps で使用されるオプションのパラメーターです。

他の使用法の場合、これは Null にすることができます。

query

string

VCS アダプター名とリモート VCSURL でブランチを取得する例。

curl -X GET -u admin:admin  "http://localhost:9400/rest/vcs/v1/branches?adaptername={adapterName}&base64Cer={pem format certificate}"  -H "Content-Type: application/json" -H "user: {user}" -H "password: {password}" -H "url: {url}"

GET /branches/{name}

この API は、VCS インスタンス名でブランチを取得するために使用されます。GIT 専用です。

パラメーター:

名前

説明

パラメーター タイプ

データ タイプ

名前

 

path

string

VCS インスタンス名でブランチを取得する例

curl -X GET -u admin:admin  "http://localhost:9400/rest/vcs/v1/branches/{vcsInstanceName}"  -H "Content-Type: application/json"  

POST /checkin/{name}

この API は、リソースを vcs にチェック・インするために使用されます。

パラメーター:

名前

説明

パラメーター タイプ

データ タイプ

名前

 

path

string

body

 

body

Model schema

リクエスト本文

Value 例 - スキーマ

{
“createdResources”:[
{
“resourcePath”: “string”,
“type”: “string”
}
],
“deletedResources”:[
{
“resourcePath”: “string”,
“type”: “string”
}
],
“updatedResources”:[
{
“resourcePath”: “string”,
“type”: “string”
}
],
“comment”: "string",
“email”: “string”,
“committerFullName”: “string”
}

チェック・インの例

curl -X POST -u admin:admin --cookie "session9400={sessionToken}" "http://localhost:9400/rest/vcs/v1/checkin/{vcsInstanceName}}" -H "Content-Type: application/json"  -d '{"comment": "my comment", "createdResources":[{"resourcePath":"/users/composite/admin/abc/foo", "type":"PROCEDURE"}], "updatedResources":[{"resourcePath":"/users/composite/admin/abc/bar", "type":"PROCEDURE"}], "deletedResources":[{"resourcePath":"/users/composite/admin/abc/kay", "type":"PROCEDURE"}]}'  

GET /connection

この API は、vcsAdapter の名前、URL、ユーザー名、パスワードによる接続をテストするために使用されます。

パラメーター:

名前

説明

パラメーター タイプ

データ タイプ

adapterName

アダプターの名前

query

string

url

 

header

string

user

 

header

string

password

 

header

string

base64Cer

これは、SSL 証明書をサポートする githttps で使用されるオプションのパラメーターです。

他の使用法の場合、これは Null にすることができます。

query

string

vcsAdapter 名、URL、ユーザー名、パスワードで接続をテストする例

curl -X GET -u admin:admin  "http://localhost:9400/rest/vcs/v1/connection?adapterName=svnAdapter&base64Cer={pem format certificate}"  -H "Content-Type: application/json" -H "url:svn://172.23.5.76:3690" -H "user:svnuser1" -H "password:foa23f9u"

GET /connection

この API は、vcsurl 接続を確認するために使用されます。

パラメーター:

名前

説明

パラメーター タイプ

データ タイプ

名前

 

path

string

vcsurl 接続を確認する例

curl -X GET -u admin:admin  "http://localhost:9400/rest/vcs/v1/connection/{vcsInstanceName}" -H "Content-Type: application/json"

GET /content/{name}

この API は、特別なリソースの cmf コンテンツと特別な vcsInstance のリビジョンを取得するために使用されます。

パラメーター:

名前

説明

パラメーター タイプ

データ タイプ

名前

 

path

string

resourceType

 

query

string

resourcePath

 

query

string

リビジョン

 

query

string

特別なリソースの cmf コンテンツと特別な vcsInstance のリビジョンを取得する例。

curl -X GET -u admin:admin --cookie "session9400={sessionToken}"  "http://localhost:9400/rest/vcs/v1/content/{vcsInstanceName}?resourcePath=/users/composite/admin/abc/LookupProduct&resourceType=PROCEDURE&revision=r109"  -H "Content-Type: application/json"

POST /discard/{name}

この API は、特別なリソースのローカル変更を破棄し、最新のリビジョンを取得するために使用されます。

パラメーター:

名前

説明

パラメーター タイプ

データ タイプ

名前

 

path

string

includePrivileges

 

query

boolean

body

 

body

Model schema

リクエスト本文

Value 例 - スキーマ

{
“ resources”:[
{
“ resourcePath”:“ string”、
“ type”:“ string”
}
]
}

ローカル変更をダイカードする例

curl -X POST -u admin:admin --cookie "session9400={sessionToken}" "http://localhost:9400/rest/vcs/v1/discard/{vcsInstanceName}?includePrivileges=true"  -H "Content-Type: application/json"  -d '{"resources":[{"resourcePath":"/users/composite/admin/def/LookupProduct", "type":"PROCEDURE"}]}'

GET /enable

この API は、vcs 機能が有効になっているかどうかを確認するために使用されます。

パラメーター:

なし

vcs 機能が有効になっているかどうかを確認する例

curl -X GET  -u admin:admin  "http://localhost:9400/rest/vcs/v1/enable"  -H "Content-Type: application/json"

POST /fetch/{name}

この API は、特定のリビジョンからリソース サブツリーをフェッチするために使用されます。単一のリソース (フォルダーまたはファイル) の場合、リソースのパスとタイプを指定する必要があります。vcs 接続全体のフェッチの場合、リソース パスとタイプを null に設定する必要があります (リソース パスとタイプの値が空の場合、現在リーダーエラーが発生します)。

パラメーター:

名前

説明

パラメーター タイプ

データ タイプ

名前

 

path

string

リビジョン

 

query

string

includePrivileges

 

query

boolean

body

 

body

Model schema

リクエスト本文

Value 例 - スキーマ

{
“resourcePath”: “string”,
“type”: “string”
}

特定のリビジョンからリソース サブツリーをフェッチする例

curl -X POST -u admin:admin --cookie "session9400={sessionToken}" "http://localhost:9400/rest/vcs/v1/fetch/{vcsInstanceName}?revision=r112&includePrivileges=true" -H "Content-Type: application/json" -d”{"resourcePath":"/users/composite/admin/examples/view4", "type":"TABLE"}’  

GET /history/{name}

この API は、特別な vcsInstance の特別なリソースのヒストリー全体またはヒストリーを取得するために使用されます。

パラメーター:

名前

説明

パラメーター タイプ

データ タイプ

名前

 

path

string

resourceType

 

query

string

resourcePath

 

query

string

特別な vcsInstance の特別なリソースの全ヒストリーまたはヒストリーを取得する例

curl -X GET -u admin:admin --cookie "session9400={sessionToken}" "http://localhost:9400/rest/vcs/v1/history/{vcsInstnace}[?resourcePath=/users/composite/admin/abc/LookupProduct&resourceType=PROCEDURE]"  -H "Content-Type: application/json"

GET /latestcontent/{name}

この API は、特別な vcsInstance の特別なリソースの最新の cmf コンテンツを取得するために使用されます。

パラメーター:

名前

説明

パラメーター タイプ

データ タイプ

名前

 

path

string

resourceType

 

query

string

resourcePath

 

query

string

特別な vcsInstance の特別なリソースの最新の cmf コンテンツを取得する例。

curl -X GET -u admin:admin  "http://localhost:9400/rest/vcs/v1/latestcontent/{vcsInstanceName}?resourcePath=/users/composite/admin/abc/LookupProduct&resourceType=PROCEDURE"  -H "Content-Type: application/json"

GET /localcontent/{name}

この API は、特別な vcsInstance の特別なリソースのローカル cmf コンテンツを取得するために使用されます。

パラメーター:

名前

説明

パラメーター タイプ

データ タイプ

名前

 

path

string

resourceType

 

query

string

resourcePath

 

query

string

特別な vcsInstance の特別なリソースのローカル cmf コンテンツを取得する例。

curl -X GET -u admin:admin  "http://localhost:9400/rest/vcs/v1/localcontent/{vcsInstanceName}?resourcePath=/users/composite/admin/abc/LookupProduct&resourceType=PROCEDURE"  -H "Content-Type: application/json"

GET /root

この API は、特別なパスが vcs インスタンスのルートであるかどうかを確認するために使用されます。

パラメーター:

名前

説明

パラメーター タイプ

データ タイプ

cis_path

 

query

string

rootType

 

query

string

特別なパスが vcs インスタンスのルートであるかどうかを確認する例

curl -X GET  -u admin:admin  "http://localhost:9400/rest/vcs/v1/root?cis_path=/users/composite/admin/abc/kkkdd&rootType={type}"  -H "Content-Type: application/json"

GET /root/{name}

この API は、特別な vcs インスタンスのすべてのルートを取得するために使用されます。

パラメーター:

名前

説明

パラメーター タイプ

データ タイプ

名前

 

path

string

特別な vcs インスタンスのすべてのルートを取得する例

curl -X GET  -u admin:admin  "http://localhost:9400/rest/vcs/v1/root/{vcsInstanceName}}" -H "Content-Type: application/json"

POST /root/{name}

この API は、特別な vcs インスタンスのルートを追加するために使用されます。

パラメーター:

名前

説明

パラメーター タイプ

データ タイプ

名前

 

path

string

モード

 

query

string

rootType

 

query

string

includePriveleges

 

query

boolean

body

 

body

string

特別な vcs インスタンスのルートを追加する例

curl -X POST -u admin:admin  --cookie "session9400={sessionToken}"  "http://localhost:9400/rest/vcs/v1/root/{vcsInstanceName}?mode={push/pull}&includePrivileges=true&rootType={type}"  -H "Content-Type: application/json" -d "/users/composite/admin/gitabc"

DELETE /root/{name}

この API は、特別な vcs インスタンスからルートを削除するために使用されます。

パラメーター:

名前

説明

パラメーター タイプ

データ タイプ

名前

 

path

string

cis_path

 

query

string

rootType

 

query

string

特別な vcs インスタンスからルートを削除する例

curl -X DELETE -u admin:admin  "http://localhost:9400/rest/vcs/v1/root/{vcsInstanceName}?cis_path=/users/composite/admin/abc&rootType={type}"  -H "Content-Type: application/json"

POST /setCredential/{name}

この API は、vcs インスタンスの資格情報を設定するために使用されます。

パラメーター:

名前

説明

パラメーター タイプ

データ タイプ

名前

 

path

string

body

 

body

Model schema

リクエスト本文

Value 例 - スキーマ

{
“username”: “string”,
“password”: “string”
}

資格情報を設定する例

curl -X POST -u admin:admin --cookie "session9400={sessionToken}" "http://localhost:9400/rest/vcs/v1/setCredential/{vcsInstanceName}}" -H "Content-Type: application/json" -d '{"username":"gituser2", "password":"foa23f9u"}'

GET /status/{name}

この API は、特別な vcs インスタンスのリソース ステータスを取得するために使用されます。

パラメーター:

名前

説明

パラメーター タイプ

データ タイプ

名前

 

path

string

特別な vcs インスタンスのリソース ステータスを取得する例

curl -X GET -u admin:admin  "http://localhost:9400/rest/vcs/v1/status/{vcsInstanceName}}" -H "Content-Type: application/json"

GET /vcsAdapter/{adapter_name}

この API は、アダプター名で VCS アダプターを取得するために使用されます。

パラメーター:

名前

説明

パラメーター タイプ

データ タイプ

adapterName

アダプターの名前

path

string

アダプター名で VCS アダプターを取得する例

curl -X GET -u admin:admin "http://localhost:9400/rest/vcs/v1/vcsAdapter/{adapterName}"  -H "Content-Type: application/json"  

GET /vcsAdapters

この API は、VCS アダプターを取得するために使用されます。

パラメーター:

なし

VCS アダプターを入手する例

curl -X GET -u admin:admin "http://localhost:9400/rest/vcs/v1/vcsAdapters"  -H "Content-Type: application/json"  

POST /vcsInstance

この API は、vcs インスタンスを作成するために使用されます。

パラメーター:

なし

リクエスト本文

Value 例 - スキーマ

{
“cmdCheckIn”: “string”,
“cmdCheckOut: “string”,
“cmdAdd”: “string”,
“cmdRemove”: “string”,
“cmdRevert”: “string”,
“cmdStatus”: “string”,
“cmdDiff”: “string”,
“name”: “string,
“description”: “string”,
“providerId”: “string”,
“repository”: “string”,
“localWorkspace”: “string”,
“encryptionPassword”, “string”,
“branch”, “string”,
“ignoreEncryption”: “string”,
“base64Cer”: “string”,
“cmdHistory”: “string”
}

vcs インスタンスを作成する例

curl  -X POST -u admin:admin "http://localhost:9400/rest/vcs/v1/vcsInstance"  -H "Content-Type: application/json" -d '{"name":"vcssource1", "description": "dd", "providerId":"svnAdapter", "repository": "svn://172.23.5.76:3690/project6",  "branch":"master", "encryptionPassword":"testPassword", "base64Cer":"Pem format certificate" }'

GET /vcsInstance/{name}

この API は、vcs インスタンスを名前で取得するために使用されます。

パラメーター:

名前

説明

パラメーター タイプ

データ タイプ

名前

 

path

string

名前で vcs インスタンスを取得する例

curl -X GET -u admin:admin  "http://localhost:9400/rest/vcs/v1/vcsInstance/{vcsInstanceName}"  -H "Content-Type: application/json"

PUT /vcsInstance/{name}

この API は、vcs インスタンスを更新するために使用されます。

パラメーター:

名前

説明

パラメーター タイプ

データ タイプ

名前

 

path

string

リクエスト本文

Value 例 - スキーマ

{
“cmdCheckIn”: “string”,
“cmdCheckOut: “string”,
“cmdAdd”: “string”,
“cmdRemove”: “string”,
“cmdRevert”: “string”,
“cmdStatus”: “string”,
“cmdDiff”: “string”,
“name”: “string,
“description”: “string”,
“providerId”: “string”,
“repository”: “string”,
“localWorkspace”: “string”,
“encryptionPassword”, “string”,
“branch”, “string”,
“ignoreEncryption”: “string”,
“base64Cer”: “string”,
“cmdHistory”: “string”
}

vcs インスタンスを更新する例

curl -X PUT -u admin:admin  "http://localhost:9400/rest/vcs/v1/vcsInstance/{vcsInstanceName}" -H "Content-Type: application/json" -d '{"description": "dddddd", "providerId":"svnAdapter", "repository": "svn://172.23.5.76:3690", "branch":"master", "encryptionPassword":"testPassword", "base64Cer":"Pem format certificate" }'

DELETE /vcsInstance/{name}

この API は、vcs インスタンスを削除するために使用されます。

パラメーター:

名前

説明

パラメーター タイプ

データ タイプ

名前

 

path

string

vcs インスタンスを削除する例

curl -X DELETE -u admin:admin  "http://localhost:9400/rest/vcs/v1/vcsInstance/{vcsInstanceName}"  -H "Content-Type: application/json"

GET /vcsInstances

この API は、すべての vcs インスタンスを取得するために使用されます。

パラメーター:

なし

すべての vcs インスタンスを取得する例

curl -X GET -u admin:admin  "http://localhost:9400/rest/vcs/v1/vcsInstances"  -H "Content-Type: application/json"