-
Notifications
You must be signed in to change notification settings - Fork 17
/
API12.txt
151 lines (136 loc) · 5.08 KB
/
API12.txt
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
o-charts API
http://test.o-charts.org/shop/index.php?fc=module&module=occharts&controller=api
-----------------------------------------------------------------
da1742dc776b6fb18866ef197c508952
4534e7d09405b8f2b9d22e4e4c8070e3
-----------------------------------------------------------------
PUT request encoded as "application/x-www-form-urlencoded".
All parameters set as name/value pairs.
taskId=getlist&username=myemail%40rr-consult.net&key=da1742dc776b6fb18866ef197c508952
-----------------------------------------------------------------
<UUID I1="5bcab7b3-7bd8-3e4a-9c90-b1cad18fe991"/>
<HWH H1="4CCB9FAE"/>
<DATE D1="1495412808"/>
HW_ID: standard oesenc hash of (I1+H1) concatenated strings.
-----------------------------------------------------------------
xfprName = oc03R_1495855975.fpr
-----------------------------------------------------------------
xfpr = 0D616C7C7C157C080A1704565A545A02570A1A02535001180B5001581A0C520D09185A045658530409525C0C01041716093F0D7C6E7D187D0404150172777B0C7E74701B180B3B087D746C70151973040C16080101000D0C020C06011B1A063F
-----------------------------------------------------------------
result values
0: Undetermined error
1: Succesful
2: Production server in maintenance mode
3: Wrong data
4: Wrong password
5: Wrong user
6: Wrong key
7: System name already exist (when someone tries to set a new system name that already exist for that user)
8: System name does not exist (when someone tries to assign a system which does not exist for that user)
9: Wrong xfpr name (extension)
10: Wrong xfpr name (length)
11: Wrong xfpr name (OS)
12: Wrong xfpr name (version oc01 or oc03)
13: Wrong xfpr name (date)
14: Production server error (14:<error code>:<english message>)
15: Webshop database error
16: Expired chart (if someone tries to assign a system or request a download of an expired chart)
17: Chart already has a system assigned
18: Chart already has that system assigned (when someone tries to assign a system to a slot that already has the same system assigned to the other slot)
19: This request is already being processed or available for downloading
20: This chart does not have this system assigned
21: Wrong System name
1- First login.
a. taskId: login
b. username: user email on shop
c. password: user password on shop
Response (XML):
a. result: see result values
b. key: an unique hash built from password and some secret keys (note for me: pass, cookie, custumer_id).
<response>
<result>1</result>
<key>xxxxxxxxxxxxxxxxxxxxxx</key>
</response>
2- Upload fingerprint.
a. taskId: xfpr
b. username:
c. key: got after first login
d. systemName: 3 characters minimum and 15 maximum. Only lowercase letters and numbers allowed. No symbols or spaces
e. xfpr: obfuscated file. ascii hex, 2 bytes per character.
f. xfprName: as usual.
Response (XML): same as request 4
4- Get list of charts assigned to that system or with no assigment.
a. taskId: getlist
b. username:
c. key:
Response (XML):
a. result: see result values
b. list:
b0. chartid (unique chart id on shop)
b1. order (order reference)
b2. chartName
b3. chartEdition (current chart edition on shop)
b4. chartPublication (YY-MM-DD)
b5. state (unassigned/expired/requestable/processing/download)
b6. link (download link, void if state is not "download")
b7. size (download file size, void if state is not "download")
b8. expiration (YY-MM-DD)
b9. lastRequested (current chart edition on computer, void if never requested yet)
b10. purchase (YY-MM-DD)
b11. quantityId (if user bought more than one item of the same chart)
b12. slot (0, 1)
b13. assignedSystemName (assigned system name, void if no assigment)
b14. thumbLink
b15. sha1
c. list:
c0. systemName (system names for that user)
<response>
<result>1</result>
<chart>
<order>GBLAQPDMG</order>
<purchase>2017-05-18</purchase>
<expiration>2018-05-18</expiration>
<chartid>15</chartid>
<thumbLink>http://test.o-charts.org/shop/img/p/4/4/44-home_default.jpg</thumbLink>
<chartEdition>2017-2</chartEdition>
<chartPublication>2017-04-01</chartPublication>
<chartName>British Isles 2017</chartName>
<quantityId>1</quantityId>
<slot>0</slot>
<assignedSystemName>mylaptop</assignedSystemName>
<lastRequested>2017-2</lastRequested>
<state>download</state>
<link>https://ocharts.blob.core.windows.net/test911/roberto/1495103442.01/roberto-FRatl_UK-2017-1.zip?sr=b&sp=r&sig=QsfNOaCaMI61NS1Xm1JAtThklq5zXFpiQiKt7/5o1AA%3D&sv=2015-07-08&se=2017-05-26T12%3A04%3A21Z</link>
<size>1GB</size>
<sha1>TsfkOaCaMI61NS1Xm1JAtThklq5zXFpiQiK6y</sha1>
</chart>
<chart>
....
</chart>
<systemName>mylaptop</systemName>
<systemName>mydesktop</systemName>
<systemName>myandroid</systemName>
<systemName>myraspberry</systemName>
</response>
5. Chart assigment
a. taskId: assign
b. username:
c. key:
d. systemName:
e. chartid
f. order
g. quantityId
h. slot
Response (XML): same as request 4
6. chart request
a. taskId: request
b. username:
c. key:
d. assignedSystemName:
e. chartid
f. order
g. quantityId
h. slot
Response (XML): same as request 4