Giter Club home page Giter Club logo

hmrc.file-transmission-synchronous's Introduction

GitHub release (latest by date) GitHub code size in bytes

file-transmission-synchronous

Backend microservice providing an API to transfer a file from the Upscan bucket to the PEGA/Documentum via an EIS endpoint /cpr/filetransfer/caseevidence/v1.

API

Transfer File

Requests file transfer from some downloadUrl returned by Upscan callback to /cpr/filetransfer/caseevidence/v1.

Method Path Description Authorization
POST /transfer-file transfer file to the PEGA/Documentum system via EIS any GovernmentGateway authorized user
Header Description
x-correlation-id message correlation UUID (optional)
Response status Description
202 when file transfer successful
400 when payload invalid or has not passed the validation

Example request payload:

{
    "conversationId": "074c3823-c941-417e-a08b-e47b08e9a9b7",
    "caseReferenceNumber": "Risk-123",
    "applicationName": "Route1",
    "upscanReference": "XYZ0123456789",
    "downloadUrl": "https://s3.amazonaws.com/bucket/9d9e1444-2555-422e-b251-44fd2e85530a",
    "fileName": "test.jpeg",
    "fileMimeType": "image/jpeg",
    "fileSize": 12345,  // optional
    "checksum": "a38d7dd155b1ec9703e5f19f839922ad5a1b0aa4f255c6c2b03e61535997d757",
    "batchSize": 1,
    "batchCount": 1
}

Example 400 error response payload

{
    "correlationId" : "7fedc2d5-1bba-434b-87e6-4d4ec1757e31",
    "error" : {
        "errorCode" : "400",
        "errorMessage" : "invalid case reference number"
    }
}     

Running the tests

sbt test it:test

Running the tests with coverage

sbt clean coverageOn test it:test coverageReport

Running the app locally

sm --start FILE_TRANSMISSION_SYNCHRONOUS
sm --start TRADER_SERVICES_ROUTE_ONE_STUB
sbt run

It should then be listening on port 10003

License

This code is open source software licensed under the Apache 2.0 License

hmrc.file-transmission-synchronous's People

Contributors

arturopala avatar hmrc-web-operations avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.