Skip to main content
GET
/
api
/
adm
/
companyProjects
Get Company Projects
curl --request GET \
  --url https://localhost:44371/api/adm/companyProjects \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "code": 200,
  "errorMessage": null,
  "entries": []
}

Description

Queries all projects in the system with optional filtering by company, name, or active status. Results are paginated and commonly used for admin dashboards, project selection dropdowns, and reporting interfaces.

Input

  • Query Parameters: model (CompanyProjectQueryRequest) — Filtering options including:
    • companyId (guid, optional) — Filter by parent company identifier.
    • name (string, optional) — Filter by project name (case-insensitive partial match).
    • isActive (bool, optional) — Filter by active status.
    • limit (int, optional) — Maximum number of records to return (default: 20).
    • offset (int, optional) — Number of records to skip for pagination.

Output

Returns a CompanyProjectQueryResponse containing matching projects or an empty list if none found.

Example Request

GET /api/admin/companyProjects?companyId=3fa85f64-5717-4562-b3fc-2c963f66afa6&isActive=true
Authorization: Bearer {token}

Example Response

{
  "success": true,
  "code": 200,
  "errorMessage": null,
  "entries": [
    {
      "id": "7bc94a21-8833-4d2f-a5e1-9f4b2d8c1e7a",
      "name": "E-Commerce Application",
      "companyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "isActive": true,
      "createdDate": "2025-10-15T09:00:00Z"
    }
  ]
}

Errors

  • 400 Bad Request — Invalid query parameters or filter values.
  • 401 Unauthorized — Missing or invalid authentication token.
  • 404 Not Found — Specified company does not exist when filtering by companyId.

Notes

  • Results are paginated; use limit and offset parameters for large datasets.
  • Filter by companyId to retrieve all projects for a specific company.
  • Filter by isActive to show only active or inactive projects.
  • Empty results return success with an empty entries array.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Query Parameters

CompanyId
string<guid> | null

The company identifier used to restrict the query.

Id
string<guid> | null

Optional identifier to filter results by a specific entity.

Example:

"3fa85f64-5717-4562-b3fc-2c963f66afa6"

Response

Always returned. Check the success property in the response body to determine if the operation succeeded.

Standard response structure containing operation status and error information. Standard query response containing a collection of matching entities. Represents the collection response returned when querying projects.

success
boolean

True if the operation completed successfully; false if an error occurred.

Example:

true

code
enum<string>

Result code indicating the outcome of the operation.

Available options:
Unknown,
Success,
BadRequest,
Unauthorized,
NotFound,
Error
Example:

200

errorMessage
string | null

Human-readable error message when an error occurs.

Example:

null

entries
object[] | null

Collection of entities matching the query criteria.

Example:
[]