Options
All
  • Public
  • Public/Protected
  • All
Menu

w2ps-api

W2PS-WFX Data Sync API


This module is for syncing data between W2PS - WFX

:open_book: This module has been made for pulling data from WFX and put them on W2PS, our ERP system.

:smiley: How to Set Up Development Environment

git clone https://github.com/wnwusa/w2ps-api.git
yarn install
mv .env.example .env

You should fill out the blank values of .env file first. After then, type this to start a dev server:

yarn start:dev

:wave: Getting Started


First of all, we need [Request URL] and [Auth Key] to request to this API server. [Auth Key] value is the key between Client and Server. You can get this key from our IT Manager, so please ask if you need.

You should send that [Auth Key] to the [Request URL] to proceed the sync function. You have to send that value using JSON type data like:

{
  "AuthKey": "2Np@NKcQ8XEj"
}

body에 넣어줘야한다. header가 아님

:notebook: Request URL List

All URL starts with https://api.prod.wnwconcept.com/. There're total 17 requests (14 for sync, 3 for integrate) available right now.

Sync


IMPORTANT: You have to pass the [Auth Key] when you request to this API!

No Table URI Method
1 color_cards /api/sync/color-cards POST
2 division /api/sync/division POST
3 style_library /api/sync/style-library POST
4 fabric_library /api/sync/fabric-library POST
5 fabric_colors /api/sync/fabric-colors POST
6 trims_library /api/sync/trims-library POST
7 trims_colors /api/sync/trims-colors POST
8 prints_library /api/sync/prints-library POST
9 prints_colors /api/sync/prints-colors POST
10 bom_library /api/sync/bom-library POST
11 material_master_composition /api/sync/material-master-composition POST
12 material_master_contents /api/sync/material-master-contents POST
13 material_product_group /api/sync/material-product-group POST
14 material_product_sub_category /api/sync/material-product-sub-category POST

Integration


IMPORTANT: You have to pass the [Auth Key] when you request to this API!

No Table URI Method
1 material_master /api/integration/material-master/fabric POST
2 material_master /api/integration/material-master/trims POST
3 material_master_print /api/integration/material-master-print POST

:memo: Result Values

The Response will comes with the JSON type value. There're two types of values: SUCCESS and FAILED.

[Success Result] is like this:

{
  "statusCode": "SUCCESS",
  "totalTime": integer,
  "totalRecords": integer
}

And [Failed Result] is like this:

{
  "statusCode": "FAILED",
  "errorMsg": string
}

Nodejs 버전 : v10.16.3

sudo rsync --delete -azvv \
-e "ssh -i prod.pem" \
ubuntu@70.70.21.126:/mnt/efs/ \
/home/ec2-user/efs/efs-csi-ap-50000-e644730a-b0e1-4e23-b7e6-3a5628981a7f
sudo rsync --delete -azvv \
-e "ssh -i prod.pem" \
ubuntu@70.70.21.126:/mnt/efs/ \
/home/ec2-user/kube-efs-prod/efs-csi-ap-50000-de826f04-ba15-4b2f-8497-9e98be152f18
sudo du -sk *
ssh ec2-user@54.200.171.138 -i ~/Desktop/GitHub/perseption/perseption-ticket.wiki/data/aws-dev-wps.pem

Generated using TypeDoc