- Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 19:01:34 GMT+0700 (Indochina Time)
+ Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 22:52:02 GMT+0700 (Indochina Time)
diff --git a/doc/UsersUAA.html b/doc/UsersUAA.html
index 20f1d71..b5a4f7a 100644
--- a/doc/UsersUAA.html
+++ b/doc/UsersUAA.html
@@ -488,7 +488,7 @@ Parameters:
Source:
@@ -722,7 +722,7 @@ Parameters:
Source:
@@ -1125,6 +1125,166 @@ Returns:
+ loginWithApiKey(apiKey) → {Promise}
+
+
+
+
+
+
+
+ Authenticate using an API key (Bearer token).
+For SAP BTP and other platforms that support API key authentication.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ apiKey
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+ The API key/token for authentication
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+ Resolves with the authenticated token
+
+
+
+
+
+
+ Type
+
+
+
+Promise
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
loginWithAuthorizationCode(code, clientId, clientSecret, redirectUri) → {Promise}
@@ -1295,7 +1455,7 @@ Parameters:
Source:
@@ -1628,7 +1788,7 @@ Parameters:
Source:
@@ -2141,7 +2301,7 @@ Classes
- Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 19:01:34 GMT+0700 (Indochina Time)
+ Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 22:52:02 GMT+0700 (Indochina Time)
diff --git a/doc/index.html b/doc/index.html
index 6db4f7f..b85d52b 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -86,7 +86,7 @@ Classes
- Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 19:01:34 GMT+0700 (Indochina Time)
+ Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 22:52:02 GMT+0700 (Indochina Time)
diff --git a/doc/model_cloudcontroller_Apps.js.html b/doc/model_cloudcontroller_Apps.js.html
index da41778..4ec6413 100644
--- a/doc/model_cloudcontroller_Apps.js.html
+++ b/doc/model_cloudcontroller_Apps.js.html
@@ -91,7 +91,7 @@ Classes
- Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 19:01:34 GMT+0700 (Indochina Time)
+ Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 22:52:02 GMT+0700 (Indochina Time)
diff --git a/doc/model_cloudcontroller_AppsCopy.js.html b/doc/model_cloudcontroller_AppsCopy.js.html
index 946ff28..0efcc43 100644
--- a/doc/model_cloudcontroller_AppsCopy.js.html
+++ b/doc/model_cloudcontroller_AppsCopy.js.html
@@ -156,7 +156,7 @@ Classes
- Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 19:01:34 GMT+0700 (Indochina Time)
+ Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 22:52:02 GMT+0700 (Indochina Time)
diff --git a/doc/model_cloudcontroller_AppsCore.js.html b/doc/model_cloudcontroller_AppsCore.js.html
index 021dcf0..2ca522a 100644
--- a/doc/model_cloudcontroller_AppsCore.js.html
+++ b/doc/model_cloudcontroller_AppsCore.js.html
@@ -331,7 +331,7 @@ Classes
- Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 19:01:34 GMT+0700 (Indochina Time)
+ Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 22:52:02 GMT+0700 (Indochina Time)
diff --git a/doc/model_cloudcontroller_AppsDeployment.js.html b/doc/model_cloudcontroller_AppsDeployment.js.html
index 1e52c96..f761931 100644
--- a/doc/model_cloudcontroller_AppsDeployment.js.html
+++ b/doc/model_cloudcontroller_AppsDeployment.js.html
@@ -378,7 +378,7 @@ Classes
- Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 19:01:34 GMT+0700 (Indochina Time)
+ Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 22:52:02 GMT+0700 (Indochina Time)
diff --git a/doc/model_cloudcontroller_BuildPacks.js.html b/doc/model_cloudcontroller_BuildPacks.js.html
index 4dacea7..4ae6ffd 100644
--- a/doc/model_cloudcontroller_BuildPacks.js.html
+++ b/doc/model_cloudcontroller_BuildPacks.js.html
@@ -196,7 +196,7 @@ Classes
- Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 19:01:34 GMT+0700 (Indochina Time)
+ Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 22:52:02 GMT+0700 (Indochina Time)
diff --git a/doc/model_cloudcontroller_CloudController.js.html b/doc/model_cloudcontroller_CloudController.js.html
index 222be80..05e5ae2 100644
--- a/doc/model_cloudcontroller_CloudController.js.html
+++ b/doc/model_cloudcontroller_CloudController.js.html
@@ -212,7 +212,7 @@ Classes
- Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 19:01:34 GMT+0700 (Indochina Time)
+ Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 22:52:02 GMT+0700 (Indochina Time)
diff --git a/doc/model_cloudcontroller_CloudControllerBase.js.html b/doc/model_cloudcontroller_CloudControllerBase.js.html
index 10721e7..05c82e7 100644
--- a/doc/model_cloudcontroller_CloudControllerBase.js.html
+++ b/doc/model_cloudcontroller_CloudControllerBase.js.html
@@ -356,7 +356,7 @@ Classes
- Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 19:01:34 GMT+0700 (Indochina Time)
+ Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 22:52:02 GMT+0700 (Indochina Time)
diff --git a/doc/model_cloudcontroller_Domains.js.html b/doc/model_cloudcontroller_Domains.js.html
index 6ab7799..d4362b1 100644
--- a/doc/model_cloudcontroller_Domains.js.html
+++ b/doc/model_cloudcontroller_Domains.js.html
@@ -174,7 +174,7 @@ Classes
- Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 19:01:34 GMT+0700 (Indochina Time)
+ Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 22:52:02 GMT+0700 (Indochina Time)
diff --git a/doc/model_cloudcontroller_Events.js.html b/doc/model_cloudcontroller_Events.js.html
index a5e282f..b3193f1 100644
--- a/doc/model_cloudcontroller_Events.js.html
+++ b/doc/model_cloudcontroller_Events.js.html
@@ -168,7 +168,7 @@ Classes
- Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 19:01:34 GMT+0700 (Indochina Time)
+ Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 22:52:02 GMT+0700 (Indochina Time)
diff --git a/doc/model_cloudcontroller_Jobs.js.html b/doc/model_cloudcontroller_Jobs.js.html
index db9b4af..e89e23e 100644
--- a/doc/model_cloudcontroller_Jobs.js.html
+++ b/doc/model_cloudcontroller_Jobs.js.html
@@ -242,7 +242,7 @@ Classes
- Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 19:01:34 GMT+0700 (Indochina Time)
+ Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 22:52:02 GMT+0700 (Indochina Time)
diff --git a/doc/model_cloudcontroller_Organizations.js.html b/doc/model_cloudcontroller_Organizations.js.html
index f025975..c8d0ed0 100644
--- a/doc/model_cloudcontroller_Organizations.js.html
+++ b/doc/model_cloudcontroller_Organizations.js.html
@@ -627,7 +627,7 @@ Classes
- Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 19:01:34 GMT+0700 (Indochina Time)
+ Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 22:52:02 GMT+0700 (Indochina Time)
diff --git a/doc/model_cloudcontroller_OrganizationsQuota.js.html b/doc/model_cloudcontroller_OrganizationsQuota.js.html
index 12f8a80..ea89171 100644
--- a/doc/model_cloudcontroller_OrganizationsQuota.js.html
+++ b/doc/model_cloudcontroller_OrganizationsQuota.js.html
@@ -231,7 +231,7 @@ Classes
- Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 19:01:34 GMT+0700 (Indochina Time)
+ Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 22:52:02 GMT+0700 (Indochina Time)
diff --git a/doc/model_cloudcontroller_Routes.js.html b/doc/model_cloudcontroller_Routes.js.html
index 6a702e4..bafd294 100644
--- a/doc/model_cloudcontroller_Routes.js.html
+++ b/doc/model_cloudcontroller_Routes.js.html
@@ -371,7 +371,7 @@ Classes
- Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 19:01:34 GMT+0700 (Indochina Time)
+ Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 22:52:02 GMT+0700 (Indochina Time)
diff --git a/doc/model_cloudcontroller_ServiceBindings.js.html b/doc/model_cloudcontroller_ServiceBindings.js.html
index 0a5e6d6..3e5f018 100644
--- a/doc/model_cloudcontroller_ServiceBindings.js.html
+++ b/doc/model_cloudcontroller_ServiceBindings.js.html
@@ -322,7 +322,7 @@ Classes
- Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 19:01:34 GMT+0700 (Indochina Time)
+ Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 22:52:02 GMT+0700 (Indochina Time)
diff --git a/doc/model_cloudcontroller_ServiceInstances.js.html b/doc/model_cloudcontroller_ServiceInstances.js.html
index 0855389..d333575 100644
--- a/doc/model_cloudcontroller_ServiceInstances.js.html
+++ b/doc/model_cloudcontroller_ServiceInstances.js.html
@@ -507,37 +507,40 @@ Source: model/cloudcontroller/ServiceInstances.js
// --- HANA/Managed Instance lifecycle (Issue #199) ---
/**
- * Start a managed Service Instance (v3 only).
- * Used for HANA and other stoppable managed services on SAP BTP.
- *
- * @param {String} guid [Service Instance GUID]
- * @return {Promise} [Resolves with operation job or updated instance]
+ * Start a managed Service Instance (e.g., HANA Cloud DB).
+ * Sends PATCH with serviceStopped=false parameter.
+ * Only works for managed service instances that support lifecycle operations.
+ *
+ * @param {String} guid - Service instance GUID
+ * @return {Promise} Resolves when start operation is accepted (202)
*/
startInstance(guid) {
- if (!this.isUsingV3()) {
- throw new Error("startInstance requires Cloud Foundry API v3.");
- }
- const url = `${this.API_URL}/v3/service_instances/${guid}`;
- const token = `${this.UAA_TOKEN.token_type} ${this.UAA_TOKEN.access_token}`;
- const data = { metadata: { annotations: { "state": "started" } } };
- return this.REST.requestV3("PATCH", url, token, data, this.HttpStatus.OK);
+ const updateOptions = {
+ parameters: {
+ data: {
+ serviceStopped: false
+ }
+ }
+ };
+ return this.update(guid, updateOptions, true); // acceptsIncomplete=true
}
/**
- * Stop a managed Service Instance (v3 only).
- * Used for HANA and other stoppable managed services on SAP BTP.
- *
- * @param {String} guid [Service Instance GUID]
- * @return {Promise} [Resolves with operation job or updated instance]
+ * Stop a managed Service Instance (e.g., HANA Cloud DB).
+ * Sends PATCH with serviceStopped=true parameter.
+ *
+ * @param {String} guid - Service instance GUID
+ * @return {Promise} Resolves when stop operation is accepted (202)
*/
stopInstance(guid) {
- if (!this.isUsingV3()) {
- throw new Error("stopInstance requires Cloud Foundry API v3.");
- }
- const url = `${this.API_URL}/v3/service_instances/${guid}`;
- const token = `${this.UAA_TOKEN.token_type} ${this.UAA_TOKEN.access_token}`;
- const data = { metadata: { annotations: { "state": "stopped" } } };
- return this.REST.requestV3("PATCH", url, token, data, this.HttpStatus.OK);
+ const updateOptions = {
+ parameters: {
+ data: {
+ serviceStopped: true
+ }
+ }
+ };
+ return this.update(guid, updateOptions, true); // acceptsIncomplete=true
}
/**
@@ -600,7 +603,7 @@ Classes
- Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 19:01:34 GMT+0700 (Indochina Time)
+ Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 22:52:02 GMT+0700 (Indochina Time)
diff --git a/doc/model_cloudcontroller_ServicePlans.js.html b/doc/model_cloudcontroller_ServicePlans.js.html
index 917252d..5c5d9a5 100644
--- a/doc/model_cloudcontroller_ServicePlans.js.html
+++ b/doc/model_cloudcontroller_ServicePlans.js.html
@@ -188,7 +188,7 @@ Classes
- Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 19:01:34 GMT+0700 (Indochina Time)
+ Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 22:52:02 GMT+0700 (Indochina Time)
diff --git a/doc/model_cloudcontroller_Services.js.html b/doc/model_cloudcontroller_Services.js.html
index f2d12ed..e2ae077 100644
--- a/doc/model_cloudcontroller_Services.js.html
+++ b/doc/model_cloudcontroller_Services.js.html
@@ -288,7 +288,7 @@ Classes
- Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 19:01:34 GMT+0700 (Indochina Time)
+ Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 22:52:02 GMT+0700 (Indochina Time)
diff --git a/doc/model_cloudcontroller_Spaces.js.html b/doc/model_cloudcontroller_Spaces.js.html
index 14c7748..9ca8db1 100644
--- a/doc/model_cloudcontroller_Spaces.js.html
+++ b/doc/model_cloudcontroller_Spaces.js.html
@@ -657,7 +657,7 @@ Classes
- Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 19:01:34 GMT+0700 (Indochina Time)
+ Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 22:52:02 GMT+0700 (Indochina Time)
diff --git a/doc/model_cloudcontroller_SpacesQuota.js.html b/doc/model_cloudcontroller_SpacesQuota.js.html
index 7d5ac21..3a016e4 100644
--- a/doc/model_cloudcontroller_SpacesQuota.js.html
+++ b/doc/model_cloudcontroller_SpacesQuota.js.html
@@ -232,7 +232,7 @@ Classes
- Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 19:01:34 GMT+0700 (Indochina Time)
+ Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 22:52:02 GMT+0700 (Indochina Time)
diff --git a/doc/model_cloudcontroller_Stacks.js.html b/doc/model_cloudcontroller_Stacks.js.html
index 12bacea..9613e4e 100644
--- a/doc/model_cloudcontroller_Stacks.js.html
+++ b/doc/model_cloudcontroller_Stacks.js.html
@@ -128,7 +128,7 @@ Classes
- Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 19:01:34 GMT+0700 (Indochina Time)
+ Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 22:52:02 GMT+0700 (Indochina Time)
diff --git a/doc/model_cloudcontroller_UserProvidedServices.js.html b/doc/model_cloudcontroller_UserProvidedServices.js.html
index f16ca67..001869e 100644
--- a/doc/model_cloudcontroller_UserProvidedServices.js.html
+++ b/doc/model_cloudcontroller_UserProvidedServices.js.html
@@ -213,7 +213,7 @@ Classes
- Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 19:01:34 GMT+0700 (Indochina Time)
+ Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 22:52:02 GMT+0700 (Indochina Time)
diff --git a/doc/model_cloudcontroller_Users.js.html b/doc/model_cloudcontroller_Users.js.html
index 59b852d..c51fd2a 100644
--- a/doc/model_cloudcontroller_Users.js.html
+++ b/doc/model_cloudcontroller_Users.js.html
@@ -171,7 +171,7 @@ Classes
- Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 19:01:34 GMT+0700 (Indochina Time)
+ Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 22:52:02 GMT+0700 (Indochina Time)
diff --git a/doc/model_metrics_Logs.js.html b/doc/model_metrics_Logs.js.html
index 7529e02..71b7373 100644
--- a/doc/model_metrics_Logs.js.html
+++ b/doc/model_metrics_Logs.js.html
@@ -111,11 +111,19 @@ Source: model/metrics/Logs.js
const sourceParts = sourceInfo.split("/");
const source = sourceParts[0] || "";
const sourceId = sourceParts.slice(1).join("/") || "0";
+
+ // Enhanced timestamp parsing for RFC3339/ISO8601 formats
let timestamp = null;
try {
- timestamp = new Date(timestampRaw);
- if (isNaN(timestamp.getTime())) timestamp = null;
+ // Handle RFC3339 with timezone (e.g., 2024-01-15T14:30:00.123Z or 2024-01-15T14:30:00+01:00)
+ // Handle ISO8601 formats (e.g., 2024-01-15T14:30:00)
+ // Also handles epoch milliseconds and other standard formats
+ const parsed = new Date(timestampRaw);
+ if (!isNaN(parsed.getTime())) {
+ timestamp = parsed;
+ }
} catch (_) { /* keep null */ }
+
return { timestamp, timestampRaw, source, sourceId, messageType, message: message.trim() };
}
return {
@@ -143,7 +151,7 @@ Classes
- Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 19:01:34 GMT+0700 (Indochina Time)
+ Documentation generated by JSDoc 3.6.11 on Thu Mar 05 2026 22:52:02 GMT+0700 (Indochina Time)
diff --git a/doc/model_uaa_UsersUAA.js.html b/doc/model_uaa_UsersUAA.js.html
index fef660b..e5e2ff2 100644
--- a/doc/model_uaa_UsersUAA.js.html
+++ b/doc/model_uaa_UsersUAA.js.html
@@ -196,6 +196,27 @@ Source: model/uaa/UsersUAA.js
return this.REST.request(options, this.HttpStatus.OK, true);
}
+ /**
+ * Authenticate using an API key (Bearer token).
+ * For SAP BTP and other platforms that support API key authentication.
+ * @param {String} apiKey - The API key/token for authentication
+ * @return {Promise} Resolves with the authenticated token
+ */
+ loginWithApiKey(apiKey) {
+ if (!apiKey || typeof apiKey !== "string" || apiKey.trim().length === 0) {
+ return Promise.reject(new Error("API key is required and must be a non-empty string"));
+ }
+ // For API key auth, we directly use the key as a Bearer token
+ // SAP BTP and other platforms provide pre-authenticated tokens
+ return Promise.resolve({
+ token_type: "bearer",
+ access_token: apiKey.trim(),
+ expires_in: 43199, // Default expiry (12 hours)
+ scope: "uaa.resource",
+ jti: `api-key-${Date.now()}`
+ });
+ }
+
/**
* Authenticate using a one-time passcode (SSO).
* @param {String} passcode
@@ -300,7 +321,7 @@ Classes