| 64 | |
| 65 | |
| 66 | def get_all_meta(args): |
| 67 | config = get_config() |
| 68 | |
| 69 | url = ( |
| 70 | f'{config["API_URL_BASE"]}/api/datasources/' |
| 71 | f"{args.accountName}/{args.containerName}/meta" |
| 72 | ) |
| 73 | resp = call_get_all_metadata_api(url) |
| 74 | |
| 75 | items = json.loads(resp.text) |
| 76 | if len(items) == 0: |
| 77 | print( |
| 78 | f"There are no items in account: {args.accountName}" |
| 79 | f", container: {args.containerName}." |
| 80 | ) |
| 81 | else: |
| 82 | for item in items: |
| 83 | print( |
| 84 | f"Account: {item['accountName']}, Container: {item['containerName']}" |
| 85 | f", filepath: {item['filepath']}" |
| 86 | ) |
| 87 | |
| 88 | return resp.text |
| 89 | |
| 90 | |
| 91 | def call_create_meta_api(url, payload): |