-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmarchetemporali.openapi.json
More file actions
1 lines (1 loc) · 11.3 KB
/
Copy pathmarchetemporali.openapi.json
File metadata and controls
1 lines (1 loc) · 11.3 KB
1
{"openapi":"3.0.0","info":{"description":"This web service allows you to purchase time stamps and time stamp documents.","version":"1.0.0","title":"Marche Temporali","termsOfService":"https://openapi.it/en/terms-and-conditions","contact":{"url":"https://openapi.it/en/support","name":"Support"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"servers":[{"url":"https://ws.marchetemporali.com","description":"Production"},{"url":"https://test.ws.marchetemporali.com","description":"Sandbox"}],"tags":[{"name":"Marche","description":"Calls for the purchase and control of time stamps"},{"name":"Marcatura","description":"Calls for time stamping, analysis and verification of documents"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Marca":{"type":"object","properties":{"id_marca":{"type":"string"},"type":{"type":"string"},"qty_marca":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"id_entita":{"type":"string"},"timestamp_acquisto":{"type":"string","format":"date-time"}}},"PostBodyCheckLotto":{"type":"object","properties":{"username":{"type":"string","description":"name assigned to use the time stamp batch"},"password":{"type":"string","description":"password assigned to use the time stamp batch"},"type":{"type":"string","description":"brand of time stamp; if not passed it is 'infocert' by default","enum":["infocert","aruba"]}},"required":["username","password"]},"PostBodyMarca":{"type":"object","properties":{"username":{"type":"string","description":"name of the time stamp batch"},"password":{"type":"string","description":"password of the time stamp batch"},"file":{"type":"string","description":"file you want to mark: you can pass the remote url of the file or the content encoded in base64 or sha256"},"mime":{"type":"boolean","description":"if false returns only the timestamp on the file, if true a file in mime format containing original file and timestamp"},"type":{"type":"string","description":"brand of time stamp; if not passed it is 'infocert' by default","enum":["infocert","aruba"]}},"required":["file"]},"Marcatura":{"type":"object","properties":{"available":{"type":"integer"},"used":{"type":"integer"},"timestamp_header":{"type":"string"},"timestamp_body":{"type":"string"},"transaction":{"type":"string"}}},"VerificaAnalisi":{"type":"object","properties":{"transaction":{"type":"string"},"UTCTime":{"type":"string"},"SN":{"type":"string"},"TSAName":{"type":"string"}}}}},"paths":{"/marche":{"get":{"tags":["Marche"],"summary":"List of your time stamps","description":"This endpoint shows you the list of all purchased timestamps","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Marca"}},"success":{"type":"boolean"},"message":{"type":"string"},"error":{"type":"integer"}}},"example":{"data":[{"id_marca":"deb184df120e0487b64a2f77a4ab60c5","type":"aruba","qty_marca":"50","username":"FAKETxxxxltravia09","password":"FAKxxxB71AJHN","id_entita":"159xxx2274","timestamp_acquisto":"2020-09-10 12:04:35"},{"id_marca":"79b1ab2ce4825c955ba7b99c6d1a4b5f","type":"infocert","qty_marca":"100","username":"FAKExxxR325","password":"FAKEinxxxxx2","id_entita":"159xxx2274","timestamp_acquisto":"2020-09-10 12:10:52"}],"success":true,"message":"","error":null}}}},"404":{"description":"Not Found","content":{"application/json":{"example":{"success":false,"message":"you have not assigned any batch of time stamps","error":200,"data":null}}}}}}},"/marche/{type}/{qty}":{"get":{"tags":["Marche"],"summary":"Purchase of time stamps","description":"This endpoint allows you to purchase time stamps.\n\n### Applying Time stamps (Marche Temporali)\nTo apply a time stamp to a document via the API, use the `POST /marca` endpoint.\n\n---\n### Provider Compatibility\n\n> **Important Note:**\n> The `POST /marca` endpoint is designed to work **exclusively** with time stamps purchased from **Infocert**. It is **not** compatible with timestamps acquired from **Aruba**.\n\n---\n### Procedure for Aruba Timestamps\nIf you are using Aruba time stamps, you must use their dedicated tools.\n\n**ArubaSign Web Portal**\nAn online tool for applying time stamps directly in a web browser.\n- **Link:** [https://arubasign.arubapec.it/asonline/](https://arubasign.arubapec.it/asonline/)\n\n**ArubaSign Desktop Software**\nA downloadable application for managing digital signatures and timestamps on your computer.\n- **Link:** [https://www.pec.it/gestione-supporto-firma-digitale.aspx](https://www.pec.it/gestione-supporto-firma-digitale.aspx)\n","parameters":[{"name":"type","in":"path","description":"Type of time stamps","required":true,"schema":{"type":"string","enum":["infocert","aruba"],"example":"aruba"}},{"name":"qty","in":"path","description":"Quantity of time stamps","required":true,"schema":{"type":"string","example":"50"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id_marca":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"}}},"success":{"type":"boolean"},"message":{"type":"string"},"error":{"type":"integer"}}},"example":{"data":{"id_marca":"1bab897afce17bd101c54d6011851d10","username":"FAKETSxxxxravia10","password":"FAKE6GxxxxSFA"},"message":"Marca erogata","success":true,"error":null}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"success":false,"message":"wrong type: INFOCERT|ARUBA","error":202,"data":null}}}},"402":{"description":"Payment Required","content":{"application/json":{"example":{"success":false,"message":"Insufficient Credit in Wallet: 182.03","error":206,"data":null}}}},"404":{"description":"Not Found","content":{"application/json":{"example":{"success":false,"message":"lot not available","error":205,"data":null}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"example":{"success":false,"message":"internal error, new identity not inserted","error":204,"data":null}}}}}}},"/availability/{type}/{qty}":{"get":{"tags":["Marche"],"summary":"Availability of time stamps","description":"This endpoint allows you to check if a certain type of time stamps are available for purchase","parameters":[{"name":"type","in":"path","description":"Type of time stamps","required":true,"schema":{"type":"string","enum":["infocert","aruba"],"example":"aruba"}},{"name":"qty","in":"path","description":"Quantity of time stamps","required":true,"schema":{"type":"string","example":"50"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"availability":{"type":"string"}}},"success":{"type":"boolean"},"message":{"type":"string"},"error":{"type":"integer"}}},"example":{"data":{"availability":"89"},"success":true,"message":"","error":null}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"success":false,"message":"amount required","error":209,"data":null}}}}}}},"/check_lotto":{"post":{"tags":["Marche"],"summary":"Control over consumption","description":"This endpoint allows you to check, in relation to a specific batch, how many timestamps you have used and how many you have left","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostBodyCheckLotto"},"example":{"username":"J0xxxx57","password":"R6xxxh5X"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"available":{"type":"string"},"used":{"type":"string"}}},"success":{"type":"boolean"},"message":{"type":"string"},"error":{"type":"integer"}}},"example":{"data":{"available":"250","used":"0"},"message":"DESCR = Marche per J0xxxx57; disponibili 250 consumate 0","success":true,"error":null}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"success":false,"message":"password required","error":212,"data":null}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"example":{"success":false,"message":"","error":213,"data":null}}}}}}},"/marca":{"post":{"tags":["Marcatura"],"summary":"Time stamp a document","description":"This endpoint allows you to mark a document in time; if you do not have our timestamps you can still mark a document by passing only 'file' parameter.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostBodyMarca"},"example":{"username":"J0xxxx51","password":"5xxxxxg2","file":"https://dev.ws.marchetemporali.com/test.pdf"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Marcatura"},"success":{"type":"boolean"},"message":{"type":"string"},"error":{"type":"integer"}}},"example":{"data":{"available":99,"used":1,"timestamp_header":"{\"Date\":\"Fri, 11 Sep 2020 09:27:19 GMT\",\"Server\":\"Apache\",\"X-Powered-By\":\"Application Server Infocert - marca4\",\"Set-Cookie\":\"JSESSIONID=A9FCAAAFFF1320E96F19AD43F7B590A2.marca4; Path=\\/; Secure\",\"ICTSA-UCTTime\":\"20200911092720Z\",\"ICTSA-SN\":\"428957893\",\"ICTSA-TSAName\":\"CN=ICEDTS02202009, OU=TSA, O=INFOCERT SPA, C=IT\",\"Content-Disposition\":\"attachment; filename=\\\"test.tsr\\\"\",\"Content-Type\":\"application\\/timestamp-reply; name=\\\"test.tsr\\\"\",\"Content-Length\":\"3584\"}","timestamp_body":"https://dev.ws.marchetemporali.com/MARCATURE/7fc398e761e35b0c766698b27b4e7430/test.tsr","transaction":"7fc398e761e35b0c766698b27b4e7430"},"message":"Documento Marcato Correttamente","success":true,"error":null}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"success":false,"message":"file required","error":216,"data":null}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"example":{"success":false,"message":"","error":220,"data":null}}}}}}},"/analisi":{"post":{"tags":["Marcatura"],"summary":"Analyze the marking","description":"This endpoint allows you to analyze the timestamped file","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"string","description":"file you want to analyze: you can pass the remote url of the file or the content encoded in base64"}}},"example":{"file":"https://dev.ws.marchetemporali.com/MARCATURE/62623dd3b911198e3c67a0d836830719/test.m7m"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VerificaAnalisi"},"success":{"type":"boolean"},"message":{"type":"string"},"error":{"type":"integer"}}},"example":{"data":{"transaction":"691929c444e1d7d0c6c2f78d0fed3be7","UTCTime":"20200911131712Z","SN":"429027229","TSAName":"CN=ICEDTS02202009, OU=TSA, O=INFOCERT SPA, C=IT"},"message":"Documento Verificato Correttamente","success":true,"error":null}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"success":false,"message":"Wrong Document URL or document unavailable","error":224,"data":null}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"example":{"success":false,"message":"","error":225,"data":null}}}}}}}},"externalDocs":{"description":"First time here? Generate a new access token","url":"https://console.openapi.com/oauth"},"security":[{"bearerAuth":[]}]}