API Documentation

Integrate with Igris IAM using our RESTful API endpoints. Base URL: http://localhost:9095/api/v1

POST

User Login

Authenticate a user and retrieve a JWT Access Token.

curl -X POST http://localhost:9095/api/v1/auth/user-login \
  -H "Content-Type: application/json" \
  -d '{"username": "admin", "password": "password"}'

Success Response (200 OK)

{
  "accessToken": "eyJhbGciOiJIUzI...",
  "refreshToken": "def502005...",
  "expiresIn": 3600,
  "tokenType": "Bearer"
}

Error Response (401 Unauthorized)

{
  "status": 401,
  "error": "Unauthorized",
  "message": "Invalid username or password",
  "timestamp": "2024-05-17T10:00:00Z"
}
POST

Register New User

Create a new user identity within the system. Requires Super-Admin Authorization.

curl -X POST http://localhost:9095/api/v1/users/create-new-user \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"username": "jdoe", "email": "jdoe@example.com", "firstName": "John", "lastName": "Doe", "password": "SecretPassword123"}'

Success Response (201 Created)

{
  "id": 1054,
  "username": "jdoe",
  "email": "jdoe@example.com",
  "firstName": "John",
  "lastName": "Doe",
  "isActive": true,
  "createdAt": "2024-05-17T10:05:00Z"
}

Error Response (400 Bad Request)

{
  "status": 400,
  "error": "Bad Request",
  "message": "Username 'jdoe' is already taken",
  "timestamp": "2024-05-17T10:05:00Z"
}
POST

Setup Organization (OU)

Create a new Organizational Unit for structural hierarchy.

curl -X POST http://localhost:9095/api/v1/organizational-units/create-new-organizational-unit \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "Engineering Dept", "code": "ENG_01", "parentId": null}'

Success Response (201 Created)

{
  "id": 12,
  "name": "Engineering Dept",
  "code": "ENG_01",
  "parentId": null,
  "createdAt": "2024-05-17T10:10:00Z"
}

Error Response (403 Forbidden)

{
  "status": 403,
  "error": "Forbidden",
  "message": "Insufficient permissions to create OUs",
  "timestamp": "2024-05-17T10:10:00Z"
}
POST

Register System

Register a target downstream application/system.

curl -X POST http://localhost:9095/api/v1/systems/create-new-system \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "Core Banking Portal", "code": "CORE_BNK"}'

Success Response (201 Created)

{
  "id": 5,
  "name": "Core Banking Portal",
  "code": "CORE_BNK",
  "createdAt": "2024-05-17T10:15:00Z"
}

Error Response (400 Bad Request)

{
  "status": 400,
  "error": "Bad Request",
  "message": "System code 'CORE_BNK' already exists",
  "timestamp": "2024-05-17T10:15:00Z"
}