1# MissionInfo (System API) 2 3The module defines detailed information about a mission. The information can be obtained through [getMissionInfo](js-apis-app-ability-missionManager-sys.md#missionmanagergetmissioninfo). 4 5> **NOTE** 6> 7> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. 8> The APIs provided by this module are system APIs. 9 10## Modules to Import 11 12```ts 13import { missionManager } from '@kit.AbilityKit'; 14``` 15 16## Attributes 17 18**System API**: This is a system API. 19 20**System capability**: SystemCapability.Ability.AbilityRuntime.Mission 21 22| Name| Type| Read-Only| Optional| Description| 23| -------- | -------- | -------- | -------- | -------- | 24| missionId | number | No| No| Mission ID.| 25| runningState | number | No| No| Running state of the mission.| 26| lockedState | boolean | No| No| Locked state of the mission. **true** if locked, **false** otherwise.| 27| timestamp | string | No| No| Latest time when the mission was created or updated.| 28| want | [Want](js-apis-app-ability-want.md) | No| No| Want information of the mission.| 29| label | string | No| No| Label of the mission.| 30| iconPath | string | No| No| Path of the mission icon.| 31| continuable | boolean | No| No| Whether the mission can be continued on another device. **true** if the mission can be continued on another device, **false** otherwise.| 32| abilityState<sup>10+</sup> | number | No| No| Capability status of the mission.| 33| unclearable<sup>10+</sup> | boolean | No| No| Whether the mission can be manually deleted. **true** if the mission can be manually deleted, **false** otherwise.| 34 35**Example** 36```ts 37import { missionManager } from '@kit.AbilityKit'; 38import { BusinessError } from '@kit.BasicServicesKit'; 39 40try { 41 missionManager.getMissionInfo('', 1, (error, data) => { 42 if (error) { 43 // Process service logic errors. 44 console.error(`getMissionInfo failed, error.code: ${error.code}, error.message: ${error.message}`); 45 return; 46 } 47 48 console.info(`getMissionInfo missionId is: ${JSON.stringify(data.missionId)}`); 49 console.info(`getMissionInfo runningState is: ${JSON.stringify(data.runningState)}`); 50 console.info(`getMissionInfo lockedState is: ${JSON.stringify(data.lockedState)}`); 51 console.info(`getMissionInfo timestamp is: ${JSON.stringify(data.timestamp)}`); 52 console.info(`getMissionInfo want is: ${JSON.stringify(data.want)}`); 53 console.info(`getMissionInfo label is: ${JSON.stringify(data.label)}`); 54 console.info(`getMissionInfo iconPath is: ${JSON.stringify(data.iconPath)}`); 55 console.info(`getMissionInfo continuable is: ${JSON.stringify(data.continuable)}`); 56 console.info(`getMissionInfo unclearable is: ${JSON.stringify(data.unclearable)}`); 57 }); 58} catch (paramError) { 59 console.error(`error: ${(paramError as BusinessError).code}, ${(paramError as BusinessError).message}`); 60} 61``` 62