Created
June 22, 2022 13:16
-
-
Save mat-work/35403a7ba537e038d7d01ff683059e2b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openapi": "3.0.1", | |
"info": { | |
"title": "walt.id ESSIF API", | |
"description": "The walt.id public API documentation", | |
"contact": { | |
"name": "walt.id", | |
"url": "https://walt.id", | |
"email": "[email protected]" | |
}, | |
"version": "1.11.0-SNAPSHOT" | |
}, | |
"externalDocs": { | |
"description": "walt.id Docs", | |
"url": "https://docs.walt.id/api" | |
}, | |
"servers": [ | |
{ | |
"url": "/" | |
} | |
], | |
"paths": { | |
"/api-routes": { | |
"get": { | |
"summary": "Get apiRoutes", | |
"operationId": "getApiRoutes", | |
"responses": { | |
"200": { | |
"description": "Default response" | |
} | |
} | |
} | |
}, | |
"/health": { | |
"get": { | |
"summary": "Returns HTTP 200 in case all services are up and running", | |
"operationId": "health", | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/client/onboard": { | |
"post": { | |
"tags": [ | |
"ESSIF Client" | |
], | |
"summary": "EBSI onboarding flow, which requests a Verifiable Authorization from the EOS.", | |
"operationId": "onboard", | |
"requestBody": { | |
"description": "DID to be registered on the EBSI Blockchain; Bearer token to be used to authenticate the user. Get it from here https://app.preprod.ebsi.eu/users-onboarding", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/EbsiOnboardRequest" | |
} | |
} | |
} | |
}, | |
"responses": { | |
"200": { | |
"description": "Onboarding flow completed successfully", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/client/auth": { | |
"post": { | |
"tags": [ | |
"ESSIF Client" | |
], | |
"summary": "Runs the ESSIF Authorization API flow", | |
"operationId": "createDid", | |
"requestBody": { | |
"description": "DID", | |
"content": { | |
"text/plain": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"responses": { | |
"200": { | |
"description": "Auth flow executed successfully", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/client/registerDid": { | |
"post": { | |
"tags": [ | |
"ESSIF Client" | |
], | |
"summary": "Registers DID on the EBSI Blockchain", | |
"operationId": "registerDid", | |
"requestBody": { | |
"description": "DID", | |
"content": { | |
"text/plain": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"responses": { | |
"200": { | |
"description": "DID registered successfully", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/client/timestamp": { | |
"post": { | |
"tags": [ | |
"ESSIF Client" | |
], | |
"summary": "Creates a timestamp on the EBSI ledger.", | |
"operationId": "createTimestamp", | |
"requestBody": { | |
"description": "The DID (or ETH key alias) indicates which key to be used for creating the timestamp. The data will be written to the data-field of the timestamp.", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/EbsiTimestampRequest" | |
} | |
} | |
} | |
}, | |
"responses": { | |
"200": { | |
"description": "Transaction ID of the timestamp request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/client/timestamp/id/{timestampId}": { | |
"get": { | |
"tags": [ | |
"ESSIF Client" | |
], | |
"summary": "Get a timestamp based on the timestamp ID", | |
"operationId": "getByTransactionId", | |
"parameters": [ | |
{ | |
"name": "timestampId", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "The resolved timestamp", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/client/timestamp/txhash/{txhash}": { | |
"get": { | |
"tags": [ | |
"ESSIF Client" | |
], | |
"summary": "Get a timestamp based on the transaction Hash", | |
"operationId": "getByTransactionHash", | |
"parameters": [ | |
{ | |
"name": "txhash", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "The resolved timestamp", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"components": { | |
"schemas": { | |
"EbsiOnboardRequest": { | |
"required": [ | |
"bearerToken", | |
"did" | |
], | |
"type": "object", | |
"properties": { | |
"bearerToken": { | |
"type": "string" | |
}, | |
"did": { | |
"type": "string" | |
} | |
} | |
}, | |
"EbsiTimestampRequest": { | |
"required": [ | |
"data", | |
"did" | |
], | |
"type": "object", | |
"properties": { | |
"did": { | |
"type": "string" | |
}, | |
"ethDidAlias": { | |
"type": "string" | |
}, | |
"data": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"securitySchemes": { | |
"http": { | |
"type": "http", | |
"description": "HTTP Bearer Token authentication", | |
"name": "bearerAuth", | |
"in": "header", | |
"scheme": "bearer", | |
"bearerFormat": "JWT" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment