User API

Manage users and retrieve user information programmatically

Overview

The User API allows you to retrieve information about users in your account. Users represent individuals who have access to the RackCorp portal and can be associated with customers.

GET Get User

Retrieve a single user by ID.

Request

GET https://api.rackcorp.net/api/rest/v2.9/json.php?cmd=user.get&id=123
Authorization: Bearer YOUR_JWT_TOKEN

Parameters

Parameter Type Required Description
cmd string Yes Must be "user.get"
id integer Yes User ID

Response

{
  "code": "OK",
  "user": {
    "id": 123,
    "name": "John Doe",
    "userLogin": "jdoe",
    "customerID": 456,
    "customID": "USER-001",
    "status": "ACTIVE",
    "timezone": "Australia/Sydney",
    "companyName": "Example Corp",
    "lastLogin": 1699123456,
    "verifyOnly": false,
    "dateCreated": 1699000000,
    "dateModified": 1699123456
  }
}

GET List Users

Retrieve a list of users with optional filtering and pagination.

Request

GET https://api.rackcorp.net/api/rest/v2.9/json.php?cmd=user.getall&resStart=0&resWindow=50&keyword=search%20term&stdName_wild=Example&customerParentId=456
Authorization: Bearer YOUR_JWT_TOKEN

Parameters

Parameter Type Required Description
cmd string Yes Must be "user.getall"
resStart integer No Pagination start offset (default: 0)
resWindow integer No Number of results per page (default: 20, minimum: 20)
keyword string No Search term to filter results (searches across multiple fields)
stdName_wild string No Filter by customer standard name (wildcard search)
companyname string No Filter by company name (maps to stdName_wild)
customerParentId integer No Filter by parent customer ID (for reseller hierarchies)

Response

{
  "code": "OK",
  "count": 25,
  "users": [
    {
      "id": 123,
      "name": "John Doe",
      "userLogin": "jdoe",
      "customerID": 456,
      "status": "ACTIVE",
      "companyName": "Example Corp",
      "lastLogin": 1699123456
    }
  ]
}

Error Responses

If an error occurs, the API will return a response with code: "FAULT":

{
  "code": "FAULT",
  "message": "Error message",
  "error": {
    "field1": "Error message 1",
    "field2": "Error message 2"
  }
}