Repository navigation
Expand file tree
/
Copy pathexamples
More file actions
43 lines (26 loc) · 1.96 KB
/
Copy pathexamples
File metadata and controls
43 lines (26 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
###LOGIN
########
curl -s -d '{"auth": {"passwordCredentials": {"username": "tester1", "password": "testpass"}, "tenantName":"tester1"}}' -H 'Content-type: application/json' http://10.30.239.228:5000/v2.0/tokens
curl -XGET -i -k -H "X-Auth-Token: 640a85fd092b4265946168b941be1da9" https://10.30.239.228:8080/v1/AUTH_e26e8353dbd043ae857ad6962e02f5cc
########
###GET_METADATA
########
curl -XGET -i -k -H "X-Auth-Token: 640a85fd092b4265946168b941be1da9" -H "stacksync-api: true" "https://10.30.239.228:8080/v1/AUTH_e26e8353dbd043ae857ad6962e02f5cc/stacksync/metadata"
##FOLDER
curl -XGET -i -k -H "X-Auth-Token: 640a85fd092b4265946168b941be1da9" -H "stacksync-api: true" "https://10.30.239.228:8080/v1/AUTH_e26e8353dbd043ae857ad6962e02f5cc/stacksync/metadata?file_id=295032074532275582"
curl -XGET -i -k -H "X-Auth-Token: 640a85fd092b4265946168b941be1da9" -H "stacksync-api: true" "https://10.30.239.228:8080/v1/AUTH_e26e8353dbd043ae857ad6962e02f5cc/stacksync/metadata?file_id=295032074532275582&list=true"
##FILE
curl -XGET -i -k -H "X-Auth-Token: 640a85fd092b4265946168b941be1da9" -H "stacksync-api: true" "https://10.30.239.228:8080/v1/AUTH_e26e8353dbd043ae857ad6962e02f5cc/stacksync/metadata?file_id=-6325143143878324378"
########
###PUT_File
########
curl -XPUT -i -k -H "X-Auth-Token: 63bdc8aaa0ac4a2394482d203ba09713" -H "stacksync-api: true" -H "list: true" "https://10.30.239.228:8080/v1/AUTH_e26e8353dbd043ae857ad6962e02f5cc/stacksync/files?file_name=blabla&overwrite=true" -T Path_file
########
###DELETE_FILE
########
curl -XDELETE -i -k -H "X-Auth-Token: 640a85fd092b4265946168b941be1da9" -H "stacksync-api: true" "https://10.30.239.228:8080/v1/AUTH_e26e8353dbd043ae857ad6962e02f5cc/stacksync/files?file_id=8988892293679382566"
########
###CREATE_FOLDER
########
curl -XPOST -i -k -H "X-Auth-Token: 640a85fd092b4265946168b941be1da9" -H "stacksync-api: true" "https://10.30.239.228:8080/v1/AUTH_e26e8353dbd043ae857ad6962e02f5cc/stacksync/files?folder_name=patata"