diff --git a/src/keria/app/agenting.py b/src/keria/app/agenting.py index e48019be..3b7480cf 100644 --- a/src/keria/app/agenting.py +++ b/src/keria/app/agenting.py @@ -56,6 +56,8 @@ from keri.vdr.eventing import Tevery from keri.app import challenging +from keria.utils.openapi import dataclassFromFielddom + from . import aiding, notifying, indirecting, credentialing, ipexing, delegating from . import grouping as keriagrouping from .serving import GracefulShutdownDoer @@ -1845,6 +1847,31 @@ def on_get(req, rep): rep.data = json.dumps(states).encode("utf-8") +exnFieldDomV1 = serdering.SerderKERI.Fields[serdering.Protocols.keri][ + serdering.Vrsn_1_0 +][serdering.Ilks.exn] +EXN_V_1, EXNSchema_V_1 = dataclassFromFielddom("EXN_V_1", exnFieldDomV1) +exnFieldDomV2 = serdering.SerderKERI.Fields[serdering.Protocols.keri][ + serdering.Vrsn_2_0 +][serdering.Ilks.exn] +EXN_V_2, EXNSchema_V_2 = dataclassFromFielddom("EXN_V_2", exnFieldDomV2) + +issFieldDomV1 = serdering.SerderKERI.Fields[serdering.Protocols.keri][ + serdering.Vrsn_1_0 +][serdering.Ilks.iss] +ISS_V_1, ISSSchema_V_1 = dataclassFromFielddom("ISS_V_1", issFieldDomV1) + +revFieldDomV1 = serdering.SerderKERI.Fields[serdering.Protocols.keri][ + serdering.Vrsn_1_0 +][serdering.Ilks.rev] +REV_V_1, REVSchema_V_1 = dataclassFromFielddom("REV_V_1", revFieldDomV1) + +vcpFieldDomV1 = serdering.SerderKERI.Fields[serdering.Protocols.keri][ + serdering.Vrsn_1_0 +][serdering.Ilks.vcp] +VCP_V_1, VCPSchema_V_1 = dataclassFromFielddom("VCP_V_1", vcpFieldDomV1) + + @dataclass class KeyEventRecord: """Key Event Record for KEL""" diff --git a/src/keria/app/aiding.py b/src/keria/app/aiding.py index 079ac433..d5d824f5 100644 --- a/src/keria/app/aiding.py +++ b/src/keria/app/aiding.py @@ -23,16 +23,7 @@ from marshmallow_dataclass import class_schema from ..core import longrunning, httping from ..utils.openapi import namedtupleToEnum, dataclassFromFielddom -from .credentialing import ( - ICP_V_1, - ICP_V_2, - ROT_V_1, - ROT_V_2, - DIP_V_1, - DIP_V_2, - DRT_V_1, - DRT_V_2, -) +from keri.core.serdering import Protocols, Vrsn_1_0, Vrsn_2_0, SerderKERI logger = ogler.getLogger() @@ -87,6 +78,41 @@ def loadEnds(app, agency, authn): return aidEnd +@dataclass +class Seal: + s: str + d: str + i: Optional[str] = field( + default=None, metadata={"marshmallow_field": fields.String(allow_none=False)} + ) + + +ixnFieldDomV1 = SerderKERI.Fields[Protocols.keri][Vrsn_1_0][coring.Ilks.ixn] +IXN_V_1, IXNSchema_V_1 = dataclassFromFielddom("IXN_V_1", ixnFieldDomV1) +ixnFieldDomV2 = SerderKERI.Fields[Protocols.keri][Vrsn_2_0][coring.Ilks.ixn] +IXN_V_2, IXNSchema_V_2 = dataclassFromFielddom("IXN_V_2", ixnFieldDomV2) + +icpFieldDomV1 = SerderKERI.Fields[Protocols.keri][Vrsn_1_0][coring.Ilks.icp] +ICP_V_1, ICPSchema_V_1 = dataclassFromFielddom("ICP_V_1", icpFieldDomV1) +icpFieldDomV2 = SerderKERI.Fields[Protocols.keri][Vrsn_2_0][coring.Ilks.icp] +ICP_V_2, ICPSchema_V_2 = dataclassFromFielddom("ICP_V_2", icpFieldDomV2) + +rotFieldDomV1 = SerderKERI.Fields[Protocols.keri][Vrsn_1_0][coring.Ilks.rot] +ROT_V_1, ROTSchema_V_1 = dataclassFromFielddom("ROT_V_1", rotFieldDomV1) +rotFieldDomV2 = SerderKERI.Fields[Protocols.keri][Vrsn_2_0][coring.Ilks.rot] +ROT_V_2, ROTSchema_V_2 = dataclassFromFielddom("ROT_V_2", rotFieldDomV2) + +dipFieldDomV1 = SerderKERI.Fields[Protocols.keri][Vrsn_1_0][coring.Ilks.dip] +DIP_V_1, DIPSchema_V_1 = dataclassFromFielddom("DIP_V_1", dipFieldDomV1) +dipFieldDomV2 = SerderKERI.Fields[Protocols.keri][Vrsn_2_0][coring.Ilks.dip] +DIP_V_2, DIPSchema_V_2 = dataclassFromFielddom("DIP_V_2", dipFieldDomV2) + +drtFieldDomV1 = SerderKERI.Fields[Protocols.keri][Vrsn_1_0][coring.Ilks.drt] +DRT_V_1, DRTSchema_V_1 = dataclassFromFielddom("DRT_V_1", drtFieldDomV1) +drtFieldDomV2 = SerderKERI.Fields[Protocols.keri][Vrsn_2_0][coring.Ilks.drt] +DRT_V_2, DRTSchema_V_2 = dataclassFromFielddom("DRT_V_2", drtFieldDomV2) + + @dataclass class KeyStateRecord(basing.KeyStateRecord): k: list[str] = field( diff --git a/src/keria/app/credentialing.py b/src/keria/app/credentialing.py index 9cd86df6..42336628 100644 --- a/src/keria/app/credentialing.py +++ b/src/keria/app/credentialing.py @@ -23,6 +23,19 @@ from ..core import httping, longrunning from marshmallow import fields, Schema as MarshmallowSchema from typing import List, Dict, Any, Optional, Tuple, Literal, Union +from .aiding import ( + Seal, + ICP_V_1, + ICP_V_2, + ROT_V_1, + ROT_V_2, + DIP_V_1, + DIP_V_2, + DRT_V_1, + DRT_V_2, + IXN_V_1, + IXN_V_2, +) logger = help.ogler.getLogger() @@ -77,15 +90,6 @@ class ACDCAttributes: # Override the schema to force additionalProperties=True -@dataclass -class Seal: - s: str - d: str - i: Optional[str] = field( - default=None, metadata={"marshmallow_field": fields.String(allow_none=False)} - ) - - acdcCustomTypes = { "a": ACDCAttributes, "A": Union[str, List[Any]], @@ -169,33 +173,18 @@ class Anchor: d: str -ixnCustomTypes = { - "a": List[Seal], -} -ixnFieldDomV1 = SerderKERI.Fields[Protocols.keri][Vrsn_1_0][coring.Ilks.ixn] -IXN_V_1, IXNSchema_V_1 = dataclassFromFielddom("IXN_V_1", ixnFieldDomV1, ixnCustomTypes) -ixnFieldDomV2 = SerderKERI.Fields[Protocols.keri][Vrsn_2_0][coring.Ilks.ixn] -IXN_V_2, IXNSchema_V_2 = dataclassFromFielddom("IXN_V_2", ixnFieldDomV2, ixnCustomTypes) - -icpFieldDomV1 = SerderKERI.Fields[Protocols.keri][Vrsn_1_0][coring.Ilks.icp] -ICP_V_1, ICPSchema_V_1 = dataclassFromFielddom("ICP_V_1", icpFieldDomV1) -icpFieldDomV2 = SerderKERI.Fields[Protocols.keri][Vrsn_2_0][coring.Ilks.icp] -ICP_V_2, ICPSchema_V_2 = dataclassFromFielddom("ICP_V_2", icpFieldDomV2) - -rotFieldDomV1 = SerderKERI.Fields[Protocols.keri][Vrsn_1_0][coring.Ilks.rot] -ROT_V_1, ROTSchema_V_1 = dataclassFromFielddom("ROT_V_1", rotFieldDomV1) -rotFieldDomV2 = SerderKERI.Fields[Protocols.keri][Vrsn_2_0][coring.Ilks.rot] -ROT_V_2, ROTSchema_V_2 = dataclassFromFielddom("ROT_V_2", rotFieldDomV2) - -dipFieldDomV1 = SerderKERI.Fields[Protocols.keri][Vrsn_1_0][coring.Ilks.dip] -DIP_V_1, DIPSchema_V_1 = dataclassFromFielddom("DIP_V_1", dipFieldDomV1) -dipFieldDomV2 = SerderKERI.Fields[Protocols.keri][Vrsn_2_0][coring.Ilks.dip] -DIP_V_2, DIPSchema_V_2 = dataclassFromFielddom("DIP_V_2", dipFieldDomV2) - -drtFieldDomV1 = SerderKERI.Fields[Protocols.keri][Vrsn_1_0][coring.Ilks.drt] -DRT_V_1, DRTSchema_V_1 = dataclassFromFielddom("DRT_V_1", drtFieldDomV1) -drtFieldDomV2 = SerderKERI.Fields[Protocols.keri][Vrsn_2_0][coring.Ilks.drt] -DRT_V_2, DRTSchema_V_2 = dataclassFromFielddom("DRT_V_2", drtFieldDomV2) +AnchoringEvent = Union[ + IXN_V_1, + IXN_V_2, + ICP_V_1, + ICP_V_2, + ROT_V_1, + ROT_V_2, + DIP_V_1, + DIP_V_2, + DRT_V_1, + DRT_V_2, +] @dataclass @@ -211,18 +200,7 @@ class ClonedCredential: chains: List[Dict[str, Any]] status: Union[CredentialStateIssOrRev, CredentialStateBisOrBrv] anchor: Anchor - anc: Union[ - "IXN_V_1", - "IXN_V_2", - "ICP_V_1", - "ICP_V_2", - "ROT_V_1", - "ROT_V_2", - "DIP_V_1", - "DIP_V_2", - "DRT_V_1", - "DRT_V_2", - ] + anc: AnchoringEvent # type: ignore ancatc: str diff --git a/src/keria/app/delegating.py b/src/keria/app/delegating.py index 214f2f5b..da0fcf66 100644 --- a/src/keria/app/delegating.py +++ b/src/keria/app/delegating.py @@ -234,6 +234,18 @@ def on_post(self, req, rep, name): rep (Response): falcon.Response HTTP response object name (str): human readable name or prefix for Hab to rename + responses: + 200: + description: Delegation approved and interaction event created. + content: + application/json: + schema: + $ref: '#/components/schemas/Operation' + 400: + description: Bad request. This could be due to missing or invalid parameters. + 404: + description: Not found. The specified identifier does not exist. + """ if not name: raise falcon.HTTPBadRequest(description="name is required") diff --git a/src/keria/app/grouping.py b/src/keria/app/grouping.py index 2bea1693..ae787b5f 100644 --- a/src/keria/app/grouping.py +++ b/src/keria/app/grouping.py @@ -6,8 +6,10 @@ """ import json +from dataclasses import dataclass import falcon +from typing import Optional, Union from keri import core from keri.app import habbing from keri.core import coring, eventing, serdering @@ -15,6 +17,7 @@ from keri.kering import SerializeError from keria.core import httping, longrunning +from keria.app import aiding, credentialing, agenting logger = ogler.getLogger() @@ -40,6 +43,19 @@ def on_post(req, rep, name): rep (falcon.Response): HTTP response object name (str): AID prefix or human-readable name of Hab to load credentials for + responses: + 200: + description: Successfully created the multisig request. + content: + application/json: + schema: + type: object + $ref: '#/components/schemas/Exn' + 400: + description: Bad request. This could be due to missing or invalid parameters, or the identifier is not a multisig. + 404: + description: Alias or prefix {name} is not a valid reference to an identifier. + """ agent = req.context.agent @@ -167,6 +183,11 @@ def on_post(req, rep, name): responses: 202: description: Successfully created the multisig request. + content: + application/json: + schema: + type: object + $ref: '#/components/schemas/Operation' 400: description: Bad request. Bad request. This could be due to missing or invalid parameters. 404: @@ -251,6 +272,117 @@ def on_post(req, rep, name): rep.data = op.to_json().encode("utf-8") +@dataclass +class MultisigInceptEmbeds: + icp: Union["aiding.ICP_V_1", "aiding.ICP_V_2"] # type: ignore + + +@dataclass +class MultisigRotateEmbeds: + rot: Union["credentialing.ROT_V_1", "credentialing.ROT_V_2"] # type: ignore + + +@dataclass +class MultisigInteractEmbeds: + ixn: Union["credentialing.IXN_V_1", "credentialing.IXN_V_2"] # type: ignore + + +@dataclass +class MultisigRegistryInceptEmbeds: + vcp: "agenting.VCP_V_1" # type: ignore + anc: credentialing.AnchoringEvent # type: ignore + + +@dataclass +class MultisigIssueEmbeds: + acdc: Union["credentialing.ACDC_V_1", "credentialing.ACDC_V_2"] # type: ignore + iss: "agenting.ISS_V_1" # type: ignore + anc: credentialing.AnchoringEvent # type: ignore + + +@dataclass +class MultisigRevokeEmbeds: + rev: "agenting.REV_V_1" # type: ignore + anc: credentialing.AnchoringEvent # type: ignore + + +@dataclass +class MultisigRpyEmbeds: + rpy: Union["aiding.RPY_V_1", "aiding.RPY_V_2"] # type: ignore + + +@dataclass +class MultisigExnEmbeds: + exn: Union["agenting.EXN_V_1", "agenting.EXN_V_2"] # type: ignore + + +@dataclass +class ExnEmbedsBase: + d: str + + +@dataclass +class ExnInceptEmbeds(ExnEmbedsBase, MultisigInceptEmbeds): + pass + + +@dataclass +class ExnRotateEmbeds(ExnEmbedsBase, MultisigRotateEmbeds): + pass + + +@dataclass +class ExnInteractEmbeds(ExnEmbedsBase, MultisigInteractEmbeds): + pass + + +@dataclass +class ExnRegistryInceptEmbeds(ExnEmbedsBase, MultisigRegistryInceptEmbeds): + pass + + +@dataclass +class ExnIssueEmbeds(ExnEmbedsBase, MultisigIssueEmbeds): + pass + + +@dataclass +class ExnRevokeEmbeds(ExnEmbedsBase, MultisigRevokeEmbeds): + pass + + +@dataclass +class ExnRpyEmbeds(ExnEmbedsBase, MultisigRpyEmbeds): + pass + + +@dataclass +class ExnExnEmbeds(ExnEmbedsBase, MultisigExnEmbeds): + pass + + +# Type alias for all possible ExnEmbeds types +ExnEmbeds = Union[ + ExnInceptEmbeds, + ExnRotateEmbeds, + ExnInteractEmbeds, + ExnRegistryInceptEmbeds, + ExnIssueEmbeds, + ExnRevokeEmbeds, + ExnRpyEmbeds, + ExnExnEmbeds, +] + + +@dataclass +class ExnMultisig: + exn: Union["agenting.EXN_V_1", "agenting.EXN_V_2"] # type: ignore + paths: dict + groupName: Optional[str] = None + memberName: Optional[str] = None + sender: Optional[str] = None + + class MultisigRequestResourceEnd: """Resource endpoint class for getting full data for a mulisig exn request from a notification""" @@ -277,6 +409,12 @@ def on_get(req, rep, said): responses: 200: description: Successfully retrieved the multisig resource. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ExnMultisig' 400: description: Bad request. This could be due to missing or invalid parameters. 404: diff --git a/src/keria/app/ipexing.py b/src/keria/app/ipexing.py index 944a50ea..ca55d9bc 100644 --- a/src/keria/app/ipexing.py +++ b/src/keria/app/ipexing.py @@ -47,6 +47,11 @@ def on_post(req, rep, name): responses: 200: description: long running operation of IPEX admit + content: + application/json: + schema: + type: object + $ref: '#/components/schemas/Operation' """ agent = req.context.agent @@ -214,6 +219,11 @@ def on_post(req, rep, name): responses: 200: description: long running operation of IPEX grant + content: + application/json: + schema: + type: object + $ref: '#/components/schemas/Operation' """ agent = req.context.agent @@ -367,8 +377,13 @@ def on_post(req, rep, name): tags: - Credentials responses: - 200: - description: long running operation of IPEX apply + 200: + description: long running operation of IPEX apply + content: + application/json: + schema: + type: object + $ref: '#/components/schemas/Operation' """ agent = req.context.agent @@ -518,6 +533,11 @@ def on_post(req, rep, name): responses: 200: description: long running operation of IPEX offer + content: + application/json: + schema: + type: object + $ref: '#/components/schemas/Operation' """ agent = req.context.agent @@ -671,6 +691,11 @@ def on_post(req, rep, name): responses: 200: description: long running operation of IPEX agree + content: + application/json: + schema: + type: object + $ref: '#/components/schemas/Operation' """ agent = req.context.agent diff --git a/src/keria/app/notifying.py b/src/keria/app/notifying.py index bdcd9eae..47b8842d 100644 --- a/src/keria/app/notifying.py +++ b/src/keria/app/notifying.py @@ -10,6 +10,9 @@ import falcon from keria.core import httping +from dataclasses import dataclass, field +from typing import Optional +from marshmallow import fields def loadEnds(app): @@ -19,6 +22,28 @@ def loadEnds(app): app.add_route("/notifications/{said}", noteRes) +@dataclass +class NotificationData: + r: Optional[str] = field( + default=None, metadata={"marshmallow_field": fields.String(allow_none=False)} + ) + d: Optional[str] = field( + default=None, metadata={"marshmallow_field": fields.String(allow_none=False)} + ) + m: Optional[str] = field( + default=None, metadata={"marshmallow_field": fields.String(allow_none=False)} + ) + # Override the schema to force additionalProperties=True + + +@dataclass +class Notification: + i: str + dt: str + r: bool + a: NotificationData + + class NotificationCollectionEnd: @staticmethod def on_get(req, rep): @@ -44,7 +69,13 @@ def on_get(req, rep): responses: 200: - description: List of contact information for remote identifiers + description: List of contact information for remote identifiers + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Notification' """ agent = req.context.agent diff --git a/src/keria/app/specing.py b/src/keria/app/specing.py index 4d3267bd..f65f82b1 100644 --- a/src/keria/app/specing.py +++ b/src/keria/app/specing.py @@ -5,7 +5,8 @@ from apispec.core import VALID_METHODS, APISpec from apispec.ext.marshmallow import MarshmallowPlugin -from keria.app import aiding, agenting +from keria.app import aiding, agenting, grouping, notifying +from keria.peer import exchanging from ..core import longrunning from ..utils.openapi import applyAltConstraintsToOpenApiSchema from . import credentialing @@ -51,47 +52,47 @@ def __init__(self, app, title, version="1.0.1", openapi_version="3.1.0"): "Anchor", schema=marshmallow_dataclass.class_schema(credentialing.Anchor)() ) self.spec.components.schema( - "Seal", schema=marshmallow_dataclass.class_schema(credentialing.Seal)() + "Seal", schema=marshmallow_dataclass.class_schema(aiding.Seal)() ) self.spec.components.schema( "IXN_V_1", - schema=marshmallow_dataclass.class_schema(credentialing.IXN_V_1)(), + schema=marshmallow_dataclass.class_schema(aiding.IXN_V_1)(), ) self.spec.components.schema( "IXN_V_2", - schema=marshmallow_dataclass.class_schema(credentialing.IXN_V_2)(), + schema=marshmallow_dataclass.class_schema(aiding.IXN_V_2)(), ) self.spec.components.schema( "ICP_V_1", - schema=marshmallow_dataclass.class_schema(credentialing.ICP_V_1)(), + schema=marshmallow_dataclass.class_schema(aiding.ICP_V_1)(), ) self.spec.components.schema( "ICP_V_2", - schema=marshmallow_dataclass.class_schema(credentialing.ICP_V_2)(), + schema=marshmallow_dataclass.class_schema(aiding.ICP_V_2)(), ) self.spec.components.schema( "ROT_V_1", - schema=marshmallow_dataclass.class_schema(credentialing.ROT_V_1)(), + schema=marshmallow_dataclass.class_schema(aiding.ROT_V_1)(), ) self.spec.components.schema( "ROT_V_2", - schema=marshmallow_dataclass.class_schema(credentialing.ROT_V_2)(), + schema=marshmallow_dataclass.class_schema(aiding.ROT_V_2)(), ) self.spec.components.schema( "DIP_V_1", - schema=marshmallow_dataclass.class_schema(credentialing.DIP_V_1)(), + schema=marshmallow_dataclass.class_schema(aiding.DIP_V_1)(), ) self.spec.components.schema( "DIP_V_2", - schema=marshmallow_dataclass.class_schema(credentialing.DIP_V_2)(), + schema=marshmallow_dataclass.class_schema(aiding.DIP_V_2)(), ) self.spec.components.schema( "DRT_V_1", - schema=marshmallow_dataclass.class_schema(credentialing.DRT_V_1)(), + schema=marshmallow_dataclass.class_schema(aiding.DRT_V_1)(), ) self.spec.components.schema( "DRT_V_2", - schema=marshmallow_dataclass.class_schema(credentialing.DRT_V_2)(), + schema=marshmallow_dataclass.class_schema(aiding.DRT_V_2)(), ) self.spec.components.schema( "RPY_V_1", schema=marshmallow_dataclass.class_schema(aiding.RPY_V_1)() @@ -99,6 +100,18 @@ def __init__(self, app, title, version="1.0.1", openapi_version="3.1.0"): self.spec.components.schema( "RPY_V_2", schema=marshmallow_dataclass.class_schema(aiding.RPY_V_2)() ) + self.spec.components.schema( + "VCP_V_1", + schema=marshmallow_dataclass.class_schema(agenting.VCP_V_1)(), + ) + self.spec.components.schema( + "EXN_V_1", + schema=marshmallow_dataclass.class_schema(agenting.EXN_V_1)(), + ) + self.spec.components.schema( + "EXN_V_2", + schema=marshmallow_dataclass.class_schema(agenting.EXN_V_2)(), + ) self.spec.components.schema( "Credential", schema=marshmallow_dataclass.class_schema(credentialing.ClonedCredential)(), @@ -144,7 +157,7 @@ def __init__(self, app, title, version="1.0.1", openapi_version="3.1.0"): {"$ref": "#/components/schemas/ACDC_V_2"}, ] } - credentialSchema["properties"]["anc"] = { + ancEvent = { "oneOf": [ {"$ref": "#/components/schemas/IXN_V_1"}, {"$ref": "#/components/schemas/IXN_V_2"}, @@ -158,6 +171,7 @@ def __init__(self, app, title, version="1.0.1", openapi_version="3.1.0"): {"$ref": "#/components/schemas/DRT_V_2"}, ] } + credentialSchema["properties"]["anc"] = ancEvent # CredentialState self.spec.components.schemas["CredentialState"] = { @@ -298,28 +312,179 @@ def __init__(self, app, title, version="1.0.1", openapi_version="3.1.0"): schema=marshmallow_dataclass.class_schema(agenting.KeyEventRecord)(), ) keyEventRecordSchema = self.spec.components.schemas["KeyEventRecord"] - keyEventRecordSchema["properties"]["ked"] = { + keyEventRecordSchema["properties"]["ked"] = ancEvent + + # Register the AgentConfig schema + self.spec.components.schema( + "AgentConfig", + schema=marshmallow_dataclass.class_schema(agenting.AgentConfig)(), + ) + + # Register mulisig exn schemas + self.spec.components.schemas["Exn"] = { + "oneOf": [ + {"$ref": "#/components/schemas/EXN_V_1"}, + {"$ref": "#/components/schemas/EXN_V_2"}, + ] + } + self.spec.components.schemas["Icp"] = { "oneOf": [ - # Key events V1.0 {"$ref": "#/components/schemas/ICP_V_1"}, - {"$ref": "#/components/schemas/ROT_V_1"}, - {"$ref": "#/components/schemas/IXN_V_1"}, - {"$ref": "#/components/schemas/DIP_V_1"}, - {"$ref": "#/components/schemas/DRT_V_1"}, - # Key events V2.0 {"$ref": "#/components/schemas/ICP_V_2"}, + ] + } + self.spec.components.schemas["Rot"] = { + "oneOf": [ + {"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}, + ] + } + self.spec.components.schemas["Vcp"] = { + "oneOf": [ + {"$ref": "#/components/schemas/VCP_V_1"}, + ] + } + self.spec.components.schemas["Iss"] = { + "oneOf": [ + {"$ref": "#/components/schemas/ISS_V_1"}, + ] + } + self.spec.components.schemas["Ixn"] = { + "oneOf": [ + {"$ref": "#/components/schemas/IXN_V_1"}, {"$ref": "#/components/schemas/IXN_V_2"}, - {"$ref": "#/components/schemas/DIP_V_2"}, - {"$ref": "#/components/schemas/DRT_V_2"}, + ] + } + self.spec.components.schemas["Rpy"] = { + "oneOf": [ + {"$ref": "#/components/schemas/RPY_V_1"}, + {"$ref": "#/components/schemas/RPY_V_2"}, ] } - # Register the AgentConfig schema + # Register Notification schema self.spec.components.schema( - "AgentConfig", - schema=marshmallow_dataclass.class_schema(agenting.AgentConfig)(), + "Notification", + schema=marshmallow_dataclass.class_schema(notifying.Notification)(), + ) + + # Patch the schema to force additionalProperties=True + notificationDataSchema = self.spec.components.schemas["NotificationData"] + notificationDataSchema["additionalProperties"] = True + + # Register the ExchangeResource schema + self.spec.components.schema( + "ExchangeResource", + schema=marshmallow_dataclass.class_schema(exchanging.ExchangeResource)(), + ) + exchangeResourceSchema = self.spec.components.schemas["ExchangeResource"] + exchangeResourceSchema["properties"]["exn"] = { + "$ref": "#/components/schemas/Exn" + } + + # Register Grouping schemas + self.spec.components.schema( + "MultisigInceptEmbeds", + schema=marshmallow_dataclass.class_schema(grouping.MultisigInceptEmbeds), + ) + self.spec.components.schemas["MultisigInceptEmbeds"]["properties"]["icp"] = { + "$ref": "#/components/schemas/Icp" + } + + self.spec.components.schema( + "MultisigRotateEmbeds", + schema=marshmallow_dataclass.class_schema(grouping.MultisigRotateEmbeds), + ) + self.spec.components.schemas["MultisigRotateEmbeds"]["properties"]["rot"] = { + "$ref": "#/components/schemas/Rot" + } + + self.spec.components.schema( + "MultisigInteractEmbeds", + schema=marshmallow_dataclass.class_schema(grouping.MultisigInteractEmbeds), + ) + self.spec.components.schemas["MultisigInteractEmbeds"]["properties"]["ixn"] = { + "$ref": "#/components/schemas/Ixn" + } + + self.spec.components.schema( + "MultisigRegistryInceptEmbeds", + schema=marshmallow_dataclass.class_schema( + grouping.MultisigRegistryInceptEmbeds + ), + ) + self.spec.components.schemas["MultisigRegistryInceptEmbeds"]["properties"][ + "vcp" + ] = {"$ref": "#/components/schemas/Vcp"} + self.spec.components.schemas["MultisigRegistryInceptEmbeds"]["properties"][ + "anc" + ] = ancEvent + + self.spec.components.schema( + "MultisigIssueEmbeds", + schema=marshmallow_dataclass.class_schema(grouping.MultisigIssueEmbeds), + ) + self.spec.components.schemas["MultisigIssueEmbeds"]["properties"]["acdc"] = { + "oneOf": [ + {"$ref": "#/components/schemas/ACDC_V_1"}, + {"$ref": "#/components/schemas/ACDC_V_2"}, + ] + } + self.spec.components.schemas["MultisigIssueEmbeds"]["properties"]["iss"] = { + "$ref": "#/components/schemas/Iss" + } + self.spec.components.schemas["MultisigIssueEmbeds"]["properties"]["anc"] = ( + ancEvent + ) + + self.spec.components.schema( + "MultisigRevokeEmbeds", + schema=marshmallow_dataclass.class_schema(grouping.MultisigRevokeEmbeds), + ) + self.spec.components.schemas["MultisigRevokeEmbeds"]["properties"]["rev"] = { + "$ref": "#/components/schemas/REV_V_1" + } + self.spec.components.schemas["MultisigRevokeEmbeds"]["properties"]["anc"] = ( + ancEvent + ) + + self.spec.components.schema( + "MultisigRpyEmbeds", + schema=marshmallow_dataclass.class_schema(grouping.MultisigRpyEmbeds), + ) + self.spec.components.schemas["MultisigRpyEmbeds"]["properties"]["rpy"] = { + "$ref": "#/components/schemas/Rpy" + } + + self.spec.components.schema( + "MultisigExnEmbeds", + schema=marshmallow_dataclass.class_schema(grouping.MultisigExnEmbeds), + ) + self.spec.components.schemas["MultisigExnEmbeds"]["properties"]["exn"] = { + "$ref": "#/components/schemas/Exn" + } + + self.spec.components.schema( + "ExnEmbeds", + schema=marshmallow_dataclass.class_schema(grouping.ExnEmbedsBase)(), + ) + exnEmbedsSchema = self.spec.components.schemas["ExnEmbeds"] + exnEmbedsSchema["oneOf"] = [ + {"$ref": "#/components/schemas/MultisigInceptEmbeds"}, + {"$ref": "#/components/schemas/MultisigRotateEmbeds"}, + {"$ref": "#/components/schemas/MultisigInteractEmbeds"}, + {"$ref": "#/components/schemas/MultisigRegistryInceptEmbeds"}, + {"$ref": "#/components/schemas/MultisigIssueEmbeds"}, + {"$ref": "#/components/schemas/MultisigRevokeEmbeds"}, + {"$ref": "#/components/schemas/MultisigRpyEmbeds"}, + {"$ref": "#/components/schemas/MultisigExnEmbeds"}, + ] + self.spec.components.schema( + "ExnMultisig", + schema=marshmallow_dataclass.class_schema(grouping.ExnMultisig)(), ) + exnMSchema = self.spec.components.schemas["ExnMultisig"] + exnMSchema["properties"]["exn"] = {"$ref": "#/components/schemas/Exn"} self.addRoutes(app) diff --git a/src/keria/peer/exchanging.py b/src/keria/peer/exchanging.py index faac0460..65d1c92a 100644 --- a/src/keria/peer/exchanging.py +++ b/src/keria/peer/exchanging.py @@ -6,6 +6,8 @@ """ import json +from typing import Union +from dataclasses import dataclass import falcon from keri import core @@ -13,6 +15,7 @@ from keri.peer import exchanging from keri.help import ogler from keria.core import httping +from keria.app import agenting logger = ogler.getLogger() @@ -77,6 +80,11 @@ def on_post(req, rep, name): responses: 202: description: Successfully posted the exchange message. + content: + application/json: + schema: + type: object + $ref: '#/components/schemas/Exn' 400: description: Bad request. This could be due to missing or invalid parameters. 404: @@ -146,6 +154,20 @@ def on_post(req, rep, name): rep.data = json.dumps(serder.ked).encode("utf-8") +@dataclass +class ExchangeResource: + """Data class for exchange message resource""" + + exn: Union["agenting.EXN_V_1", "agenting.EXN_V_2"] # type: ignore + pathed: dict + + def to_dict(self): + return { + "exn": self.exn, + "pathed": {k: v.decode("utf-8") for k, v in self.pathed.items()}, + } + + class ExchangeQueryCollectionEnd: @staticmethod def on_post(req, rep): @@ -181,6 +203,12 @@ def on_post(req, rep): responses: 200: description: Successfully retrieved the exchange messages. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ExchangeResource' 400: description: Bad request. This could be due to missing or invalid parameters. """ @@ -258,6 +286,11 @@ def on_get(req, rep, said): responses: 200: description: Successfully retrieved the exchange message. + content: + application/json: + schema: + type: object + $ref: '#/components/schemas/ExchangeResource' 404: description: The requested exchange message was not found. """ diff --git a/tests/app/test_specing.py b/tests/app/test_specing.py index 08fdaa4b..12b421ed 100644 --- a/tests/app/test_specing.py +++ b/tests/app/test_specing.py @@ -55,5 +55,5 @@ def test_spec_resource(helpers): # Assert on the entire JSON to ensure we are getting all the docs assert ( js - == '{"paths": {"/operations": {"get": {"summary": "Get list of long running operations", "parameters": [{"in": "query", "name": "type", "schema": {"type": "string"}, "required": false, "description": "filter list of long running operations by type"}], "responses": {"200": {"description": "list of long running operations", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/Operation"}}}}}}}}, "/oobis": {"post": {"summary": "Resolve OOBI and assign an alias for the remote identifier", "description": "Resolve OOBI URL or `rpy` message by process results of request and assign \'alias\' in contact data for resolved identifier", "tags": ["OOBIs"], "requestBody": {"required": true, "content": {"application/json": {"schema": {"description": "OOBI", "oneOf": [{"type": "object", "properties": {"oobialias": {"type": "string", "description": "alias to assign to the identifier resolved from this OOBI"}, "url": {"type": "string", "description": "URL OOBI"}, "rpy": {"type": "object", "description": "unsigned KERI `rpy` event message with endpoints"}}}]}}}}, "responses": {"202": {"description": "OOBI resolution to key state successful", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}}}}, "/states": {"get": {"summary": "Display key event log (KEL) for given identifier prefix", "description": "If provided qb64 identifier prefix is in Kevers, return the current state of the identifier along with the KEL and all associated signatures and receipts", "tags": ["Key Event Log"], "parameters": [{"in": "path", "name": "pre", "description": "qb64 identifier prefix of KEL to load", "schema": {"type": "string"}, "required": true}], "responses": {"200": {"description": "Key event log and key state of identifier", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/KeyStateRecord"}}}}}, "400": {"description": "Bad request, missing required fields"}, "404": {"description": "Identifier not found in Key event database"}}}}, "/events": {"get": {"summary": "Display key event log (KEL) for given identifier prefix", "description": "If provided qb64 identifier prefix is in Kevers, return the current state of the identifier along with the KEL and all associated signatures and receipts", "tags": ["Key Event Log"], "parameters": [{"in": "path", "name": "pre", "schema": {"type": "string"}, "required": true, "description": "qb64 identifier prefix of KEL to load"}], "responses": {"200": {"description": "Key event log and key state of identifier", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/KeyEventRecord"}}}}}, "404": {"description": "Identifier not found in Key event database"}}}}, "/queries": {"post": {"summary": "Display key event log (KEL) for given identifier prefix", "description": "If provided qb64 identifier prefix is in Kevers, return the current state of the identifier along with the KEL and all associated signatures and receipts", "tags": ["Query"], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["pre"], "properties": {"pre": {"type": "string", "description": "qb64 identifier prefix of KEL to load"}, "anchor": {"type": "string", "description": "Anchor"}, "sn": {"type": "string", "description": "Serial number"}}}}}}, "responses": {"200": {"description": "Key event log and key state of identifier", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "404": {"description": "Identifier not found in Key event database"}}}}, "/config": {"get": {"summary": "Retrieve agent configuration", "description": "Retrieve agent configuration (only necessary fields are exposed)", "tags": ["Config"], "responses": {"200": {"description": "Subset of configuration dict as JSON", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentConfig"}}}}}}}, "/identifiers": {"get": {"summary": "Retrieve a list of identifiers associated with the agent.", "description": "This endpoint retrieves a list of identifiers associated with the agent. It supports pagination through the \'Range\' header.", "tags": ["Identifier"], "parameters": [{"in": "header", "name": "Range", "schema": {"type": "string"}, "required": false, "description": "The \'Range\' header is used for pagination. The default range is 0-9."}], "responses": {"200": {"description": "Successfully retrieved identifiers.", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/Identifier"}}}}}, "206": {"description": "Successfully retrieved identifiers within the specified range."}}}, "options": {}, "post": {"summary": "Create an identifier.", "description": "This endpoint creates an identifier with the provided inception event, name, and signatures.", "tags": ["Identifier"], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"icp": {"type": "object", "description": "The inception event for the identifier."}, "name": {"type": "string", "description": "The name of the identifier."}, "sigs": {"type": "array", "items": {"type": "string"}, "description": "The signatures for the inception event."}, "group": {"type": "object", "description": "Multisig group information."}, "salty": {"type": "object", "description": "Salty parameters."}, "randy": {"type": "object", "description": "Randomly generated materials."}, "extern": {"type": "object", "description": "External parameters."}}}}}}, "responses": {"202": {"description": "Identifier creation is in progress. The response is a long running operation.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}}}}, "/challenges": {"get": {"summary": "Get random list of words for a 2 factor auth challenge", "description": "Get the list of identifiers associated with this agent", "tags": ["Challenge/Response"], "parameters": [{"in": "query", "name": "strength", "schema": {"type": "integer"}, "description": "cryptographic strength of word list", "required": false}], "responses": {"200": {"description": "An array of random words", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Challenge"}}}}}}}, "/contacts": {"get": {"summary": "Get list of contact information associated with remote identifiers", "description": "Get list of contact information associated with remote identifiers. All information is metadata and kept in local storage only", "tags": ["Contacts"], "parameters": [{"in": "query", "name": "group", "schema": {"type": "string"}, "required": false, "description": "field name to group results by"}, {"in": "query", "name": "filter_field", "schema": {"type": "string"}, "description": "field name to search", "required": false}, {"in": "query", "name": "filter_value", "schema": {"type": "string"}, "description": "value to search for", "required": false}], "responses": {"200": {"description": "List of contact information for remote identifiers", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/Contact"}}}}}}}}, "/oobi": {"get": {"summary": "Retrieve OOBI resource.", "description": "This endpoint retrieves the OOBI resource based on the provided aid, role, and eid.", "tags": ["OOBI Resource"], "parameters": [{"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of OOBI."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The requested role for OOBI rpy message."}, {"in": "path", "name": "eid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of participant in role."}], "responses": {"200": {"description": "Successfully retrieved the OOBI resource."}, "400": {"description": "Bad request. This could be due to invalid or missing parameters."}, "404": {"description": "The requested OOBI resource was not found."}}}}, "/": {"post": {"summary": "Accept KERI events with attachment headers and parse", "description": "Accept KERI events with attachment headers and parse.", "tags": ["Events"], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "description": "KERI event message"}}}}, "responses": {"204": {"description": "KEL EXN, QRY, RPY event accepted."}}}, "put": {"summary": "Accept KERI events with attachment headers and parse", "description": "Accept KERI events with attachment headers and parse.", "tags": ["Events"], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "description": "KERI event message"}}}}, "responses": {"200": {"description": "Mailbox query response for server sent events"}, "204": {"description": "KEL or EXN event accepted."}}}}, "/notifications": {"get": {"summary": "Get list of notifications for the controller of the agent", "description": "Get list of notifications for the controller of the agent. Notifications will be sorted by creation date/time", "parameters": [{"in": "header", "name": "Range", "schema": {"type": "string"}, "required": false, "description": "size of the result list. Defaults to 25"}], "tags": ["Notifications"], "responses": {"200": {"description": "List of contact information for remote identifiers"}}}}, "/operations/{name}": {"delete": {"summary": "Remove a specific long running operation.", "description": "This endpoint removes a long running operation by its name.", "tags": ["Operation"], "parameters": [{"in": "path", "name": "name", "schema": {"type": "string"}, "required": true, "description": "The name of the long running operation to remove."}], "responses": {"204": {"description": "Successfully removed the long running operation."}, "404": {"description": "The requested long running operation was not found."}, "500": {"description": "Internal server error. This could be due to an issue with removing the operation."}}}, "get": {"summary": "Retrieve a specific long running operation.", "description": "This endpoint retrieves the status of a long running operation by its name.", "tags": ["Operation"], "parameters": [{"in": "path", "name": "name", "schema": {"type": "string"}, "required": true, "description": "The name of the long running operation to retrieve."}], "responses": {"200": {"description": "Successfully retrieved the status of the long running operation.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "404": {"description": "The requested long running operation was not found."}}}}, "/oobis/{alias}": {"get": {"summary": "Get OOBI for specific identifier", "description": "Generate OOBI for the identifier of the specified alias and role", "tags": ["OOBIs"], "parameters": [{"in": "path", "name": "alias", "schema": {"type": "string"}, "required": true, "description": "human readable alias for the identifier generate OOBI for"}, {"in": "query", "name": "role", "schema": {"type": "string"}, "required": true, "description": "role for which to generate OOBI"}], "responses": {"200": {"description": "An array of Identifier key state information", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OOBI"}}}}}}}, "/agent/{caid}": {"get": {"summary": "Retrieve key state record of an agent by controller AID.", "description": "This endpoint retrieves the key state record for a given controller of an agent.", "tags": ["Agent"], "parameters": [{"in": "path", "name": "caid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of Controller."}], "responses": {"200": {"description": "Successfully retrieved the key state record.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentResourceResult"}}}}, "400": {"description": "Bad request. This could be due to an invalid agent or controller configuration."}, "404": {"description": "The requested controller or agent was not found."}}}, "put": {"summary": "Update agent configuration by controller AID.", "description": "This endpoint updates the agent configuration based on the provided request parameters and body.", "tags": ["Agent"], "parameters": [{"in": "path", "name": "caid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of Controller."}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["rot", "sigs", "sxlt", "kyes"], "properties": {"rot": {"type": "object", "description": "The rotation event."}, "sigs": {"type": "array", "items": {"type": "string"}, "description": "The signatures."}, "sxlt": {"type": "string", "description": "The salty parameters."}, "keys": {"type": "object", "description": "The keys."}}}}}}, "responses": {"204": {"description": "Successfully updated the agent configuration."}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "The requested agent was not found."}, "500": {"description": "Internal server error. This could be due to an issue with updating the agent configuration."}}}}, "/identifiers/{name}": {"get": {"summary": "Retrieve an identifier.", "description": "This endpoint retrieves an identifier by its prefix or human-readable name.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "responses": {"200": {"description": "Successfully retrieved the identifier details.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Identifier"}}}}, "400": {"description": "Bad request. This could be due to a missing or invalid name parameter."}, "404": {"description": "The requested identifier was not found."}}}, "post": {"summary": "Process identifier events.", "description": "This endpoint handles the \'rot\' or \'ixn\' events of an identifier, or the request to resubmit the KEL, based on the provided request.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rot": {"type": "object", "description": "The rotation event details."}, "ixn": {"type": "object", "description": "The interaction event details."}, "submit": {"type": "object", "description": "The request to resubmit event details to witnesses."}}, "oneOf": [{"required": ["rot"]}, {"required": ["ixn"]}, {"required": ["submit"]}]}}}}, "responses": {"200": {"description": "Successfully processed the identifier\'s event.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}}}, "put": {"summary": "Rename an identifier.", "description": "This endpoint renames an identifier with the provided new name.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The current human-readable name of the identifier or its prefix."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string", "description": "The new human-readable name for the identifier."}}, "required": ["name"]}}}}, "responses": {"200": {"description": "Successfully renamed the identifier and returns the updated information.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Identifier"}}}}, "400": {"description": "Bad request. This could be due to a missing or invalid name parameter."}, "404": {"description": "The requested identifier was not found."}}}}, "/endroles/{aid}": {"get": {"summary": "Retrieve end roles.", "description": "This endpoint retrieves the end roles associated with an identifier prefix or human-readable name. It can also filter the end roles based on a specific role.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The identifier (AID)."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The specific role to filter the end roles."}], "responses": {"200": {"description": "Successfully retrieved the end roles. The response body contains the end roles.", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/EndRole"}}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "The requested identifier was not found."}}}, "post": {"summary": "Create an end role.", "description": "This endpoint creates an end role associated with a given identifier prefix or human-readable name.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "Not supported for POST. If provided, a 404 is returned."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rpy": {"type": "object", "description": "The reply object."}, "sigs": {"type": "array", "items": {"type": "string"}, "description": "The signatures."}}}}}}, "responses": {"202": {"description": "Accepted. The end role creation is in progress.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "Not found. The requested identifier was not found."}}}}, "/escrows/rpy": {"get": {"summary": "Retrieve reply escrows.", "description": "This endpoint retrieves the reply escrows and can filter the collection based on a specific route.", "tags": ["Reply Escrow"], "parameters": [{"in": "query", "name": "route", "schema": {"type": "string"}, "required": false, "description": "The specific route to filter the reply escrow collection."}], "responses": {"200": {"description": "Successfully retrieved the reply escrows.", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/Rpy"}}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}}}}, "/challenges/{name}": {"post": {"summary": "Sign challenge message and forward to peer identifier", "description": "Sign a challenge word list received out of bands and send `exn` peer to peer message to recipient", "tags": ["Challenge/Response"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "Human readable alias or prefix for the identifier to create"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"description": "Challenge response", "properties": {"recipient": {"type": "string", "description": "human readable alias recipient identifier to send signed challenge to"}, "words": {"type": "array", "description": "challenge in form of word list", "items": {"type": "string"}}}}}}}, "responses": {"202": {"description": "Success submission of signed challenge/response"}}}}, "/challenges_verify/{source}": {"post": {"summary": "Sign challenge message and forward to peer identifier", "description": "Sign a challenge word list received out of bands and send `exn` peer to peer message to recipient", "tags": ["Challenge/Response"], "parameters": [{"in": "path", "name": "source", "schema": {"type": "string"}, "required": true, "description": "Human readable alias for the identifier to create"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"description": "Challenge response", "properties": {"recipient": {"type": "string", "description": "human readable alias recipient identifier to send signed challenge to"}, "words": {"type": "array", "description": "challenge in form of word list", "items": {"type": "string"}}}}}}}, "responses": {"202": {"description": "Success submission of signed challenge/response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}}}, "put": {"summary": "Mark challenge response exn message as signed", "description": "Mark challenge response exn message as signed", "tags": ["Challenge/Response"], "parameters": [{"in": "path", "name": "source", "schema": {"type": "string"}, "required": true, "description": "Human readable alias for the identifier to create"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"description": "Challenge response", "properties": {"aid": {"type": "string", "description": "aid of signer of accepted challenge response"}, "said": {"type": "array", "description": "SAID of challenge message signed", "items": {"type": "string"}}}}}}}, "responses": {"202": {"description": "Success submission of signed challenge/response"}}}}, "/contacts/{prefix}": {"delete": {"summary": "Delete contact information associated with remote identifier", "description": "Delete contact information associated with remote identifier", "tags": ["Contacts"], "parameters": [{"in": "path", "name": "prefix", "schema": {"type": "string"}, "required": true, "description": "qb64 identifier prefix of contact to delete"}], "responses": {"202": {"description": "Contact information successfully deleted for prefix"}, "404": {"description": "No contact information found for prefix"}}}, "get": {"summary": "Get contact information associated with single remote identifier", "description": "Get contact information associated with single remote identifier. All information is meta-data and kept in local storage only", "tags": ["Contacts"], "parameters": [{"in": "path", "name": "prefix", "schema": {"type": "string"}, "required": true, "description": "qb64 identifier prefix of contact to get"}], "responses": {"200": {"description": "Contact information successfully retrieved for prefix", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Contact"}}}}, "404": {"description": "No contact information found for prefix"}}}, "post": {"summary": "Create new contact information for an identifier", "description": "Creates new information for an identifier, overwriting all existing information for that identifier", "tags": ["Contacts"], "parameters": [{"in": "path", "name": "prefix", "schema": {"type": "string"}, "required": true, "description": "qb64 identifier prefix to add contact metadata to"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"description": "Contact information", "type": "object"}}}}, "responses": {"200": {"description": "Updated contact information for remote identifier", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Contact"}}}}, "400": {"description": "Invalid identifier used to update contact information"}, "404": {"description": "Prefix not found in identifier contact information"}}}, "put": {"summary": "Update provided fields in contact information associated with remote identifier prefix", "description": "Update provided fields in contact information associated with remote identifier prefix. All information is metadata and kept in local storage only", "tags": ["Contacts"], "parameters": [{"in": "path", "name": "prefix", "schema": {"type": "string"}, "required": true, "description": "qb64 identifier prefix to add contact metadata to"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"description": "Contact information", "type": "object"}}}}, "responses": {"200": {"description": "Updated contact information for remote identifier", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Contact"}}}}, "400": {"description": "Invalid identifier used to update contact information"}, "404": {"description": "Prefix not found in identifier contact information"}}}}, "/oobi/{aid}": {"get": {"summary": "Retrieve OOBI resource.", "description": "This endpoint retrieves the OOBI resource based on the provided aid, role, and eid.", "tags": ["OOBI Resource"], "parameters": [{"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of OOBI."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The requested role for OOBI rpy message."}, {"in": "path", "name": "eid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of participant in role."}], "responses": {"200": {"description": "Successfully retrieved the OOBI resource."}, "400": {"description": "Bad request. This could be due to invalid or missing parameters."}, "404": {"description": "The requested OOBI resource was not found."}}}}, "/notifications/{said}": {"delete": {"summary": "Delete notification", "description": "Delete notification", "tags": ["Notifications"], "parameters": [{"in": "path", "name": "said", "schema": {"type": "string"}, "required": true, "description": "qb64 said of note to delete"}], "responses": {"202": {"description": "Notification successfully deleted for prefix"}, "404": {"description": "No notification information found for prefix"}}}, "put": {"summary": "Mark notification as read", "description": "Mark notification as read", "tags": ["Notifications"], "parameters": [{"in": "path", "name": "said", "schema": {"type": "string"}, "required": true, "description": "qb64 said of note to mark as read"}], "responses": {"202": {"description": "Notification successfully marked as read for prefix"}, "404": {"description": "No notification information found for SAID"}}}}, "/identifiers/{name}/events": {"get": {"summary": "Retrieve an identifier.", "description": "This endpoint retrieves an identifier by its prefix or human-readable name.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "responses": {"200": {"description": "Successfully retrieved the identifier details.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Identifier"}}}}, "400": {"description": "Bad request. This could be due to a missing or invalid name parameter."}, "404": {"description": "The requested identifier was not found."}}}, "post": {"summary": "Process identifier events.", "description": "This endpoint handles the \'rot\' or \'ixn\' events of an identifier, or the request to resubmit the KEL, based on the provided request.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rot": {"type": "object", "description": "The rotation event details."}, "ixn": {"type": "object", "description": "The interaction event details."}, "submit": {"type": "object", "description": "The request to resubmit event details to witnesses."}}, "oneOf": [{"required": ["rot"]}, {"required": ["ixn"]}, {"required": ["submit"]}]}}}}, "responses": {"200": {"description": "Successfully processed the identifier\'s event.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}}}, "put": {"summary": "Rename an identifier.", "description": "This endpoint renames an identifier with the provided new name.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The current human-readable name of the identifier or its prefix."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string", "description": "The new human-readable name for the identifier."}}, "required": ["name"]}}}}, "responses": {"200": {"description": "Successfully renamed the identifier and returns the updated information.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Identifier"}}}}, "400": {"description": "Bad request. This could be due to a missing or invalid name parameter."}, "404": {"description": "The requested identifier was not found."}}}}, "/identifiers/{name}/submit": {"get": {"summary": "Retrieve an identifier.", "description": "This endpoint retrieves an identifier by its prefix or human-readable name.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "responses": {"200": {"description": "Successfully retrieved the identifier details.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Identifier"}}}}, "400": {"description": "Bad request. This could be due to a missing or invalid name parameter."}, "404": {"description": "The requested identifier was not found."}}}, "post": {"summary": "Process identifier events.", "description": "This endpoint handles the \'rot\' or \'ixn\' events of an identifier, or the request to resubmit the KEL, based on the provided request.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rot": {"type": "object", "description": "The rotation event details."}, "ixn": {"type": "object", "description": "The interaction event details."}, "submit": {"type": "object", "description": "The request to resubmit event details to witnesses."}}, "oneOf": [{"required": ["rot"]}, {"required": ["ixn"]}, {"required": ["submit"]}]}}}}, "responses": {"200": {"description": "Successfully processed the identifier\'s event.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}}}, "put": {"summary": "Rename an identifier.", "description": "This endpoint renames an identifier with the provided new name.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The current human-readable name of the identifier or its prefix."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string", "description": "The new human-readable name for the identifier."}}, "required": ["name"]}}}}, "responses": {"200": {"description": "Successfully renamed the identifier and returns the updated information.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Identifier"}}}}, "400": {"description": "Bad request. This could be due to a missing or invalid name parameter."}, "404": {"description": "The requested identifier was not found."}}}}, "/identifiers/{name}/oobis": {"get": {"summary": "Fetch OOBI URLs of an identifier.", "description": "This endpoint fetches the OOBI URLs for a specific role associated with an identifier.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "query", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The role for which to fetch the OOBI URLs. Can be a witness, controller, agent, or mailbox."}], "responses": {"200": {"description": "Successfully fetched the OOBI URLs. The response body contains the OOBI URLs.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OOBI"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "The requested identifier was not found."}}}}, "/identifiers/{name}/endroles": {"get": {"summary": "Retrieve end roles.", "description": "This endpoint retrieves the end roles associated with an identifier prefix or human-readable name. It can also filter the end roles based on a specific role.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The identifier (AID)."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The specific role to filter the end roles."}], "responses": {"200": {"description": "Successfully retrieved the end roles. The response body contains the end roles.", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/EndRole"}}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "The requested identifier was not found."}}}, "post": {"summary": "Create an end role.", "description": "This endpoint creates an end role associated with a given identifier prefix or human-readable name.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "Not supported for POST. If provided, a 404 is returned."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rpy": {"type": "object", "description": "The reply object."}, "sigs": {"type": "array", "items": {"type": "string"}, "description": "The signatures."}}}}}}, "responses": {"202": {"description": "Accepted. The end role creation is in progress.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "Not found. The requested identifier was not found."}}}}, "/identifiers/{name}/locschemes": {"post": {"summary": "Authorises a new location scheme.", "description": "This endpoint authorises a new location scheme (endpoint) for a particular endpoint identifier.", "tags": ["Loc Scheme"], "parameters": [{"in": "path", "name": "name", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rpy": {"type": "object", "description": "The reply object."}, "sigs": {"type": "array", "items": {"type": "string"}, "description": "The signatures."}}}}}}, "responses": {"202": {"description": "Accepted. The loc scheme authorisation is in progress.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "Not found. The requested identifier was not found."}}}}, "/identifiers/{name}/members": {"get": {"summary": "Fetch group member information.", "description": "This endpoint retrieves the signing and rotation members for a specific group associated with an identifier.", "tags": ["Group Member"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "responses": {"200": {"description": "Successfully fetched the group member information.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GroupMember"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "The requested identifier was not found."}}}}, "/identifiers/{name}/delegation": {"post": {}}, "/endroles/{aid}/{role}": {"get": {"summary": "Retrieve end roles.", "description": "This endpoint retrieves the end roles associated with an identifier prefix or human-readable name. It can also filter the end roles based on a specific role.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The identifier (AID)."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The specific role to filter the end roles."}], "responses": {"200": {"description": "Successfully retrieved the end roles. The response body contains the end roles.", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/EndRole"}}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "The requested identifier was not found."}}}, "post": {"summary": "Create an end role.", "description": "This endpoint creates an end role associated with a given identifier prefix or human-readable name.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "Not supported for POST. If provided, a 404 is returned."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rpy": {"type": "object", "description": "The reply object."}, "sigs": {"type": "array", "items": {"type": "string"}, "description": "The signatures."}}}}}}, "responses": {"202": {"description": "Accepted. The end role creation is in progress.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "Not found. The requested identifier was not found."}}}}, "/contacts/{prefix}/img": {"get": {"summary": "Get contact image for identifer prefix", "description": "Get contact image for identifer prefix", "tags": ["Contacts"], "parameters": [{"in": "path", "name": "prefix", "schema": {"type": "string"}, "required": true, "description": "qb64 identifier prefix of contact image to get"}], "responses": {"200": {"description": "Contact information successfully retrieved for prefix", "content": {"image/jpg": {"schema": {"description": "Image", "type": "binary"}}}}, "404": {"description": "No contact information found for prefix"}}}, "post": {"summary": "Uploads an image to associate with identifier.", "description": "Uploads an image to associate with identifier.", "tags": ["Contacts"], "parameters": [{"in": "path", "name": "prefix", "schema": {"type": "string"}, "description": "identifier prefix to associate image to", "required": true}], "requestBody": {"required": true, "content": {"image/jpg": {"schema": {"type": "string", "format": "binary"}}, "image/png": {"schema": {"type": "string", "format": "binary"}}}}, "responses": {"200": {"description": "Image successfully uploaded"}}}}, "/oobi/{aid}/{role}": {"get": {"summary": "Retrieve OOBI resource.", "description": "This endpoint retrieves the OOBI resource based on the provided aid, role, and eid.", "tags": ["OOBI Resource"], "parameters": [{"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of OOBI."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The requested role for OOBI rpy message."}, {"in": "path", "name": "eid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of participant in role."}], "responses": {"200": {"description": "Successfully retrieved the OOBI resource."}, "400": {"description": "Bad request. This could be due to invalid or missing parameters."}, "404": {"description": "The requested OOBI resource was not found."}}}}, "/identifiers/{name}/endroles/{role}": {"get": {"summary": "Retrieve end roles.", "description": "This endpoint retrieves the end roles associated with an identifier prefix or human-readable name. It can also filter the end roles based on a specific role.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The identifier (AID)."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The specific role to filter the end roles."}], "responses": {"200": {"description": "Successfully retrieved the end roles. The response body contains the end roles.", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/EndRole"}}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "The requested identifier was not found."}}}, "post": {"summary": "Create an end role.", "description": "This endpoint creates an end role associated with a given identifier prefix or human-readable name.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "Not supported for POST. If provided, a 404 is returned."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rpy": {"type": "object", "description": "The reply object."}, "sigs": {"type": "array", "items": {"type": "string"}, "description": "The signatures."}}}}}}, "responses": {"202": {"description": "Accepted. The end role creation is in progress.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "Not found. The requested identifier was not found."}}}}, "/oobi/{aid}/{role}/{eid}": {"get": {"summary": "Retrieve OOBI resource.", "description": "This endpoint retrieves the OOBI resource based on the provided aid, role, and eid.", "tags": ["OOBI Resource"], "parameters": [{"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of OOBI."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The requested role for OOBI rpy message."}, {"in": "path", "name": "eid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of participant in role."}], "responses": {"200": {"description": "Successfully retrieved the OOBI resource."}, "400": {"description": "Bad request. This could be due to invalid or missing parameters."}, "404": {"description": "The requested OOBI resource was not found."}}}}, "/identifiers/{name}/endroles/{role}/{eid}": {"delete": {}}}, "info": {"title": "KERIA Interactive Web Interface API", "version": "1.0.1"}, "openapi": "3.1.0", "components": {"schemas": {"ACDCAttributes": {"type": "object", "properties": {"dt": {"type": "string"}, "i": {"type": "string"}, "u": {"type": "string"}}, "additionalProperties": true}, "ACDC_V_1": {"oneOf": [{"type": "object", "properties": {"v": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "u": {"type": "string"}, "ri": {"type": "string"}, "e": {"type": "string"}, "r": {"type": "string"}, "a": {"$ref": "#/components/schemas/ACDCAttributes"}}, "additionalProperties": false, "required": ["d", "i", "s", "v"]}, {"type": "object", "properties": {"v": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "u": {"type": "string"}, "ri": {"type": "string"}, "e": {"type": "string"}, "r": {"type": "string"}, "A": {"anyOf": [{"type": "string"}, {"type": "array"}]}}, "additionalProperties": false, "required": ["d", "i", "s", "v"]}]}, "ACDC_V_2": {"oneOf": [{"type": "object", "properties": {"v": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "u": {"type": "string"}, "rd": {"type": "string"}, "e": {"type": "string"}, "r": {"type": "string"}, "a": {"$ref": "#/components/schemas/ACDCAttributes"}}, "additionalProperties": false, "required": ["d", "i", "s", "v"]}, {"type": "object", "properties": {"v": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "u": {"type": "string"}, "rd": {"type": "string"}, "e": {"type": "string"}, "r": {"type": "string"}, "A": {"anyOf": [{"type": "string"}, {"type": "array"}]}}, "additionalProperties": false, "required": ["d", "i", "s", "v"]}]}, "IssEvent": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"enum": ["iss", "bis"]}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "ri": {"type": "string"}, "dt": {"type": "string"}}, "required": ["d", "dt", "i", "ri", "s", "t", "v"]}, "Schema": {"type": "object", "properties": {"$id": {"type": "string"}, "$schema": {"type": "string"}, "title": {"type": "string"}, "description": {"type": "string"}, "type": {"type": "string"}, "credentialType": {"type": "string"}, "version": {"type": "string"}, "properties": {"type": "object", "additionalProperties": {}}, "additionalProperties": {"type": "boolean"}, "required": {"type": "array", "items": {"type": "string"}}}, "required": ["$id", "$schema", "additionalProperties", "credentialType", "description", "properties", "required", "title", "type", "version"]}, "Anchor": {"type": "object", "properties": {"pre": {"type": "string"}, "sn": {"type": "integer"}, "d": {"type": "string"}}, "required": ["d", "pre", "sn"]}, "Seal": {"type": "object", "properties": {"s": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}}, "required": ["d", "s"]}, "IXN_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "p": {"type": "string"}, "a": {"type": "array", "items": {"$ref": "#/components/schemas/Seal"}}}, "required": ["a", "d", "i", "p", "s", "t", "v"]}, "IXN_V_2": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "p": {"type": "string"}, "a": {"type": "array", "items": {"$ref": "#/components/schemas/Seal"}}}, "required": ["a", "d", "i", "p", "s", "t", "v"]}, "ICP_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "b": {"type": "array", "items": {"type": "string"}}, "c": {"type": "array", "items": {"type": "string"}}, "a": {}}, "required": ["a", "b", "bt", "c", "d", "i", "k", "kt", "n", "nt", "s", "t", "v"]}, "ICP_V_2": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "b": {"type": "array", "items": {"type": "string"}}, "c": {"type": "array", "items": {"type": "string"}}, "a": {}}, "required": ["a", "b", "bt", "c", "d", "i", "k", "kt", "n", "nt", "s", "t", "v"]}, "ROT_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "p": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "br": {"type": "array", "items": {"type": "string"}}, "ba": {"type": "array", "items": {"type": "string"}}, "a": {}}, "required": ["a", "ba", "br", "bt", "d", "i", "k", "kt", "n", "nt", "p", "s", "t", "v"]}, "ROT_V_2": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "p": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "br": {"type": "array", "items": {"type": "string"}}, "ba": {"type": "array", "items": {"type": "string"}}, "c": {"type": "array", "items": {"type": "string"}}, "a": {}}, "required": ["a", "ba", "br", "bt", "c", "d", "i", "k", "kt", "n", "nt", "p", "s", "t", "v"]}, "DIP_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "b": {"type": "array", "items": {"type": "string"}}, "c": {"type": "array", "items": {"type": "string"}}, "a": {}, "di": {"type": "string"}}, "required": ["a", "b", "bt", "c", "d", "di", "i", "k", "kt", "n", "nt", "s", "t", "v"]}, "DIP_V_2": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "b": {"type": "array", "items": {"type": "string"}}, "c": {"type": "array", "items": {"type": "string"}}, "a": {}, "di": {"type": "string"}}, "required": ["a", "b", "bt", "c", "d", "di", "i", "k", "kt", "n", "nt", "s", "t", "v"]}, "DRT_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "p": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "br": {"type": "array", "items": {"type": "string"}}, "ba": {"type": "array", "items": {"type": "string"}}, "a": {}}, "required": ["a", "ba", "br", "bt", "d", "i", "k", "kt", "n", "nt", "p", "s", "t", "v"]}, "DRT_V_2": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "p": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "br": {"type": "array", "items": {"type": "string"}}, "ba": {"type": "array", "items": {"type": "string"}}, "c": {"type": "array", "items": {"type": "string"}}, "a": {}}, "required": ["a", "ba", "br", "bt", "c", "d", "i", "k", "kt", "n", "nt", "p", "s", "t", "v"]}, "RPY_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "dt": {"type": "string"}, "r": {"type": "string"}, "a": {}}, "required": ["a", "d", "dt", "r", "t", "v"]}, "RPY_V_2": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "dt": {"type": "string"}, "r": {"type": "string"}, "a": {}}, "required": ["a", "d", "dt", "i", "r", "t", "v"]}, "Credential": {"type": "object", "properties": {"sad": {"oneOf": [{"$ref": "#/components/schemas/ACDC_V_1"}, {"$ref": "#/components/schemas/ACDC_V_2"}]}, "atc": {"type": "string"}, "iss": {"$ref": "#/components/schemas/IssEvent"}, "issatc": {"type": "string"}, "pre": {"type": "string"}, "schema": {"$ref": "#/components/schemas/Schema"}, "chains": {"type": "array", "items": {"type": "object", "additionalProperties": {}}}, "status": {"$ref": "#/components/schemas/CredentialState"}, "anchor": {"$ref": "#/components/schemas/Anchor"}, "anc": {"oneOf": [{"$ref": "#/components/schemas/IXN_V_1"}, {"$ref": "#/components/schemas/IXN_V_2"}, {"$ref": "#/components/schemas/ICP_V_1"}, {"$ref": "#/components/schemas/ICP_V_2"}, {"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}, {"$ref": "#/components/schemas/DIP_V_1"}, {"$ref": "#/components/schemas/DIP_V_2"}, {"$ref": "#/components/schemas/DRT_V_1"}, {"$ref": "#/components/schemas/DRT_V_2"}]}, "ancatc": {"type": "string"}}, "required": ["anc", "ancatc", "anchor", "atc", "chains", "iss", "issatc", "pre", "sad", "schema", "status"]}, "OperationStatus": {"type": "object", "properties": {"code": {"type": "integer"}, "message": {"type": "string"}, "details": {"type": ["object", "null"], "additionalProperties": {}}}, "required": ["code", "message"]}, "Operation": {"type": "object", "properties": {"name": {"type": "string"}, "error": {"$ref": "#/components/schemas/OperationStatus"}, "done": {"type": "boolean"}, "metadata": {"type": "object"}, "response": {"type": "object"}}, "required": ["name"]}, "EmptyDict": {"type": "object", "properties": {}}, "CredentialStateIssOrRev": {"type": "object", "properties": {"vn": {}, "i": {"type": "string"}, "s": {"type": "string"}, "d": {"type": "string"}, "ri": {"type": "string"}, "a": {"$ref": "#/components/schemas/Seal"}, "dt": {"type": "string"}, "et": {"enum": ["iss", "rev"]}, "ra": {"$ref": "#/components/schemas/EmptyDict"}}, "required": ["a", "d", "dt", "et", "i", "ra", "ri", "s", "vn"]}, "RaFields": {"type": "object", "properties": {"i": {"type": "string"}, "s": {"type": "string"}, "d": {"type": "string"}}, "required": ["d", "i", "s"]}, "CredentialStateBisOrBrv": {"type": "object", "properties": {"vn": {}, "i": {"type": "string"}, "s": {"type": "string"}, "d": {"type": "string"}, "ri": {"type": "string"}, "a": {"$ref": "#/components/schemas/Seal"}, "dt": {"type": "string"}, "et": {"enum": ["bis", "brv"]}, "ra": {"$ref": "#/components/schemas/RaFields"}}, "required": ["a", "d", "dt", "et", "i", "ra", "ri", "s", "vn"]}, "CredentialState": {"oneOf": [{"$ref": "#/components/schemas/CredentialStateIssOrRev"}, {"$ref": "#/components/schemas/CredentialStateBisOrBrv"}]}, "Registry": {"type": "object", "properties": {"name": {"type": "string"}, "regk": {"type": "string"}, "pre": {"type": "string"}, "state": {"$ref": "#/components/schemas/CredentialState"}}, "required": ["name", "pre", "regk", "state"]}, "StateEERecord": {"type": "object", "properties": {"s": {"type": "string", "default": "0"}, "d": {"type": "string", "default": ""}, "br": {"type": "array", "items": {}}, "ba": {"type": "array", "items": {}}}}, "KeyStateRecord": {"type": "object", "properties": {"vn": {"type": "array", "items": {"type": "integer"}}, "i": {"type": "string", "default": ""}, "s": {"type": "string", "default": "0"}, "p": {"type": "string", "default": ""}, "d": {"type": "string", "default": ""}, "f": {"type": "string", "default": "0"}, "dt": {"type": "string", "default": ""}, "et": {"type": "string", "default": ""}, "kt": {"type": "string", "default": "0"}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"type": "string", "default": "0"}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string", "default": "0"}, "b": {"type": "array", "items": {"type": "string"}}, "c": {"type": "array", "items": {"type": "string"}}, "ee": {"$ref": "#/components/schemas/StateEERecord"}, "di": {"type": "string", "default": ""}}, "required": ["b", "c", "ee", "k", "n"]}, "Controller": {"type": "object", "properties": {"state": {"$ref": "#/components/schemas/KeyStateRecord"}, "ee": {"oneOf": [{"$ref": "#/components/schemas/ICP_V_1"}, {"$ref": "#/components/schemas/ICP_V_2"}, {"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}, {"$ref": "#/components/schemas/DIP_V_1"}, {"$ref": "#/components/schemas/DIP_V_2"}, {"$ref": "#/components/schemas/DRT_V_1"}, {"$ref": "#/components/schemas/DRT_V_2"}]}}, "required": ["ee", "state"]}, "AgentResourceResult": {"type": "object", "properties": {"agent": {"$ref": "#/components/schemas/KeyStateRecord"}, "controller": {"$ref": "#/components/schemas/Controller"}, "pidx": {"type": "integer"}, "ridx": {"type": ["integer", "null"], "default": null}, "sxlt": {"type": ["string", "null"], "default": null}}, "required": ["agent", "controller", "pidx"]}, "SaltyState": {"type": "object", "properties": {"tier": {"$ref": "#/components/schemas/Tier"}, "sxlt": {"type": "string", "default": ""}, "pidx": {"type": "integer", "default": 0}, "kidx": {"type": "integer", "default": 0}, "stem": {"type": "string", "default": ""}, "dcode": {"type": "string", "default": ""}, "icodes": {"type": "array", "items": {"type": "string"}}, "ncodes": {"type": "array", "items": {"type": "string"}}, "transferable": {"type": "boolean", "default": false}}, "required": ["icodes", "ncodes", "tier"]}, "RandyKeyState": {"type": "object", "properties": {"prxs": {"type": "array", "items": {"type": "string"}}, "nxts": {"type": "array", "items": {"type": "string"}}}, "required": ["nxts", "prxs"]}, "HabState": {"type": "object", "properties": {"name": {"type": "string"}, "prefix": {"type": "string"}, "icp_dt": {"type": "string"}, "state": {"$ref": "#/components/schemas/KeyStateRecord"}, "transferable": {"type": ["boolean", "null"], "default": null}, "windexes": {"type": ["array", "null"], "default": null, "items": {"type": "string"}}}, "required": ["icp_dt", "name", "prefix", "state"]}, "GroupKeyState": {"type": "object", "properties": {"mhab": {"$ref": "#/components/schemas/Identifier"}, "keys": {"type": "array", "items": {"type": "string"}}, "ndigs": {"type": "array", "items": {"type": "string"}}}, "required": ["keys", "mhab", "ndigs"]}, "ExternState": {"type": "object", "properties": {"extern_type": {"type": "string"}, "pidx": {"type": "integer"}}, "required": ["extern_type", "pidx"], "additionalProperties": true}, "Identifier": {"type": "object", "properties": {"name": {"type": "string"}, "prefix": {"type": "string"}, "icp_dt": {"type": "string"}, "state": {"$ref": "#/components/schemas/KeyStateRecord"}, "transferable": {"type": ["boolean", "null"], "default": null}, "windexes": {"type": ["array", "null"], "default": null, "items": {"type": "string"}}}, "required": ["icp_dt", "name", "prefix", "state"], "oneOf": [{"required": ["salty"], "properties": {"salty": {"$ref": "#/components/schemas/SaltyState"}}}, {"required": ["randy"], "properties": {"randy": {"$ref": "#/components/schemas/RandyKeyState"}}}, {"required": ["group"], "properties": {"group": {"$ref": "#/components/schemas/GroupKeyState"}}}, {"required": ["extern"], "properties": {"extern": {"$ref": "#/components/schemas/ExternState"}}}]}, "Tier": {"type": "string", "enum": ["low", "med", "high"], "description": "Tier of key material"}, "OOBI": {"type": "object", "properties": {"role": {"type": "string", "enum": ["controller", "witness", "registrar", "watcher", "judge", "juror", "peer", "mailbox", "agent"]}, "oobis": {"type": "array", "items": {"type": "string"}}}, "required": ["oobis", "role"]}, "EndRole": {"type": "object", "properties": {"cid": {"type": "string"}, "role": {"type": "string"}, "eid": {"type": "string"}}, "required": ["cid", "eid", "role"]}, "Rpy": {"oneOf": [{"$ref": "#/components/schemas/RPY_V_1"}, {"$ref": "#/components/schemas/RPY_V_2"}]}, "Challenge": {"type": "object", "properties": {"words": {"type": "array", "items": {"type": "string"}}, "dt": {"type": "string"}, "said": {"type": "string"}, "authenticated": {"type": "boolean"}}, "required": ["words"]}, "MemberEnds": {"type": "object", "properties": {"agent": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "controller": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "witness": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "registrar": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "watcher": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "judge": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "juror": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "peer": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "mailbox": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}}}, "WellKnown": {"type": "object", "properties": {"url": {"type": "string"}, "dt": {"type": "string"}}, "required": ["dt", "url"]}, "Contact": {"type": "object", "properties": {"id": {"type": "string"}, "alias": {"type": "string"}, "oobi": {"type": "string"}, "ends": {"$ref": "#/components/schemas/MemberEnds"}, "challenges": {"type": "array", "items": {"$ref": "#/components/schemas/Challenge"}}, "wellKnowns": {"type": "array", "items": {"$ref": "#/components/schemas/WellKnown"}}}, "required": ["id"], "additionalProperties": true}, "AidRecord": {"type": "object", "properties": {"aid": {"type": "string"}, "ends": {"$ref": "#/components/schemas/MemberEnds"}}, "required": ["aid", "ends"]}, "GroupMember": {"type": "object", "properties": {"signing": {"type": "array", "items": {"$ref": "#/components/schemas/AidRecord"}}, "rotation": {"type": "array", "items": {"$ref": "#/components/schemas/AidRecord"}}}, "required": ["rotation", "signing"]}, "KeyEventRecord": {"type": "object", "properties": {"ked": {"oneOf": [{"$ref": "#/components/schemas/ICP_V_1"}, {"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/IXN_V_1"}, {"$ref": "#/components/schemas/DIP_V_1"}, {"$ref": "#/components/schemas/DRT_V_1"}, {"$ref": "#/components/schemas/ICP_V_2"}, {"$ref": "#/components/schemas/ROT_V_2"}, {"$ref": "#/components/schemas/IXN_V_2"}, {"$ref": "#/components/schemas/DIP_V_2"}, {"$ref": "#/components/schemas/DRT_V_2"}]}, "atc": {"type": "string"}}, "required": ["atc", "ked"]}, "AgentConfig": {"type": "object", "properties": {"iurls": {"type": "array", "items": {"type": "string"}}}}}}}' + == '{"paths": {"/operations": {"get": {"summary": "Get list of long running operations", "parameters": [{"in": "query", "name": "type", "schema": {"type": "string"}, "required": false, "description": "filter list of long running operations by type"}], "responses": {"200": {"description": "list of long running operations", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/Operation"}}}}}}}}, "/oobis": {"post": {"summary": "Resolve OOBI and assign an alias for the remote identifier", "description": "Resolve OOBI URL or `rpy` message by process results of request and assign \'alias\' in contact data for resolved identifier", "tags": ["OOBIs"], "requestBody": {"required": true, "content": {"application/json": {"schema": {"description": "OOBI", "oneOf": [{"type": "object", "properties": {"oobialias": {"type": "string", "description": "alias to assign to the identifier resolved from this OOBI"}, "url": {"type": "string", "description": "URL OOBI"}, "rpy": {"type": "object", "description": "unsigned KERI `rpy` event message with endpoints"}}}]}}}}, "responses": {"202": {"description": "OOBI resolution to key state successful", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}}}}, "/states": {"get": {"summary": "Display key event log (KEL) for given identifier prefix", "description": "If provided qb64 identifier prefix is in Kevers, return the current state of the identifier along with the KEL and all associated signatures and receipts", "tags": ["Key Event Log"], "parameters": [{"in": "path", "name": "pre", "description": "qb64 identifier prefix of KEL to load", "schema": {"type": "string"}, "required": true}], "responses": {"200": {"description": "Key event log and key state of identifier", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/KeyStateRecord"}}}}}, "400": {"description": "Bad request, missing required fields"}, "404": {"description": "Identifier not found in Key event database"}}}}, "/events": {"get": {"summary": "Display key event log (KEL) for given identifier prefix", "description": "If provided qb64 identifier prefix is in Kevers, return the current state of the identifier along with the KEL and all associated signatures and receipts", "tags": ["Key Event Log"], "parameters": [{"in": "path", "name": "pre", "schema": {"type": "string"}, "required": true, "description": "qb64 identifier prefix of KEL to load"}], "responses": {"200": {"description": "Key event log and key state of identifier", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/KeyEventRecord"}}}}}, "404": {"description": "Identifier not found in Key event database"}}}}, "/queries": {"post": {"summary": "Display key event log (KEL) for given identifier prefix", "description": "If provided qb64 identifier prefix is in Kevers, return the current state of the identifier along with the KEL and all associated signatures and receipts", "tags": ["Query"], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["pre"], "properties": {"pre": {"type": "string", "description": "qb64 identifier prefix of KEL to load"}, "anchor": {"type": "string", "description": "Anchor"}, "sn": {"type": "string", "description": "Serial number"}}}}}}, "responses": {"200": {"description": "Key event log and key state of identifier", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "404": {"description": "Identifier not found in Key event database"}}}}, "/config": {"get": {"summary": "Retrieve agent configuration", "description": "Retrieve agent configuration (only necessary fields are exposed)", "tags": ["Config"], "responses": {"200": {"description": "Subset of configuration dict as JSON", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentConfig"}}}}}}}, "/identifiers": {"get": {"summary": "Retrieve a list of identifiers associated with the agent.", "description": "This endpoint retrieves a list of identifiers associated with the agent. It supports pagination through the \'Range\' header.", "tags": ["Identifier"], "parameters": [{"in": "header", "name": "Range", "schema": {"type": "string"}, "required": false, "description": "The \'Range\' header is used for pagination. The default range is 0-9."}], "responses": {"200": {"description": "Successfully retrieved identifiers.", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/Identifier"}}}}}, "206": {"description": "Successfully retrieved identifiers within the specified range."}}}, "options": {}, "post": {"summary": "Create an identifier.", "description": "This endpoint creates an identifier with the provided inception event, name, and signatures.", "tags": ["Identifier"], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"icp": {"type": "object", "description": "The inception event for the identifier."}, "name": {"type": "string", "description": "The name of the identifier."}, "sigs": {"type": "array", "items": {"type": "string"}, "description": "The signatures for the inception event."}, "group": {"type": "object", "description": "Multisig group information."}, "salty": {"type": "object", "description": "Salty parameters."}, "randy": {"type": "object", "description": "Randomly generated materials."}, "extern": {"type": "object", "description": "External parameters."}}}}}}, "responses": {"202": {"description": "Identifier creation is in progress. The response is a long running operation.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}}}}, "/challenges": {"get": {"summary": "Get random list of words for a 2 factor auth challenge", "description": "Get the list of identifiers associated with this agent", "tags": ["Challenge/Response"], "parameters": [{"in": "query", "name": "strength", "schema": {"type": "integer"}, "description": "cryptographic strength of word list", "required": false}], "responses": {"200": {"description": "An array of random words", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Challenge"}}}}}}}, "/contacts": {"get": {"summary": "Get list of contact information associated with remote identifiers", "description": "Get list of contact information associated with remote identifiers. All information is metadata and kept in local storage only", "tags": ["Contacts"], "parameters": [{"in": "query", "name": "group", "schema": {"type": "string"}, "required": false, "description": "field name to group results by"}, {"in": "query", "name": "filter_field", "schema": {"type": "string"}, "description": "field name to search", "required": false}, {"in": "query", "name": "filter_value", "schema": {"type": "string"}, "description": "value to search for", "required": false}], "responses": {"200": {"description": "List of contact information for remote identifiers", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/Contact"}}}}}}}}, "/oobi": {"get": {"summary": "Retrieve OOBI resource.", "description": "This endpoint retrieves the OOBI resource based on the provided aid, role, and eid.", "tags": ["OOBI Resource"], "parameters": [{"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of OOBI."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The requested role for OOBI rpy message."}, {"in": "path", "name": "eid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of participant in role."}], "responses": {"200": {"description": "Successfully retrieved the OOBI resource."}, "400": {"description": "Bad request. This could be due to invalid or missing parameters."}, "404": {"description": "The requested OOBI resource was not found."}}}}, "/": {"post": {"summary": "Accept KERI events with attachment headers and parse", "description": "Accept KERI events with attachment headers and parse.", "tags": ["Events"], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "description": "KERI event message"}}}}, "responses": {"204": {"description": "KEL EXN, QRY, RPY event accepted."}}}, "put": {"summary": "Accept KERI events with attachment headers and parse", "description": "Accept KERI events with attachment headers and parse.", "tags": ["Events"], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "description": "KERI event message"}}}}, "responses": {"200": {"description": "Mailbox query response for server sent events"}, "204": {"description": "KEL or EXN event accepted."}}}}, "/notifications": {"get": {"summary": "Get list of notifications for the controller of the agent", "description": "Get list of notifications for the controller of the agent. Notifications will be sorted by creation date/time", "parameters": [{"in": "header", "name": "Range", "schema": {"type": "string"}, "required": false, "description": "size of the result list. Defaults to 25"}], "tags": ["Notifications"], "responses": {"200": {"description": "List of contact information for remote identifiers", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/Notification"}}}}}}}}, "/operations/{name}": {"delete": {"summary": "Remove a specific long running operation.", "description": "This endpoint removes a long running operation by its name.", "tags": ["Operation"], "parameters": [{"in": "path", "name": "name", "schema": {"type": "string"}, "required": true, "description": "The name of the long running operation to remove."}], "responses": {"204": {"description": "Successfully removed the long running operation."}, "404": {"description": "The requested long running operation was not found."}, "500": {"description": "Internal server error. This could be due to an issue with removing the operation."}}}, "get": {"summary": "Retrieve a specific long running operation.", "description": "This endpoint retrieves the status of a long running operation by its name.", "tags": ["Operation"], "parameters": [{"in": "path", "name": "name", "schema": {"type": "string"}, "required": true, "description": "The name of the long running operation to retrieve."}], "responses": {"200": {"description": "Successfully retrieved the status of the long running operation.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "404": {"description": "The requested long running operation was not found."}}}}, "/oobis/{alias}": {"get": {"summary": "Get OOBI for specific identifier", "description": "Generate OOBI for the identifier of the specified alias and role", "tags": ["OOBIs"], "parameters": [{"in": "path", "name": "alias", "schema": {"type": "string"}, "required": true, "description": "human readable alias for the identifier generate OOBI for"}, {"in": "query", "name": "role", "schema": {"type": "string"}, "required": true, "description": "role for which to generate OOBI"}], "responses": {"200": {"description": "An array of Identifier key state information", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OOBI"}}}}}}}, "/agent/{caid}": {"get": {"summary": "Retrieve key state record of an agent by controller AID.", "description": "This endpoint retrieves the key state record for a given controller of an agent.", "tags": ["Agent"], "parameters": [{"in": "path", "name": "caid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of Controller."}], "responses": {"200": {"description": "Successfully retrieved the key state record.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentResourceResult"}}}}, "400": {"description": "Bad request. This could be due to an invalid agent or controller configuration."}, "404": {"description": "The requested controller or agent was not found."}}}, "put": {"summary": "Update agent configuration by controller AID.", "description": "This endpoint updates the agent configuration based on the provided request parameters and body.", "tags": ["Agent"], "parameters": [{"in": "path", "name": "caid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of Controller."}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["rot", "sigs", "sxlt", "kyes"], "properties": {"rot": {"type": "object", "description": "The rotation event."}, "sigs": {"type": "array", "items": {"type": "string"}, "description": "The signatures."}, "sxlt": {"type": "string", "description": "The salty parameters."}, "keys": {"type": "object", "description": "The keys."}}}}}}, "responses": {"204": {"description": "Successfully updated the agent configuration."}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "The requested agent was not found."}, "500": {"description": "Internal server error. This could be due to an issue with updating the agent configuration."}}}}, "/identifiers/{name}": {"get": {"summary": "Retrieve an identifier.", "description": "This endpoint retrieves an identifier by its prefix or human-readable name.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "responses": {"200": {"description": "Successfully retrieved the identifier details.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Identifier"}}}}, "400": {"description": "Bad request. This could be due to a missing or invalid name parameter."}, "404": {"description": "The requested identifier was not found."}}}, "post": {"summary": "Process identifier events.", "description": "This endpoint handles the \'rot\' or \'ixn\' events of an identifier, or the request to resubmit the KEL, based on the provided request.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rot": {"type": "object", "description": "The rotation event details."}, "ixn": {"type": "object", "description": "The interaction event details."}, "submit": {"type": "object", "description": "The request to resubmit event details to witnesses."}}, "oneOf": [{"required": ["rot"]}, {"required": ["ixn"]}, {"required": ["submit"]}]}}}}, "responses": {"200": {"description": "Successfully processed the identifier\'s event.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}}}, "put": {"summary": "Rename an identifier.", "description": "This endpoint renames an identifier with the provided new name.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The current human-readable name of the identifier or its prefix."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string", "description": "The new human-readable name for the identifier."}}, "required": ["name"]}}}}, "responses": {"200": {"description": "Successfully renamed the identifier and returns the updated information.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Identifier"}}}}, "400": {"description": "Bad request. This could be due to a missing or invalid name parameter."}, "404": {"description": "The requested identifier was not found."}}}}, "/endroles/{aid}": {"get": {"summary": "Retrieve end roles.", "description": "This endpoint retrieves the end roles associated with an identifier prefix or human-readable name. It can also filter the end roles based on a specific role.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The identifier (AID)."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The specific role to filter the end roles."}], "responses": {"200": {"description": "Successfully retrieved the end roles. The response body contains the end roles.", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/EndRole"}}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "The requested identifier was not found."}}}, "post": {"summary": "Create an end role.", "description": "This endpoint creates an end role associated with a given identifier prefix or human-readable name.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "Not supported for POST. If provided, a 404 is returned."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rpy": {"type": "object", "description": "The reply object."}, "sigs": {"type": "array", "items": {"type": "string"}, "description": "The signatures."}}}}}}, "responses": {"202": {"description": "Accepted. The end role creation is in progress.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "Not found. The requested identifier was not found."}}}}, "/escrows/rpy": {"get": {"summary": "Retrieve reply escrows.", "description": "This endpoint retrieves the reply escrows and can filter the collection based on a specific route.", "tags": ["Reply Escrow"], "parameters": [{"in": "query", "name": "route", "schema": {"type": "string"}, "required": false, "description": "The specific route to filter the reply escrow collection."}], "responses": {"200": {"description": "Successfully retrieved the reply escrows.", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/Rpy"}}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}}}}, "/challenges/{name}": {"post": {"summary": "Sign challenge message and forward to peer identifier", "description": "Sign a challenge word list received out of bands and send `exn` peer to peer message to recipient", "tags": ["Challenge/Response"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "Human readable alias or prefix for the identifier to create"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"description": "Challenge response", "properties": {"recipient": {"type": "string", "description": "human readable alias recipient identifier to send signed challenge to"}, "words": {"type": "array", "description": "challenge in form of word list", "items": {"type": "string"}}}}}}}, "responses": {"202": {"description": "Success submission of signed challenge/response"}}}}, "/challenges_verify/{source}": {"post": {"summary": "Sign challenge message and forward to peer identifier", "description": "Sign a challenge word list received out of bands and send `exn` peer to peer message to recipient", "tags": ["Challenge/Response"], "parameters": [{"in": "path", "name": "source", "schema": {"type": "string"}, "required": true, "description": "Human readable alias for the identifier to create"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"description": "Challenge response", "properties": {"recipient": {"type": "string", "description": "human readable alias recipient identifier to send signed challenge to"}, "words": {"type": "array", "description": "challenge in form of word list", "items": {"type": "string"}}}}}}}, "responses": {"202": {"description": "Success submission of signed challenge/response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}}}, "put": {"summary": "Mark challenge response exn message as signed", "description": "Mark challenge response exn message as signed", "tags": ["Challenge/Response"], "parameters": [{"in": "path", "name": "source", "schema": {"type": "string"}, "required": true, "description": "Human readable alias for the identifier to create"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"description": "Challenge response", "properties": {"aid": {"type": "string", "description": "aid of signer of accepted challenge response"}, "said": {"type": "array", "description": "SAID of challenge message signed", "items": {"type": "string"}}}}}}}, "responses": {"202": {"description": "Success submission of signed challenge/response"}}}}, "/contacts/{prefix}": {"delete": {"summary": "Delete contact information associated with remote identifier", "description": "Delete contact information associated with remote identifier", "tags": ["Contacts"], "parameters": [{"in": "path", "name": "prefix", "schema": {"type": "string"}, "required": true, "description": "qb64 identifier prefix of contact to delete"}], "responses": {"202": {"description": "Contact information successfully deleted for prefix"}, "404": {"description": "No contact information found for prefix"}}}, "get": {"summary": "Get contact information associated with single remote identifier", "description": "Get contact information associated with single remote identifier. All information is meta-data and kept in local storage only", "tags": ["Contacts"], "parameters": [{"in": "path", "name": "prefix", "schema": {"type": "string"}, "required": true, "description": "qb64 identifier prefix of contact to get"}], "responses": {"200": {"description": "Contact information successfully retrieved for prefix", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Contact"}}}}, "404": {"description": "No contact information found for prefix"}}}, "post": {"summary": "Create new contact information for an identifier", "description": "Creates new information for an identifier, overwriting all existing information for that identifier", "tags": ["Contacts"], "parameters": [{"in": "path", "name": "prefix", "schema": {"type": "string"}, "required": true, "description": "qb64 identifier prefix to add contact metadata to"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"description": "Contact information", "type": "object"}}}}, "responses": {"200": {"description": "Updated contact information for remote identifier", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Contact"}}}}, "400": {"description": "Invalid identifier used to update contact information"}, "404": {"description": "Prefix not found in identifier contact information"}}}, "put": {"summary": "Update provided fields in contact information associated with remote identifier prefix", "description": "Update provided fields in contact information associated with remote identifier prefix. All information is metadata and kept in local storage only", "tags": ["Contacts"], "parameters": [{"in": "path", "name": "prefix", "schema": {"type": "string"}, "required": true, "description": "qb64 identifier prefix to add contact metadata to"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"description": "Contact information", "type": "object"}}}}, "responses": {"200": {"description": "Updated contact information for remote identifier", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Contact"}}}}, "400": {"description": "Invalid identifier used to update contact information"}, "404": {"description": "Prefix not found in identifier contact information"}}}}, "/oobi/{aid}": {"get": {"summary": "Retrieve OOBI resource.", "description": "This endpoint retrieves the OOBI resource based on the provided aid, role, and eid.", "tags": ["OOBI Resource"], "parameters": [{"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of OOBI."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The requested role for OOBI rpy message."}, {"in": "path", "name": "eid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of participant in role."}], "responses": {"200": {"description": "Successfully retrieved the OOBI resource."}, "400": {"description": "Bad request. This could be due to invalid or missing parameters."}, "404": {"description": "The requested OOBI resource was not found."}}}}, "/notifications/{said}": {"delete": {"summary": "Delete notification", "description": "Delete notification", "tags": ["Notifications"], "parameters": [{"in": "path", "name": "said", "schema": {"type": "string"}, "required": true, "description": "qb64 said of note to delete"}], "responses": {"202": {"description": "Notification successfully deleted for prefix"}, "404": {"description": "No notification information found for prefix"}}}, "put": {"summary": "Mark notification as read", "description": "Mark notification as read", "tags": ["Notifications"], "parameters": [{"in": "path", "name": "said", "schema": {"type": "string"}, "required": true, "description": "qb64 said of note to mark as read"}], "responses": {"202": {"description": "Notification successfully marked as read for prefix"}, "404": {"description": "No notification information found for SAID"}}}}, "/identifiers/{name}/events": {"get": {"summary": "Retrieve an identifier.", "description": "This endpoint retrieves an identifier by its prefix or human-readable name.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "responses": {"200": {"description": "Successfully retrieved the identifier details.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Identifier"}}}}, "400": {"description": "Bad request. This could be due to a missing or invalid name parameter."}, "404": {"description": "The requested identifier was not found."}}}, "post": {"summary": "Process identifier events.", "description": "This endpoint handles the \'rot\' or \'ixn\' events of an identifier, or the request to resubmit the KEL, based on the provided request.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rot": {"type": "object", "description": "The rotation event details."}, "ixn": {"type": "object", "description": "The interaction event details."}, "submit": {"type": "object", "description": "The request to resubmit event details to witnesses."}}, "oneOf": [{"required": ["rot"]}, {"required": ["ixn"]}, {"required": ["submit"]}]}}}}, "responses": {"200": {"description": "Successfully processed the identifier\'s event.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}}}, "put": {"summary": "Rename an identifier.", "description": "This endpoint renames an identifier with the provided new name.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The current human-readable name of the identifier or its prefix."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string", "description": "The new human-readable name for the identifier."}}, "required": ["name"]}}}}, "responses": {"200": {"description": "Successfully renamed the identifier and returns the updated information.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Identifier"}}}}, "400": {"description": "Bad request. This could be due to a missing or invalid name parameter."}, "404": {"description": "The requested identifier was not found."}}}}, "/identifiers/{name}/submit": {"get": {"summary": "Retrieve an identifier.", "description": "This endpoint retrieves an identifier by its prefix or human-readable name.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "responses": {"200": {"description": "Successfully retrieved the identifier details.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Identifier"}}}}, "400": {"description": "Bad request. This could be due to a missing or invalid name parameter."}, "404": {"description": "The requested identifier was not found."}}}, "post": {"summary": "Process identifier events.", "description": "This endpoint handles the \'rot\' or \'ixn\' events of an identifier, or the request to resubmit the KEL, based on the provided request.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rot": {"type": "object", "description": "The rotation event details."}, "ixn": {"type": "object", "description": "The interaction event details."}, "submit": {"type": "object", "description": "The request to resubmit event details to witnesses."}}, "oneOf": [{"required": ["rot"]}, {"required": ["ixn"]}, {"required": ["submit"]}]}}}}, "responses": {"200": {"description": "Successfully processed the identifier\'s event.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}}}, "put": {"summary": "Rename an identifier.", "description": "This endpoint renames an identifier with the provided new name.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The current human-readable name of the identifier or its prefix."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string", "description": "The new human-readable name for the identifier."}}, "required": ["name"]}}}}, "responses": {"200": {"description": "Successfully renamed the identifier and returns the updated information.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Identifier"}}}}, "400": {"description": "Bad request. This could be due to a missing or invalid name parameter."}, "404": {"description": "The requested identifier was not found."}}}}, "/identifiers/{name}/oobis": {"get": {"summary": "Fetch OOBI URLs of an identifier.", "description": "This endpoint fetches the OOBI URLs for a specific role associated with an identifier.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "query", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The role for which to fetch the OOBI URLs. Can be a witness, controller, agent, or mailbox."}], "responses": {"200": {"description": "Successfully fetched the OOBI URLs. The response body contains the OOBI URLs.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OOBI"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "The requested identifier was not found."}}}}, "/identifiers/{name}/endroles": {"get": {"summary": "Retrieve end roles.", "description": "This endpoint retrieves the end roles associated with an identifier prefix or human-readable name. It can also filter the end roles based on a specific role.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The identifier (AID)."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The specific role to filter the end roles."}], "responses": {"200": {"description": "Successfully retrieved the end roles. The response body contains the end roles.", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/EndRole"}}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "The requested identifier was not found."}}}, "post": {"summary": "Create an end role.", "description": "This endpoint creates an end role associated with a given identifier prefix or human-readable name.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "Not supported for POST. If provided, a 404 is returned."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rpy": {"type": "object", "description": "The reply object."}, "sigs": {"type": "array", "items": {"type": "string"}, "description": "The signatures."}}}}}}, "responses": {"202": {"description": "Accepted. The end role creation is in progress.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "Not found. The requested identifier was not found."}}}}, "/identifiers/{name}/locschemes": {"post": {"summary": "Authorises a new location scheme.", "description": "This endpoint authorises a new location scheme (endpoint) for a particular endpoint identifier.", "tags": ["Loc Scheme"], "parameters": [{"in": "path", "name": "name", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rpy": {"type": "object", "description": "The reply object."}, "sigs": {"type": "array", "items": {"type": "string"}, "description": "The signatures."}}}}}}, "responses": {"202": {"description": "Accepted. The loc scheme authorisation is in progress.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "Not found. The requested identifier was not found."}}}}, "/identifiers/{name}/members": {"get": {"summary": "Fetch group member information.", "description": "This endpoint retrieves the signing and rotation members for a specific group associated with an identifier.", "tags": ["Group Member"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "responses": {"200": {"description": "Successfully fetched the group member information.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GroupMember"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "The requested identifier was not found."}}}}, "/identifiers/{name}/delegation": {"post": {}}, "/endroles/{aid}/{role}": {"get": {"summary": "Retrieve end roles.", "description": "This endpoint retrieves the end roles associated with an identifier prefix or human-readable name. It can also filter the end roles based on a specific role.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The identifier (AID)."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The specific role to filter the end roles."}], "responses": {"200": {"description": "Successfully retrieved the end roles. The response body contains the end roles.", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/EndRole"}}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "The requested identifier was not found."}}}, "post": {"summary": "Create an end role.", "description": "This endpoint creates an end role associated with a given identifier prefix or human-readable name.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "Not supported for POST. If provided, a 404 is returned."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rpy": {"type": "object", "description": "The reply object."}, "sigs": {"type": "array", "items": {"type": "string"}, "description": "The signatures."}}}}}}, "responses": {"202": {"description": "Accepted. The end role creation is in progress.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "Not found. The requested identifier was not found."}}}}, "/contacts/{prefix}/img": {"get": {"summary": "Get contact image for identifer prefix", "description": "Get contact image for identifer prefix", "tags": ["Contacts"], "parameters": [{"in": "path", "name": "prefix", "schema": {"type": "string"}, "required": true, "description": "qb64 identifier prefix of contact image to get"}], "responses": {"200": {"description": "Contact information successfully retrieved for prefix", "content": {"image/jpg": {"schema": {"description": "Image", "type": "binary"}}}}, "404": {"description": "No contact information found for prefix"}}}, "post": {"summary": "Uploads an image to associate with identifier.", "description": "Uploads an image to associate with identifier.", "tags": ["Contacts"], "parameters": [{"in": "path", "name": "prefix", "schema": {"type": "string"}, "description": "identifier prefix to associate image to", "required": true}], "requestBody": {"required": true, "content": {"image/jpg": {"schema": {"type": "string", "format": "binary"}}, "image/png": {"schema": {"type": "string", "format": "binary"}}}}, "responses": {"200": {"description": "Image successfully uploaded"}}}}, "/oobi/{aid}/{role}": {"get": {"summary": "Retrieve OOBI resource.", "description": "This endpoint retrieves the OOBI resource based on the provided aid, role, and eid.", "tags": ["OOBI Resource"], "parameters": [{"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of OOBI."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The requested role for OOBI rpy message."}, {"in": "path", "name": "eid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of participant in role."}], "responses": {"200": {"description": "Successfully retrieved the OOBI resource."}, "400": {"description": "Bad request. This could be due to invalid or missing parameters."}, "404": {"description": "The requested OOBI resource was not found."}}}}, "/identifiers/{name}/endroles/{role}": {"get": {"summary": "Retrieve end roles.", "description": "This endpoint retrieves the end roles associated with an identifier prefix or human-readable name. It can also filter the end roles based on a specific role.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The identifier (AID)."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The specific role to filter the end roles."}], "responses": {"200": {"description": "Successfully retrieved the end roles. The response body contains the end roles.", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/EndRole"}}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "The requested identifier was not found."}}}, "post": {"summary": "Create an end role.", "description": "This endpoint creates an end role associated with a given identifier prefix or human-readable name.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "Not supported for POST. If provided, a 404 is returned."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rpy": {"type": "object", "description": "The reply object."}, "sigs": {"type": "array", "items": {"type": "string"}, "description": "The signatures."}}}}}}, "responses": {"202": {"description": "Accepted. The end role creation is in progress.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "Not found. The requested identifier was not found."}}}}, "/oobi/{aid}/{role}/{eid}": {"get": {"summary": "Retrieve OOBI resource.", "description": "This endpoint retrieves the OOBI resource based on the provided aid, role, and eid.", "tags": ["OOBI Resource"], "parameters": [{"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of OOBI."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The requested role for OOBI rpy message."}, {"in": "path", "name": "eid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of participant in role."}], "responses": {"200": {"description": "Successfully retrieved the OOBI resource."}, "400": {"description": "Bad request. This could be due to invalid or missing parameters."}, "404": {"description": "The requested OOBI resource was not found."}}}}, "/identifiers/{name}/endroles/{role}/{eid}": {"delete": {}}}, "info": {"title": "KERIA Interactive Web Interface API", "version": "1.0.1"}, "openapi": "3.1.0", "components": {"schemas": {"ACDCAttributes": {"type": "object", "properties": {"dt": {"type": "string"}, "i": {"type": "string"}, "u": {"type": "string"}}, "additionalProperties": true}, "ACDC_V_1": {"oneOf": [{"type": "object", "properties": {"v": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "u": {"type": "string"}, "ri": {"type": "string"}, "e": {"type": "string"}, "r": {"type": "string"}, "a": {"$ref": "#/components/schemas/ACDCAttributes"}}, "additionalProperties": false, "required": ["d", "i", "s", "v"]}, {"type": "object", "properties": {"v": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "u": {"type": "string"}, "ri": {"type": "string"}, "e": {"type": "string"}, "r": {"type": "string"}, "A": {"anyOf": [{"type": "string"}, {"type": "array"}]}}, "additionalProperties": false, "required": ["d", "i", "s", "v"]}]}, "ACDC_V_2": {"oneOf": [{"type": "object", "properties": {"v": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "u": {"type": "string"}, "rd": {"type": "string"}, "e": {"type": "string"}, "r": {"type": "string"}, "a": {"$ref": "#/components/schemas/ACDCAttributes"}}, "additionalProperties": false, "required": ["d", "i", "s", "v"]}, {"type": "object", "properties": {"v": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "u": {"type": "string"}, "rd": {"type": "string"}, "e": {"type": "string"}, "r": {"type": "string"}, "A": {"anyOf": [{"type": "string"}, {"type": "array"}]}}, "additionalProperties": false, "required": ["d", "i", "s", "v"]}]}, "IssEvent": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"enum": ["iss", "bis"]}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "ri": {"type": "string"}, "dt": {"type": "string"}}, "required": ["d", "dt", "i", "ri", "s", "t", "v"]}, "Schema": {"type": "object", "properties": {"$id": {"type": "string"}, "$schema": {"type": "string"}, "title": {"type": "string"}, "description": {"type": "string"}, "type": {"type": "string"}, "credentialType": {"type": "string"}, "version": {"type": "string"}, "properties": {"type": "object", "additionalProperties": {}}, "additionalProperties": {"type": "boolean"}, "required": {"type": "array", "items": {"type": "string"}}}, "required": ["$id", "$schema", "additionalProperties", "credentialType", "description", "properties", "required", "title", "type", "version"]}, "Anchor": {"type": "object", "properties": {"pre": {"type": "string"}, "sn": {"type": "integer"}, "d": {"type": "string"}}, "required": ["d", "pre", "sn"]}, "Seal": {"type": "object", "properties": {"s": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}}, "required": ["d", "s"]}, "IXN_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "p": {"type": "string"}, "a": {}}, "required": ["a", "d", "i", "p", "s", "t", "v"]}, "IXN_V_2": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "p": {"type": "string"}, "a": {}}, "required": ["a", "d", "i", "p", "s", "t", "v"]}, "ICP_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "b": {"type": "array", "items": {"type": "string"}}, "c": {"type": "array", "items": {"type": "string"}}, "a": {}}, "required": ["a", "b", "bt", "c", "d", "i", "k", "kt", "n", "nt", "s", "t", "v"]}, "ICP_V_2": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "b": {"type": "array", "items": {"type": "string"}}, "c": {"type": "array", "items": {"type": "string"}}, "a": {}}, "required": ["a", "b", "bt", "c", "d", "i", "k", "kt", "n", "nt", "s", "t", "v"]}, "ROT_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "p": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "br": {"type": "array", "items": {"type": "string"}}, "ba": {"type": "array", "items": {"type": "string"}}, "a": {}}, "required": ["a", "ba", "br", "bt", "d", "i", "k", "kt", "n", "nt", "p", "s", "t", "v"]}, "ROT_V_2": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "p": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "br": {"type": "array", "items": {"type": "string"}}, "ba": {"type": "array", "items": {"type": "string"}}, "c": {"type": "array", "items": {"type": "string"}}, "a": {}}, "required": ["a", "ba", "br", "bt", "c", "d", "i", "k", "kt", "n", "nt", "p", "s", "t", "v"]}, "DIP_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "b": {"type": "array", "items": {"type": "string"}}, "c": {"type": "array", "items": {"type": "string"}}, "a": {}, "di": {"type": "string"}}, "required": ["a", "b", "bt", "c", "d", "di", "i", "k", "kt", "n", "nt", "s", "t", "v"]}, "DIP_V_2": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "b": {"type": "array", "items": {"type": "string"}}, "c": {"type": "array", "items": {"type": "string"}}, "a": {}, "di": {"type": "string"}}, "required": ["a", "b", "bt", "c", "d", "di", "i", "k", "kt", "n", "nt", "s", "t", "v"]}, "DRT_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "p": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "br": {"type": "array", "items": {"type": "string"}}, "ba": {"type": "array", "items": {"type": "string"}}, "a": {}}, "required": ["a", "ba", "br", "bt", "d", "i", "k", "kt", "n", "nt", "p", "s", "t", "v"]}, "DRT_V_2": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "p": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "br": {"type": "array", "items": {"type": "string"}}, "ba": {"type": "array", "items": {"type": "string"}}, "c": {"type": "array", "items": {"type": "string"}}, "a": {}}, "required": ["a", "ba", "br", "bt", "c", "d", "i", "k", "kt", "n", "nt", "p", "s", "t", "v"]}, "RPY_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "dt": {"type": "string"}, "r": {"type": "string"}, "a": {}}, "required": ["a", "d", "dt", "r", "t", "v"]}, "RPY_V_2": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "dt": {"type": "string"}, "r": {"type": "string"}, "a": {}}, "required": ["a", "d", "dt", "i", "r", "t", "v"]}, "VCP_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "ii": {"type": "string"}, "s": {"type": "string"}, "c": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "b": {"type": "array", "items": {"type": "string"}}, "n": {"type": "string"}}, "required": ["b", "bt", "c", "d", "i", "ii", "n", "s", "t", "v"]}, "EXN_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "rp": {"type": "string"}, "p": {"type": "string"}, "dt": {"type": "string"}, "r": {"type": "string"}, "q": {"type": "object", "additionalProperties": {}}, "a": {}, "e": {"type": "object", "additionalProperties": {}}}, "required": ["a", "d", "dt", "e", "i", "p", "q", "r", "rp", "t", "v"]}, "EXN_V_2": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "x": {"type": "string"}, "p": {"type": "string"}, "dt": {"type": "string"}, "r": {"type": "string"}, "q": {"type": "object", "additionalProperties": {}}, "a": {}}, "required": ["a", "d", "dt", "i", "p", "q", "r", "t", "v", "x"]}, "Credential": {"type": "object", "properties": {"sad": {"oneOf": [{"$ref": "#/components/schemas/ACDC_V_1"}, {"$ref": "#/components/schemas/ACDC_V_2"}]}, "atc": {"type": "string"}, "iss": {"$ref": "#/components/schemas/IssEvent"}, "issatc": {"type": "string"}, "pre": {"type": "string"}, "schema": {"$ref": "#/components/schemas/Schema"}, "chains": {"type": "array", "items": {"type": "object", "additionalProperties": {}}}, "status": {"$ref": "#/components/schemas/CredentialState"}, "anchor": {"$ref": "#/components/schemas/Anchor"}, "anc": {"oneOf": [{"$ref": "#/components/schemas/IXN_V_1"}, {"$ref": "#/components/schemas/IXN_V_2"}, {"$ref": "#/components/schemas/ICP_V_1"}, {"$ref": "#/components/schemas/ICP_V_2"}, {"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}, {"$ref": "#/components/schemas/DIP_V_1"}, {"$ref": "#/components/schemas/DIP_V_2"}, {"$ref": "#/components/schemas/DRT_V_1"}, {"$ref": "#/components/schemas/DRT_V_2"}]}, "ancatc": {"type": "string"}}, "required": ["anc", "ancatc", "anchor", "atc", "chains", "iss", "issatc", "pre", "sad", "schema", "status"]}, "OperationStatus": {"type": "object", "properties": {"code": {"type": "integer"}, "message": {"type": "string"}, "details": {"type": ["object", "null"], "additionalProperties": {}}}, "required": ["code", "message"]}, "Operation": {"type": "object", "properties": {"name": {"type": "string"}, "error": {"$ref": "#/components/schemas/OperationStatus"}, "done": {"type": "boolean"}, "metadata": {"type": "object"}, "response": {"type": "object"}}, "required": ["name"]}, "EmptyDict": {"type": "object", "properties": {}}, "CredentialStateIssOrRev": {"type": "object", "properties": {"vn": {}, "i": {"type": "string"}, "s": {"type": "string"}, "d": {"type": "string"}, "ri": {"type": "string"}, "a": {"$ref": "#/components/schemas/Seal"}, "dt": {"type": "string"}, "et": {"enum": ["iss", "rev"]}, "ra": {"$ref": "#/components/schemas/EmptyDict"}}, "required": ["a", "d", "dt", "et", "i", "ra", "ri", "s", "vn"]}, "RaFields": {"type": "object", "properties": {"i": {"type": "string"}, "s": {"type": "string"}, "d": {"type": "string"}}, "required": ["d", "i", "s"]}, "CredentialStateBisOrBrv": {"type": "object", "properties": {"vn": {}, "i": {"type": "string"}, "s": {"type": "string"}, "d": {"type": "string"}, "ri": {"type": "string"}, "a": {"$ref": "#/components/schemas/Seal"}, "dt": {"type": "string"}, "et": {"enum": ["bis", "brv"]}, "ra": {"$ref": "#/components/schemas/RaFields"}}, "required": ["a", "d", "dt", "et", "i", "ra", "ri", "s", "vn"]}, "CredentialState": {"oneOf": [{"$ref": "#/components/schemas/CredentialStateIssOrRev"}, {"$ref": "#/components/schemas/CredentialStateBisOrBrv"}]}, "Registry": {"type": "object", "properties": {"name": {"type": "string"}, "regk": {"type": "string"}, "pre": {"type": "string"}, "state": {"$ref": "#/components/schemas/CredentialState"}}, "required": ["name", "pre", "regk", "state"]}, "StateEERecord": {"type": "object", "properties": {"s": {"type": "string", "default": "0"}, "d": {"type": "string", "default": ""}, "br": {"type": "array", "items": {}}, "ba": {"type": "array", "items": {}}}}, "KeyStateRecord": {"type": "object", "properties": {"vn": {"type": "array", "items": {"type": "integer"}}, "i": {"type": "string", "default": ""}, "s": {"type": "string", "default": "0"}, "p": {"type": "string", "default": ""}, "d": {"type": "string", "default": ""}, "f": {"type": "string", "default": "0"}, "dt": {"type": "string", "default": ""}, "et": {"type": "string", "default": ""}, "kt": {"type": "string", "default": "0"}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"type": "string", "default": "0"}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string", "default": "0"}, "b": {"type": "array", "items": {"type": "string"}}, "c": {"type": "array", "items": {"type": "string"}}, "ee": {"$ref": "#/components/schemas/StateEERecord"}, "di": {"type": "string", "default": ""}}, "required": ["b", "c", "ee", "k", "n"]}, "Controller": {"type": "object", "properties": {"state": {"$ref": "#/components/schemas/KeyStateRecord"}, "ee": {"oneOf": [{"$ref": "#/components/schemas/ICP_V_1"}, {"$ref": "#/components/schemas/ICP_V_2"}, {"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}, {"$ref": "#/components/schemas/DIP_V_1"}, {"$ref": "#/components/schemas/DIP_V_2"}, {"$ref": "#/components/schemas/DRT_V_1"}, {"$ref": "#/components/schemas/DRT_V_2"}]}}, "required": ["ee", "state"]}, "AgentResourceResult": {"type": "object", "properties": {"agent": {"$ref": "#/components/schemas/KeyStateRecord"}, "controller": {"$ref": "#/components/schemas/Controller"}, "pidx": {"type": "integer"}, "ridx": {"type": ["integer", "null"], "default": null}, "sxlt": {"type": ["string", "null"], "default": null}}, "required": ["agent", "controller", "pidx"]}, "SaltyState": {"type": "object", "properties": {"tier": {"$ref": "#/components/schemas/Tier"}, "sxlt": {"type": "string", "default": ""}, "pidx": {"type": "integer", "default": 0}, "kidx": {"type": "integer", "default": 0}, "stem": {"type": "string", "default": ""}, "dcode": {"type": "string", "default": ""}, "icodes": {"type": "array", "items": {"type": "string"}}, "ncodes": {"type": "array", "items": {"type": "string"}}, "transferable": {"type": "boolean", "default": false}}, "required": ["icodes", "ncodes", "tier"]}, "RandyKeyState": {"type": "object", "properties": {"prxs": {"type": "array", "items": {"type": "string"}}, "nxts": {"type": "array", "items": {"type": "string"}}}, "required": ["nxts", "prxs"]}, "HabState": {"type": "object", "properties": {"name": {"type": "string"}, "prefix": {"type": "string"}, "icp_dt": {"type": "string"}, "state": {"$ref": "#/components/schemas/KeyStateRecord"}, "transferable": {"type": ["boolean", "null"], "default": null}, "windexes": {"type": ["array", "null"], "default": null, "items": {"type": "string"}}}, "required": ["icp_dt", "name", "prefix", "state"]}, "GroupKeyState": {"type": "object", "properties": {"mhab": {"$ref": "#/components/schemas/Identifier"}, "keys": {"type": "array", "items": {"type": "string"}}, "ndigs": {"type": "array", "items": {"type": "string"}}}, "required": ["keys", "mhab", "ndigs"]}, "ExternState": {"type": "object", "properties": {"extern_type": {"type": "string"}, "pidx": {"type": "integer"}}, "required": ["extern_type", "pidx"], "additionalProperties": true}, "Identifier": {"type": "object", "properties": {"name": {"type": "string"}, "prefix": {"type": "string"}, "icp_dt": {"type": "string"}, "state": {"$ref": "#/components/schemas/KeyStateRecord"}, "transferable": {"type": ["boolean", "null"], "default": null}, "windexes": {"type": ["array", "null"], "default": null, "items": {"type": "string"}}}, "required": ["icp_dt", "name", "prefix", "state"], "oneOf": [{"required": ["salty"], "properties": {"salty": {"$ref": "#/components/schemas/SaltyState"}}}, {"required": ["randy"], "properties": {"randy": {"$ref": "#/components/schemas/RandyKeyState"}}}, {"required": ["group"], "properties": {"group": {"$ref": "#/components/schemas/GroupKeyState"}}}, {"required": ["extern"], "properties": {"extern": {"$ref": "#/components/schemas/ExternState"}}}]}, "Tier": {"type": "string", "enum": ["low", "med", "high"], "description": "Tier of key material"}, "OOBI": {"type": "object", "properties": {"role": {"type": "string", "enum": ["controller", "witness", "registrar", "watcher", "judge", "juror", "peer", "mailbox", "agent"]}, "oobis": {"type": "array", "items": {"type": "string"}}}, "required": ["oobis", "role"]}, "EndRole": {"type": "object", "properties": {"cid": {"type": "string"}, "role": {"type": "string"}, "eid": {"type": "string"}}, "required": ["cid", "eid", "role"]}, "Rpy": {"oneOf": [{"$ref": "#/components/schemas/RPY_V_1"}, {"$ref": "#/components/schemas/RPY_V_2"}]}, "Challenge": {"type": "object", "properties": {"words": {"type": "array", "items": {"type": "string"}}, "dt": {"type": "string"}, "said": {"type": "string"}, "authenticated": {"type": "boolean"}}, "required": ["words"]}, "MemberEnds": {"type": "object", "properties": {"agent": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "controller": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "witness": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "registrar": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "watcher": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "judge": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "juror": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "peer": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "mailbox": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}}}, "WellKnown": {"type": "object", "properties": {"url": {"type": "string"}, "dt": {"type": "string"}}, "required": ["dt", "url"]}, "Contact": {"type": "object", "properties": {"id": {"type": "string"}, "alias": {"type": "string"}, "oobi": {"type": "string"}, "ends": {"$ref": "#/components/schemas/MemberEnds"}, "challenges": {"type": "array", "items": {"$ref": "#/components/schemas/Challenge"}}, "wellKnowns": {"type": "array", "items": {"$ref": "#/components/schemas/WellKnown"}}}, "required": ["id"], "additionalProperties": true}, "AidRecord": {"type": "object", "properties": {"aid": {"type": "string"}, "ends": {"$ref": "#/components/schemas/MemberEnds"}}, "required": ["aid", "ends"]}, "GroupMember": {"type": "object", "properties": {"signing": {"type": "array", "items": {"$ref": "#/components/schemas/AidRecord"}}, "rotation": {"type": "array", "items": {"$ref": "#/components/schemas/AidRecord"}}}, "required": ["rotation", "signing"]}, "KeyEventRecord": {"type": "object", "properties": {"ked": {"oneOf": [{"$ref": "#/components/schemas/IXN_V_1"}, {"$ref": "#/components/schemas/IXN_V_2"}, {"$ref": "#/components/schemas/ICP_V_1"}, {"$ref": "#/components/schemas/ICP_V_2"}, {"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}, {"$ref": "#/components/schemas/DIP_V_1"}, {"$ref": "#/components/schemas/DIP_V_2"}, {"$ref": "#/components/schemas/DRT_V_1"}, {"$ref": "#/components/schemas/DRT_V_2"}]}, "atc": {"type": "string"}}, "required": ["atc", "ked"]}, "AgentConfig": {"type": "object", "properties": {"iurls": {"type": "array", "items": {"type": "string"}}}}, "Exn": {"oneOf": [{"$ref": "#/components/schemas/EXN_V_1"}, {"$ref": "#/components/schemas/EXN_V_2"}]}, "Icp": {"oneOf": [{"$ref": "#/components/schemas/ICP_V_1"}, {"$ref": "#/components/schemas/ICP_V_2"}]}, "Rot": {"oneOf": [{"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}]}, "Vcp": {"oneOf": [{"$ref": "#/components/schemas/VCP_V_1"}]}, "Iss": {"oneOf": [{"$ref": "#/components/schemas/ISS_V_1"}]}, "Ixn": {"oneOf": [{"$ref": "#/components/schemas/IXN_V_1"}, {"$ref": "#/components/schemas/IXN_V_2"}]}, "NotificationData": {"type": "object", "properties": {"r": {"type": "string"}, "d": {"type": "string"}, "m": {"type": "string"}}, "additionalProperties": true}, "Notification": {"type": "object", "properties": {"i": {"type": "string"}, "dt": {"type": "string"}, "r": {"type": "boolean"}, "a": {"$ref": "#/components/schemas/NotificationData"}}, "required": ["a", "dt", "i", "r"]}, "ExchangeResource": {"type": "object", "properties": {"exn": {"$ref": "#/components/schemas/Exn"}, "pathed": {"type": "object", "additionalProperties": {}}}, "required": ["exn", "pathed"]}, "MultisigInceptEmbeds": {"type": "object", "properties": {"icp": {"$ref": "#/components/schemas/Icp"}}, "required": ["icp"]}, "MultisigRotateEmbeds": {"type": "object", "properties": {"rot": {"$ref": "#/components/schemas/Rot"}}, "required": ["rot"]}, "MultisigInteractEmbeds": {"type": "object", "properties": {"ixn": {"$ref": "#/components/schemas/Ixn"}}, "required": ["ixn"]}, "MultisigRegistryInceptEmbeds": {"type": "object", "properties": {"vcp": {"$ref": "#/components/schemas/Vcp"}, "anc": {"oneOf": [{"$ref": "#/components/schemas/IXN_V_1"}, {"$ref": "#/components/schemas/IXN_V_2"}, {"$ref": "#/components/schemas/ICP_V_1"}, {"$ref": "#/components/schemas/ICP_V_2"}, {"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}, {"$ref": "#/components/schemas/DIP_V_1"}, {"$ref": "#/components/schemas/DIP_V_2"}, {"$ref": "#/components/schemas/DRT_V_1"}, {"$ref": "#/components/schemas/DRT_V_2"}]}}, "required": ["anc", "vcp"]}, "ISS_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "ri": {"type": "string"}, "dt": {"type": "string"}}, "required": ["d", "dt", "i", "ri", "s", "t", "v"]}, "MultisigIssueEmbeds": {"type": "object", "properties": {"acdc": {"oneOf": [{"$ref": "#/components/schemas/ACDC_V_1"}, {"$ref": "#/components/schemas/ACDC_V_2"}]}, "iss": {"$ref": "#/components/schemas/Iss"}, "anc": {"oneOf": [{"$ref": "#/components/schemas/IXN_V_1"}, {"$ref": "#/components/schemas/IXN_V_2"}, {"$ref": "#/components/schemas/ICP_V_1"}, {"$ref": "#/components/schemas/ICP_V_2"}, {"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}, {"$ref": "#/components/schemas/DIP_V_1"}, {"$ref": "#/components/schemas/DIP_V_2"}, {"$ref": "#/components/schemas/DRT_V_1"}, {"$ref": "#/components/schemas/DRT_V_2"}]}}, "required": ["acdc", "anc", "iss"]}, "REV_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "ri": {"type": "string"}, "p": {"type": "string"}, "dt": {"type": "string"}}, "required": ["d", "dt", "i", "p", "ri", "s", "t", "v"]}, "MultisigRevokeEmbeds": {"type": "object", "properties": {"rev": {"$ref": "#/components/schemas/REV_V_1"}, "anc": {"oneOf": [{"$ref": "#/components/schemas/IXN_V_1"}, {"$ref": "#/components/schemas/IXN_V_2"}, {"$ref": "#/components/schemas/ICP_V_1"}, {"$ref": "#/components/schemas/ICP_V_2"}, {"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}, {"$ref": "#/components/schemas/DIP_V_1"}, {"$ref": "#/components/schemas/DIP_V_2"}, {"$ref": "#/components/schemas/DRT_V_1"}, {"$ref": "#/components/schemas/DRT_V_2"}]}}, "required": ["anc", "rev"]}, "MultisigRpyEmbeds": {"type": "object", "properties": {"rpy": {"$ref": "#/components/schemas/Rpy"}}, "required": ["rpy"]}, "MultisigExnEmbeds": {"type": "object", "properties": {"exn": {"$ref": "#/components/schemas/Exn"}}, "required": ["exn"]}, "ExnEmbeds": {"type": "object", "properties": {"d": {"type": "string"}}, "required": ["d"], "oneOf": [{"$ref": "#/components/schemas/MultisigInceptEmbeds"}, {"$ref": "#/components/schemas/MultisigRotateEmbeds"}, {"$ref": "#/components/schemas/MultisigInteractEmbeds"}, {"$ref": "#/components/schemas/MultisigRegistryInceptEmbeds"}, {"$ref": "#/components/schemas/MultisigIssueEmbeds"}, {"$ref": "#/components/schemas/MultisigRevokeEmbeds"}, {"$ref": "#/components/schemas/MultisigRpyEmbeds"}, {"$ref": "#/components/schemas/MultisigExnEmbeds"}]}, "ExnMultisig": {"type": "object", "properties": {"exn": {"$ref": "#/components/schemas/Exn"}, "paths": {"type": "object", "additionalProperties": {}}, "groupName": {"type": ["string", "null"], "default": null}, "memberName": {"type": ["string", "null"], "default": null}, "sender": {"type": ["string", "null"], "default": null}}, "required": ["exn", "paths"]}}}}' )