Giter Club home page Giter Club logo

hmrc.nonrep-generate-pdf's Introduction

nonrep-generate-pdf

PDF Generation Service

The PDF Generation service is hosted within the Non Repudiation Store infrastructure and is available to backend MDTP microservices via Private Link.

The detailed API specification is documented in Confluence with an abbreviated version below

Endpoints

Version

This endpoint returns the deployed version designation of this service

GET /generate-pdf/version

Sample response:

{
    "version": "20201118T150059"
}

Generate PDF

This endpoint provides a mechanism whereby a calling service can specify a template to be populated with the matching JSON from the request body. These will be used to prepare PDF which will then be digitally signed and returned to the calling service

POST /generate-pdf/template/{template-id}/signed-pdf

An example template-id is trusts-5mld-1-0-0 which corresponds to the below configuration:

{
    template-id = "trusts-5mld-1-0-0"
    json-schema = "API#1584_Response_Schema-v1.0.0.json"
    pdf-template = "trusts-5mld.dito"
    signing-profile = "pades-t"
    api-key = "<...>"
}

The request body should be compliant with the schema associated with the selected {template-id}. An example request based on the API#1584_Response_Schema-v1.0.0.json schema referenced in the above configuration is 1584_control_1.0.0.json

Responses Status Description
Ok 200 Successfully created and digitally signed PDF
Bad Request 400 PDF not created, with some reason message
Unauthorised 401 Unauthorised request - invalid X-API-Key

Ping

This endpoint can be used as a lightweight health check for the availability of the service

GET /generate-pdf/ping

Returns "pong"

License

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

hmrc.nonrep-generate-pdf's People

Contributors

craigtd avatar crashposition avatar greg-gajda 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.