MLTF - OPTION API'S
URL: <jira_base_url>/rest/mltf-rest/1.0/option/<id>
Method: GET
Result:
{
"self": "<jira_base_url>/rest/mltf-rest/1.0/option/15925",
"id": 15925,
"value": "32 GB",
"path": "Hardware/RAM/32 GB",
"pathLower": "hardware/ram/32 gb",
"optionsTreeId": 52,
"parentOptionId": 15924,
"level": 3,
"sequence": 1,
"hasChildren": false,
"enable": true,
"selectable": true,
"visible": false,
"projects": [],
"validProjects": [
"all"
],
"issueTypes": [],
"validIssueTypes": [
"all"
],
"groups": [],
"validGroups": [
"all"
]
}
URL: <jira_base_url>/rest/mltf-rest/1.0/option
Method: GET
Result:
[
{
"self": "<jira_base_url>/rest/mltf-rest/1.0/option/15925",
"id": 15925,
"value": "32 GB",
"path": "Hardware/RAM/32 GB",
"pathLower": "hardware/ram/32 gb",
"optionsTreeId": 52,
"parentOptionId": 15924,
"level": 3,
"sequence": 1,
"hasChildren": false,
"enable": true,
"selectable": true,
"visible": false,
"projects": [],
"validProjects": [
"all"
],
"issueTypes": [],
"validIssueTypes": [
"all"
],
"groups": [],
"validGroups": [
"all"
]
}
]
URL: <jira_base_url>/rest/mltf-rest/1.0/option/by-options-tree?optionsTreeId=<option_tree_id>
Method: GET
Result:
[
{
"self": "<jira_base_url>/rest/mltf-rest/1.0/option/15925",
"id": 15925,
"value": "32 GB",
"path": "Hardware/RAM/32 GB",
"pathLower": "hardware/ram/32 gb",
"optionsTreeId": 52,
"parentOptionId": 15924,
"level": 3,
"sequence": 1,
"hasChildren": false,
"enable": true,
"selectable": true,
"visible": false,
"projects": [],
"validProjects": [
"all"
],
"issueTypes": [],
"validIssueTypes": [
"all"
],
"groups": [],
"validGroups": [
"all"
]
}
]
URL: <jira_base_url>/rest/mltf-rest/1.0/option
Method: POST
Content Type: application/json
Body:
If a top-level option is to be added, the "parentOptionId" value should be given "-1".
If a new option will be added under a parent; The id value of the relevant option should be written to the "parentOptionId" value
{
"value": "32 GB",
"optionsTreeId": 52,
"parentOptionId": 15924,
"projects": [],
"issueTypes": [],
"groups": []
}
Result:
{
"self": "<jira_base_url>/rest/mltf-rest/1.0/option/15925",
"id": 15925,
"value": "32 GB",
"path": "Hardware/RAM/32 GB",
"pathLower": "hardware/ram/32 gb",
"optionsTreeId": 52,
"parentOptionId": 15924,
"level": 3,
"sequence": 1,
"hasChildren": false,
"enable": true,
"selectable": true,
"visible": false,
"projects": [],
"validProjects": [
"all"
],
"issueTypes": [],
"validIssueTypes": [
"all"
],
"groups": [],
"validGroups": [
"all"
]
}
URL: <jira_base_url>/rest/mltf-rest/1.0/option/create-multiple-options
Method: POST
Content Type: application/json
Body:
{
"values": ["8 GB", "16 GB"],
"optionsTreeId": 52,
"parentOptions": [15924],
"projects": [],
"issueTypes": [],
"groups": []
}
Result:
[
{
"self": "<jira_base_url>/rest/mltf-rest/1.0/option/15929",
"id": 15929,
"value": "8 GB",
"path": "Hardware/RAM/8 GB",
"pathLower": "hardware/ram/8 gb",
"optionsTreeId": 52,
"parentOptionId": 15924,
"level": 3,
"sequence": 2,
"hasChildren": false,
"enable": true,
"selectable": true,
"visible": false,
"projects": [],
"validProjects": [
"all"
],
"issueTypes": [],
"validIssueTypes": [
"all"
],
"groups": [],
"validGroups": [
"all"
]
},
{
"self": "<jira_base_url>/rest/mltf-rest/1.0/option/15930",
"id": 15930,
"value": "16 GB",
"path": "Hardware/RAM/16 GB",
"pathLower": "hardware/ram/16 gb",
"optionsTreeId": 52,
"parentOptionId": 15924,
"level": 3,
"sequence": 3,
"hasChildren": false,
"enable": true,
"selectable": true,
"visible": false,
"projects": [],
"validProjects": [
"all"
],
"issueTypes": [],
"validIssueTypes": [
"all"
],
"groups": [],
"validGroups": [
"all"
]
}
]
URL: <jira_base_url>/rest/mltf-rest/1.0/option/sort-alphabetically
Method: POST
Content Type: application/json
Body:
{
"optionsTreeId": 52,
"reverse": false
}
URL: <jira_base_url>/rest/mltf-rest/1.0/option/sort
Method: POST
Content Type: application/json
Body:
{
"optionIds": [15930, 15929, 15926]
}
URL: <jira_base_url>/rest/mltf-rest/1.0/option/<id>
Method: PUT
Content Type: application/json
Body:
{
"value": "32 GB Updated",
"visible": false,
"projects": [],
"issueTypes": [],
"groups": []
}
Result:
{
"self": "<jira_base_url>/rest/mltf-rest/1.0/option/15925",
"id": 15925,
"value": "32 GB Updated",
"path": "Hardware/RAM/32 GB Updated",
"pathLower": "hardware/ram/32 gb updated",
"optionsTreeId": 52,
"parentOptionId": 15924,
"level": 3,
"sequence": 1,
"hasChildren": false,
"enable": true,
"selectable": true,
"visible": false,
"projects": [],
"validProjects": [
"all"
],
"issueTypes": [],
"validIssueTypes": [
"all"
],
"groups": [],
"validGroups": [
"all"
]
}
URL: <jira_base_url>/rest/mltf-rest/1.0/option/<id>/move
Method: PUT
Content Type: application/json
Body:
If the parent option id is null, the option becomes a first-level option.
{
"parentOptionId": 15928
}
Result:
{
"self": "<jira_base_url>/rest/mltf-rest/1.0/option/15926",
"id": 15926,
"value": "32 GB",
"path": "Hardware/RAM 2/32 GB",
"pathLower": "hardware/ram 2/32 gb",
"optionsTreeId": 52,
"parentOptionId": 15928,
"level": 3,
"sequence": 1,
"hasChildren": false,
"enable": true,
"selectable": true,
"visible": false,
"projects": [],
"validProjects": [
"all"
],
"issueTypes": [],
"validIssueTypes": [
"all"
],
"groups": [],
"validGroups": [
"all"
]
}
URL: <jira_base_url>/rest/mltf-rest/1.0/option/<id>/enable
Method: PUT
Result:
{
"self": "<jira_base_url>/rest/mltf-rest/1.0/option/15926",
"id": 15926,
"value": "32 GB",
"path": "Hardware/RAM/32 GB",
"pathLower": "hardware/ram/32 gb",
"optionsTreeId": 52,
"parentOptionId": 15924,
"level": 3,
"sequence": 1,
"hasChildren": false,
"enable": true,
"selectable": true,
"visible": false,
"projects": [],
"validProjects": [
"all"
],
"issueTypes": [],
"validIssueTypes": [
"all"
],
"groups": [],
"validGroups": [
"all"
]
}
URL: <jira_base_url>/rest/mltf-rest/1.0/option/<id>/disable
Method: PUT
Result:
{
"self": "<jira_base_url>/rest/mltf-rest/1.0/option/15926",
"id": 15926,
"value": "32 GB",
"path": "Hardware/RAM/32 GB",
"pathLower": "hardware/ram/32 gb",
"optionsTreeId": 52,
"parentOptionId": 15924,
"level": 3,
"sequence": 1,
"hasChildren": false,
"enable": false,
"selectable": false,
"visible": false,
"projects": [],
"validProjects": [
"all"
],
"issueTypes": [],
"validIssueTypes": [
"all"
],
"groups": [],
"validGroups": [
"all"
]
}
URL: <jira_base_url>/rest/mltf-rest/1.0/option/15925
Method: DELETE