有奖捉虫:云通信与企业服务文档专题,速来> HOT

简介

本文档提供关于搜索工作流的 API 概览和 SDK 示例代码。
API
操作描述
用于搜索工作流

搜索工作流

功能说明

用于搜索工作流。

方法原型

public Guzzle\\Service\\Resource\\Model describeWorkflow(array $args = array());

请求示例

<?php

require dirname(__FILE__) . '/../vendor/autoload.php';

$secretId = "SECRETID"; //替换为用户的 secretId,请登录访问管理控制台进行查看和管理,https://console.cloud.tencent.com/cam/capi
$secretKey = "SECRETKEY"; //替换为用户的 secretKey,请登录访问管理控制台进行查看和管理,https://console.cloud.tencent.com/cam/capi
$region = "ap-beijing"; //替换为用户的 region,已创建桶归属的region可以在控制台查看,https://console.cloud.tencent.com/cos5/bucket
$cosClient = new Qcloud\\Cos\\Client(
array(
'region' => $region,
'scheme' => 'https', //协议头部,默认为http
'credentials'=> array(
'secretId' => $secretId ,
'secretKey' => $secretKey)));
try {
// https://cloud.tencent.com/document/product/436/53991 搜索工作流
$result = $cosClient->describeWorkflow(array(
'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket
// 'Ids' => '',
// 'Name' => '',
// 'PageNumber' => '',
// 'PageSize' => '',
));
// 请求成功
print_r($result);
} catch (\\Exception $e) {
// 请求失败
echo($e);
}

参数说明

Request 中的具体数据描述如下:
参数名称(关键字)
描述
类型
是否必选
Ids
工作流 ID,以,符号分割字符串。
string
Name
工作流名称。
string
PageNumber
第几页。
string
PageSize
每页个数。
string

返回结果示例

GuzzleHttp\\Command\\Result Object
(
[RequestId] => NjJhOTU0MWZfZmNjYTADUSIANDllNGI=
[ContentType] => application/xml
[ContentLength] => 2022
[TotalCount] => 1
[PageNumber] => 1
[PageSize] => 10
[MediaWorkflowList] => Array
(
[0] => Array
(
[BucketId] => examplebucket-125000000
[CreateTime] => 2022-05-24T15:54:35+0800
[Name] => workflow-1
[State] => Paused
[Topology] => Array
(
[Dependencies] => Array
(
[PicProcess_165337887999] => End
[Start] => PicProcess_165337887999
)

[Nodes] => Array
(
[PicProcess_1653378870999] => Array
(
[Operation] => Array
(
[IsTerminal] => false
[Output] => Array
(
[AuObject] =>
[Bucket] => examplebucket-125000000
[Object] => ${InputPath}${InputName}_${RunId}.${ext}
[Region] => ap-guangzhou
[SpriteObject] =>
)

[TemplateId] => t16as98d0asdf76c8d9asd789ad78a09
[TranscodeTemplateId] =>
[WatermarkTemplateId] =>
)

[Type] => PicProcess
)

[Start] => Array
(
[Input] => Array
(
[ExtFilter] => Array
(
[AllFile] => false
[Audio] => false
[ContentType] => false
[Custom] => false
[CustomExts] =>
[Image] => true
[State] => On
[Video] => false
)

[NotifyConfig] => Array
(
[Event] => TaskFinish,WorkflowFinish
[ResultFormat] => JSON
[State] => On
[Type] => Url
[Url] => http://www.xxx.com/xxx
)

[ObjectPrefix] => /workflow/
[PicProcessQueueId] => pcf4d6d9d0b8as09d88a09d06ad0
[QueueId] => p81eaee496885707d8a09s8de086
)

[Type] => Start
)

)

)

[UpdateTime] => 2022-05-24T15:54:35+0800
[WorkflowId] => w9938eas908d0a98d090as8d09abdd
[type] => 0
[ver] =>

)

)

[Bucket] => examplebucket-125000000
[Location] => examplebucket-125000000.ci.ap-guangzhou.myqcloud.com/workflow
)