Skip to content

Instantly share code, notes, and snippets.

@sergiomario
Created January 10, 2018 10:51
Show Gist options
  • Save sergiomario/4d993b602deb624b338d7dd717441d19 to your computer and use it in GitHub Desktop.
Save sergiomario/4d993b602deb624b338d7dd717441d19 to your computer and use it in GitHub Desktop.
API = {
'apply': BASE_URL+'/api/v1/system/apply',
'login': BASE_URL+'/api/v1/system/login',
'service_ssh': BASE_URL+'/api/v1/service/ssh',
}
def apply():
response = requests.post(API['apply'], headers=headers, verify=False)
result = json.loads(response.content.decode('utf-8'))
if result['data']['sucess']:
return result['data']['config_hash']
return False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment