THO Parts

Used to display parts currently in production on the THO machines.

Parts scheme

Each part is identified by its fields id, name and media_url. media_url is always empty string since no media is present in the THO database.

Scheme:

{
  "id": "Int",
  "name": "String",
  "media_url": "String"
}

Example metric:

{
  "id": "123456",
  "name": "54367 Sonda sonda",
  "media_url": ""
}

GET methods

GET /api/parts

Returns all the parts currently in production on all the machines.

Accepts machine_number as query paramter to return only the parts in production on a particular machine. Machine number is extracted from the machine name in THO use case, so the machine resource from Machine State BB with the name Maquina 16 has machine_number = 16.

Example request:

GET /api/parts?machine_number=16 HTTP/1.1
Host: https://api.facts4.work/

Example response:

HTTP/1.1 200 OK
Content-type: application/json

[
  {
    "id": 1266,
    "name": "62032005 1212742XSW E07 BOP S. B. SMALL RI LHD  55002683",
    "image_url": ""
  },
  {
    "id": 771,
    "name": "61951109 CUBETA PYLAR NUEVA Z000489",
    "image_url": ""
  },
  {
    "id": 72,
    "name": "31985007 CIERRE 1172G",
    "image_url": ""
  },
  {
    "id": 907,
    "name": "61246527 COVER DECKEL 4530; 713726 ESP  90459902",
    "image_url": ""
  },
  {
    "id": 507,
    "name": "61752153 CCAR 1051412s52  en KLT",
    "image_url": ""
  },
  {
    "id": 363,
    "name": "61985140 74111 SHOP & ROLL 52L NARANJA",
    "image_url": ""
  },
  {
    "id": 1259,
    "name": "61752093 Bracket Assy 1102483S01 N01",
    "image_url": ""
  },
  {
    "id": 1354,
    "name": "61752178 Tapa 1135616S01 N01",
    "image_url": ""
  },
  {
    "id": 772,
    "name": "61951110 TAPA PYLAR BLANCO NUEVO Z00146",
    "image_url": ""
  }
]
Query Parameters:
 
  • machine_number (string) – valid machine number for filtering parts in production on machine
Response JSON Array of Objects:
 
  • id (string) – id of the part
  • name (string) – name of the part
  • media_url (string) – URL of the media representing the part
Status Codes: