UiPath Documentation
orchestrator
2021.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.

[Vista previa] Actualizar usuario

Actualiza la información sobre el usuario local especificado.

Punto final de API​

PUT https://{yourDomain}/identity/api/User/{userId}

Ámbitos​

Necesita los siguientes ámbitos:

  • PM.User
  • PM.User.Write

Solicitar encabezados.​

--header 'Authorization: Bearer {access_token}'\
--header 'Content-Type: application/json'
--header 'Authorization: Bearer {access_token}'\
--header 'Content-Type: application/json'
Nota:

To obtain the {access_token}, make sure to authenticate through one of the methods described here.

Parámetros de ruta​

ParámetrosTipo de datosDescripción
userId

(obligatorio)
CadenaEl ID del usuario que quieres actualizar.

Solicitar cuerpo​

El cuerpo de la solicitud contiene la información de usuario que quieres actualizar, como el nombre, correo electrónico o pertenencia a un grupo.

{
  "name": "string",
  "surname": "string",
  "email": "user@example.com",
  "isActive": true,
  "password": "string",
  "groupIDsToAdd": [
    "string"
  ],
  "groupIDsToRemove": [
    "string"
  ],
  "bypassBasicAuthRestriction": true,
  "invitationAccepted": true
}
{
  "name": "string",
  "surname": "string",
  "email": "user@example.com",
  "isActive": true,
  "password": "string",
  "groupIDsToAdd": [
    "string"
  ],
  "groupIDsToRemove": [
    "string"
  ],
  "bypassBasicAuthRestriction": true,
  "invitationAccepted": true
}

Respuesta​

200 OK​

El grupo personalizado se actualiza con la información que has proporcionado.

400 Bad Request​

No se pudo realizar la actualización.

{
    "errors": {
        "bypassBasicAuthRestriction": [
            "Unexpected character encountered while parsing value: h. Path 'bypassBasicAuthRestriction', line 17, position 35.",
            "Unexpected character encountered while parsing value: a. Path 'bypassBasicAuthRestriction', line 17, position 35."
        ]
    },
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "00-aec3de9099a9934e9c31e26c19f5e0dd-8c0d3d5f476c7742-00"
}
{
    "errors": {
        "bypassBasicAuthRestriction": [
            "Unexpected character encountered while parsing value: h. Path 'bypassBasicAuthRestriction', line 17, position 35.",
            "Unexpected character encountered while parsing value: a. Path 'bypassBasicAuthRestriction', line 17, position 35."
        ]
    },
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "00-aec3de9099a9934e9c31e26c19f5e0dd-8c0d3d5f476c7742-00"
}

Solicitud de ejemplo​

Supongamos que has recopilado toda la información necesaria para crear la llamada a la API.

  • Tu {baseURL} es: https://{yourDomain}/{organizationName}/{tenantName}/
  • Tu {access_token} es: 1234 (para consideraciones de longitud)
  • Quieres actualizar la información y la pertenencia a un grupo del ID de usuario her-1909.

La llamada debe ser similar a lo que mostramos a continuación (cURL):

curl --location --request PUT 'https://{yourDomain}/{organizationName}/{tenantName}/identity_/api/User/her-1909' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json'
--data-raw '{
    "name": "Hermione",
    "surname": "Granger-Weasley",
    "email": "hermione@hogwarts.com",
    "groupIDsToAdd": [
        "gryff-01",
        "alumni-02",
        "teachers-03"
    ],
    "groupIDsToRemove": [],
    "bypassBasicAuthRestriction": false
}'
curl --location --request PUT 'https://{yourDomain}/{organizationName}/{tenantName}/identity_/api/User/her-1909' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json'
--data-raw '{
    "name": "Hermione",
    "surname": "Granger-Weasley",
    "email": "hermione@hogwarts.com",
    "groupIDsToAdd": [
        "gryff-01",
        "alumni-02",
        "teachers-03"
    ],
    "groupIDsToRemove": [],
    "bypassBasicAuthRestriction": false
}'

Esta es la respuesta para una llamada exitosa:

{
    "succeeded": true,
    "errors": []
}
{
    "succeeded": true,
    "errors": []
}
  • Punto final de API​
  • Ámbitos​
  • Solicitar encabezados.​
  • Parámetros de ruta​
  • Solicitar cuerpo​
  • Respuesta​
  • 200 OK​
  • 400 Bad Request​
  • Solicitud de ejemplo​

¿Te ha resultado útil esta página?

Conectar

¿Necesita ayuda? Soporte

¿Quiere aprender? UiPath Academy

¿Tiene alguna pregunta? Foro de UiPath

Manténgase actualizado