Apps
delete
https://api.connect.jfrog.io/v1/
device_apps
Delete Apps from devices
Possible types and values:
  • device_filter object:
    • filters key:
      • Possible values for the type key:
        • specific_device - Set this value if you want to filter one specific device. The value of the value key of this type is the ID of the device you want to filter (you can obtain the id on Connect dashboard). The possible operand key values for this type are: is, is_not
        • tag - Set this value if you want to filter devices by a tag. The value of the value key of this type is the name of the tag you want to filter (you can obtain the tag name on Connect dashboard). The possible operand key values for this type are: is, is_not
        • app - Set this value if you want to filter devices by the apps that are set to them. The value of the value key of this type is the app name. The possible operand key values for this type are: is, is_not.
        • device_state - Set this value if you want to filter devices by their state. The possible values of the value key of this type are: online, offline. The possible operand key value of this type is: is
        • update_status - Set this value if you want to filter devices by their last update status. The possible values of the value key of this type are: pending, in_progress, success, failed, aborted. The possible operand key value of this type is: is, is_not
All values must be of type: String.
Full payload example:
1
{
2
"user_token": "<user token>",
3
"app_name": "some-app-name",
4
"device_filter": {"project": {"name": "Demo"},
5
"groups": [{"name": "TestGroup1"}, {"name": "TestGroup2"}],
6
"filters": [{"type": "specific_device",
7
"operand": "is",
8
"value": "d-4ec7-1be9"}]},
9
}
Copied!

Code Example

Python
1
import json
2
import requests
3
4
#Upswift tokens
5
user_token = "<user token>"
6
7
json_content = {'user_token': user_token,
8
'app_name': 'some-name',
9
'device_filter': {'project': {'name': 'Demo'},
10
'groups': [{'name': 'TestGroup1'}, {'name': 'TestGroup2'}],
11
'filters': [{'type': 'specific_device',
12
'operand': 'is',
13
'value': 'd-4ec7-1be9'}]}
14
}
15
16
17
18
call_request = requests.delete("https://api.connect.jfrog.io/v1/device_apps", json=json_content)
19
call_response = json.loads(call_request.text)
20
21
if call_request.status_code != 200:
22
if call_request.status_code == 429:
23
error = "API limit reached"
24
else:
25
error = call_response["error_message"]
26
print(error)
27
else:
28
response_message = call_response["message"]
29
30
Copied!