Optional
realtime: RealtimeThe application to clone.
Optional
version: stringIf a blueprint, you can define which version to clone. If not provided, it will always clone the latest version.
The application entity.
Creates a new application.
Application object.
Response wrapped in [[IResult]]
Example
const newApp = {
name: 'New application',
type: 'EXTERNAL',
key: 'new-app'
};
(async () => {
const {data, res} = await applicationService.create(newApp);
})();
Removes an application with given id.
entity or id of the application.
Example
const removeApp: object = {
id: 38
};
(async () => {
const {data, res} = await applicationService.delete(removeApp);
// data will be null
})();
Response wrapped in [[IResult]]
Removes package version.
Application entity.
Version or tag indication package to remove.
Request response.
Example
const { res } = await applicationService.deleteVersionPackage(app, {version: '1.0.0'});
const { res } = await applicationService.deleteVersionPackage(app, {tag: 'next'});
Gets the details of selected application.
Entity or Id of the entity.
Response wrapped in [[IResult]]
Example
const applicationId: number = 1;
(async () => {
const {data, res} = await applicationService.detail(applicationId);
})();
Gets manifest (cumulocity.json file) of a given application.
Application entity.
Optional
version: stringApplication manifest object.
Get log for a specific application instance.
Entity or Id of the application.
instance name of the application.
Optional
params: IApplicationInstanceLogRequestParamsObject containing parameters for querying the log file.
Response wrapped in [[IResult]]
Example
const applicationId: number = 1;
const applicationInstanceName: string = 'apama-ctrl-1c-4g-scope-t123456789-deployment-abcdefghij-abcde';
(async () => {
const {data, res} = await applicationService.getInstanceLog(applicationId, applicationInstanceName);
})();
Extracts instance names of the provided IApplicationManagedObject.
Application details managedObject.
instance names
Example
const applicationId: number = 1;
(async () => {
const {data, res} = await applicationService.getStatusDetails(applicationId);
const instances = data.map((appMO) => applicationService.getInstanceNames(appMO));
})();
Retrieves the manifest of the application behind the given context path.
Gets instance details of the specified application (microservice).
Entity or Id of the application.
Response wrapped in [[IResultList]]
Example
const applicationId: number = 1;
(async () => {
const {data, res} = await applicationService.getStatusDetails(applicationId);
})();
Checks if current user can access specified application.
Application name or contextPath as a string or Application object.
Example
const checkApp: object = {
name: 'myApplication'
};
(async () => {
const {data, res} = await applicationService.isAvailable(checkApp);
})();
Response wrapped in [[IResult]]
Gets the list of existing applications filtered by parameters.
Object containing filters for querying applications.
Example
const filter: object = {
pageSize: 100,
withTotalPages: true
};
(async () => {
const {data, res, paging} = await applicationService.list(filter);
})();
Response wrapped in [[IResultList]]
Optional
tenantOrName: string | ITenantOptional
tenantOrName: string | ITenantOptional
userOrId: string | number | IUserGets the list of all application versions.
Entity or Id of the entity.
Additional request parameters.
Returns list of all application versions.
Example
const applicationId: number = 1;
(async () => {
const {res, data} = await applicationService.listVersions(applicationId);
})();
Sets tags for specific application package version.
Application entity.
Application package version which tags will be set.
Tags array to set on package version
Application version object.
Updates manifest (cumulocity.json file) of a given application.
Entity or Id of the application.
Application manifest object to be stored.
Application manifest object.
Updates existing application. Make sure that you specifiy the application id within the update object.
Application object.
Response wrapped in [[IResult]]
Example
const updateApp = {
id: 38
name: 'Updated application'
};
(async () => {
const {data, res} = await applicationService.update(updateApp);
})();
Updates the availability of the given application to the provided value.
Entity or Id of the application.
The new application availability.
Updated application.
Dynamic options are stored on the API in a specific config: {}
object. They can
be used to configure the app dynamically.
Note: To avoids conflicts with the default Config, it is recommended to use a certain namespace.
Entity or Id of the application.
Configuration to be updated.
Returns updated configuration.
Clones a given application. The application name, key, and context-path will be prefixed with
clone
and if necessary a number.