openapi: 3.0.1 info: description: This represents the Presentation API as per DCP specification. It serves endpoints to query for specific VerifiablePresentations. title: Presentation API version: "1" paths: /v1/participants/{participantContextId}/presentations/query: post: description: "Issues a new presentation query, that contains either a DIF presentation\ \ definition, or a list of scopes" operationId: queryPresentation parameters: - in: path name: participantContextId required: true schema: type: string - in: header name: Authorization schema: type: string requestBody: content: application/json: schema: $ref: "#/components/schemas/PresentationQueryMessage" responses: "200": content: application/json: schema: $ref: "#/components/schemas/PresentationResponseMessage" description: "The query was successfully processed, the response contains\ \ the VerifiablePresentation" "400": content: application/json: schema: type: array items: $ref: "#/components/schemas/ApiErrorDetail" description: "Request body was malformed, for example when both scope and\ \ presentationDefinition are given" "401": content: application/json: schema: type: array items: $ref: "#/components/schemas/ApiErrorDetail" description: No Authorization header was given. "403": content: application/json: schema: type: array items: $ref: "#/components/schemas/ApiErrorDetail" description: "The given authentication token could not be validated. This\ \ can happen, when the request body calls for a broader query scope than\ \ the granted scope in the auth token" "501": content: application/json: schema: type: array items: $ref: "#/components/schemas/ApiErrorDetail" description: "When the request contained a presentationDefinition object,\ \ but the implementation does not support it." tags: - Presentation API components: schemas: ApiErrorDetail: type: object example: message: error message type: ErrorType path: object.error.path invalidValue: this value is not valid properties: invalidValue: type: string message: type: string path: type: string type: type: string JsonObject: type: object additionalProperties: $ref: "#/components/schemas/JsonValue" properties: empty: type: boolean valueType: type: string enum: - ARRAY - OBJECT - STRING - NUMBER - "TRUE" - "FALSE" - "NULL" JsonValue: type: object properties: valueType: type: string enum: - ARRAY - OBJECT - STRING - NUMBER - "TRUE" - "FALSE" - "NULL" PresentationDefinitionSchema: type: object example: | { "comment": "taken from https://identity.foundation/presentation-exchange/spec/v2.0.0/#presentation-definition" "presentationDefinition": { "id": "first simple example", "input_descriptors": [ { "id": "A specific type of VC", "name": "A specific type of VC", "purpose": "We want a VC of this type", "constraints": { "fields": [ { "path": [ "$.type" ], "filter": { "type": "string", "pattern": "" } } ] } } ] } } PresentationQueryMessage: type: object example: '@context': - https://w3id.org/tractusx-trust/v0.8 - https://identity.foundation/presentation-exchange/submission/v1 '@type': PresentationQueryMessage presentationDefinition: null scope: - org.eclipse.edc.vc.type:SomeCredential_0.3.5:write - org.eclipse.edc.vc.type:SomeOtherCredential:read - org.eclipse.edc.vc.type:ThirdCredential:* properties: '@context': type: object '@type': type: string presentationDefinition: $ref: "#/components/schemas/PresentationDefinitionSchema" scope: type: array items: type: string required: - '@context' - '@type' PresentationResponseMessage: type: object example: '@context': - https://w3id.org/tractusx-trust/v0.8 '@type': PresentationResponseMessage presentation: - dsJdh...UMetV properties: '@context': type: object presentation: type: array items: type: object anyOf: - type: string - $ref: "#/components/schemas/JsonObject" required: - '@context' - presentation securitySchemes: Authentication: bearerFormat: JWT description: Self-Issued ID token containing an access_token scheme: bearer type: http