> For AI agents: [llms.txt](https://docs.trustedauth.com/llms.txt) provides a Markdown index of this documentation.

# Get directory synchronization status

`GET /api/web/v1/directorysyncinfo/{id}`

Get the specified directory synchronization status details. Caller requires the DIRECTORIES:VIEW permission.

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| id | path | Yes | string | The UUID of the directory whose synchronization status is to be returned. |

## Responses

### 200

Successful

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "directoryName": {
      "type": "string",
      "description": "The name of the directory."
    },
    "directoryOrSearchBaseBeingProcessed": {
      "type": "string",
      "description": "The name of the directory or searchbase is being processed."
    },
    "errors": {
      "type": "string",
      "description": "Comma separated list of errors occurred during the AD-sync process."
    },
    "groupsAdded": {
      "type": "integer",
      "description": "The number of groups added.",
      "format": "int32"
    },
    "groupsCreateCount": {
      "type": "integer",
      "description": "The number of groups successfully created in the service database.",
      "format": "int32"
    },
    "groupsDeleteCount": {
      "type": "integer",
      "description": "The number of groups successfully deleted from the service database.",
      "format": "int32"
    },
    "groupsFailCount": {
      "type": "integer",
      "description": "The number of groups failed to be uploaded.",
      "format": "int32"
    },
    "groupsFailed": {
      "type": "integer",
      "description": "The number of groups skipped due to errors.",
      "format": "int32"
    },
    "groupsProcessedSuccessfully": {
      "type": "integer",
      "description": "The number of groups processed successfully.",
      "format": "int32",
      "deprecated": true
    },
    "groupsRemoved": {
      "type": "integer",
      "description": "The number of groups removed.",
      "format": "int32"
    },
    "groupsSyncedWithChanges": {
      "type": "integer",
      "description": "The number of groups changed.",
      "format": "int32"
    },
    "groupsSyncedWithNoChanges": {
      "type": "integer",
      "description": "The number of groups synced with no changes.",
      "format": "int32"
    },
    "groupsUpdateCount": {
      "type": "integer",
      "description": "The number of groups successfully updated in the service database.",
      "format": "int32"
    },
    "id": {
      "type": "string",
      "description": "The UUID of the DirectorySyncStatusInfo."
    },
    "searchbasesProcessed": {
      "type": "integer",
      "description": "The number of search bases already processed.",
      "format": "int32"
    },
    "state": {
      "type": "string",
      "description": "The status of the Directory Sync processed.",
      "example": "CRAWLING",
      "enum": [
        "CRAWLING",
        "CRAWL_COMPLETE",
        "ERROR",
        "NOTIFYING_GROUPS",
        "NOTIFYING_GROUPS_USERS",
        "NOTIFYING_USERS",
        "NOTIFY_COMPLETE",
        "OUT_OF_SYNC",
        "PENDING_CHANGES",
        "SYNCED",
        "UNKNOWN"
      ]
    },
    "syncStarted": {
      "type": "string",
      "description": "The time when the synchronization was started.",
      "format": "date-time",
      "example": "2019-02-19T13:15:27Z"
    },
    "syncUpdated": {
      "type": "string",
      "description": "The last time the directory was updated.",
      "format": "date-time",
      "example": "2019-02-19T13:15:27Z"
    },
    "totalSearchbases": {
      "type": "integer",
      "description": "Total number of search bases to be processed.",
      "format": "int32"
    },
    "usersAdded": {
      "type": "integer",
      "description": "Number of users added.",
      "format": "int32"
    },
    "usersCreateCount": {
      "type": "integer",
      "description": "The number of users successfully created in the service database.",
      "format": "int32"
    },
    "usersDeleteCount": {
      "type": "integer",
      "description": "The number of users successfully deleted from the service database.",
      "format": "int32"
    },
    "usersFailCount": {
      "type": "integer",
      "description": "The number of users failed to be uploaded.",
      "format": "int32"
    },
    "usersFailed": {
      "type": "integer",
      "description": "The number of users skipped due to errors.",
      "format": "int32"
    },
    "usersProcessedSuccessfully": {
      "type": "integer",
      "description": "The number of users processed successfully.",
      "format": "int32",
      "deprecated": true
    },
    "usersRemoved": {
      "type": "integer",
      "description": "The number of users removed.",
      "format": "int32"
    },
    "usersSyncedWithChanges": {
      "type": "integer",
      "description": "The number of users synced with changes.",
      "format": "int32"
    },
    "usersSyncedWithNoChanges": {
      "type": "integer",
      "description": "The number of users synced with no changes.",
      "format": "int32"
    },
    "usersUpdateCount": {
      "type": "integer",
      "description": "The number of users successfully updated in the service database.",
      "format": "int32"
    }
  },
  "description": "A DirectorySyncStatusInfo defines the information returned about the status of the last directory synchronization.",
  "title": "DirectorySyncStatusInfo"
}
```

### 400

Bad Request

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 401

Access denied

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 403

Forbidden

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 404

Not Found

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 409

Conflict

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

## Security

Requirements

```json
[
  {
    "AdminAPIAuthentication": [
      "DIRECTORIES:VIEW"
    ]
  }
]
```
