REST API to retrieve tenants details
Goal
Use the API to implement the mobile CI/CD to (re)build the tenants mobile apps.
What needs to be done
- create an API to retrieve the list of all active tenants. The response should be an array of tenant objects.
- create an API to retrieve the details of each tenant, by ID. The details should include collected info in json format.
The tenant response object should be a json similar to this:
{
"APP_NAME": "Minds",
"APP_SCHEME": "mindsapp",
"APP_HOST": "www.minds.com",
"APP_IOS_BUNDLE": "com.minds.mobile",
"APP_SPLASH_RESIZE": "contain",
"APP_ANDROID_PACKAGE": "com.minds.mobile",
"ACCENT_COLOR_LIGHT": "#1B85D6",
"ACCENT_COLOR_DARK": "#FFD048",
"WELCOME_LOGO": "horizontal",
"ADAPTIVE_ICON": "",
"ADAPTIVE_COLOR": "#FFFFFF",
"THEME": "dark",
"API_URL": "https://www.minds.com/",
"EAS_PROJECT_ID": "7a92bc49-6d7e-468f-af13-0a9aff39fc0e",
"assets": {
"adaptive-icon": "<path_to>/adaptive-icon.png",
"icon": "<path_to>/icon.png",
"icon_mono": "<path_to>/icon_mono.png",
"logo_horizontal": "<path_to>/logo_horizontal.png",
"logo_horizontal_dark": "<path_to>/logo_horizontal_dark.png",
"logo_square": "<path_to>/logo_square.png",
"splash": "<path_to>/splash.png"
}
}
QA
UX/Design
Mobile
-
Is Mobile Required?
Personas
Experiments
Acceptance Criteria
Endpoint 1: List of Tenants
-
Endpoint URL: - When I make a GET request to
/api/tenants
, it should return a list of all tenants in the system.
- When I make a GET request to
-
Authentication and Authorization: - When an unauthorized user tries to access
/api/tenants
, it should return a 401 Unauthorized error.
- When an unauthorized user tries to access
-
Response Format: - When I make a GET request to
/api/tenants
, the response should be in valid JSON format.
- When I make a GET request to
-
Status Codes: - When I make a GET request to
/api/tenants
with no tenants in the system, it should return a 204 No Content status code.
- When I make a GET request to
-
Response Body: - When I make a GET request to
/api/tenants
, each tenant in the response should contain a unique Tenant ID and Tenant Name.
- When I make a GET request to
Endpoint 2: Tenant Details
-
Endpoint URL: - When I make a GET request to
/api/tenants/12345
, where12345
is a valid Tenant ID, it should return detailed information for the tenant with that ID.
- When I make a GET request to
-
Authentication and Authorization: - When an unauthorized user tries to access
/api/tenants/12345
, it should return a 401 Unauthorized error.
- When an unauthorized user tries to access
-
Response Format: - When I make a GET request to
/api/tenants/12345
, the response should be in valid JSON format.
- When I make a GET request to
-
Status Codes: - When I make a GET request to
/api/tenants/12345
with an invalid Tenant ID, it should return a 404 Not Found status code.
- When I make a GET request to
-
Response Body: - When I make a GET request to
/api/tenants/12345
, the response should contain detailed information for the specified tenant, including Tenant ID, Tenant Name as per the example below:
- When I make a GET request to
{
"APP_NAME": "Minds",
"APP_SCHEME": "mindsapp",
"APP_HOST": "www.minds.com",
"APP_IOS_BUNDLE": "com.minds.mobile",
"APP_SPLASH_RESIZE": "contain",
"APP_ANDROID_PACKAGE": "com.minds.mobile",
"ACCENT_COLOR_LIGHT": "#1B85D6",
"ACCENT_COLOR_DARK": "#FFD048",
"WELCOME_LOGO": "horizontal",
"ADAPTIVE_ICON": "",
"ADAPTIVE_COLOR": "#FFFFFF",
"THEME": "dark",
"API_URL": "https://www.minds.com/",
"EAS_PROJECT_ID": "7a92bc49-6d7e-468f-af13-0a9aff39fc0e",
"assets": {
"adaptive-icon": "<path_to>/adaptive-icon.png",
"icon": "<path_to>/icon.png",
"icon_mono": "<path_to>/icon_mono.png",
"logo_horizontal": "<path_to>/logo_horizontal.png",
"logo_horizontal_dark": "<path_to>/logo_horizontal_dark.png",
"logo_square": "<path_to>/logo_square.png",
"splash": "<path_to>/splash.png"
}
}
-
Error Handling: - When I make a GET request to
/api/tenants/99999
, where99999
is an invalid Tenant ID, it should return a JSON response with an error message indicating that the tenant was not found.
- When I make a GET request to
-
Security: - When I make a GET request to
/api/tenants/12345
, the response should not include sensitive information like credentials.
- When I make a GET request to
Definition of Ready Checklist
-
Definition Of Done (DoD) -
Acceptance criteria -
Weighted -
QA -
UX/Design -
Personas -
Experiments
Edited by Vali