Table of Contents

Class ApiRoutes.Administrators

Namespace
Core.CliniCore.Api
Assembly
Core.CliniCore.dll

Routes for Administrators API (/api/administrators)

public static class ApiRoutes.Administrators
Inheritance
ApiRoutes.Administrators
Inherited Members

Fields

BasePath

Represents the base path for the administrators API, combining the base route and controller name.

public const string BasePath = "api/administrators"

Field Value

string

ByDepartment

Represents the route template for accessing administrators by department.

public const string ByDepartment = "by-department/{department}"

Field Value

string

Remarks

The ByDepartment constant can be used to construct URLs or route patterns where the {department} placeholder is replaced with the specific department name or identifier.

ById

Represents the route segment used to identify an administrator by its unique identifier in HTTP GET requests.

public const string ById = "{id}"

Field Value

string

Remarks

This constant is typically used in route templates for controller actions that retrieve a single administrator profile by its id parameter, such as [HttpGet("{id}")].

ByPermission

Represents the route template for accessing resources by a specific permission.

public const string ByPermission = "by-permission/{permission}"

Field Value

string

Remarks

Use this constant to construct URLs or route patterns that require a permission parameter. Replace {permission} with the desired permission value.

Controller

Represents the route segment used to identify administrator-related controllers in routing operations.

public const string Controller = "administrators"

Field Value

string

Remarks

Use this constant when constructing routes or URLs that target administrator functionality to ensure consistency across the application.

Methods

GetAll()

Gets the full API endpoint path for retrieving all administrators.

public static string GetAll()

Returns

string

A string containing the absolute path to the endpoint used for fetching all administrators.

GetByDepartment(string)

Returns the API endpoint URL for retrieving administrators associated with the specified department.

public static string GetByDepartment(string department)

Parameters

department string

The name of the department for which to generate the endpoint URL. Cannot be null or empty.

Returns

string

A string containing the relative URL for accessing resources by department. The department name is URL-encoded in the returned path.

GetById(Guid)

Returns the resource path corresponding to the specified unique identifier.

public static string GetById(Guid id)

Parameters

id Guid

The unique identifier of the administrator to retrieve. Must not be Empty.

Returns

string

A string containing the resource path for the specified id.

GetByPermission(string)

Returns the API endpoint URL for accessing administrators associated with the specified permission.

public static string GetByPermission(string permission)

Parameters

permission string

The permission identifier used to filter resources. Cannot be null or empty.

Returns

string

A string containing the URL path for resources filtered by the given permission.