- Primeros pasos
- Autenticación
- Ámbitos y permisos
- API de gestión de plataformas
Guía de la API de Test Cloud
Resuelve una única entidad de directorio por su identificador único y tipo, en función del ID de la organización.
Punto final de API
POST {accessURL}/{organizationName}/identity_/api/Directory/Resolve/{partitionGlobalId}
Sustituye {accessURL} en todas las rutas de los puntos finales por la URL base de tu plataforma en la nube:
| Cloud Platform | URL de acceso |
|---|---|
| Test Cloud | https://cloud.uipath.com/ |
| Test Cloud Sector Público | https://govcloud.uipath.us/ |
| Test Cloud Dedicado | https://{customURL}.dedicated.uipath.com/ |
Ámbitos
Necesita los siguientes ámbitos:
- PM.Directorio
Solicitar encabezados.
--header 'Authorization: Bearer {access_token}'\
--header 'Content-Type: application/json'
--header 'Authorization: Bearer {access_token}'\
--header 'Content-Type: application/json'
Para obtener el {access_token}, asegúrate de autenticarte a través de uno de los métodos descritos aquí.
Parámetros de ruta
| Parámetros de ruta | Tipo de datos | Descripción |
|---|---|---|
partitionGlobalId (obligatorio) | Cadena (GUID) | El ID de la organización en la que se resolverá la entidad. |
Solicitar cuerpo
El cuerpo de la solicitud especifica la entidad a resolver.
{
"entityId": "string",
"entityType": "User"
}
{
"entityId": "string",
"entityType": "User"
}
| Propiedad | Tipo de datos | Descripción |
|---|---|---|
entityId (obligatorio) | Cadena | El identificador único de la entidad del directorio. |
entityType (obligatorio) | Cadena | El tipo de entidad de directorio. Valores válidos: User, Group, Application. |
Respuesta
200 OK
Devuelve la entidad de directorio completa. La forma de respuesta varía en función del tipo de entidad.
Respuesta del usuario:
{
"objectType": "DirectoryUser",
"source": "aad",
"identifier": "aad|a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "john.doe@example.com",
"email": "john.doe@example.com",
"displayName": "John Doe",
"firstName": "John",
"lastName": "Doe",
"jobTitle": "Software Engineer",
"companyName": "Contoso",
"city": "Seattle",
"department": "Engineering",
"isActive": true,
"creationTime": "2025-01-15T10:30:00Z"
}
{
"objectType": "DirectoryUser",
"source": "aad",
"identifier": "aad|a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "john.doe@example.com",
"email": "john.doe@example.com",
"displayName": "John Doe",
"firstName": "John",
"lastName": "Doe",
"jobTitle": "Software Engineer",
"companyName": "Contoso",
"city": "Seattle",
"department": "Engineering",
"isActive": true,
"creationTime": "2025-01-15T10:30:00Z"
}
Respuesta del grupo:
{
"objectType": "DirectoryGroup",
"source": "aad",
"identifier": "aad|b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "Engineering Team",
"email": null,
"displayName": "Engineering Team",
"externalId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
}
{
"objectType": "DirectoryGroup",
"source": "aad",
"identifier": "aad|b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "Engineering Team",
"email": null,
"displayName": "Engineering Team",
"externalId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
}
Respuesta de la aplicación:
{
"objectType": "DirectoryApplication",
"source": "aad",
"identifier": "aad|c3d4e5f6-a7b8-9012-cdef-123456789012",
"name": "My Application",
"email": null,
"displayName": "My Application",
"applicationId": "c3d4e5f6-a7b8-9012-cdef-123456789012"
}
{
"objectType": "DirectoryApplication",
"source": "aad",
"identifier": "aad|c3d4e5f6-a7b8-9012-cdef-123456789012",
"name": "My Application",
"email": null,
"displayName": "My Application",
"applicationId": "c3d4e5f6-a7b8-9012-cdef-123456789012"
}
404 No encontrado
Se devuelve cuando no se puede encontrar la entidad o partición.
Solicitud de ejemplo
Supongamos que has recopilado toda la información necesaria para crear la llamada a la API.
- Su
{baseURL}es: https://cloud.uipath.com/{organizationName}/identity_ - Tu
{access_token}es:1234(para consideraciones de longitud) - El
{partitionGlobalId}es:3fa85f64-5717-4562-b3fc-2c963f66afa6 - Desea resolver un usuario con ID
aad|a1b2c3d4-e5f6-7890-abcd-ef1234567890.
La llamada debe parecerse al siguiente ejemplo (cURL):
curl --location --request POST 'https://cloud.uipath.com/{organizationName}/identity_/api/Directory/Resolve/3fa85f64-5717-4562-b3fc-2c963f66afa6' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \
--data-raw '{
"entityId": "aad|a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"entityType": "User"
}'
curl --location --request POST 'https://cloud.uipath.com/{organizationName}/identity_/api/Directory/Resolve/3fa85f64-5717-4562-b3fc-2c963f66afa6' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \
--data-raw '{
"entityId": "aad|a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"entityType": "User"
}'
Aquí está el body de respuesta de una llamada correcta:
{
"objectType": "DirectoryUser",
"source": "aad",
"identifier": "aad|a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "john.doe@example.com",
"email": "john.doe@example.com",
"displayName": "John Doe",
"firstName": "John",
"lastName": "Doe",
"jobTitle": "Software Engineer",
"companyName": "Contoso",
"city": "Seattle",
"department": "Engineering",
"isActive": true,
"creationTime": "2025-01-15T10:30:00Z"
}
{
"objectType": "DirectoryUser",
"source": "aad",
"identifier": "aad|a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "john.doe@example.com",
"email": "john.doe@example.com",
"displayName": "John Doe",
"firstName": "John",
"lastName": "Doe",
"jobTitle": "Software Engineer",
"companyName": "Contoso",
"city": "Seattle",
"department": "Engineering",
"isActive": true,
"creationTime": "2025-01-15T10:30:00Z"
}