Astn'go API (1.0.4)

Download OpenAPI specification:

Introduction

Welcome to the Astn'go public API, designed to provide access to the Astn'go application.

What's new

1.0.0 (10/01/2024)

Released the API version 1.0.0 in Open API format.

0.0.4 (06/22/2023)

Adding an endpoint to retrieve the value of an indicator over a period and an axis (equipment, operation,...).

0.0.3 (06/17/2023)

Adding endpoints to collect the following data from the Astn'go application.

  • operations
  • references
  • equipements

0.0.2 (05/25/2023)

Adding an endpoint to import references

0.0.1 (03/16/2023)

First API version.

Authentication

To access the API, Astn'go uses an API key and your organization id which takes the format of 32 lower case and hexadecimal digits separated by 4 dashes (e.g.: d1056faa-4133-418c-a6fc-e9ddb7627156).

You can save a new API key and find your organization id in your app My Astn'go Manager (Parameters -> Configuration -> Settings -> Interface).

You must include your API key and your organization id in all your requests to the Astn'go API through the following headers:

  • x-api-key: my_api_key
  • x-organization-id: my_organization_id

You must replace:

  • my_api_key with your personal API key
  • my_organization_id with your organizationid.

References

Create or update reference

Create or update an existing reference.

Authorizations:
(x-api-keyx-organization-id)
Request Body schema: application/json
required

Reference object to create or update

strategy
required
string
Enum: "CREATE" "UPDATE" "CREATE_AND_UPDATE"

The strategy for importing references.

  • CREATE: only references that do not exist are created.
  • UPDATE: only the existing references are updated in the system.
  • CREATE_AND_UPDATE: if the reference exists, it is updated, otherwise, it is created.
referenceCode
required
string

Reference code. This is the unique id of a reference.

designation
required
string

Reference designation

idErp
string

Reference ID used by the ERP

unit
required
string <= 3 characters

Reference unit

object (ProductionCharacteristicsInput)

Reference production characteristics

Array of objects (ReferencePropertyNameValueInput)

Reference properties list. Each property is uniquely defined by its name in the name field and a value in the value field.

netWeight
number <double>

The net weight of the reference

grossWeight
number <double>

The gross weight of the reference

volume
number <double>

The volume of the reference

object (PackagingCharacteristicsInput)

Reference packaging characteristics

documentNames
Array of strings unique

Set of document names to link to the reference. The documents must already exist in the system.

Responses

Request samples

Content type
application/json
" {\n \"strategy\": \"CREATE_AND_UPDATE\",\n \"referenceCode\": \"11245789\",\n \"designation\": \"ALP LEMONADE 50CL VP - LIM / LIM / 2050002\",\n \"idErp\": \"ESF9990054200\",\n \"unit\": \"u\",\n \"productionCharacteristics\": {\n \"cycleDurationMs\": 1000,\n \"maxSpeedQpH\": 3600,\n \"numberOfTopToGenerateACount\": 1,\n \"partsPerCount\": 1\n },\n \"properties\": [\n {\n \"name\": \"Origin\",\n \"value\": \"Italy\"\n },\n {\n \"name\": \"Provider\",\n \"value\": \"Coop Agri\"\n }\n ],\n \"documentNames\": [\n \"document1.pdf\",\n \"document2.pdf\"\n ],\n }\n"

Get references

Retrieve the list of references according to the search criteria

Authorizations:
(x-api-keyx-organization-id)
Request Body schema: application/json
required

Paged request

object (QueryPageRequest)

The pagination properties used for the query

Array of objects (QuerySearchCriteria)

An array representing the search criteria used for the query

Responses

Response Schema: application/json
totalElements
integer <int64>

The total number of items

totalPages
integer <int32>

The total number of pages

page
integer <int32>

The current page (0 is the first page)

Array of objects (ReferenceOutput)

The array representing the ressources

Request samples

Content type
application/json
{
  • "pageRequest": {
    },
  • "criteria": [
    ]
}

Response samples

Content type
application/json
{
  • "totalElements": 1,
  • "totalPages": 1,
  • "page": 0,
  • "data": [
    ]
}

OperatorChanges

Get operator changes

Retrieve the list of operator changes according to the search criteria

Authorizations:
(x-api-keyx-organization-id)
Request Body schema: application/json
required

Paged request

object (QueryPageRequest)

The pagination properties used for the query

Array of objects (QuerySearchCriteria)

An array representing the search criteria used for the query

Responses

Response Schema: application/json
totalElements
integer <int64>

The total number of items

totalPages
integer <int32>

The total number of pages

page
integer <int32>

The current page (0 is the first page)

Array of objects (OperatorChangeOutput)

The array representing the ressources

Request samples

Content type
application/json
{
  • "pageRequest": {
    },
  • "criteria": [
    ]
}

Response samples

Content type
application/json
{
  • "totalElements": 32,
  • "totalPages": 16,
  • "page": 0,
  • "data": [
    ]
}

Operations

Create or update operations

Create or update an existing operations.

Authorizations:
(x-api-keyx-organization-id)
Request Body schema: application/json
required

Operation object to create or update

strategy
required
string
Enum: "CREATE" "UPDATE" "CREATE_AND_UPDATE"

The strategy for importing operations.

  • CREATE: only operations that do not exist are created.
  • UPDATE: only the existing operations are updated in the system.
  • CREATE_AND_UPDATE: if the operation exists, it is updated, otherwise, it is created.
favoriteEquipmentName
string

The name of the favorite equipment associated to this operation. It is the most suitable equipment to perform this operation. It will be prioritary displayed on the operator view linked to the favorite equipment via the "List of operations".

theoreticalSetupTimeMs
integer <int64>

Theoretical adjustment time in milliseconds

expectedQuantity
required
number <double>

Expected quantity in units

object (ProductionCharacteristicsInput)

Operation production characteristics

description
string

Operation description. Maximum 2000 characters.

workOrder
required
string

Work Order (WO) of the operation

referenceCode
required
string

The reference code linked to the operation. If the reference linked to the reference code doesn't exist, it is automatically created in the system.

idErp
string

Operation ID used by the ERP

sequenceNumber
required
integer <int64>

Operation sequence number

delay
string <date-time>

The end date for the completion of the operation

startDate
string <date-time>

Planned start date of the operation.

Array of objects (OperationPropertyNameValueInput)

Operation properties list. Each property is uniquely defined by its name contained in the name field and by a value contained in the value field.

equipmentNameCandidates
Array of strings unique

Name of the equipment candidates. This is the equipment able to realize this operation. The operator can check the concerned operation via the "Supported operations" tab of their list of operations.

setupLabourTimeMs
integer <int64>

Total operation adjustment labour time in milliseconds

productionLabourTimeMs
integer <int64>

Total operation production labour time in milliseconds

Responses

Request samples

Content type
application/json
{
  • "strategy": "CREATE_AND_UPDATE",
  • "favoriteEquipmentName": "Ligne",
  • "theoreticalSetupTimeMs": 10000,
  • "expectedQuantity": 201,
  • "productionCharacteristics": {
    },
  • "description": "MES Days 2023",
  • "workOrder": "test MES_2023",
  • "referenceCode": "test-99",
  • "idErp": "MES_2023_1/80",
  • "sequenceNumber": 99,
  • "delay": "2024-03-15T14:13:12Z",
  • "startDate": "2023-03-15T14:00:00Z",
  • "properties": [
    ],
  • "equipmentNameCandidates": [
    ],
  • "setupLabourTimeMs": 60000,
  • "productionLabourTimeMs": 180000
}

Get operations

Retrieve the list of operations according to the search criteria

Authorizations:
(x-api-keyx-organization-id)
Request Body schema: application/json
required

Paged request

object (QueryPageRequest)

The pagination properties used for the query

Array of objects (QuerySearchCriteria)

An array representing the search criteria used for the query

Responses

Response Schema: application/json
totalElements
integer <int64>

The total number of items

totalPages
integer <int32>

The total number of pages

page
integer <int32>

The current page (0 is the first page)

Array of objects (OperationOutput)

The array representing the ressources

Request samples

Content type
application/json
{
  • "pageRequest": {
    },
  • "criteria": [
    ]
}

Response samples

Content type
application/json
{
  • "totalElements": 6,
  • "totalPages": 6,
  • "page": 0,
  • "data": [
    ]
}

Delete an operation

Delete an operation by ID

Authorizations:
(x-api-keyx-organization-id)
path Parameters
id
required
string

Responses

OperationChanges

Get operation changes

Retrieve the list of operation changes according to the search criteria

Authorizations:
(x-api-keyx-organization-id)
Request Body schema: application/json
required

Paged request

object (QueryPageRequest)

The pagination properties used for the query

Array of objects (QuerySearchCriteria)

An array representing the search criteria used for the query

Responses

Response Schema: application/json
totalElements
integer <int64>

The total number of items

totalPages
integer <int32>

The total number of pages

page
integer <int32>

The current page (0 is the first page)

Array of objects (OperationChangeOutput)

The array representing the ressources

Request samples

Content type
application/json
{
  • "pageRequest": {
    },
  • "criteria": [
    ]
}

Response samples

Content type
application/json
{
  • "totalElements": 19,
  • "totalPages": 10,
  • "page": 0,
  • "data": [
    ]
}

MaxSpeedChanges

Get max speed changes

Retrieve the list of max speed changes according to the search criteria

Authorizations:
(x-api-keyx-organization-id)
Request Body schema: application/json
required

Paged request

object (QueryPageRequest)

The pagination properties used for the query

Array of objects (QuerySearchCriteria)

An array representing the search criteria used for the query

Responses

Response Schema: application/json
totalElements
integer <int64>

The total number of items

totalPages
integer <int32>

The total number of pages

page
integer <int32>

The current page (0 is the first page)

Array of objects (MaxSpeedChangeOutput)

The array representing the ressources

Request samples

Content type
application/json
{
  • "pageRequest": {
    },
  • "criteria": [
    ]
}

Response samples

Content type
application/json
{
  • "totalElements": 19,
  • "totalPages": 10,
  • "page": 0,
  • "data": [
    ]
}

Indicators

Get indicators

Retrieve the value of an indicator over a period and an axis (equipment, operation, etc.). For example, you can retrieve the TRS of the Press for the previous week.

Authorizations:
(x-api-keyx-organization-id)
Request Body schema: application/json
required

Request data

indicatorIdentifier
required
string

Indicator identifier.

  • DURATION_ADJUSTMENT: Setup time
  • DURATION_CLOSING: Closing time
  • DURATION_FULLY_PRODUCTIVE: Fully productive time
  • DURATION_LOADING: Required time
  • DURATION_MACHINE_PRODUCTION: Machine production time
  • DURATION_MACHINE_SETUP: Machine setup time
  • DURATION_NET_RUNNING: Net running time
  • DURATION_NON_PLANNED_STOP: Non-planned stop time
  • DURATION_ORGANIZATIONAL_STOP: Organizational stop time
  • DURATION_PLANNED_PRODUCTION: Opening time
  • DURATION_PRODUCTION_LABOR_TIME: Labor time in production
  • DURATION_RUNNING: Running time
  • DURATION_SETUP_LABOR_TIME: Labor time in setup
  • DURATION_STOP: Stop time
  • DURATION_TECHNICAL_STOP: Technical stop time
  • DURATION_TOTAL: Total time
  • QUANTITY_ADJUSTMENT_GROSS_WEIGHT: Gross weight adjustment quantity
  • QUANTITY_ADJUSTMENT_NET_WEIGHT: Net weight adjustment quantity
  • QUANTITY_ADJUSTMENT_PARTS: Adjustment quantity
  • QUANTITY_AVERAGE_CADENCE_LOADING: Average cadence over required time
  • QUANTITY_AVERAGE_CADENCE_PER_HOUR: Average cadence per hour
  • QUANTITY_AVERAGE_CADENCE_PRODUCTION: Average cadence in production
  • QUANTITY_BAD_GROSS_WEIGHT: Gross weight of bad quantity
  • QUANTITY_BAD_NET_WEIGHT: Net weight of bad quantity
  • QUANTITY_BAD_PARTS: Bad quantity
  • QUANTITY_GOOD_GROSS_WEIGHT: Gross weight of good quantity
  • QUANTITY_GOOD_NET_WEIGHT: Net weight of good quantity
  • QUANTITY_GOOD_PARTS: Good quantity
  • QUANTITY_TOTAL_PARTS: Total quantity produced
  • RATE_AVAILABILITY: Availability rate
  • RATE_CAPACITY_FACTOR: Load factor
  • RATE_OEE: OEE
  • RATE_PERFORMANCE: Performance rate
  • RATE_QUALITY: Quality rate
  • RATE_SCRAP: Scrap rate
  • RATE_TEEP: TEEP
  • RATE_TRE: TRE
object (Temporality)

Analysis range to calculate the indicator

Array of objects (AnalysisAxisInstanceInput)

Axis used to calculate the indicator

Responses

Response Schema: application/json
value
number <double>

Indicator value

object (PeriodBaseOutput)

Analysis range used to calculate the indicator

Array of objects (IndicatorValueOutput)
Deprecated

Request samples

Content type
application/json
{
  • "indicatorIdentifier": "QUANTITY_GOOD_PARTS",
  • "temporality": {
    },
  • "analysisAxes": [
    ]
}

Response samples

Content type
application/json
{
  • "value": 50,
  • "period": {
    },
  • "indicatorDataMultiAxes": [
    ]
}

IndicatorsCategories

Get indicators categories

Retrieve the distribution of a category indicator over a period and an axis (equipment, operation, etc.). For example, you can retrieve the duration of each equipment state for the previous week.

Authorizations:
(x-api-keyx-organization-id)
Request Body schema: application/json
required

Request data

indicatorIdentifier
required
string

Indicator category identifier.

  • STATE_DURATION_COUNT_MACHINE : États équipement
  • STATE_DURATION_COUNT_MACHINE_CLOSING_STOPS : Arrêts en fermeture
  • STATE_DURATION_COUNT_MACHINE_LOADING_TIME : États sur temps requis
  • STATE_DURATION_COUNT_MACHINE_LOADING_TIME_STOPS : Arrêts sur temps requis
  • STATE_DURATION_COUNT_MACHINE_LOSS : Pertes équipement
  • STATE_DURATION_COUNT_MACHINE_ORGANISATIONAL_STOPS : Arrêts organisationnels
  • STATE_DURATION_COUNT_MACHINE_PLANNED_PRODUCTION_TIME : États sur temps d'ouverture
  • STATE_DURATION_COUNT_MACHINE_PLANNED_PRODUCTION_TIME_STOPS : Arrêts machine sur temps d'ouverture
  • STATE_DURATION_COUNT_MACHINE_PRODUCTION : États en production
  • STATE_DURATION_COUNT_MACHINE_STOPS : Arrêts
  • STATE_DURATION_COUNT_MACHINE_TECHNICAL_STOPS : Arrêts techniques
  • STATE_DURATION_COUNT_MACHINE_UNPLANNED_STOPS : Arrêts non planifiés
  • STATE_DURATION_COUNT_STOP_CAUSES : Causes d'arrêt
object (Temporality)

Analysis range to calculate the indicator

Array of objects (AnalysisAxisInstanceInput)

Axis used to calculate the indicator

Responses

Response Schema: application/json
value
number <double>

Indicator value

object (PeriodBaseOutput)

Analysis range used to calculate the indicator

Array of objects (IndicatorValueOutput)
Deprecated

Request samples

Content type
application/json
{
  • "indicatorIdentifier": "STATE_DURATION_COUNT_MACHINE",
  • "temporality": {
    },
  • "analysisAxes": [
    ]
}

Response samples

Content type
application/json
{
  • "keyDurationCountGroupingData": [
    ],
  • "period": {
    }
}

Equipments

Get equipments

Retrieve the list of equipments according to the search criteria

Authorizations:
(x-api-keyx-organization-id)
Request Body schema: application/json
required

Paged request

object (QueryPageRequest)

The pagination properties used for the query

Array of objects (QuerySearchCriteria)

An array representing the search criteria used for the query

Responses

Response Schema: application/json
totalElements
integer <int64>

The total number of items

totalPages
integer <int32>

The total number of pages

page
integer <int32>

The current page (0 is the first page)

Array of objects (EquipmentOutput)

The array representing the ressources

Request samples

Content type
application/json
{
  • "pageRequest": {
    },
  • "criteria": [ ]
}

Response samples

Content type
application/json
{
  • "totalElements": 10,
  • "totalPages": 10,
  • "page": 0,
  • "data": [
    ]
}

EquipmentStateChanges

Get equipment status changes

Retrieve the list of equipment status changes according to the search criteria

Authorizations:
(x-api-keyx-organization-id)
Request Body schema: application/json
required

Paged request

object (QueryPageRequest)

The pagination properties used for the query

Array of objects (QuerySearchCriteria)

An array representing the search criteria used for the query

Responses

Response Schema: application/json
totalElements
integer <int64>

The total number of items

totalPages
integer <int32>

The total number of pages

page
integer <int32>

The current page (0 is the first page)

Array of objects (EquipmentStateChangeOutput)

The array representing the ressources

Request samples

Content type
application/json
{
  • "pageRequest": {
    },
  • "criteria": [
    ]
}

Response samples

Content type
application/json
{
  • "totalElements": 180,
  • "totalPages": 90,
  • "page": 0,
  • "data": [
    ]
}

ChecklistInstances

Get checklist instances

Retrieve the list of checklist instances according to the search criteria

Authorizations:
(x-api-keyx-organization-id)
Request Body schema: application/json
required

Paged request

object (QueryPageRequest)

The pagination properties used for the query

Array of objects (QuerySearchCriteria)

An array representing the search criteria used for the query

Responses

Response Schema: application/json
totalElements
integer <int64>

The total number of items

totalPages
integer <int32>

The total number of pages

page
integer <int32>

The current page (0 is the first page)

Array of objects (ChecklistInstanceOutput)

The array representing the ressources

Request samples

Content type
application/json
{
  • "pageRequest": {
    },
  • "criteria": [ ]
}

Response samples

Content type
application/json
{
  • "totalElements": 10,
  • "totalPages": 10,
  • "page": 0,
  • "data": [
    ]
}

ReferenceProperties

Get references properties

Retrieve the list of references properties

Authorizations:
(x-api-keyx-organization-id)

Responses

Response Schema: application/json
Array
id
string <uuid>

Property technical id

name
string

Property name

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

OperationProperties

Get operations properties

Retrieve the list of operations properties

Authorizations:
(x-api-keyx-organization-id)

Responses

Response Schema: application/json
Array
id
string <uuid>

Property technical id

name
string

Property name

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]