Get details based on auth token
GET /auth/details/authtokenbased.rest
Operation id: getDetailsBasedOnAuthToken
Description
Retrieves user, domain, and optionally user-image details for a valid authentication token.
- Use
request_typeto control which sections are fetched. - Use
projectionsto limit fields returned inuser_details. - When an individual section fails to fetch, the API may return HTTP 200 with
status: "ER"and that section set tonullin the response; themessagefield carries the error description.
Tags: Auth
Parameters
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
auth_token | string | Yes | The authentication token. |
projections | string | No | Comma-separated list of snake_case field names to limit the user_details response (only applies when user_details or all is requested). When omitted, all user fields are returned. user_id is always included in the response. Common fields: user_id, user_name, unit_id, unit_name, email_id, telephone_no, locale_code. |
request_type | string | No | Comma-separated list of detail types to fetch (case-insensitive). Multiple values may be combined, for example request_type=user_details,domain_details. |
Responses
200 — Successfully retrieved details (may also be returned with status: "ER" when individual sections fail).
Content type: application/json
400 — Missing or malformed required parameter (for example auth_token).
Content type: application/json
401 — Invalid or expired token.
Content type: application/json
500 — Internal server error while fetching details.
Content type: application/json
Response models
200 — Successfully retrieved details (may also be returned with status: "ER" when individual sections fail).
Content type: application/json
Schema
Response containing user, domain, and optionally user-image details based on the auth token. Sections requested but failing to fetch are set to null; the message field carries any error description.
| Property | Type | Required | Description |
|---|---|---|---|
STATUS | string | No | OK for success, ER for error. |
MESSAGE | string | No | Human-readable status or error message. |
RESPONSE | object | No | Holds the requested data; section presence depends on request_type. |
{
"type": "object",
"description": "Response containing user, domain, and optionally user-image details based on the auth token.\nSections requested but failing to fetch are set to `null`; the `message` field carries any error description.\n",
"properties": {
"STATUS": {
"type": "string",
"description": "`OK` for success, `ER` for error.",
"enum": [
"OK",
"ER"
],
"example": "OK"
},
"MESSAGE": {
"type": "string",
"description": "Human-readable status or error message.",
"example": "Fetch Successful"
},
"RESPONSE": {
"type": "object",
"description": "Holds the requested data; section presence depends on `request_type`.",
"properties": {
"user_details": {
"type": "object",
"description": "User details (when `request_type` includes `user_details` or `all`). `null` when not requested or fetch failed.",
"nullable": true,
"properties": {
"user_id": {
"type": "string",
"description": "Unique identifier for the user."
},
"user_name": {
"type": "string",
"description": "User display name (URL-encoded)."
},
"unit_id": {
"type": "string",
"description": "Primary unit identifier."
},
"unit_name": {
"type": "string",
"description": "Unit display name."
},
"email_id": {
"type": "string",
"format": "email"
},
"telephone_no": {
"type": "string"
},
"locale_code": {
"type": "string"
},
"lang_code": {
"type": "string"
},
"time_zone": {
"type": "string"
},
"org_lvl": {
"type": "string"
},
"parent_unit_id": {
"type": "string"
},
"unit_category": {
"type": "string"
}
}
},
"domain_details": {
"type": "object",
"description": "Domain details (when `request_type` includes `domain_details` or `all`). `null` when not requested or fetch failed.",
"nullable": true,
"properties": {
"domain_no": {
"type": "integer",
"description": "Integer domain identifier."
},
"domain_id": {
"type": "string",
"description": "String domain identifier."
}
}
},
"user_image_details": {
"type": "object",
"description": "User image data (when `request_type` includes `user_image_details` or `all`). `null` when not requested or fetch failed.",
"nullable": true
}
}
}
}
}
400 — Missing or malformed required parameter (for example auth_token).
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
STATUS | string | No | |
RESPONSE | string | No |
{
"type": "object",
"properties": {
"STATUS": {
"type": "string",
"example": "ER"
},
"RESPONSE": {
"type": "string",
"example": "Error message"
}
}
}
401 — Invalid or expired token.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
STATUS | string | No | |
RESPONSE | string | No |
{
"type": "object",
"properties": {
"STATUS": {
"type": "string",
"example": "ER"
},
"RESPONSE": {
"type": "string",
"example": "Error message"
}
}
}
500 — Internal server error while fetching details.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
STATUS | string | No | |
RESPONSE | string | No |
{
"type": "object",
"properties": {
"STATUS": {
"type": "string",
"example": "ER"
},
"RESPONSE": {
"type": "string",
"example": "Error message"
}
}
}