Overview
The Release Management API provides a complete set of endpoints for managing users, projects, and release notes in a software release management system. The API follows REST principles and uses JSON for data exchange.
Authentication
Most endpoints require authentication using JWT tokens. Tokens are obtained through the login endpoint and should be included in the Authorization header:
Authorization: Bearer <your-jwt-token>
Base URL
Roles
Different endpoints require different user roles:
- Public - No authentication required
- User - Authenticated users
- Admin - Administrators
- SuperAdmin - Super administrators
Account Management
Register a new user account. New users are inactive by default and require admin approval.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| username | string | Yes | Unique username (max 50 characters) |
| string | Yes | User's email address | |
| password | string | Yes | Password (min 6 characters) |
| confirmPassword | string | Yes | Must match password |
| firstName | string | No | User's first name (max 50 characters) |
| lastName | string | No | User's last name (max 50 characters) |
{
"username": "johndoe",
"email": "john.doe@example.com",
"password": "securePassword123",
"confirmPassword": "securePassword123",
"firstName": "John",
"lastName": "Doe"
}
Response
Returns a UserDto object with the created user's information.
Authenticate a user and receive a JWT token for subsequent requests.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| username | string | Yes | User's username |
| password | string | Yes | User's password |
{
"username": "johndoe",
"password": "securePassword123"
}
Response
Returns a UserLoginResponseDto containing the user information and JWT token.
User Management (Admin)
Retrieve a list of all pending users who require admin approval.
Response
Returns an array of UserDto objects representing pending users.
Retrieve a list of all users in the system.
Response
Returns an array of UserDto objects representing all users.
Approve a pending user, making their account active.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | ID of the user to approve |
Response
Returns a success message upon successful approval.
Project Management (Admin)
Retrieve a list of all projects in the system.
Response
Returns an array of ProjectDto objects representing all projects.
Create a new project.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Project name (max 100 characters) |
| description | string | No | Project description (max 500 characters) |
{
"name": "Mobile App Development",
"description": "Development of the company's new mobile application"
}
Response
Returns the created ProjectDto object.
Allocate a project to a user.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| userId | integer | Yes | ID of the user to allocate the project to |
| projectId | integer | Yes | ID of the project to allocate |
{
"userId": 123,
"projectId": 456
}
Response
Returns a success message upon successful allocation.
User Functions
Retrieve a list of projects allocated to the authenticated user.
Response
Returns an array of ProjectDto objects representing the user's projects.
Retrieve release notes for a specific project allocated to the authenticated user.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectId | integer | Yes | ID of the project to retrieve release notes for |
Response
Returns an array of ReleaseNoteDto objects for the specified project.
Release Note Management (Admin)
Create a new release note for a project.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| title | string | Yes | Release note title (max 200 characters) |
| content | string | Yes | Release note content |
| version | string | No | Version identifier (max 50 characters) |
| projectId | integer | Yes | ID of the project this release note belongs to |
{
"title": "Version 2.1.0 Release",
"content": "This release includes bug fixes and performance improvements.",
"version": "2.1.0",
"projectId": 456
}
Response
Returns the created ReleaseNoteDto object.
Retrieve a specific release note by ID.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | ID of the release note to retrieve |
Response
Returns the ReleaseNoteDto object for the specified release note.
Retrieve all release notes for a specific project.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectId | integer | Yes | ID of the project to retrieve release notes for |
Response
Returns an array of ReleaseNoteDto objects for the specified project.
Update an existing release note.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | ID of the release note to update |
Request Body
Same as the POST request body for creating a release note.
Response
Returns a 204 No Content response upon successful update.
Delete a release note.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | ID of the release note to delete |
Response
Returns a 204 No Content response upon successful deletion.
User Management (SuperAdmin)
Retrieve a list of all users in the system.
Response
Returns an array of UserDto objects representing all users.
Create a new user account directly (bypassing registration).
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| username | string | Yes | Username (max 50 characters) |
| string | Yes | Email address | |
| password | string | Yes | Password (min 6 characters) |
| firstName | string | No | First name (max 50 characters) |
| lastName | string | No | Last name (max 50 characters) |
| isActive | boolean | No | Whether the account is active (default: false) |
| roleId | integer | Yes | Role ID (1=User, 2=Admin, 3=SuperAdmin) |
Response
Returns the created UserDto object.
Update an existing user's information.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | ID of the user to update |
Request Body
Same fields as the POST request for creating a user, except password.
Response
Returns the updated UserDto object.
Change a user's role.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | ID of the user whose role to change |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| roleId | integer | Yes | New role ID (1=User, 2=Admin, 3=SuperAdmin) |
Response
Returns a success message upon successful role change.
Reset a user's password.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | ID of the user whose password to reset |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| newPassword | string | Yes | New password (min 6 characters) |
Response
Returns a success message upon successful password reset.
Delete a user account.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | ID of the user to delete |
Response
Returns a success message upon successful deletion.