openapi: 3.0.0 info: title: All my rest api description: Rest API for experiment. version: 0.1.1 servers: - url: http://localhost/rest-php/myreport description: My report end point tags: - name: warehouse description: Warehouse department - name: supervisor description: People who handle department - name: head supervisor description: The people who responsible above the supervisor and all department - name: base item description: base item product - name: complain description: complain from customer - name: complain import description: complain that we imported from excel - name: case description: case from police departmen - name: case import description: case that we imported from excel - name: field problem description: The problem that obstruct supervisor in field - name: base file description: base record that parent of base stock and base clock - name: base stock description: base record as report stock - name: base clock description: base record as report clock - name: problem description: Problem that exist in department - name: document description: paper record that must be created by supervisor - name: user description: user and password that embedo on client side - name: report description: Report that need to show paths: /warehouses: get: tags: - warehouse summary: Get all warehouse. responses: "200": $ref: "#/components/responses/getWarehouse200" "401": $ref: "#/components/responses/401Error" "404": description: Warehouses not found /warehouse: post: tags: - warehouse summary: Lets a user post a new warehouse requestBody: $ref: "#/components/requestBodies/Warehouse" responses: "201": description: Successfully created a new warehouse content: application/json: schema: $ref: "#/components/schemas/Return_after_post" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" /warehouse/{id}: parameters: - name: id in: path required: true description: The ID of the warehouse schema: type: string example: "WAR220203902" get: tags: - warehouse summary: Get warehouse by id. responses: "200": $ref: "#/components/responses/getWarehouse200" "404": $ref: "#/components/responses/404Error" "401": $ref: "#/components/responses/401Error" put: tags: - warehouse summary: Update warehouse by id requestBody: $ref: "#/components/requestBodies/Warehouse" responses: "201": $ref: "#/components/responses/200Success" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" # End of warehouse end point /supervisor: post: tags: - supervisor summary: Lets a user post a new supervisor requestBody: $ref: "#/components/requestBodies/Supervisor" responses: "200": description: Successfully created a new supervisor content: application/json: schema: $ref: "#/components/schemas/Return_after_post" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" /supervisors: get: tags: - supervisor summary: Get all supervisor. responses: "200": $ref: "#/components/responses/getSupervisor200" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" /supervisor/{id}: parameters: - name: id in: path required: true description: The ID of the supervisor schema: type: string example: "SUP20220239" get: tags: - supervisor summary: Get supervisor by id. responses: "200": description: successful operation content: application/json: schema: type: object properties: status: type: string example: success data: type: array items: $ref: "#/components/schemas/Supervisor" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" put: tags: - supervisor summary: Update supervisor by id requestBody: $ref: "#/components/requestBodies/Supervisor" responses: "200": $ref: "#/components/responses/200Success" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" # End of supeervisor end point /head_spv: post: tags: - head supervisor summary: Lets a user post a new head supervisor requestBody: $ref: "#/components/requestBodies/Head_supervisor" responses: "200": description: Successfully created a new supervisor content: application/json: schema: $ref: "#/components/schemas/Return_after_post" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" /heads_spv: get: tags: - head supervisor summary: Get all head supervisor. responses: "200": $ref: "#/components/responses/getHead_spv200" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" /head_spv/{id}: parameters: - name: id in: path required: true description: The ID of the head supervisor schema: type: string example: "HEA20220239" get: tags: - head supervisor summary: Get head supervisor by id. responses: "200": $ref: "#/components/responses/getHead_spv200" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" put: tags: - head supervisor summary: Update head supervisor by id requestBody: $ref: "#/components/requestBodies/Head_supervisor" responses: "200": $ref: "#/components/responses/200Success" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" # End of head supeervisor end point /problem: post: tags: - problem summary: Let a user post a new problem requestBody: $ref: "#/components/requestBodies/Problem" responses: "200": description: Successfully created a new problem content: application/json: schema: $ref: "#/components/schemas/Return_after_post" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" /problems/byperiode: # problems?periode1=123123809&periode2=123123123 # problems?status=active # problems?warehouse=war102398&supervisor=SUP1203981 # problems?item=ITEM120398 parameters: - name: periode1 in: query required: true description: The start periode to search, date in unix time schema: type: number example: 80394802938098 - name: periode2 in: query required: true description: The end periode to search, date in unix time schema: type: number example: 80394802938098 get: tags: - problem summary: Get problems by query. responses: "200": $ref: "#/components/responses/getProblem200" "404": $ref: "#/components/responses/404Error" "401": $ref: "#/components/responses/401Error" /problems/bystatus: # problems?periode1=123123809&periode2=123123123 # problems?status=active # problems?warehouse=war102398&supervisor=SUP1203981 # problems?item=ITEM120398 parameters: - name: status in: query required: true description: status of problem either active(1) or closed(0) schema: type: boolean example: 1 get: tags: - problem summary: Get problems by query. responses: "200": $ref: "#/components/responses/getProblem200" "404": $ref: "#/components/responses/404Error" "401": $ref: "#/components/responses/401Error" /problems/bysupervisor: # problems?periode1=123123809&periode2=123123123 # problems?status=active # problems?warehouse=war102398&supervisor=SUP1203981 # problems?item=ITEM120398 parameters: - name: supervisor_id in: query required: true description: supervisor of problem schema: type: string example: SUP12301298 get: tags: - problem summary: Get problems by query. responses: "200": $ref: "#/components/responses/getProblem200" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" /problems/bywarehouseanditem: # problems?periode1=123123809&periode2=123123123 # problems?status=active # problems?warehouse=war102398&supervisor=SUP1203981 # problems?item=ITEM120398 parameters: - name: warehouse_id in: query required: true description: warehouse of problem schema: type: string example: WAR123123 - name: item_kode in: query required: true description: item of problem schema: type: string example: ITEMSD123123 get: tags: - problem summary: Get problems by query. responses: "200": $ref: "#/components/responses/getProblem200" "404": $ref: "#/components/responses/404Error" "401": $ref: "#/components/responses/401Error" /problem/{id}: parameters: - name: id in: path required: true description: id of problem schema: type: string example: "PRO2204509" get: tags: - problem summary: Get problems by id. responses: "200": $ref: "#/components/responses/getProblem200" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" put: tags: - problem summary: Update problem by id requestBody: $ref: "#/components/requestBodies/Problem" responses: "200": $ref: "#/components/responses/200Success" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" # End of problem end point /field_problem: post: tags: - field problem summary: Lets a user post a new field problem requestBody: $ref: "#/components/requestBodies/Field_problem" responses: "200": description: Successfully created a new field problem content: application/json: schema: $ref: "#/components/schemas/Return_after_post" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" /field_problems: get: tags: - field problem summary: Get all field problem. parameters: - name: limit in: query description: Limit values that need to be considered required: false explode: true schema: type: number default: 10 responses: "200": $ref: "#/components/responses/getField_problem200" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" /field_problem/{id}: parameters: - name: id in: path required: true description: The ID of the field problem schema: type: string example: "FIE20220239" get: tags: - field problem summary: Get field problem by id. responses: "200": $ref: "#/components/responses/getField_problem200" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" put: tags: - field problem summary: Update field problem by id requestBody: $ref: "#/components/requestBodies/Field_problem" responses: "200": $ref: "#/components/responses/200Success" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" delete: tags: - field problem summary: Delete field problem by id responses: "200": $ref: "#/components/responses/200Success" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" # End of field problem end point /document: post: tags: - document summary: Lets a user post a new document requestBody: $ref: "#/components/requestBodies/Document" responses: "200": description: Successfully created a new document content: application/json: schema: $ref: "#/components/schemas/Return_after_post" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" /documents/byperiode: parameters: - name: periode1 in: query required: true description: The start periode to search, date in unix time schema: type: number example: 80394802938098 - name: periode2 in: query required: true description: The end periode to search, date in unix time schema: type: number example: 80394802938098 get: tags: - document summary: Get documents between two periode. responses: "200": $ref: "#/components/responses/getDocument200" "404": $ref: "#/components/responses/404Error" "401": $ref: "#/components/responses/401Error" /documents/bystatus: parameters: - name: status in: query required: true description: The status of document, either 0 (uncollected), 1 (collected) or 2 (approved) schema: type: number example: 0 get: tags: - document summary: Get documents by status. responses: "200": $ref: "#/components/responses/getDocument200" "404": $ref: "#/components/responses/404Error" "401": $ref: "#/components/responses/401Error" /document/{id}: parameters: - name: id in: path required: true description: id of document schema: type: string example: "DOC2204509" get: tags: - document summary: Get document by id. responses: "200": $ref: "#/components/responses/getDocument200" "404": $ref: "#/components/responses/404Error" "401": $ref: "#/components/responses/401Error" put: tags: - document summary: Update document by id requestBody: $ref: "#/components/requestBodies/Document" responses: "200": $ref: "#/components/responses/200Success" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" delete: tags: - document summary: Delete field document by id responses: "200": $ref: "#/components/responses/200Success" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" /document/last_date: get: tags: - document summary: Get the higher date document. responses: "200": description: successful operation content: application/json: schema: type: object properties: date: type: number example: 1029381038102381923 "401": $ref: "#/components/responses/401Error" # End of document end point /complain: post: tags: - complain summary: Lets a user post a new complain requestBody: $ref: "#/components/requestBodies/Complain" responses: "200": description: Successfully created a new complain content: application/json: schema: $ref: "#/components/schemas/Return_after_post" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" /complains: get: tags: - complain summary: Get complain. parameters: - name: limit in: query description: Limit values that need to be considered required: false explode: true schema: type: number default: 10 responses: "200": $ref: "#/components/responses/getComplain200" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" /complain/{id}: parameters: - name: id in: path required: true description: id of complain schema: type: string example: "COM2204509" get: tags: - complain summary: Get complain by id. responses: "200": $ref: "#/components/responses/getComplain200" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" put: tags: - complain summary: Update complain by id requestBody: $ref: "#/components/requestBodies/Complain" responses: "200": $ref: "#/components/responses/200Success" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" delete: tags: - complain summary: Delete field complain by id responses: "200": $ref: "#/components/responses/200Success" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" # End of complain end point /complain_import: post: tags: - complain import summary: Lets a user post a new complain requestBody: $ref: "#/components/requestBodies/Complain_import" responses: "200": description: Successfully created a new complain import from excel content: application/json: schema: $ref: "#/components/schemas/Return_after_post" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" /complains_import: get: tags: - complain import summary: Get complain imported. parameters: - name: limit in: query description: Limit values that need to be considered required: false explode: true schema: type: number default: 10 responses: "200": $ref: "#/components/responses/getComplain_import200" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" /complain_import/{id}: parameters: - name: id in: path required: true description: id of complain schema: type: string example: "COM2204509" get: tags: - complain import summary: Get complain by id. responses: "200": $ref: "#/components/responses/getProblem200" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" put: tags: - complain import summary: Update complain by id requestBody: $ref: "#/components/requestBodies/Complain_import" responses: "200": $ref: "#/components/responses/200Success" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" delete: tags: - complain import summary: Delete field complain by id responses: "200": $ref: "#/components/responses/200Success" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" # End of complain import /case: post: tags: - case summary: Lets a user post a new case requestBody: $ref: "#/components/requestBodies/Case" responses: "200": description: Successfully created a new case content: application/json: schema: $ref: "#/components/schemas/Return_after_post" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" /cases: get: tags: - case summary: Get cases. parameters: - name: limit in: query description: Limit values that need to be considered required: false explode: true schema: type: number default: 10 responses: "200": $ref: "#/components/responses/getCase200" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" /case/{id}: parameters: - name: id in: path required: true description: id of case schema: type: string example: "COM2204509" get: tags: - case summary: Get case by id. responses: "200": $ref: "#/components/responses/getCase200" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" put: tags: - case summary: Update case by id requestBody: $ref: "#/components/requestBodies/Case" responses: "200": $ref: "#/components/responses/200Success" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" delete: tags: - case summary: Delete field case by id responses: "200": $ref: "#/components/responses/200Success" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" # End of Case end point /case_import: post: tags: - case import summary: Lets a user post a new case import requestBody: $ref: "#/components/requestBodies/Case_import" responses: "200": description: Successfully created a new case import content: application/json: schema: $ref: "#/components/schemas/Return_after_post" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" /cases_import: get: tags: - case import summary: Get cases import. parameters: - name: limit in: query description: Limit values that need to be considered required: false explode: true schema: type: number default: 10 responses: "200": $ref: "#/components/responses/getCase_import200" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" /case_import/{id}: parameters: - name: id in: path required: true description: id of case import schema: type: string example: "COM2204509" get: tags: - case import summary: Get case import by id. responses: "200": $ref: "#/components/responses/getCase_import200" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" put: tags: - case import summary: Update case import by id requestBody: $ref: "#/components/requestBodies/Case_import" responses: "200": $ref: "#/components/responses/200Success" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" delete: tags: - case import summary: Delete field case import by id responses: "200": $ref: "#/components/responses/200Success" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" # End of Case import end point /base_stock: post: tags: - base stock summary: Lets a user post a new base stock requestBody: $ref: "#/components/requestBodies/Base_stock" responses: "200": description: Successfully created a new base stock content: application/json: schema: $ref: "#/components/schemas/Return_after_post" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" /base_stocks: parameters: - name: parent in: query description: Parent id values that need to be considered for filter required: false explode: true schema: type: string default: BAS22030003 enum: - BAS22030003 - BAS22030004 - BAS22030005 - name: shift in: query description: Shift id values that need to be considered for filter required: false explode: true schema: type: number default: 1 enum: - 1 - 2 - 3 get: tags: - base stock summary: Get base stock by parent. responses: "200": $ref: "#/components/responses/getBase_stock200" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" delete: tags: - base stock summary: Delete base stock by parent responses: "200": $ref: "#/components/responses/200Success" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" /base_stock/{id}: parameters: - name: id in: path required: true description: id of base stock schema: type: string example: "BAS2204509" get: tags: - base stock summary: Get base stock by id. responses: "200": $ref: "#/components/responses/getBase_stock200" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" put: tags: - base stock summary: Update base stock by id requestBody: $ref: "#/components/requestBodies/Base_stock" responses: "200": $ref: "#/components/responses/200Success" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" delete: tags: - base stock summary: Delete base stock by id responses: "200": $ref: "#/components/responses/200Success" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" # End of base stock end point /base_file: post: tags: - base file summary: Lets a user post a new base file requestBody: $ref: "#/components/requestBodies/Base_file" responses: "200": description: Successfully created a new base file content: application/json: schema: $ref: "#/components/schemas/Return_after_post" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" /base_files: parameters: - name: periode1 in: query required: true description: The start periode to search, date in unix time schema: type: number example: 80394802938098 - name: periode2 in: query required: true description: The end periode to search, date in unix time schema: type: number example: 80394802938098 get: tags: - base file summary: Get documents between two periode. responses: "200": $ref: "#/components/responses/getBase_file200" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" /base_file/{id}: parameters: - name: id in: path required: true description: id of base file schema: type: string example: "BAS2204509" get: tags: - base file summary: Get base file by id. responses: "200": $ref: "#/components/responses/getBase_file200" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" put: tags: - base file summary: Update base file by id requestBody: $ref: "#/components/requestBodies/Base_file" responses: "200": $ref: "#/components/responses/200Success" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" delete: tags: - base file summary: Delete base file by id responses: "200": $ref: "#/components/responses/200Success" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" # End of base file end point /base_clock: post: tags: - base clock summary: Lets a user post a new base clock requestBody: $ref: "#/components/requestBodies/Base_clock" responses: "200": description: Successfully created a new base clock content: application/json: schema: $ref: "#/components/schemas/Return_after_post" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" /base_clocks: parameters: - name: parent in: query description: Parent id values that need to be considered for filter required: false explode: true schema: type: string default: BAS22030003 enum: - BAS22030003 - BAS22030004 - BAS22030005 - name: shift in: query description: Shift id values that need to be considered for filter required: false explode: true schema: type: number default: 1 enum: - 1 - 2 - 3 get: tags: - base clock summary: Get base clock by parent. responses: "200": $ref: "#/components/responses/getBase_clock200" "404": $ref: "#/components/responses/404Error" "401": $ref: "#/components/responses/401Error" delete: tags: - base clock summary: Delete base clock by parent responses: "200": $ref: "#/components/responses/200Success" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" /base_clock/{id}: parameters: - name: id in: path required: true description: id of base clock schema: type: string example: "BAS2204509" get: tags: - base clock summary: Get base clock by id. responses: "200": $ref: "#/components/responses/getBase_clock200" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" put: tags: - base clock summary: Update base stock by id requestBody: $ref: "#/components/requestBodies/Base_clock" responses: "200": $ref: "#/components/responses/200Success" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" delete: tags: - base clock summary: Delete base clock by id responses: "200": $ref: "#/components/responses/200Success" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" # End of base clock end point /base_item: post: tags: - base item summary: Let a user post a new base item requestBody: $ref: "#/components/requestBodies/Base_item" responses: "200": description: Successfully created a new base item content: application/json: schema: $ref: "#/components/schemas/Return_after_post" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" /base_items: get: tags: - base item summary: Get base item. parameters: - name: limit in: query description: Limit values that need to be considered required: false explode: true schema: type: number default: 10 - name: last_used in: query description: Last used item more than periode as epoch time required: false explode: true schema: type: number default: 10190238019238 responses: "200": $ref: "#/components/responses/getBase_item200" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" /base_item/{id}: parameters: - name: id in: path required: true description: id of base item schema: type: string example: "BAS2204509" get: tags: - base item summary: Get base item by id. responses: "200": $ref: "#/components/responses/getBase_item200" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" put: tags: - base item summary: Update base item by id requestBody: $ref: "#/components/requestBodies/Base_item" responses: "200": $ref: "#/components/responses/200Success" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" delete: tags: - base item summary: Delete base item by id responses: "200": $ref: "#/components/responses/200Success" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" # users /user: post: tags: - user summary: Store new user that will implant on client side requestBody: $ref: "#/components/requestBodies/User" responses: "200": description: Successfully store a new user content: application/json: schema: $ref: "#/components/schemas/Return_after_post" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" /users: get: tags: - user summary: Get users. responses: "200": $ref: "#/components/responses/getUser200" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" /user/{id}: parameters: - name: id in: path required: true description: id of user schema: type: string example: "USR2204509" get: tags: - user summary: Get user by id. responses: "200": $ref: "#/components/responses/getUser200" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" put: tags: - user summary: Update user by id requestBody: required: true content: application/json: schema: type: object properties: password_new: type: string password_old: type: string responses: "200": $ref: "#/components/responses/200Success" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" delete: tags: - user summary: Delete user by id responses: "200": $ref: "#/components/responses/200Success" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" # report /report/weekly: parameters: - name: supervisor_id in: query required: true description: id supervisor schema: type: string example: "USR2204509" - name: head_supervisor_id in: query required: false description: id of head supervisor schema: type: string example: "USR2204509" - name: periode1 in: query required: true description: periode start schema: type: string example: "USR2204509" - name: periode2 in: query required: true description: periode end schema: type: string example: "USR2204509" get: tags: - report summary: Get user by id. responses: "200": $ref: "#/components/responses/get_report_weekly" "400": $ref: "#/components/responses/400Error" "401": $ref: "#/components/responses/401Error" "404": $ref: "#/components/responses/404Error" components: schemas: Return_after_post: type: object properties: success: type: boolean example: true id: type: string example: "WAR22500001" Warehouse: type: object properties: id: type: string example: "WAR22500001" warehouse_name: type: string example: "warehouse001" warehouse_group: type: string example: "warehouse002" nullable: true warehouse_supervisors: type: string example: "warehouse002, warehouse003" nullable: true is_warehouse_disabled: type: string example: 0 Supervisor: type: object properties: id: type: string example: "SUP22500001" supervisor_name: type: string example: "supervisor001" supervisor_phone: type: number example: 629283019283098123 nullable: true supervisor_warehouse: type: string example: "warehouse001" nullable: true supervisor_shift: type: number example: 1 is_disabled: type: boolean example: true nullable: false Problem: type: object properties: id: type: string example: "PRO22500001" warehouse_id: type: string supervisor_id: type: string head_spv_id: type: string item_kode: type: string tanggal_mulai: type: number shift_mulai: type: number pic: type: string dl: type: number masalah: type: string sumber_masalah: type: string solusi: type: string solusi_panjang: type: string dl_panjang: type: string pic_panjang: type: string tanggal_selesai: type: number shift_selesai: type: number is_finished: type: boolean Head_supervisor: type: object properties: id: type: string example: "HEA12312830" head_name: type: string head_phone: type: number head_shift: type: number example: 1 is_disabled: type: boolean Field_problem: type: object properties: id: type: string periode: type: number supervisor_id: type: string head_spv_id: type: string masalah: type: string sumber_masalah: type: string solusi: type: string pic: type: string dl: type: number Document: type: object properties: id: type: string collected: type: number approval: type: number status: type: number shared: type: number finished: type: number total_do: type: number total_kendaraan: type: number total_waktu: type: number base_report_file: type: string is_finished: type: boolean supervisor_id: type: string periode: type: number shift: type: number head_spv_id: type: string warehouse_id: type: string is_generated_document: type: boolean item_variance: type: number parent: type: string parent_document: type: string plan_out: type: number total_item_keluar: type: number total_item_moving: type: number total_product_not_FIFO: type: number total_qty_in: type: number total_qty_out: type: number Complain: type: object properties: id: type: string periode: type: number head: type: string dl: type: number inserted: type: number masalah: type: string supervisor_id: type: number parent: type: string pic: type: string solusi: type: string is_status_done: type: boolean sumber_masalah: type: string type: type: string is_count: type: boolean Complain_import: type: object properties: id: type: string customer: type: string do_: type: string gudang: type: string item: type: string kabag: type: string nomor_SJ: type: string nopol: type: string real_: type: string row_: type: string spv: type: string tally: type: string tanggal_bongkar: type: string tanggal_info: type: string tanggal_komplain: type: string tanggal_SJ: type: string type_: type: string is_inserted: type: string Case: type: object properties: id: type: string periode: type: number head_spv_id: type: string dl: type: number masalah: type: string supervisor_id: type: string parent: type: string pic: type: string solusi: type: string status: type: string sumber_masalah: type: string Case_import: type: object properties: id: type: string bagian: type: string divisi: type: string fokus: type: string kabag: type: string karu: type: string keterangan1: type: string keterangan2: type: string periode: type: string temuan: type: string is_inserted: type: string Base_stock: type: object properties: parent: type: string shift: type: string item: type: string awal: type: number in_stock: type: number out_stock: type: number date_in: type: string plan_out: type: number date_out: type: string date_end: type: string real_stock: type: number problem: type: string Base_file: type: object properties: id: type: string periode: type: number warehouse_id: type: string file_name: type: string stock_sheet: type: string clock_sheet: type: string is_imported: type: boolean is_record_finished: type: boolean Base_clock: type: object properties: id: type: string parent: type: string shift: type: number no_do: type: string reg: type: string start: type: string finish: type: string rehat: type: number Base_item: type: object properties: id: type: string item_kode: type: string item_name: type: string last_used: type: number User: type: object properties: id: type: string username: type: string password: type: string requestBodies: Warehouse: required: true content: application/json: schema: type: object properties: warehouse_name: type: string warehouse_group: type: string warehouse_supervisors: type: string Supervisor: required: true content: application/json: schema: type: object properties: supervisor_name: type: string supervisor_phone: type: number supervisor_warehouse: type: string supervisor_shift: type: number is_disabled: type: boolean Problem: required: true content: application/json: schema: type: object properties: warehouse_id: type: string supervisor_id: type: string head_spv_id: type: string item_kode: type: string tanggal_mulai: type: number shift_mulai: type: number pic: type: string dl: type: number masalah: type: string sumber_masalah: type: string solusi: type: string solusi_panjang: type: string dl_panjang: type: string pic_panjang: type: string tanggal_selesai: type: number shift_selesai: type: number is_finished: type: boolean Head_supervisor: required: true content: application/json: schema: type: object properties: head_name: type: string head_phone: type: number head_shift: type: number example: 1 is_disabled: type: boolean Field_problem: required: true content: application/json: schema: type: object properties: periode: type: number supervisor_id: type: string head_spv_id: type: string masalah: type: string sumber_masalah: type: string solusi: type: string pic: type: string dl: type: number Document: required: true content: application/json: schema: type: object properties: collected: type: number approval: type: number status: type: number shared: type: number finished: type: number total_do: type: number total_kendaraan: type: number total_waktu: type: number base_report_file: type: string is_finished: type: boolean supervisor_id: type: string periode: type: number shift: type: number head_spv_id: type: string warehouse_id: type: string is_generated_document: type: boolean item_variance: type: number parent: type: string parent_document: type: string plan_out: type: number total_item_keluar: type: number total_item_moving: type: number total_product_not_FIFO: type: number total_qty_in: type: number total_qty_out: type: number Complain: required: true content: application/json: schema: type: object properties: periode: type: number head_spv_id: type: string dl: type: number inserted: type: number masalah: type: string supervisor_id: type: number parent: type: string pic: type: string solusi: type: string is_status_done: type: boolean sumber_masalah: type: string type: type: string is_count: type: boolean Complain_import: required: true content: application/json: schema: type: object properties: customer: type: string do_: type: string gudang: type: string item: type: string kabag: type: string nomor_SJ: type: string nopol: type: string real_: type: string row_: type: string spv: type: string tally: type: string tanggal_bongkar: type: string tanggal_info: type: string tanggal_komplain: type: string tanggal_SJ: type: string type_: type: string is_inserted: type: boolean Case: required: true content: application/json: schema: type: object properties: periode: type: number head_spv_id: type: string dl: type: number masalah: type: string supervisor_id: type: string parent: type: string pic: type: string solusi: type: string status: type: string sumber_masalah: type: string Case_import: required: true content: application/json: schema: type: object properties: bagian: type: string divisi: type: string fokus: type: string kabag: type: string karu: type: string keterangan1: type: string keterangan2: type: string periode: type: string temuan: type: string is_inserted: type: boolean Base_stock: required: true content: application/json: schema: type: object properties: parent: type: string shift: type: string item: type: string awal: type: number in_stock: type: number out_stock: type: number date_in: type: string plan_out: type: number date_out: type: string date_end: type: string real_stock: type: number problem: type: string Base_file: required: true content: application/json: schema: type: object properties: periode: type: number warehouse_id: type: string file_name: type: string stock_sheet: type: string clock_sheet: type: string is_imported: type: boolean is_record_finished: type: boolean Base_clock: required: true content: application/json: schema: type: object properties: parent: type: string shift: type: number no_do: type: string reg: type: string start: type: string finish: type: string rehat: type: number Base_item: required: true content: application/json: schema: type: object properties: item_kode: type: string item_name: type: string last_used: type: number User: required: true content: application/json: schema: type: object properties: username: type: string password: type: string responses: 400Error: description: Invalid request content: application/json: schema: type: object properties: success: type: boolean default: false message: type: string 401Error: description: Invalid Authorization Or Unauthorization content: application/json: schema: type: object properties: success: type: boolean default: false message: type: string default: "You must be authenticated to access this resource." 200Success: description: Success operation content: application/json: schema: type: object properties: success: type: boolean default: true message: type: string default: Update source success 404Error: description: Source not found content: application/json: schema: type: object properties: success: type: boolean default: false message: type: string default: Source not found getWarehouse200: description: Success operation content: application/json: schema: type: object properties: success: type: boolean default: true data: type: array items: $ref: "#/components/schemas/Warehouse" getSupervisor200: description: Success operation content: application/json: schema: type: object properties: success: type: boolean default: true data: type: array items: $ref: "#/components/schemas/Supervisor" getHead_spv200: description: Success operation content: application/json: schema: type: object properties: success: type: boolean default: true data: type: array items: $ref: "#/components/schemas/Head_supervisor" getBase_item200: description: Success operation content: application/json: schema: type: object properties: success: type: boolean default: true data: type: array items: $ref: "#/components/schemas/Base_item" getComplain200: description: Success operation content: application/json: schema: type: object properties: success: type: boolean default: true data: type: array items: $ref: "#/components/schemas/Complain" getComplain_import200: description: Success operation content: application/json: schema: type: object properties: success: type: boolean default: true data: type: array items: $ref: "#/components/schemas/Complain_import" getCase200: description: Success operation content: application/json: schema: type: object properties: success: type: boolean default: true data: type: array items: $ref: "#/components/schemas/Case" getCase_import200: description: Success operation content: application/json: schema: type: object properties: success: type: boolean default: true data: type: array items: $ref: "#/components/schemas/Case_import" getField_problem200: description: Success operation content: application/json: schema: type: object properties: success: type: boolean default: true data: type: array items: $ref: "#/components/schemas/Field_problem" getBase_file200: description: Success operation content: application/json: schema: type: object properties: success: type: boolean default: true data: type: array items: $ref: "#/components/schemas/Base_file" getBase_stock200: description: Success operation content: application/json: schema: type: object properties: success: type: boolean default: true data: type: array items: $ref: "#/components/schemas/Base_stock" getBase_clock200: description: Success operation content: application/json: schema: type: object properties: success: type: boolean default: true data: type: array items: $ref: "#/components/schemas/Base_clock" getProblem200: description: Success operation content: application/json: schema: type: object properties: success: type: boolean default: true data: type: array items: $ref: "#/components/schemas/Problem" getDocument200: description: Success operation content: application/json: schema: type: object properties: success: type: boolean default: true data: type: array items: $ref: "#/components/schemas/Document" getUser200: description: Success operation content: application/json: schema: type: object properties: success: type: boolean default: true data: type: array items: $ref: "#/components/schemas/User" get_report_weekly: description: Success operation content: application/json: schema: type: object properties: success: type: boolean default: true data: type: object properties: info: type: object properties: supervisor_name: type: string example: name of supervisor bagian: type: string example: Gudang jadi X dan Gudang jadi Y daily_reports: type: array items: properties: total_do: type: number total_kendaraan: type: number total_waktu: type: number periode: type: number shift: type: number is_generated_document: type: boolean item_variance: type: number plan_out: type: number total_item_keluar: type: number total_item_moving: type: number total_product_not_FIFO: type: number total_qty_in: type: number total_qty_out: type: number total_komplain_muat: type: number document_info: type: string problems: type: array items: properties: periode: type: string masalah: type: string sumber_masalah: type: string solusi: type: string pic: type: string dead_line: type: string