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