Code Monkey home page Code Monkey logo

demo-documents's Introduction

Demo application - Documents-Protocols

Demo users - basic auth

username password role
demo_doc pass Document manager
demo_proc pass Protocol manager
demo_hop pass Head of protocol management, Protocol manager

API

Documents - /documents/document

  1. Create document - Document manager
URL: /
method: POST
URL variables: - 
Request body:
    type: Document
        name: String, mandatory
        type: String, mandatory
returns: 
    status: 200 OK/ 400 Bad Request
    body: 
        type: Message 
          message: Error description
  1. Get document - Document manager
URL: /{documentId}
method: GET
URL variables: documentId - id of the document to find
Request body: - 
returns: 
    status: 200 OK/ 400 Bad Request
    body: 
        type: Document
             id: number
             name: String
             type: String
             created: date
             createdBy: user username
        type: Message 
          message: Error description
  1. Update document - Document manager
URL: /{documentId}
method: PUT
URL variables: documentId - id of the document to update
Request body: 
        type: Document
             name: String
             type: String
returns: 
    status: 200 OK/ 400 Bad Request
    body: 
        type: Message 
          message: Error description
  1. Delete document - Document manager
URL: /{documentId}
method: DELETE
URL variables: documentId - id of the document to delete
Request body: -
returns: 
    status: 200 OK/ 400 Bad Request
    body: 
        type: Message 
          message: Error description

Protocols - /protocols/protocol

  1. Create protocol - Protocol manager
URL: /
method: POST
URL variables: - 
Request body:
    type: Protcol
        state: String, mandatory
        documents: list of type Document, mandatory if documentsIds is empty, new documents to create
        documentIds: list of existing documents ids, mandatory id documents field is empty
returns: 
    status: 200 OK/ 400 Bad Request
    body: 
        type: Message 
          message: Error description
  1. Get protocol - Protocol manager
URL: /{protocolId}
method: GET
URL variables: protocolId - id of the protocol to find
Request body: - 
returns: 
    status: 200 OK/ 400 Bad Request
    body: 
        type: Protocol
             id: number
             state: String
             created: date
             createdBy: user username
             documents: list of assigned documents, type Document
             documentsIds: list of assigned documents ids
        type: Message 
          message: Error description
  1. Update protocol - Head of protocol management
URL: /{protocolId}
method: PUT
URL variables: protocolId - id of the protocol to update
Request body: 
        type: Protcol
                state: String, mandatory
                documents: list of type Document, mandatory if documentsIds is empty, new documents to create
                documentIds: list of existing documents ids, mandatory id documents field is empty
returns: 
    status: 200 OK/ 400 Bad Request
    body: 
        type: Message 
          message: Error description
  1. Update protocol state - Protocol manager
URL: /{protocolId}/state
method: PUT
URL variables: protocolId - id of the protocol to update
Request body: 
    type: string
returns: 
    status: 200 OK/ 400 Bad Request
    body: 
        type: Message 
          message: Error description

Technologies

Java, Spring boot, Spring WEB, Spring JPA, Spring Security, Spring JPA Auditing, H2 DB.

demo-documents's People

Contributors

kulyndar avatar

Watchers

 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.