Skip to content

Servers

http://localhost:3000Local tests
http://192.168.0.103:3000Develop Env

Login to tablet

POST
/login/tab

Use this request to get the JWT for a user connection on the tablet

Request Body

application/json
JSON
{
"username": "eliott.ferry@polyflyx.com",
"password": "IAmAPassword"
}

Responses

application/json
JSON
{
"token": "string"
}

Playground

Server
Body

Samples


Login to PC

POST
/login/pc

Use this request to get the JWT for a user connection on the pc

Request Body

application/json
JSON
{
"username": "eliott.ferry@polyflyx.com",
"password": "IAmAPassword"
}

Responses

application/json
JSON
{
"token": "string"
}

Playground

Server
Body

Samples


Login

POST
/auth

Use this request to get the JWT for a user connection on the tablet

Request Body

application/json
JSON
{
"username": "eliott.ferry@polyflyx.com",
"password": "IAmAPassword"
}

Responses

application/json
JSON
{
"token": "string"
}

Playground

Server
Body

Samples


Refresh token

POST
/auth/refresh

Responses

application/json
JSON
{
}

Playground

Samples


Create one

POST
/user/create

This route is used to create a new user

Authorizations

bearer
Type
HTTP (bearer)

Parameters

Header Parameters

Authorization*

The jwt token created upon login

Type
string
Required
Example"Bearer jwtToken"

Request Body

application/json
JSON
{
"email": "informatique@polyflyx.com",
"username": "user-1768",
"firstname": "Thomas",
"lastname": "Samot",
"password": "123456",
"roleIds": [
],
"rightIds": [
]
}

Responses

application/json
JSON
{
}

Playground

Server
Authorization
Headers
Body

Samples


Get user by id

GET
/user/{id}

Authorizations

bearer
Type
HTTP (bearer)

Parameters

Path Parameters

id*

The id of the user you're looking for

Type
string
Required
Example"{{$number.int(min=1)}}"

Responses

application/json
JSON
{
"email": "informatique@polyflyx.com",
"username": "user-1768",
"firstname": "Thomas",
"lastname": "Samot",
"roles": [
],
"rights": [
]
}

Playground

Server
Authorization
Variables
Key
Value

Samples


Update one

PATCH
/user/{id}

This route is used to update a user

Authorizations

bearer
Type
HTTP (bearer)

Parameters

Header Parameters

Authorization*

The jwt token created upon login

Type
string
Required
Example"Bearer jwtToken"

Path Parameters

id*

The id of the user you want to update

Type
string
Required

Request Body

application/json
JSON
{
"email": "informatique@polyflyx.com",
"username": "user-1768",
"firstname": "Thomas",
"lastname": "Samot",
"password": "123456",
"roleIds": [
],
"rightIds": [
]
}

Responses

application/json
JSON
{
}

Playground

Server
Authorization
Headers
Variables
Key
Value
Body

Samples


Add role

POST
/user/{id}/role

This route is used to add roles to a user

Authorizations

bearer
Type
HTTP (bearer)

Parameters

Path Parameters

id*

The id of the user you want to add roles to

Type
integer
Required

Request Body

application/json
JSON
{
"roleIds": [
0
]
}

Responses

application/json
JSON
{
}

Playground

Server
Authorization
Variables
Key
Value
Body

Samples


Add right

POST
/user/{id}/right

This route is used to add rights to a user

Authorizations

bearer
Type
HTTP (bearer)

Parameters

Path Parameters

id*

The id of the user you want to add rights to

Type
integer
Required
Example"{{$number.int(min=1)}}"

Request Body

application/json
JSON
{
"rightIds": [
0
]
}

Responses

application/json
JSON
{
}

Playground

Server
Authorization
Variables
Key
Value
Body

Samples


Remove right

DELETE
/user/{id}/right

This route is used to remove rights from a user

Authorizations

bearer
Type
HTTP (bearer)

Parameters

Path Parameters

id*

The id of the user you want to remove the right from

Type
integer
Required

Request Body

application/json
JSON
{
"rightIds": [
0
]
}

Responses

application/json
JSON
{
}

Playground

Server
Authorization
Variables
Key
Value
Body

Samples


Create one role

POST
/role/create

The route used to create a new role

Authorizations

bearer
Type
HTTP (bearer)

Request Body

application/json
JSON
{
"name": "string",
"parentId": "string",
"rightIds": [
]
}

Responses

application/json
JSON
{
}

Playground

Server
Authorization
Body

Samples


Delete one role

DELETE
/role/{id}

The route used to delete a role.
This will also remove this role from every users

Authorizations

bearer
Type
HTTP (bearer)

Parameters

Path Parameters

id*

The id of the role you want to delete

Type
integer
Required

Responses

application/json
JSON
{
}

Playground

Server
Authorization
Variables
Key
Value

Samples


Get all roles

GET
/role/all

Authorizations

bearer
Type
HTTP (bearer)

Responses

application/json
JSON
{
}

Playground

Server
Authorization

Samples


Get all roles tree

GET
/role/tree

Authorizations

bearer
Type
HTTP (bearer)

Responses

application/json
JSON
{
}

Playground

Server
Authorization

Samples


needAuth/Upload


Upload file

POST
/upload/cao

The route used to upload STEP, STL or IGS files

Authorizations

bearer
Type
HTTP (bearer)

Request Body

multipart/form-data
object

The file that you want to upload

Format"binary"

Responses

application/json
JSON
{
}

Playground

Server
Authorization
Body

Samples


Create Product

POST
/product/create

The route to upload a new product in database and on the FTP

Authorizations

bearer
Type
HTTP (bearer)

Request Body

application/json
JSON
{
"name": "test",
"reference": "AA001",
"stageGraph": [
{
"id": "1",
"name": "import_cao",
"dependencies": [
]
},
{
"id": "2",
"name": "cad_convertion",
"dependencies": [
"1"
]
},
{
"id": "3",
"name": "cad_segmentation",
"dependencies": [
"1"
]
},
{
"id": "4",
"name": "model_target",
"dependencies": [
"2"
]
}
]
}

Responses

application/json
JSON
{
}

Playground

Server
Authorization
Body

Samples


Get product by id

GET
/product/{id}

The route to get a product

Authorizations

bearer
Type
HTTP (bearer)

Parameters

Path Parameters

id*
Type
string
Required
Example""

Responses

application/json
JSON
{
"product": "string",
"stageGraph": [
]
}

Playground

Server
Authorization
Variables
Key
Value

Samples


Upload file for product

POST
/product/upload

The endpoint to upload a file

Authorizations

bearer
Type
HTTP (bearer)

Request Body

multipart/form-data
object
Format"binary"

The path to the FTP

The reference of the product

Responses

application/json
JSON
{
}

Playground

Server
Authorization
Body

Samples


Get list of products ready to scan

GET
/product/scannable-list

This endpoint is used to get a list of the products that have parts ready to scan, alongside the filepath to get the model target.

Authorizations

bearer
Type
HTTP (bearer)

Parameters

Header Parameters

Authorization
Type
string
Example""

Responses

application/json
JSON
[
{
"id": "string",
"reference": "string",
"name": "string",
"parts": [
{
"id": "string",
"reference": "string"
}
]
}
]

Playground

Server
Authorization
Headers

Samples


Delete product

DELETE
/product/{productId}

The endpoint to delete a product. It also deletes the file in the FTP linked to the product

Authorizations

bearer
Type
HTTP (bearer)

Parameters

Path Parameters

productId*
Type
string
Required

Responses

application/json
JSON
{
}

Playground

Server
Authorization
Variables
Key
Value

Samples


Create Part

POST
/part/create

This route is used to create a part

Authorizations

bearer
Type
HTTP (bearer)

Request Body

application/json
JSON
{
"productRef": "string",
"reference": "string",
"stageList": "string"
}

Responses

application/json
JSON
{
}

Playground

Server
Authorization
Body

Samples


Get part by reference

GET
/part/{id}

The route is used to get a part data

Authorizations

bearer
Type
HTTP (bearer)

Parameters

Path Parameters

id*
Type
string
Required

Responses

application/json
JSON
{
"part": "string",
"stageGraph": [
]
}

Playground

Server
Authorization
Variables
Key
Value

Samples


Get list of parts

GET
/part/list

This endpoint is used to get a list of reference of parts, paginated.

Authorizations

bearer
Type
HTTP (bearer)

Parameters

Header Parameters

Authorization
Type
string
Example""

Query Parameters

limit
Type
number
Default
25
refQuery
Type
string
page
Type
number
Default
1

Responses

application/json
JSON
{
}

Playground

Server
Authorization
Headers
Variables
Key
Value

Samples


Get all part waiting for scan

GET
/part/waiting-scan

This endpoint is used to get all the parts that are waiting for a scan, with their files url.

Authorizations

bearer
Type
HTTP (bearer)

Responses

application/json
JSON
[
{
"id": "string",
"reference": "string",
"product": {
"id": "string",
"reference": "string",
"name": "string"
}
}
]

Playground

Server
Authorization

Samples


Get one stage

GET
/stage/{stageId}

The route is use to get a stage data.

Authorizations

bearer
Type
HTTP (bearer)

Parameters

Path Parameters

stageId*

The id of the stage

Type
string
Required

Responses

application/json
JSON
{
}

Playground

Server
Authorization
Variables
Key
Value

Samples


Create stage

POST
/stage/create

This route is used to create a new stage.

Authorizations

bearer
Type
HTTP (bearer)

Request Body

application/json
JSON
{
"name": "string",
"validatedBy": "string",
"linkableItem": "string"
}

Responses

application/json
JSON
{
}

Playground

Server
Authorization
Body

Samples


Get Stage tree

GET
/stage/list

This endpoint is used to get the tree of all stages

Authorizations

bearer
Type
HTTP (bearer)

Responses

application/json
JSON
[
]

Playground

Server
Authorization

Samples


Validate stage

POST
/stage/validate

This endpoint is used to validate a stage.

Authorizations

bearer
Type
HTTP (bearer)

Request Body

multipart/form-data
object
Format"binary"
Format"uuid"

Responses

application/json
JSON
{
}

Playground

Server
Authorization
Body

Samples


Reject Stage

POST
/stage/reject

This endpoint is used to reject a stage

Authorizations

bearer
Type
HTTP (bearer)

Responses

application/json
JSON
{
"linkedStageId": "string",
"stageGraphToInsert": [
{
"id": "string",
"name": "string",
"dependencies": [
"string"
]
}
],
"data": {
"reason": "string"
}
}

Playground

Server
Authorization

Samples


needAuth/Document


Get a document

GET
/document

Authorizations

bearer
Type
HTTP (bearer)

Parameters

Query Parameters

itemId*
Type
string
Required
Format
"uuid"
type*
Type
string
Required
Valid values
"vis""seg""cycle""mes""pos""stp""step""obj""stl""mat"
itemType*
Type
string
Required
Valid values
"product""part"

Responses

*/*
JSON
{
}

Playground

Server
Authorization
Variables
Key
Value

Samples


Upload a document

POST
/document

Authorizations

bearer
Type
HTTP (bearer)

Request Body

multipart/form-data
object
Format"binary"

Responses

application/json
JSON
{
}

Playground

Server
Authorization
Body

Samples


Database


Seed db

POST
/tests/database/seed

This endpoint is used to seeed the database

Responses

application/json
JSON
{
}

Playground

Samples


Powered by VitePress OpenAPI