bcgov / entity

ServiceBC Registry Team working on Legal Entities
Apache License 2.0
23 stars 58 forks source link

Doc API - Implementation #22444

Closed doug-lovett closed 1 month ago

doug-lovett commented 2 months ago

New API tasks:

Published spec: https://bcregistry-partnerrestricted.apigee.io/docs/doc-service-proxy/1/overview

Only the file upload and retrieve endpoints are implemented: POST and GET. PATCH and PUT are not implemented. GET by query date range is not yet implemented.

Examples: POST /doc/api/v1/business/CORP/CORP_MISC?consumerFilename=test.pdf&consumerIdentifier=UT00001 GET /doc/api/v1/business/CORP?consumerIdentifier=UT00001 GET /doc/api/v1/business/CORP?documentServiceId=DS0000100000 GET /doc/api/v1/business/CORP?consumerDocumentId=0100000000

Developer Note: For testing, a starter Postman collection is attached here: doc-api-unit.postman_collection.json.zip

For POST upload requests, set the payload in the request by selecting body, then binary, then uploading a file.

LizGovier commented 2 months ago

Hey team! Please add your planning poker estimate with Zenhub @cameron-eyds @chdivyareddy @doug-lovett @flutistar

doug-lovett commented 2 months ago

Sample POST response: { "consumerDocumentId": "0100000000", "consumerFilename": "test.pdf", "consumerIdentifier": "UT00001", "createDateTime": "2024-08-01T13:18:59+00:00", "documentClass": "CORP", "documentServiceId": "DS0000100000", "documentType": "CORP_MISC", "documentTypeDescription": "Corporations miscellaneous documents", "documentURL": "https://storage.googleapis.com/docs_business_dev/2024/08/01/corp_misc-DS0000100000.pdf?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=doc-dev-sa%40c4hnrd-dev.iam.gserviceaccount.com%2F20240801%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20240801T131859Z&X-Goog-Expires=172800&X-Goog-SignedHeaders=host&X-Goog-Signature=9de02753647984a04d66238245743a15ba75dfa8dc56a8aae1fcb0381fbb2496d255d9177ed66c02dd59e13be60dd7a56eb8278e55caa543af4694974d677755111f2c74c947c5e17dac74b4ab6fcf0731cb57be3d1656c1e489c6da78be8fe9e0e94a3c9601ed766864049e7b911b766e77bea2021ca253501db6b87f396e939e4acdd999fb1ec6dc67c6e41c04344f7a65bad466aa8bc61e58e211c490965ce74cf69f877c5660375d884c0842f76a1a1e833367f5544c20d5ccc8ae83e99a42f5af303b904c5a467e7d1c209fc331622c8814c8ed74cd577d5892fe983cd0e772c2a06cdfbf04c6e7d3eb80d1898be032949770c1a85c2192358ac9fca2df" }

doug-lovett commented 2 months ago

Sample GET response: [ { "consumerDocumentId": "0100000000", "consumerFilename": "test.pdf", "consumerIdentifier": "UT00001", "createDateTime": "2024-08-01T13:18:59+00:00", "documentClass": "CORP", "documentServiceId": "DS0000100000", "documentType": "CORP_MISC", "documentTypeDescription": "Corporations miscellaneous documents", "documentURL": "https://storage.googleapis.com/docs_business_dev/2024/08/01/corp_misc-DS0000100000.pdf?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=doc-dev-sa%40c4hnrd-dev.iam.gserviceaccount.com%2F20240801%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20240801T132041Z&X-Goog-Expires=172800&X-Goog-SignedHeaders=host&X-Goog-Signature=8af71e0f1f2abadc41849db2596685ca705ca9d21f44e727f148978a98fad2e4f5f0c4aef28f9d5bb543b7dd54200558aa7a51bb3694f0bd3674e179ee8fd2c5be9ec84fec179d04deb619658188451e32a56c1872e41481ad653051551ea4ba6c60b5792d18f53052a3ded41ce200f456fe5c3b03e930bb10b450b7e110664855ff48da78a64c9120227b5e5b300e199b69dd28ccd388d49a624c0f3cff04466f0c107623f403d89fa09de4c3c28b7f362ca8256e6a4fede86ee180764aa273ba24c99ff584e345763fd281630a651b1922b08fe9032533f2c60420fe11b528095c5aa07b1ef533ef6f8d7553403bcfde1ba4f33dabb0edffcbbb19a2dac7b4" } ]

cameron-eyds commented 2 months ago

@doug-lovett Beauty, thank you sir, i will probably adjust the ui state properties to match!

doug-lovett commented 2 months ago

Either test with postman or wait until UI integration.

chdivyareddy commented 2 months ago

Verified in DEV using postman.

POST response:

image.png

GET response:

image.png