Skip to content
4 changes: 4 additions & 0 deletions src/doc/02 - functional.rst
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,8 @@ The following table describes in detail the interfaces and associated services.
Finalize Enrollment Finalize an enrollment (mark it as completed)
Delete Enrollment Delete an enrollment
Find Enrollments Retrieve a list of enrollments which match passed in search criteria
Read Enrollment Processing Status Retrieve the status of the processing done after finalization
Read Enrollment Processing Data Retrieve the data generated by the processing of the enrollment done after finalization
Send Buffer Send a buffer (image, etc.)
Get Buffer Get a buffer
--------------------------------- -----------------------------------------------------------------------------------
Expand Down Expand Up @@ -341,6 +343,8 @@ The interfaces described in the following chapter can be mapped against ID ecosy
Finalize Enrollment U I
Delete Enrollment U I
Find Enrollments U I
Read Enrollment Processing Status U I
Read Enrollment Processing Data U I
Send Buffer U I
Get Buffer U I
--------------------------------- ------- ------- ------- ------- ------- ------- ------- -------
Expand Down
2 changes: 2 additions & 0 deletions src/doc/03 - security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ The following table is a summary of all scopes defined in OSIA.
Finalize Enrollment ``enroll.write``
Delete Enrollment ``enroll.write``
Find Enrollments ``enroll.read``
Read Enrollment Processing Status ``enroll.proc.status``
Read Enrollment Processing Data ``enroll.proc.data``
Send Buffer ``enroll.buf.write``
Get Buffer ``enroll.buf.read``
----------------------------------- -----------------------------------------------
Expand Down
26 changes: 26 additions & 0 deletions src/doc/functional/_enrollment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,32 @@ Services
:param string transactionID: The client generated transactionID.
:return: a status indicating success or error and in case of success the matching enrollment list.

.. py:function:: readEnrollmentProcessingStatus(enrollmentID, transactionID, names)
:noindex:

Retrieve the status of the processing of an enrollment.
The status is available only after the finalization of the enrollment.

**Authorization**: ``enroll.proc.status``

:param str enrollmentID: The ID of the enrollment.
:param string transactionID: The client generated transactionID.
:param list[str] names: The names of the status requested
:return: a dictionary of names and status. The name is the processing and the value is the status.

.. py:function:: readEnrollmentProcessingData(enrollmentID, transactionID, names)
:noindex:

Retrieve the data resulting of the processing of an enrollment.
The data is available only after the finalization of the enrollment.

**Authorization**: ``enroll.proc.data``

:param str enrollmentID: The ID of the enrollment.
:param string transactionID: The client generated transactionID.
:param list[str] names: The names of the data requested
:return: a dictionary of names and data. The name is the processing and the value is the data if available.

.. py:function:: createBuffer(enrollmentId, data, digest)
:noindex:

Expand Down
144 changes: 144 additions & 0 deletions src/doc/yaml/enrollment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ info:
- Add quality, qualityFormat, algorithm, vendor fields to biometricData
- Mark some fields (ID, etc.) as readOnly
- Add FORM in possible document type
- Add service readEnrollmentProcessingStatus and readEnrollmentProcessingData
- 1.1.0:
- Add error structure on 400 errors
- Add additional documentType and open it for extension
Expand Down Expand Up @@ -408,6 +409,145 @@ paths:
schema:
$ref: '#/components/schemas/Error'

/v1/enrollments/{enrollmentId}/processing/status:
get:
tags:
- Enrollment
summary: Retrieve the status of the processing of the enrollment
description: |
Retrieve the status of the processing of the enrollment.
The status is available only after the finalization of the enrollment.
operationId: readEnrollmentProcessingStatus
security:
- BearerAuth: [enroll.proc.status]
parameters:
- name: enrollmentId
in: path
description: the id of the enrollment
required: true
schema:
type: string
- name: transactionId
in: query
description: The id of the transaction
required: true
schema:
type: string
- name: names
in: query
description: The names of the processings to consider. If not provided, the server will attempt to return all available status.
required: false
schema:
type: array
items:
type: string
style: form
explode: true
example:
- UIN generation
- credential issuance
responses:
200:
description: |
The requested status found (a value) for each processing name, or nothing if the status is not yet available.
Proposed list of status is: NOT_STARTED, IN_PROGRESS, SUSPENDED, FINISHED, REJECTED
content:
application/json:
schema:
type: object
additionalProperties:
$ref: '#/components/schemas/ProcessingStatusType'
example:
UIN generation: FINISHED
credential issuance: IN_PROGRESS
400:
description: Invalid parameter
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
401:
description: Client must be authenticated
403:
description: Service forbidden
404:
description: No record found
500:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'

/v1/enrollments/{enrollmentId}/processing/data:
get:
tags:
- Enrollment
summary: Retrieve the data of the processing of the enrollment
description: |
Retrieve the data of the processing of an enrollment.
The data is available only after the finalization of the enrollment and is available
only to priviledged users.
operationId: readEnrollmentProcessingData
security:
- BearerAuth: [enroll.proc.data]
parameters:
- name: enrollmentId
in: path
description: the id of the enrollment
required: true
schema:
type: string
- name: transactionId
in: query
description: The id of the transaction
required: true
schema:
type: string
- name: names
in: query
description: The names of the data to return. If not provided, the server will attempt to return all available data.
required: false
schema:
type: array
items:
type: string
style: form
explode: true
example:
- UIN generation
- credential issuance
responses:
200:
description: The requested data found (a value or object) for each data name, or nothing if the data is not yet available
content:
application/json:
schema:
type: object
additionalProperties: true
example:
UIN generation: "123456789"
credential issuance:
credentialNumber: 88FR978662
400:
description: Invalid parameter
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
401:
description: Client must be authenticated
403:
description: Service forbidden
404:
description: No record found
500:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'

/v1/enrollments/{enrollmentId}/buffer:
post:
tags:
Expand Down Expand Up @@ -907,3 +1047,7 @@ components:
- RIGHT_PROFILE
example: RIGHT_INDEX

ProcessingStatusType:
type: string
enum: [NOT_STARTED, IN_PROGRESS, SUSPENDED, FINISHED, REJECTED]