GetUserTaskRedirectionsFrom API¶
Returns the list of users who are currently redirecting their tasks to the specified user. Each entry represents a different user whose tasks will be forwarded to the named user during the configured date range.
This is the reverse view of GetUserTaskRedirectionTo.
Endpoint¶
Methods¶
- GET
/srv.asmx/GetUserTaskRedirectionsFrom?authenticationTicket=...&userName=... - POST
/srv.asmx/GetUserTaskRedirectionsFrom(form data) - SOAP Action:
http://tempuri.org/GetUserTaskRedirectionsFrom
Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
authenticationTicket |
string | Yes | Authentication ticket obtained from AuthenticateUser. |
userName |
string | Yes | Login name of the user who is receiving redirected tasks. |
Response¶
Success Response¶
<response success="true">
<TaskRedirections>
<TaskRedirection>
<UserId>7</UserId>
<UserName>john.smith</UserName>
<FullName>John Smith</FullName>
<Email>john.smith@example.com</Email>
<StartDate>2024-03-01</StartDate>
<EndDate>2024-03-31</EndDate>
</TaskRedirection>
<TaskRedirection>
<UserId>9</UserId>
<UserName>bob.jones</UserName>
<FullName>Bob Jones</FullName>
<Email>bob.jones@example.com</Email>
<StartDate>2024-03-10</StartDate>
<EndDate></EndDate>
</TaskRedirection>
</TaskRedirections>
</response>
Success Response -" no inbound redirections¶
Error Response¶
Response Field Reference¶
The <TaskRedirections> element contains zero or more <TaskRedirection> entries. Each entry describes the source user (the person whose tasks are being redirected from):
| Element | Description |
|---|---|
UserId |
Numeric user ID of the source user (the one redirecting tasks away). |
UserName |
Login name of the source user. |
FullName |
Full display name of the source user. |
Email |
Email address of the source user. |
StartDate |
Date from which the redirection is active. Empty string if open-ended. |
EndDate |
Date on which the redirection expires. Empty string if open-ended. |
Required Permissions¶
Any authenticated user may call this API.
Example¶
GET Request¶
GET /srv.asmx/GetUserTaskRedirectionsFrom
?authenticationTicket=3f7a1b2c-4d5e-6f7a-8b9c-0d1e2f3a4b5c
&userName=alice.jones
HTTP/1.1
Host: yourserver
POST Request¶
POST /srv.asmx/GetUserTaskRedirectionsFrom HTTP/1.1
Host: yourserver
Content-Type: application/x-www-form-urlencoded
authenticationTicket=3f7a1b2c-4d5e-6f7a-8b9c-0d1e2f3a4b5c&userName=alice.jones
JavaScript¶
Every call answers XML with HTTP 200, success or not, so success is the thing to branch on and
errorCode is the number to report.
async function call(action, params) {
const response = await fetch(`/srv.asmx/${action}?${new URLSearchParams(params)}`);
const root = new DOMParser()
.parseFromString(await response.text(), 'text/xml')
.documentElement;
if (root.getAttribute('success') !== 'true') {
throw new Error(`${root.getAttribute('errorCode')}: ${root.getAttribute('error')}`);
}
return root;
}
The other direction: everybody whose tasks arrive at this user.
const root = await call('GetUserTaskRedirectionsFrom', { authenticationTicket: ticket, userName: 'ajones' });
for (const redirection of root.querySelectorAll('TaskRedirections > TaskRedirection')) {
console.log(redirection.querySelector('UserName').textContent,
redirection.querySelector('StartDate').textContent);
}
Unlike GetUserTaskRedirectionTo this one always returns its <TaskRedirections> wrapper, empty
when nobody redirects here.
Notes¶
- Each entry represents a user who has configured
userNameas their redirection target. - The entries are stored redirection records and may include redirections whose date window has already expired or not yet started.
- To see where a user's own tasks are being redirected to, use GetUserTaskRedirectionTo.
- To configure a redirection, use SetUserTaskRedirection.
- To remove a redirection, use RemoveUserTaskRedirection.
Related APIs¶
- GetUserTaskRedirectionTo -" Get the user that a given user's tasks are being forwarded to.
- SetUserTaskRedirection -" Set or update a task redirection for a user.
- RemoveUserTaskRedirection -" Remove a user's task redirection.
- RerouteUserTaskRedirection -" Change the target of an existing task redirection.
Error Codes¶
The errorCode values this operation returns, checked against a running server:
errorCode |
When |
|---|---|
4010 |
the ticket is expired or unknown |
4041 |
no user by that name |
4030 |
there is no ticket at all |