File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,22 @@ Goal: implement sending data from 1c to Google BigQuery
44Problem: 1C can't generate session key for connection to BigQuery
55Resolution: create REST function for handling session key creation
66
7+ # Api
8+ Endpoint deployed at ` https://bigquery-1c.web.app/sign `
9+
10+ ### Request format
11+ ``` json
12+ {"pem" : " key" ,
13+ "body" : " body to encrypt" }
14+ ```
15+ ### Responce format
16+ ``` json
17+ {"code" : " status code" ,
18+ "message" : " result, is digest or error"
19+ }
20+ ```
21+ On successful execution ` code ` is ` 200 ` and message will contain digest.
22+ On error mostly 500 or 400 code will be thrown.
723
824## To create one line PEM
925Api accepts json, to pass multiline string in json you need to convert newlines to ` \n ` .
@@ -20,5 +36,7 @@ curl --location --request POST 'https://bigquery-1c.web.app/sign' \
2036--data-raw ' {"pem": "-----BEGIN RSA PRIVATE KEY-----\nMIICWwIBAAKBgQCwmZ78ATcFE9p/TJZskVaDpzkJXp8+TiIL6Ik+A/GqVaAAZ/vO\n8WWnX/n4i4Bt+w0yR2Jr4LEuH2r3vNsfeMZKXwg3h8oWJUBG9hY3sFSmoohNlHxm\nMF9vWzpSKJtkpgzYkfVXppEzpWHFQGZdmO2GLnmPpyN3CmN64DdiQ1Z0vQIDAQAB\nAoGAA+FcPO1J6DKnemSUaY5H+FyUREBv/054MQrK+THc/YEkIt4mCkYDlcnmFC/8\ngm4hvBkVcIlfW0QVdZwQtIBS2wYdVONC2NpXjiBRPj0TzH2f87bvWSOO6i6pJ/+o\nUVGB85ZZqLP1fzp7KpHZ2jk6chlpEpxbOHKLTZ4o7zKqMAECQQDkciet7Svy0jb0\noW6DVXCLtIYhMbYxDKRCYEDzcf2o/YGTI1olTjqFJApewbHqrx6lk4ZWOn03w7EI\nDDQaMWgdAkEAxeaYR2vT8O9myK3uc77uuZfOwmRGPHgsPTxwWhVRVKgIuDLeo7cH\nWiBjO+EaEPgfvPT3SMMk4wYo34mERsPdIQJAW0AF/YFZJrs1XG4HOMquE//d+/Bh\neCI2kpTkHNoRmqj4Uw+x+GjRE1GcGtGAAeBFe5n79QGT9uxiEHbfcP7/OQJAEVOx\nPX+ZXNz5GNTxrbyn1iQOfEKfS6gR54KlK532Mv1LViVODPN3d1KinZmF2LqAvOCN\nzhcX4bCmX3wA0tlPQQJAT9fuwVEN0cOHiX4OEL36KPQ7/rrbKOb6y5iDv1VfoKCL\nhOqU+7yhUj88M2D2gd/JTlp1XI6GfhH+Y7sUdGKP/g==\n-----END RSA PRIVATE KEY-----\n","body": "body"}'
2137```
2238
39+
40+
2341## todo
2442- 1c example
You can’t perform that action at this time.
0 commit comments