UiPath Documentation
orchestrator
2020.10
false
Guía de la API de Orchestrator
Importante :
Este contenido se ha localizado parcialmente a partir de un sistema de traducción automática. La localización de contenidos recién publicados puede tardar entre una y dos semanas en estar disponible.

Autenticando

El sistema de autenticación para la API de UiPath Orchestrator utiliza un token de portador para los usuarios locales y autenticación NTLM para los usuarios del directorio.

Nota:

By default, the bearer token expires after 30 minutes.

Importante:

Las instrucciones de esta página solo se aplican a la API de Orchestrator local. La autenticación básica para API no es compatible con los tenants de Automation Cloud Orchestrator.

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

Autenticación de usuario local a través de un token al 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:

    ClaveValor
    AutorizaciónPortador

    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. Copia la cadena en el parámetro de resultado de la respuesta HTTP en el portapapeles. Esto representa el token de portador y se puede utilizar en todas las solicitudes futuras de la siguiente manera:

    • As an Authorization header with the Bearer xxxxxxxxxxxxx value, where xxxxxxxxxxxxx represents the string previously copied;
    • Si tu herramienta de prueba de API lo admite, selecciona el tipo de autorización de token de portador e introduce la cadena copiada previamente.

Autenticación de usuario de dominio mediante autenticación 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. Si tu usuario existe en varios tenants, especifica el exacto usando el encabezado X-UIPATH-TenantName de lo contrario, la solicitud se realiza en el primer tenant en el que se ha aprovisionado el usuario. El siguiente ejemplo ilustra una solicitud GET {OrchestratorURL}/odata/Processes en el tenant de Finanzas.

    OBTENER {OrchestratorURL}/odata/Processes

    Request headers:

    ClaveValor
    AutorizaciónPortador
    X-UIPATH-TenantNameEl nombre del tenant.

    Por ejemplo, "Finanzas".

    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

Si está utilizando Swagger para probar nuestra API, simplemente inicie sesión en su instancia de Orchestrator en una pestaña 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#/.

Nota:

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.

¿Te ha resultado útil esta página?

Conectar

¿Necesita ayuda? Soporte

¿Quiere aprender? UiPath Academy

¿Tiene alguna pregunta? Foro de UiPath

Manténgase actualizado