automation-hub
2021.10
false
Automation Hub API Guide
Automation CloudAutomation Cloud Public SectorAutomation Suite
Last updated Sep 19, 2023

Inactivate User Accounts that are Not Part of the Company

The following request exemplifies how to use the /edituser API call in order to inactivate the user accounts that are no longer part of the company. To execute this call we use the following filters:

user_invite_status: 1

user_is_active:0

Post: https://{yourDomain}/automationhub_/api/v1/openapi/edituser

Request

Content-Type: application/json
	Authorization: Bearer [Tenant ID/Token]
  x-ah-openapi-app-key: [API key if added]
  x-ah-openapi-auth: openapi-token
 data-raw '{
    {
      "user_email": "jane.doe@email.com",
      "user_first_name": "Jane",
      "user_last_name": "Doe",
      "user_location": "Brooklyn",
      "user_department": "Engineering",
      "user_business_unit": "Product",
      "user_job_title": "Developer",
      "user_is_active": 0,
      "user_invite_status": 1,
      "user_roles": [
        {
          "role_id": 6,
          "category_id": 0
        },
        {
          "role_id": 4,
          "category_id": 0
        },
        {
          "role_id": 5,
          "category_id": 3
        }
        ]
    }	Content-Type: application/json
	Authorization: Bearer [Tenant ID/Token]
  x-ah-openapi-app-key: [API key if added]
  x-ah-openapi-auth: openapi-token
 data-raw '{
    {
      "user_email": "jane.doe@email.com",
      "user_first_name": "Jane",
      "user_last_name": "Doe",
      "user_location": "Brooklyn",
      "user_department": "Engineering",
      "user_business_unit": "Product",
      "user_job_title": "Developer",
      "user_is_active": 0,
      "user_invite_status": 1,
      "user_roles": [
        {
          "role_id": 6,
          "category_id": 0
        },
        {
          "role_id": 4,
          "category_id": 0
        },
        {
          "role_id": 5,
          "category_id": 3
        }
        ]
    }

Response

Content-Type: application/json

{
    "message": "Resource Updated",
    "statusCode": 201,
    "data": {
        "message": "Sync Successful."
    }
}    {
    "message": "Resource Updated",
    "statusCode": 201,
    "data": {
        "message": "Sync Successful."
    }
}

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.