1# MissionInfo (System API)
2
3The **MissionInfo** 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 and cannot be called by third-party applications.
19
20**System capability**: SystemCapability.Ability.AbilityRuntime.Mission
21
22| Name | Type | Readable | Writable | Description |
23| -------- | -------- | -------- | -------- | -------- |
24| missionId | number | Yes | Yes | Mission ID.|
25| runningState | number | Yes | Yes | Running state of the mission. |
26| lockedState | boolean | Yes | Yes | Locked state of the mission. |
27| timestamp | string | Yes | Yes | Latest time when the mission was created or updated. |
28| want | [Want](js-apis-app-ability-want.md) | Yes | Yes | Want information of the mission. |
29| label | string | Yes | Yes | Label of the mission. |
30| iconPath | string | Yes | Yes | Path of the mission icon. |
31| continuable | boolean | Yes | Yes | Whether the mission can be continued on another device. |
32| abilityState<sup>10+</sup> | number | Yes | Yes | Capability status of the mission. |
33| unclearable<sup>10+</sup> | boolean | Yes | Yes | Whether the mission can be manually deleted. |
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.log(`getMissionInfo missionId is: ${JSON.stringify(data.missionId)}`);
49    console.log(`getMissionInfo runningState is: ${JSON.stringify(data.runningState)}`);
50    console.log(`getMissionInfo lockedState is: ${JSON.stringify(data.lockedState)}`);
51    console.log(`getMissionInfo timestamp is: ${JSON.stringify(data.timestamp)}`);
52    console.log(`getMissionInfo want is: ${JSON.stringify(data.want)}`);
53    console.log(`getMissionInfo label is: ${JSON.stringify(data.label)}`);
54    console.log(`getMissionInfo iconPath is: ${JSON.stringify(data.iconPath)}`);
55    console.log(`getMissionInfo continuable is: ${JSON.stringify(data.continuable)}`);
56    console.log(`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