orchestrator
2024.10
true
UiPath logo, featuring letters U and I in white
Guia da API do Orchestrator
Automation CloudAutomation Cloud Public SectorAutomation SuiteStandalone
Last updated 21 de out de 2024

Solicitações de webhooks

Recuperando webhooks

De acordo com a URL deles

O exemplo a seguir permite obter todos os webhooks que enviam informações para a URL http://documentation.azurewebsites.net/webhook/documentation .

Obter

https://{yourDomain}/odata/Webhooks?$filter=Url eq 'http://documentation.azurewebsites.net/webhook/documentation'

Cabeçalhos de solicitação.

Chave

Valor

Autorização

O portador

Código de resposta

200 OK

Corpo da Resposta

{
    "@odata.context": "https://{yourDomain}/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}/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"
            }
        ]
    }]
}

De acordo com um Id

A solicitação a seguir permite que você recupere informações sobre um webhook específico, de acordo com seu Id.

Obter

https://{yourDomain}/odata/Webhooks(10)

Cabeçalhos de solicitação.

Chave

Valor

Autorização

O portador

Código de resposta

200 OK

Corpo da Resposta

{
  "@odata.context": "https://{yourDomain}/odata/$metadata#Webhooks/$entity",
  "Url": "https://orchestrator.uipath.com",
  "Enabled": false,
  "Secret": "1234567890",
  "SubscribeToAllEvents": true,
  "AllowInsecureSsl": false,
  "Id": 10,
  "Events": []
}{
  "@odata.context": "https://{yourDomain}/odata/$metadata#Webhooks/$entity",
  "Url": "https://orchestrator.uipath.com",
  "Enabled": false,
  "Secret": "1234567890",
  "SubscribeToAllEvents": true,
  "AllowInsecureSsl": false,
  "Id": 10,
  "Events": []
}

Recuperando todos os tipos de eventos disponíveis

O exemplo abaixo permite que você recupere todos os tipos de eventos que podem ser assinados no Orchestrator.

Obter

https://{yourDomain}/odata/Webhooks/UiPath.Server.Configuration.OData.GetEventTypes()

Cabeçalhos de solicitação.

Chave

Valor

Autorização

O portador

Código de resposta

200 OK

Corpo da Resposta

{
    "@odata.context": "https://{yourDomain}/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}/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"
        }
    ]
}

Edição de um webhook

O exemplo abaixo altera o estado Url, Enabled , Secret, AllowInsecureSsle o Events ao qual o webhook com 10 Id está inscrito.

COLOCAR

https://{yourDomain}/odata/Webhooks(10)

Cabeçalhos de solicitação.

Chave

Valor

Autorização

O portador

Corpo da Solicitação

{
    "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"
        }
    ]
}

Código de resposta

200 OK

Corpo da Resposta

{
    "@odata.context": "https://{yourDomain}/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}/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"
        }
    ]
}

Testando o URL de destino do webhook

A solicitação a seguir permite que você teste o URL de destino e, se for bem-sucedido, retornará um tipo de evento ping , seu Id, TenantId, OrganizationUnitIde UserId.

Postar

https://{yourDomain}/odata/Webhooks(11)/UiPath.Server.Configuration.OData.Ping

Cabeçalhos de solicitação.

Chave

Valor

Autorização

O portador

Código de resposta

200 OK

Corpo da Resposta

{
  "@odata.context": "https://{yourDomain}/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}/odata/$metadata#UiPath.Webhooks.Dto.PingEventDto",
  "Type": "ping",
  "EventId": "c3319a2d83c44b2f989bdd7eba1f0297",
  "Timestamp": "2018-11-19T14:32:47.6024779Z",
  "TenantId": 57,
  "OrganizationUnitId": null,
  "UserId": 583
}

Esta página foi útil?

Obtenha a ajuda que você precisa
Aprendendo RPA - Cursos de automação
Fórum da comunidade da Uipath
Uipath Logo White
Confiança e segurança
© 2005-2024 UiPath. Todos os direitos reservados.