Change devices details
post
https://api.connect.jfrog.io/v1/
devices_details
Change devices details
You can set whichever parameters you would like to change on each request.
Example
Python
1
import json
2
import requests
3
4
5
6
#Upswift tokens
7
user_token = "<user_token>"
8
device_token = "<device_token>"
9
10
json_content = {'user_token': user_token,
11
'device_token': device_token,
12
'device_name': 'new_device_name',
13
'group': 'Production',
14
'tag': 'test_tag',
15
'apps': [{'app_name': 'default_app', 'version': 'v1.1'}],
16
'description': 'Some kind of description for that device'}
17
18
call_request = requests.post("https://api.connect.jfrog.io/v1/devices_details", 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
Copied!
Copy link