Reassign Assessment - PATCH /{userId}
Summarize
Summary of Reassign Assessment - PATCH /{userId}
This REST API endpoint allows ServiceNow customers to reassign an in-progress assessment instance to a different user. It is used to transfer ownership of an assessment currently in the “Open” state, updating the primary owner on the assessment instance persona record. This change designates a new responsible user for completing the assessment.
Show less
Use Cases
- Reassign assessment responsibility when an employee changes roles or leaves the organization.
- Correct an incorrectly assigned assessment.
- Delegate assessment completion to a more suitable team member.
Key Requirements
- The assessment must be in the “Open” state to be eligible for reassignment.
- The requesting user must have write access to the assessment’s persona assignment record to perform the reassignment.
API Details
- HTTP Method: PATCH
- URL format:
/api/snsmartasmt/instance/asmt/{asmtInstanceId}/user/{userId}(optionally with version prefix) - Path Parameters:
asmtInstanceId(required): Sysid of the assessment instance.userId(required): Sysid of the user to reassign the assessment to.apiversion(optional): To specify endpoint version.
- Request Body: None required or accepted.
- Headers: Accepts standard REST headers including
Authorizationfor authentication andAcceptfor response format.
Expected Responses
- 200 Success: Assessment reassigned successfully; response body is empty.
- 400 Bad Request: Missing required path parameters.
- 403 Forbidden: Requesting user lacks write permissions on the persona assignment record.
- 404 Not Found: Assessment instance, user, or persona assignment record not found.
- 406 Not Acceptable: Reassignment cannot proceed due to business rules, e.g., assessment not in “Open” state or already assigned to the target user.
Error Handling
If an error occurs, the response includes a JSON object with:
status: "failure"error.message: Descriptive error message (e.g., "User not authorized to reassign.")error.detail: Additional error details if available.
Practical Application
Use this endpoint to ensure assessment ownership is accurately maintained, improving accountability and workflow continuity. It supports organizational changes and correction of assignment errors without manual intervention. Make sure your API calls include the correct assessment and user IDs and that your user has the necessary permissions to avoid authorization errors.
Reassigns an assessment instance to a different user. Use this endpoint when you need to transfer ownership of an in-progress assessment from the current assignee to another user.
The assessment must be in the “Open” state to be reassigned. This endpoint updates the primary owner on the assessment instance persona record, effectively changing who is responsible for completing the assessment.
- Transferring assessment responsibility when an employee changes roles or leaves the organization.
- Correcting an incorrectly assigned assessment.
- Delegating assessment completion to a more appropriate team member.
URL format
Versioned URL: PATCH /api/sn_smart_asmt/{api_version}/instance/asmt/{asmtInstanceId}/user/{userId}
Default URL: PATCH /api/sn_smart_asmt/instance/asmt/{asmtInstanceId}/user/{userId}
Supported request parameters
| Name | Description |
|---|---|
| api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
| asmtInstanceId | Required. Sys_id of the assessment instance to reassign. Table: Assessment Instance [sn_smart_asmt_instance] Maximum length: 32 Data type: String |
| userId | Required. Sys_id of the user to whom the assessment will be reassigned. Table: User [sys_user] Maximum length: 32 Data type: String |
| Name | Description |
|---|---|
| None |
| Name | Description |
|---|---|
| None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
| Header | Description |
|---|---|
| Accept | Data format of the response body. Supported values: application/json, application/xml, text/xml. Default: application/json. |
| Authorization | Authentication credentials. Use Basic authentication with base64-encoded username:password, or an OAuth 2.0 bearer token. |
| Content-Type | Not required for this endpoint as there is no request body, but if provided, supported values are: application/json, application/xml, text/xml. |
| Header | Description |
|---|---|
| Content-Type | Data format of the response body. Matches the Accept header value or defaults to application/json. |
| X-Is-Logged-In | Flag that indicates whether the requesting user is logged in. Possible values: true, false. |
| X-Transaction-ID | Unique identifier for the transaction, useful for debugging and support requests. |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
| Status code | Description |
|---|---|
| 200 | Success. The assessment was successfully reassigned to the specified user. No response body is returned. |
| 400 | Bad Request. The request is missing required path parameters. Possible error messages:
|
| 403 | Forbidden. The requesting user doesn't have authorization to reassign this assessment. This occurs when the user lacks write access to the assessment’s persona assignment record. Error message: |
| 404 | Not Found. The specified resource doesn't exist. Possible error messages:
|
| 406 | Not acceptable. The reassignment can't be completed due to business rule constraints. Possible error messages:
|
Response body parameters (JSON or XML)
| Name | Description |
|---|---|
| Object | Return object containing results of the reassignment. |
| error | Object containing error details. Data type: Object |
| error.message | Human-readable description of the error that occurred. Examples:
Data type: String |
| error.detail | Additional details about the error, if available. May be empty. Data type: String |
| status | Indicates the outcome of the request. Possible values: "failure" (when an error occurs). Successful responses (HTTP 200) return an empty body with no status field. |
cURL request
This PATCH example reassigns the assessment with ID 4d812fed47f8835060b5e65d416d431a to the user with ID 62826bf03710200044e0bfc8bcbe5df1.
curl "https://testsae.service-now.com/api/sn_smart_asmt/instance/asmt/4d812fed47f8835060b5e65d416d431a/user/62826bf03710200044e0bfc8bcbe5df1" \
--request PATCH \
--header "Accept:application/json" \
--user 'admin':'admin'
Response:
{
"error": {
"message": "Assessment can't be reassigned as it is already assigned to the current user",
"detail": ""
},
"status": "failure"
}