UiPath Documentation
orchestrator
2020.10
false
Guia da API do Orchestrator
Importante :
A tradução automática foi aplicada parcialmente neste conteúdo. A localização de um conteúdo recém-publicado pode levar de 1 a 2 semanas para ficar disponível.

Autenticando

O sistema de autenticação para a API UiPath Orchestrator usa um token de portador para usuários locais e autenticação NTLM para usuários de diretório.

Observação:

By default, the bearer token expires after 30 minutes.

Importante:

As instruções nesta página se aplicam apenas à API do Orchestrator local. A autenticação básica para API não tem suporte para tenants do Orchestrator do Automation Cloud.

If you are using the Orchestrator service in Automation Cloud, use the instructions in Consuming Cloud API instead.

Autenticação de usuário local por meio de um token de portador

  1. Make a POST request to the {OrchestratorURL}/api/account/authenticate endpoint with your Orchestrator login credentials, as in the example below.

    POST {OrchestratorURL}/api/account/authenticate

    Request headers:

    ChaveValor
    AutorizaçãoO portador

    Request body:

    {
        "tenancyName" : "Documentation",
        "usernameOrEmailAddress" : "Documentation",
        "password" : "DocumentationAPItest"
    }
    {
        "tenancyName" : "Documentation",
        "usernameOrEmailAddress" : "Documentation",
        "password" : "DocumentationAPItest"
    }
    

    Response code: 200 OK

    Response body:

    {
        "result": "<BEARER_TOKEN>",
        "targetUrl": null,
        "success": true,
        "error": null,
        "unAuthorizedRequest": false,
        "__abp": true
    }
    {
        "result": "<BEARER_TOKEN>",
        "targetUrl": null,
        "success": true,
        "error": null,
        "unAuthorizedRequest": false,
        "__abp": true
    }
    
  2. Copie a string no parâmetro de resultado da resposta HTTP para a área de transferência. Isso representa o token do portador e pode ser usado em todas as solicitações futuras da seguinte maneira:

    • As an Authorization header with the Bearer xxxxxxxxxxxxx value, where xxxxxxxxxxxxx represents the string previously copied;
    • Se sua ferramenta de teste de API for compatível, selecione o tipo de autorização de token de portador e insira a sequência copiada anteriormente.

Autenticação de usuário de domínio via autenticação NTLM

Importante:

To authenticate your requests using Windows credentials you need to use an API client that supports NTLM authentication, such as Postman.

  1. Make a request to the desired endpoint specifying your Windows credentials in the dedicated API client. To change an NTLM auth header in Postman, navigate to the Auth tab, set the Type to NTLM Authentication, and fill in the Username and Password fields.

  2. Se o usuário existir em vários locatários, especifique o exato usando o cabeçalho X-UIPATH-TenantName , caso contrário, a solicitação será executada no primeiro locatário em que o usuário foi provisionado. O exemplo a seguir ilustra uma solicitação GET para o ponto de extremidade {OrchestratorURL}/odata/Processes no locatário financeiro.

    OBTER {OrchestratorURL}/odata/Processes

    Request headers:

    ChaveValor
    AutorizaçãoO portador
    X-UIPATH-TenantNameO nome do inquilino.

    Por exemplo, "Finanças".

    Response code: 200 OK

    Response body:

    {
        "@odata.context": "{OrchestratorURL}/odata/$metadata#Processes",
        "@odata.count": 2,
        "value": [
            {
                "IsActive": false,
                "SupportsMultipleEntryPoints": false,
                "RequiresUserInteraction": true,
                "Title": null,
                "Version": "1.0.6981.35861",
                "Key": "QueueItemsProcessing:1.0.6981.35861",
                "Description": "Process items from an Orchestrator queue.",
                "Published": "2020-10-17T14:22:11.0566667Z",
                "IsLatestVersion": false,
                "OldVersion": null,
                "ReleaseNotes": null,
                "Authors": "petrina.smith",
                "ProjectType": "Undefined",
                "Id": "QueueItemsProcessing",
                "Arguments": {
                    "Input": "[{\"name\":\"argument1\",\"type\":\"System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":true},{\"name\":\"argument2\",\"type\":\"System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":false},{\"name\":\"argument3\",\"type\":\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":true}]",
                    "Output": null
                }
            },
            {
                "IsActive": false,
                "SupportsMultipleEntryPoints": false,
                "RequiresUserInteraction": false,
                "Title": "TestingSequence",
                "Version": "4.0.6",
                "Key": "TestingSequence:4.0.6",
                "Description": "Blank Process",
                "Published": "2020-10-17T13:04:06.6766667Z",
                "IsLatestVersion": false,
                "OldVersion": null,
                "ReleaseNotes": "Invoke WF Action Generator",
                "Authors": "petrina.smith",
                "ProjectType": "Process",
                "Id": "TestingSequence",
                "Arguments": {
                    "Input": "[{\"name\":\"Name\",\"type\":\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":false},{\"name\":\"Email\",\"type\":\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":false},{\"name\":\"Product\",\"type\":\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":false}]",
                    "Output": null
                }
            }
        ]
    }
    {
        "@odata.context": "{OrchestratorURL}/odata/$metadata#Processes",
        "@odata.count": 2,
        "value": [
            {
                "IsActive": false,
                "SupportsMultipleEntryPoints": false,
                "RequiresUserInteraction": true,
                "Title": null,
                "Version": "1.0.6981.35861",
                "Key": "QueueItemsProcessing:1.0.6981.35861",
                "Description": "Process items from an Orchestrator queue.",
                "Published": "2020-10-17T14:22:11.0566667Z",
                "IsLatestVersion": false,
                "OldVersion": null,
                "ReleaseNotes": null,
                "Authors": "petrina.smith",
                "ProjectType": "Undefined",
                "Id": "QueueItemsProcessing",
                "Arguments": {
                    "Input": "[{\"name\":\"argument1\",\"type\":\"System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":true},{\"name\":\"argument2\",\"type\":\"System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":false},{\"name\":\"argument3\",\"type\":\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":true}]",
                    "Output": null
                }
            },
            {
                "IsActive": false,
                "SupportsMultipleEntryPoints": false,
                "RequiresUserInteraction": false,
                "Title": "TestingSequence",
                "Version": "4.0.6",
                "Key": "TestingSequence:4.0.6",
                "Description": "Blank Process",
                "Published": "2020-10-17T13:04:06.6766667Z",
                "IsLatestVersion": false,
                "OldVersion": null,
                "ReleaseNotes": "Invoke WF Action Generator",
                "Authors": "petrina.smith",
                "ProjectType": "Process",
                "Id": "TestingSequence",
                "Arguments": {
                    "Input": "[{\"name\":\"Name\",\"type\":\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":false},{\"name\":\"Email\",\"type\":\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":false},{\"name\":\"Product\",\"type\":\"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\",\"required\":false,\"hasDefault\":false}]",
                    "Output": null
                }
            }
        ]
    }
    

Accessing Swagger

Se você estiver usando o Swagger para experimentar nossa API, basta fazer login em sua instância do Orchestrator em uma guia separada.

The Orchestrator API Swagger definition can be accessed by adding the /swagger/ui/index#/ suffix to your Orchestrator URL. For example, {baseURL2} /swagger/ui/index#/.

Observação:

The Swagger authentication expires according to the parameters set in your Orchestrator instance. By default, it is set to 30 minutes. You can change it by modifying the value of the Auth.Cookie.Expire parameter, in the Web.config file.

Esta página foi útil?

Conectar

Precisa de ajuda? Suporte

Quer aprender? Academia UiPath

Tem perguntas? Fórum do UiPath

Fique por dentro das novidades