-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #411 from LerianStudio/develop
Merge: develop to main
- Loading branch information
Showing
33 changed files
with
5,108 additions
and
112 deletions.
There are no files selected for viewing
This file contains 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
File renamed without changes.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
openapi: 3.0.1 | ||
info: | ||
contact: | ||
name: Discord community | ||
url: https://discord.gg/DnhqKwkGv3 | ||
description: This is a swagger documentation for the Midaz Audit API | ||
license: | ||
name: Apache 2.0 | ||
url: http://www.apache.org/licenses/LICENSE-2.0.html | ||
termsOfService: http://swagger.io/terms/ | ||
title: Midaz Audit API | ||
version: 1.0.0 | ||
servers: | ||
- url: //localhost:3005/ | ||
paths: | ||
/v1/organizations/{organization_id}/ledgers/{ledger_id}/audit/{audit_id}/audit-logs: | ||
get: | ||
description: Audit logs to check if any was tampered | ||
parameters: | ||
- description: Authorization Bearer Token | ||
in: header | ||
name: Authorization | ||
required: true | ||
schema: | ||
type: string | ||
- description: Request ID | ||
in: header | ||
name: Midaz-Id | ||
schema: | ||
type: string | ||
- description: Organization ID | ||
in: path | ||
name: organization_id | ||
required: true | ||
schema: | ||
type: string | ||
- description: Ledger ID | ||
in: path | ||
name: ledger_id | ||
required: true | ||
schema: | ||
type: string | ||
- description: Audit ID | ||
in: path | ||
name: audit_id | ||
required: true | ||
schema: | ||
type: string | ||
responses: | ||
"200": | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/HashValidationResponse' | ||
description: OK | ||
summary: Audit logs by reference ID | ||
tags: | ||
- Audit | ||
/v1/organizations/{organization_id}/ledgers/{ledger_id}/audit/{audit_id}/read-logs: | ||
get: | ||
description: Get log values from Trillian by reference ID | ||
parameters: | ||
- description: Authorization Bearer Token | ||
in: header | ||
name: Authorization | ||
required: true | ||
schema: | ||
type: string | ||
- description: Request ID | ||
in: header | ||
name: Midaz-Id | ||
schema: | ||
type: string | ||
- description: Organization ID | ||
in: path | ||
name: organization_id | ||
required: true | ||
schema: | ||
type: string | ||
- description: Ledger ID | ||
in: path | ||
name: ledger_id | ||
required: true | ||
schema: | ||
type: string | ||
- description: Audit ID | ||
in: path | ||
name: audit_id | ||
required: true | ||
schema: | ||
type: string | ||
responses: | ||
"200": | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/LogsResponse' | ||
description: OK | ||
summary: "Get \tlogs by reference ID" | ||
tags: | ||
- Audit | ||
components: | ||
schemas: | ||
HashValidationResponse: | ||
description: HashValidationResponse show if any of the logs has been tampered | ||
example: | ||
auditId: auditId | ||
isTampered: true | ||
calculatedHash: calculatedHash | ||
expectedHash: expectedHash | ||
properties: | ||
auditId: | ||
type: string | ||
calculatedHash: | ||
type: string | ||
expectedHash: | ||
type: string | ||
isTampered: | ||
type: boolean | ||
type: object | ||
Leaf: | ||
description: Leaf stores each audit log | ||
example: | ||
body: | ||
- 0 | ||
- 0 | ||
leaf_id: leaf_id | ||
properties: | ||
body: | ||
items: | ||
type: integer | ||
type: array | ||
leaf_id: | ||
type: string | ||
type: object | ||
LogsResponse: | ||
description: LogsResponse is the response with audit log values | ||
example: | ||
leaves: | ||
- body: | ||
- 0 | ||
- 0 | ||
leaf_id: leaf_id | ||
- body: | ||
- 0 | ||
- 0 | ||
leaf_id: leaf_id | ||
tree_id: 6 | ||
properties: | ||
leaves: | ||
items: | ||
$ref: '#/components/schemas/Leaf' | ||
type: array | ||
tree_id: | ||
type: integer | ||
type: object | ||
x-original-swagger-version: "2.0" |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.