orchestrator
2024.10
true
Webhook 请求
Orchestrator API 指南
Last updated 2024年11月11日
Webhook 请求
以下示例使您能够获取将信息发送到
http://documentation.azurewebsites.net/webhook/documentation
URL 的所有 Webhook。
获取
https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/Webhooks?$filter=Url eq 'http://documentation.azurewebsites.net/webhook/documentation'
请求标头
密钥 |
值 |
---|---|
授权 |
承载 |
响应代码
200 OK
响应正文
{
"@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Webhooks",
"@odata.count": 1,
"value": [{
"Url": "http://documentation.azurewebsites.net/webhook/documentation",
"Enabled": true,
"Secret": "1234567890",
"SubscribeToAllEvents": false,
"AllowInsecureSsl": false,
"Id": 4,
"Events": [{
"EventType": "job.started"
},
{
"EventType": "process.created"
},
{
"EventType": "process.deleted"
},
{
"EventType": "process.updated"
},
{
"EventType": "queue.created"
}
]
}]
}
{
"@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Webhooks",
"@odata.count": 1,
"value": [{
"Url": "http://documentation.azurewebsites.net/webhook/documentation",
"Enabled": true,
"Secret": "1234567890",
"SubscribeToAllEvents": false,
"AllowInsecureSsl": false,
"Id": 4,
"Events": [{
"EventType": "job.started"
},
{
"EventType": "process.created"
},
{
"EventType": "process.deleted"
},
{
"EventType": "process.updated"
},
{
"EventType": "queue.created"
}
]
}]
}
以下请求使您能够根据其
Id
检索有关特定 Webhook 的信息。
获取
https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/Webhooks(10)
请求标头
密钥 |
值 |
---|---|
授权 |
承载 |
响应代码
200 OK
响应正文
{
"@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Webhooks/$entity",
"Url": "https://orchestrator.uipath.com",
"Enabled": false,
"Secret": "1234567890",
"SubscribeToAllEvents": true,
"AllowInsecureSsl": false,
"Id": 10,
"Events": []
}
{
"@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Webhooks/$entity",
"Url": "https://orchestrator.uipath.com",
"Enabled": false,
"Secret": "1234567890",
"SubscribeToAllEvents": true,
"AllowInsecureSsl": false,
"Id": 10,
"Events": []
}
下面的示例使您能够检索可以在 Orchestrator 中订阅的所有事件类型。
获取
https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/Webhooks/UiPath.Server.Configuration.OData.GetEventTypes()
{
"@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Collection(UiPath.Application.Dto.Webhooks.WebhookEventTypeDto)",
"value": [
{
"Name": "process.created",
"Group": "process"
},
{
"Name": "process.updated",
"Group": "process"
},
{
"Name": "process.deleted",
"Group": "process"
},
{
"Name": "schedule.failed",
"Group": "schedule"
},
{
"Name": "robot.status",
"Group": "robot"
},
{
"Name": "job.started",
"Group": "job"
},
{
"Name": "job.completed",
"Group": "job"
},
{
"Name": "job.faulted",
"Group": "job"
},
{
"Name": "job.stopped",
"Group": "job"
},
{
"Name": "job.created",
"Group": "job"
},
{
"Name": "queue.created",
"Group": "queue"
},
{
"Name": "queue.updated",
"Group": "queue"
},
{
"Name": "queue.deleted",
"Group": "queue"
},
{
"Name": "queueItem.added",
"Group": "queueItem"
},
{
"Name": "queueItem.transactionStarted",
"Group": "queueItem"
},
{
"Name": "queueItem.transactionFailed",
"Group": "queueItem"
},
{
"Name": "queueItem.transactionCompleted",
"Group": "queueItem"
},
{
"Name": "queueItem.transactionAbandoned",
"Group": "queueItem"
},
{
"Name": "robot.created",
"Group": "robot"
},
{
"Name": "robot.updated",
"Group": "robot"
},
{
"Name": "robot.deleted",
"Group": "robot"
}
]
}
{
"@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Collection(UiPath.Application.Dto.Webhooks.WebhookEventTypeDto)",
"value": [
{
"Name": "process.created",
"Group": "process"
},
{
"Name": "process.updated",
"Group": "process"
},
{
"Name": "process.deleted",
"Group": "process"
},
{
"Name": "schedule.failed",
"Group": "schedule"
},
{
"Name": "robot.status",
"Group": "robot"
},
{
"Name": "job.started",
"Group": "job"
},
{
"Name": "job.completed",
"Group": "job"
},
{
"Name": "job.faulted",
"Group": "job"
},
{
"Name": "job.stopped",
"Group": "job"
},
{
"Name": "job.created",
"Group": "job"
},
{
"Name": "queue.created",
"Group": "queue"
},
{
"Name": "queue.updated",
"Group": "queue"
},
{
"Name": "queue.deleted",
"Group": "queue"
},
{
"Name": "queueItem.added",
"Group": "queueItem"
},
{
"Name": "queueItem.transactionStarted",
"Group": "queueItem"
},
{
"Name": "queueItem.transactionFailed",
"Group": "queueItem"
},
{
"Name": "queueItem.transactionCompleted",
"Group": "queueItem"
},
{
"Name": "queueItem.transactionAbandoned",
"Group": "queueItem"
},
{
"Name": "robot.created",
"Group": "robot"
},
{
"Name": "robot.updated",
"Group": "robot"
},
{
"Name": "robot.deleted",
"Group": "robot"
}
]
}
以下示例更改了
Url
、 Enabled
状态、 Secret
和 AllowInsecureSsl
,以及订阅了 10 个 Id
的 Webhook 的 Events
。
放置
https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/Webhooks(10)
{
"Url": "https://orchestrator.uipath.com/reference",
"Enabled": false,
"Secret": "This is a new secret.",
"AllowInsecureSsl": true,
"Events": [{
"EventType": "process.created"
},
{
"EventType": "queue.created"
},
{
"EventType": "robot.deleted"
}
]
}
{
"Url": "https://orchestrator.uipath.com/reference",
"Enabled": false,
"Secret": "This is a new secret.",
"AllowInsecureSsl": true,
"Events": [{
"EventType": "process.created"
},
{
"EventType": "queue.created"
},
{
"EventType": "robot.deleted"
}
]
}
{
"@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Webhooks/$entity",
"Url": "https://orchestrator.uipath.com/reference",
"Enabled": false,
"Secret": "This is a new secret.",
"SubscribeToAllEvents": false,
"AllowInsecureSsl": true,
"Id": 10,
"Events": [
{
"EventType": "process.created"
},
{
"EventType": "queue.created"
},
{
"EventType": "robot.deleted"
}
]
}
{
"@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Webhooks/$entity",
"Url": "https://orchestrator.uipath.com/reference",
"Enabled": false,
"Secret": "This is a new secret.",
"SubscribeToAllEvents": false,
"AllowInsecureSsl": true,
"Id": 10,
"Events": [
{
"EventType": "process.created"
},
{
"EventType": "queue.created"
},
{
"EventType": "robot.deleted"
}
]
}
以下请求使您能够测试目标 URL,如果成功,则返回
ping
类型的事件、其 ID、 TenantId
、 OrganizationUnitId
和 UserId
。
发布
https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/Webhooks(11)/UiPath.Server.Configuration.OData.Ping
{
"@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#UiPath.Webhooks.Dto.PingEventDto",
"Type": "ping",
"EventId": "c3319a2d83c44b2f989bdd7eba1f0297",
"Timestamp": "2018-11-19T14:32:47.6024779Z",
"TenantId": 57,
"OrganizationUnitId": null,
"UserId": 583
}
{
"@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#UiPath.Webhooks.Dto.PingEventDto",
"Type": "ping",
"EventId": "c3319a2d83c44b2f989bdd7eba1f0297",
"Timestamp": "2018-11-19T14:32:47.6024779Z",
"TenantId": 57,
"OrganizationUnitId": null,
"UserId": 583
}