From f363a25fac39349f09bbcec4b36d2e4bf226a7b3 Mon Sep 17 00:00:00 2001 From: Smita Selot <140137588+smita-govstack@users.noreply.github.com> Date: Wed, 14 Feb 2024 12:16:52 +0530 Subject: [PATCH] Create Credential-Management.yaml --- api/Credential-Management.yaml | 628 +++++++++++++++++++++++++++++++++ 1 file changed, 628 insertions(+) create mode 100644 api/Credential-Management.yaml diff --git a/api/Credential-Management.yaml b/api/Credential-Management.yaml new file mode 100644 index 0000000..a3384d4 --- /dev/null +++ b/api/Credential-Management.yaml @@ -0,0 +1,628 @@ +openapi: 3.1.0 +info: + title: Credential Management APIs + description: Credential Management APIs + version: 1.0.0 + contact: + url: 'https://www.govstack.global/' +paths: + /share-credential: + post: + description: Format for sharing identity credentials with an identity partner + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ShareCredentialInfo' + responses: + 200: + description: EventId generated successfully. + headers: + eventId: + description: The eventId for the share credential format + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/ShareCredentialResp' + 401: + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/UnauthorizedError' + /events/{eventId}?language=LANGCODE: + get: + description: Get the status by eventID + parameters: + - in: path + name: eventId + schema: + type: integer + required: true + description: Event ID to get the status + - in: query + name: language + schema: + type: string + required: true + description: Language Code + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/EventResp' + 401: + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/UnauthorizedError' + security: + - Authorization: [] + - ID_token: [] + /download/personalized-card: + post: + description: Download the personalized UIN Card + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DownloadCardInfo' + responses: + 200: + description: OK - The PDF Bytes + headers: + eventId: + description: The eventId for the share credential format + schema: + type: string + 400: + description: Bad Request + content: + application/json: + schema: + type: string + 401: + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/UnauthorizedError' + security: + - Authorization: [] + - ID_token: [] + /update-uin: + description: This request will authenticate an Individual based on provided OTP and respond with RID after successfully placing update request to Registration Processor. Notification will be sent to phone/email. + post: + description: Update UIN request raised by the resident/citizen + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateUINInfo' + responses: + 200: + description: OK, update is successful. + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateUINInfo' + security: + - Authentication: [] + /service-history/{langCode}: + get: + description: Get the status by eventID + parameters: + - in: path + name: langCode + schema: + type: string + required: true + description: Language Code + - in: query + name: fromDate + schema: + type: string + required: true + description: Start date of the request inclusive; the default date will be the 1st of January of that year + - in: query + name: pageFetch + schema: + type: string + description: integer greater than 0, default is 10 + - in: query + name: pageStart + schema: + type: string + description: integer starting from 0, default is 0 + - in: query + name: searchText + schema: + type: string + description: 'This will be used to look for Event Id- string greater than 0 but not more than 30; >= 0 characters; <= 30 characters' + - in: query + name: serviceType + schema: + type: string + description: 'The service type in general. It can map to different request types. Possible values: AUTHENTICATION_REQUEST, SERVICE_REQUEST,DATA_UPDATE_REQUEST,ID_MANAGEMENT_REQUEST,DATA_SHARE_REQUEST,ALL; default is ALL' + - in: query + name: sortType + schema: + type: string + description: ASC/DESC, default is ASC + - in: query + name: statusFilter + schema: + type: string + description: 'Comma separated service types status code- optional. This can be one of - ALL,SUCCESS,IN_PROGRESS,FAILED' + - in: query + name: toDate + schema: + type: string + description: 'End date of the request inclusive; the default date will be the date on which this transaction is being done (date today' + - in: header + name: locale + schema: + type: string + required: true + description: 'Locale based on Language and country.Used in date time formatting. Ex. en-US' + - in: header + name: time-zone-offset + schema: + type: string + required: true + description: 'Used in time conversion per the client on any timestamps returned in the response. Ex. -330 - for India' + security: + - Authorization: [] + - ID_token: [] + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceHistoryInfo' + 401: + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/UnauthorizedError' + /updateIdentity: + patch: + description: Activate/Deactivate UIN + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateIdentityRequest' + responses: + 200: + description: UIN activation status successfully updated + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateIdentityResponse' + 204: + description: No content + 401: + description: Unauthorized + 403: + description: Forbidden + /unblock: + post: + description: Command to be used by administrators to unblock UIN + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UINAdminRequest' + responses: + 200: + description: UIN unblocked successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/UINAdminResponse' + /block: + post: + description: Command to be used by administrators to block UIN + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UINAdminRequest' + responses: + 200: + description: UIN blocked successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/UINAdminResponse' +components: + schemas: + ShareCredentialInfo: + type: object + properties: + id: + type: string + request: + type: object + properties: + partnerId: + type: string + description: 'Example: mpartner-default-print' + sharableAttributes: + type: array + items: + properties: + attributeName: + type: string + description: 'Example: dateOfBirth' + format: + type: string + description: 'Example: DDMMYYYY' + isMasked: + type: boolean + purpose: + type: string + description: 'Sharing Credential with Print Partner' + consent: + type: string + description: 'Example: Accepted' + requesttime: + type: string + description: 2021-10-19T17:01:59.538Z + version: + type: string + description: 'Example: 1.0' + ShareCredentialResp: + type: object + properties: + id: + type: string + description: 'Example: resident.share.credential' + version: + type: string + description: 'Example: 1.0' + responsetime: + type: string + description: 'Example: 2022-06-23T12:00:40.326Z' + metadata: + type: object + response: + type: object + properties: + status: + type: string + description: 'Example: Success' + errors: + type: object + EventResp: + type: object + properties: + id: + type: string + version: + type: string + response: + type: object + properties: + eventId: + type: string + eventType: + type: string + eventStatus: + type: string + individualId: + type: string + summary: + type: string + timestamp: + type: string + info: + type: object + properties: + purpose: + type: string + applicantName: + type: string + partnerId: + type: string + partnerLogo: + type: string + partnerName: + type: string + paymentStatus: + type: string + partnerTransactionId: + type: string + deliveryAddress: + type: string + authenticationMode: + type: string + vidType: + type: string + vid: + type: string + attributeList: + type: string + downloadCardLink: + type: string + orderTrackingLink: + type: string + trackingId: + type: string + requestTime: + type: string + DownloadCardInfo: + type: object + properties: + id: + type: string + version: + type: string + requesttime: + type: string + request: + type: object + properties: + html: + type: string + UpdateUINInfo: + type: object + properties: + id: + type: string + version: + type: string + requestTime: + type: string + request: + type: object + properties: + transactionID: + type: string + individualId: + type: string + individualIdType: + type: string + otp: + type: string + identityJson: + type: string + documents: + type: array + items: + type: object + properties: + name: + type: string + value: + type: string + ServiceHistoryInfo: + type: object + properties: + id: + type: string + version: + type: string + errors: + type: array + items: + type: object + properties: + errorCode: + type: string + errorMessage: + type: string + response: + type: object + properties: + pageNo: + type: integer + pageSize: + type: integer + totalItems: + type: integer + totalPages: + type: integer + data: + type: array + items: + properties: + eventId: + type: string + eventDescription: + type: string + eventStatus: + type: string + timeStamp: + type: string + requestType: + type: string + responseTime: + type: string + UpdateIdentityRequest: + type: object + properties: + id: + type: string + description: 'Example - govstack.updateIdentity' + version: + type: string + description: v1 + requesttime: + type: string + metaData: + type: object + request: + type: object + properties: + status: + type: string + identity: + type: object + documents: + type: array + items: + properties: + category: + type: string + value: + type: string + verifiedAttributes: + type: array + items: + properties: + attributeString: + type: string + registrationId: + type: string + uin: + type: string + UpdateIdentityResponse: + type: object + properties: + id: + type: string + description: 'Example - govstack.updateIdentity' + version: + type: string + description: v1 + responsetime: + type: string + metaData: + type: object + response: + type: object + properties: + status: + type: string + identity: + type: object + documents: + type: array + items: + properties: + category: + type: string + value: + type: string + verifiedAttributes: + type: array + items: + type: object + properties: + attributeString: + type: string + errors: + type: array + items: + type: object + properties: + errorCode: + type: string + errorMessage: + type: string + UINAdminRequest: + type: object + properties: + id: + type: string + version: + type: string + requesttime: + type: string + metadata: + type: object + request: + type: object + properties: + id: + type: string + idType: + type: string + status: + type: string + expiryTimestamp: + type: string + UINAdminResponse: + type: object + properties: + id: + type: string + version: + type: string + responsetime: + type: string + metadata: + type: object + response: + type: object + properties: + id: + type: string + idType: + type: string + status: + type: string + expiryTimestamp: + type: string + errors: + type: array + items: + type: object + properties: + errorCode: + type: string + message: + type: string + UnauthorizedError: + type: object + properties: + id: + type: string + version: + type: string + responsetime: + type: string + metadata: + type: object + default: null + response: + type: object + default: null + errors: + type: array + items: + type: object + properties: + errorCode: + type: string + errorMessage: + type: string + securitySchemes: + Authorization: + type: http + scheme: string + in: cookie + name: authorization_code + description: Authorization code received from /token endpoint + ID_token: + type: http + scheme: string + in: cookie + name: id_token + description: ID token received from /token endpoint + Authentication: + type: http + scheme: string + in: cookie + name: authentication + description: ID token received from /token endpoint +