23 lines
567 B
Python
23 lines
567 B
Python
|
import json
|
||
|
from apiclient.config import get_cfg
|
||
|
from apiclient.client import api_client
|
||
|
from apiclient.oauth_helper import get_legacy_token
|
||
|
|
||
|
|
||
|
ENV = 'qa'
|
||
|
cfg = get_cfg(ENV)
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
token = get_legacy_token(ENV)
|
||
|
|
||
|
api_call = {
|
||
|
"token": token,
|
||
|
"method": "GET",
|
||
|
"url": cfg["api_url"] + '/data-delivery/role',
|
||
|
"headers": {'Content-Type': 'application/json'},
|
||
|
"body": {"application_id": 1}
|
||
|
}
|
||
|
|
||
|
api_response = api_client(api_call)
|
||
|
print(json.dumps(api_response, indent=4))
|