Testlogstoreendpoint - Test Log Store Endpoint Details For Run
为运行创建空文件,并获取文件的 Sas URI
POST https://vstmr.dev.azure.com/{organization}/{project}/_apis/testresults/runs/{runId}/testlogstoreendpoint?testLogStoreOperationType=read&api-version=7.1-preview.1
POST https://vstmr.dev.azure.com/{organization}/{project}/_apis/testresults/runs/{runId}/testlogstoreendpoint?testLogStoreOperationType=read&filePath={filePath}&type=generalAttachment&api-version=7.1-preview.1
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
organization
|
path | True |
string |
Azure DevOps 组织的名称。 |
project
|
path | True |
string |
项目 ID 或项目名称 |
run
|
path | True |
integer int32 |
用于获取终结点详细信息的运行 ID |
api-version
|
query | True |
string |
要使用的 API 版本。 这应设置为“7.1-preview.1”才能使用此版本的 API。 |
test
|
query | True |
使用 sas uri 执行的操作类型 |
|
file
|
query |
string |
用于创建空文件的文件路径 |
|
type
|
query |
默认值为 GeneralAttachment,这是要创建的空文件的类型 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
成功的操作 |
安全性
oauth2
类型:
oauth2
流向:
accessCode
授权 URL:
https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
令牌 URL:
https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
作用域
名称 | 说明 |
---|---|
vso.test_write | 授予读取、创建和更新测试计划、事例、结果和其他测试管理相关项目的能力。 |
示例
Post file endpoint details
示例请求
POST https://vstmr.dev.azure.com/fabrikam/Fabrikam/_apis/testresults/runs/1/testlogstoreendpoint?testLogStoreOperationType=read&filePath=textAsFileAttachment.txt&type=generalAttachment&api-version=7.1-preview.1
示例响应
{
"status": "success",
"endpointSASUri": "https://test.blob.core.windows.net/612bc82b-ebb5-431b-9992-0c1fd88e1c8b-1-runid-1/GeneralAttachment/textAsFileAttachment.txt",
"endpointType": "file"
}
定义
名称 | 说明 |
---|---|
Test |
测试日志存储状态代码 |
Test |
表示测试日志存储终结点详细信息。 |
Test |
测试日志存储终结点类型。 |
Test |
使用 sas uri 执行的操作类型 |
Test |
日志类型 |
TestLogStatusCode
测试日志存储状态代码
值 | 说明 |
---|---|
apiNotSupported |
不支持 Api |
buildDoesNotExist |
请求其操作的生成不存在 |
containerNotCreated |
无法创建容器 |
containerNotFound |
找不到为其请求操作的容器 |
directoryNotFound |
找不到目录 |
failed |
操作失败 |
featureDisabled |
TestLogStore 功能未启用 |
fileAlreadyExists |
由于文件已存在,操作失败 |
fileNotFound |
找不到文件 |
fileSizeExceeds |
文件大小大于限制 |
invalidContainer |
在容器上操作时出错 |
invalidFileName |
用户提供的文件名无效 |
invalidInput |
用户提供的输入无效 |
runDoesNotExist |
请求其操作的运行不存在 |
storageCapacityExceeded |
超出存储容量 |
success |
操作成功 |
transferFailed |
Blob 传输错误 |
TestLogStoreEndpointDetails
表示测试日志存储终结点详细信息。
名称 | 类型 | 说明 |
---|---|---|
endpointSASUri |
string |
测试日志存储连接 URI。 |
endpointType |
测试日志存储终结点类型。 |
|
status |
测试日志存储状态代码 |
TestLogStoreEndpointType
测试日志存储终结点类型。
值 | 说明 |
---|---|
file |
终结点类型的范围限定为文件 |
root |
终结点类型的范围限定为根 |
TestLogStoreOperationType
使用 sas uri 执行的操作类型
值 | 说明 |
---|---|
read |
操作的范围仅限于读取数据。 |
TestLogType
日志类型
值 | 说明 |
---|---|
generalAttachment |
任何老式附件。 |