docs/_static/nuts-event-store.yaml
openapi: "3.0.0"
info:
title: Nuts event store spec
description: >
API specification for event store. The event store records the events of the in-flight transactions.
version: 0.1.0
license:
name: GPLv3
paths:
/events:
get:
summary: "Return all events currently in store"
operationId: list
tags:
- event
responses:
'200':
description: "OK response, body holds list of events"
content:
application/json:
schema:
$ref: "#/components/schemas/EventListResponse"
/events/{uuid}:
get:
summary: "Find a specific event"
operationId: getEvent
tags:
- event
parameters:
- name: uuid
in: path
description: "uuid of consent request action, generated by first event"
required: true
schema:
type: string
format: uuid
responses:
'200':
description: "OK response, body holds outcome of request"
content:
application/json:
schema:
$ref: "#/components/schemas/Event"
'404':
description: "Not found, probably due to restart and thus no longer recorded, from which can be assumed that it has been completed."
content:
text/plain:
example: "event not found"
schema:
type: string
/events/by_external_id/{external_id}:
get:
summary: "Find a specific event by its externalId"
operationId: getEventByExternalId
tags:
- event
parameters:
- name: external_id
in: path
description: "external_id of consent request action"
required: true
schema:
type: string
responses:
'200':
description: "OK response, body holds outcome of request"
content:
application/json:
schema:
$ref: "#/components/schemas/Event"
'404':
description: "Not found, probably due to restart and thus no longer recorded, from which can be assumed that it has been completed."
content:
text/plain:
example: "event not found"
schema:
type: string
components:
schemas:
EventListResponse:
properties:
events:
type: array
items:
$ref: "#/components/schemas/Event"
Event:
required:
- uuid
- name
- retryCount
- externalId
- initiatorLegalEntity
- payload
properties:
uuid:
type: string
description: "V4 UUID"
name:
type: string
enum: [
'consentRequest constructed', 'consentRequest in flight', 'consentRequest flow errored', 'consentRequest flow success',
'distributed ConsentRequest received', 'all signatures present', 'consentRequest in flight for final state', 'consentRequest valid',
'consentRequest acked', 'consentRequest nacked', 'attachment signed', 'consent distributed',
'completed', 'error'
]
retryCount:
type: integer
description: "0 to X"
externalId:
type: string
description: "ID calculated by crypto using BSN and private key of initiatorLegalEntity"
consentId:
type: string
description: "V4 UUID assigned by Corda to a record"
transactionId:
type: string
description: "V4 UUID assigned by Corda to a transaction"
initiatorLegalEntity:
$ref: "#/components/schemas/Identifier"
payload:
type: string
description: "NewConsentRequestState JSON as accepted by consent-bridge (:ref:`nuts-consent-bridge-api`)"
error:
type: string
description: "error reason in case of a functional error"
Identifier:
type: string
description: >
Generic identifier used for representing BSN, agbcode, etc.
It's always constructed as an URN followed by a double colon (:) and then the identifying value of the given URN
example: urn:oid:2.16.840.1.113883.2.4.6.1:00000007