NextGen APIs

GET /integration/assets/r1/assets

Http Verb

GET

Url

/integration/assets/r1/assets

Permissions required

Core Additional Parameters: Edit (fsm.core.additionalparameter.edit)

Customer: View (fsm.core.technicalobject.customer.view)

Organizational Structure Entities: View (fsm.core.structure.view)

Facility Configuration: View (fsm.core.technicalobject.configuration.view)

Resource: View (fsm.core.resource.view)

Last Modified Version

r1

Tech Tags


Available Async

No

BPMN Diagram

diagram (12).svg

Business Logic

This Integration API gets an Asset with its Address.

The API returns only Asset not dummy.

One of code or externalCode must be present. If code is provided it has the precedence among the other field. If externalCode is provided then externalSystemCode becomes mandatory.

System verifies Permission Required and starts the elaboration that is organized in steps.

STEP 1 - External System Validation

System takes Input fields and checks their existence in internal configuration.

API Verb: GET

Resource: External Systems

Input: externalSystemCode

Output: externalSystemId, code, description

If System can obtain the Output fields → continue to next step.

If System can’t obtain the Output fields → responds with error. Elaboration is stopped.

Error Type:

STEP 2 - Asset Retrieve

System takes Input fields and checks their existence.

API Verb: GET

Resource: Assets

Input: {code} OR {externalSystemId, externalCode}

Output: id, code, description, note, operationCenterId, typeId, parentId, rootId, statusId, externalSystemId, externalCode, workCenterId, extension

If System can obtain the Output fields → continue to next step.

If System can’t obtain the Output fields → responds with error. Elaboration is stopped.

Error Type:

STEP 3 - Operation Center Transcode

System takes Input fields and gets the resource.

API Verb: GET

Resource: Operation Centers

Input: operationCenterId

Output: code, description

If System can obtain the Output fields → continue to next step.

If System can’t obtain the Output fields → responds with error. Elaboration is stopped.

Error Type:

STEP 4 - Asset Type Transcode

System takes Input fields and gets the resource.

API Verb: GET

Resource: Asset Types

Input: typeId, dummy=false

Output: code, description

If System can obtain the Output fields → continue to next step.

If System can’t obtain the Output fields → responds with error. Elaboration is stopped.

Error Type:

STEP 5 - Parent Asset and Root Asset Transcode

System takes Input fields and gets the resource.

API Verb: GET

Resource: Assets

Input: [parentId, rootId]

Output: code, description

If System can obtain the Output fields → continue to next step.

If System can’t obtain the Output fields → responds with error. Elaboration is stopped.

Error Type:

STEP 6 - Status Transcode

System takes Input fields and gets the resource.

API Verb: GET

Resource: Asset Status

Input: statusId

Output: code, description

If System can obtain the Output fields → continue to next step.

If System can’t obtain the Output fields → responds with error. Elaboration is stopped.

Error Type:

STEP 7 - Address Retrieve

System takes Input fields and checks their existence.

API Verb: GET

Resource: Addresses

Input: targetId=<assetId>

Output: description, countrycode, districtCode, municipality, municipalityCode, locality, postalCode, street, streetNumber, streetNumberExtension, floor, lot, staircase, apartment, directions, yCoordinate, xCoordinate, toponym, extension

If System can obtain the Output fields → continue to next step.

If System can’t obtain the Output fields → responds with error. Elaboration is stopped.

Error Type:

STEP 8 - Country Transcode

System takes Input fields and gets the resource.

API Verb: GET

Resource: Countries

Input: countryCode

Output: isoAlpha3Code

If System can obtain the Output fields → continue to next step.

If System can’t obtain the Output fields → responds with error. Elaboration is stopped.

Error Type:

STEP 9 - District Transcode

System takes Input fields and gets the resource.

API Verb: GET

Resource: Districts

Input: districtCode

Output: acronym

If System can obtain the Output fields → continue to next step.

If System can’t obtain the Output fields → responds with error. Elaboration is stopped.

Error Type:

STEP 10 - Work Center Transcode

System takes Input fields and gets the resource.

API Verb: GET

Resource: Work Centers

Input: workCenterId

Output: code, description

If System can obtain the Output fields → elaboration is stopped. See Response payload fields

If System can’t obtain the Output fields → responds with error. Elaboration is stopped.

Error Type:

STEP 11 -Asset Characteristics Retrieve

System takes Input fields and gets the resource.

API Verb: GET

Resource: {assetId}/characteristic

Input: assetId

Output: list of [characteristicId, value]

If System can obtain the Output fields →continue to next step.

If System can’t obtain the Output fields → responds with error. Elaboration is stopped.

Error Type:

  • Others - see link in Resource

STEP 12 - Characteristics Transcode

System takes Input fields and gets the resource as many times as needed .

API Verb: GET

Resource: Characteristics

Input: list of characteristicId

Output: list of code

If System can obtain the Output fields → elaboration is stopped. See Response payload fields

If System can’t obtain the Output fields → responds with error. Elaboration is stopped.

Error Type:

  • Others - see link in Resource

Path Parameters

As their name suggests, they are included in the URL path of the endpoint.

Not applicable.

Query String Parameters

Start with a ? and includes parameters listed one after the another separated by &.

Filter

Field

Description

Mandatory

Constraint

1

_language

Language option for the response. It supports the following values: - ALL: Request the server to return every possible translation of the response data. - USER

N

Null or Not Blank

2

_exclude

Allows to specify a subset of data that need to be excluded from the response

N

Null or Not Blank

3

_fields

Allows to specify a subset of data that need to be returned

N

Null or Not Blank

4

externalSystemCode

External System Code

N

Null or Not Blank

5

code

Asset Code

N

Null or Not Blank

6

externalCode

Asset Code in External System

N

Null or Not Blank

Fields

The parameter _fields allows to choose output fields. More info here How to use APIs: Output fields selection.

Header Parameters

Parameters included in the request headers. Generally, request headers are used to keep authorization parameters.

Default.

Request Body Parameters

Request body parameters are used when clients send data to the API. They are shipped in a JSON Object only in POST, PUT, or PATCH requests.

Default.

Request example

{baseUrl}/integration/assets/r1/assets?externalSystemCode=SAP&externalCode=ASS_001

Response documentation

Response payload fields

Field

Field Type

Description

1

id

 

 Id

2

code

 

 Asset Code

3

description

 

 Description

4

note

 

 Note

5

externalCode


 External Code

6

operationCenter

operationCenterObject

 Operation Center

7

type

typeObject

Asset Type 

8

parent

parentObject

Asset Parent 

9

root

rootObject

Asset Root

10

status

statusObject

Asset Status 

11

externalSystem

externalSystemObject

External System 

12

address

addressObject

Address

13

workCenter

workCenterObject

Work Center

14

characteristics

characteristicObject

Asset Characteristics

operationCenterObject

Field

Description

1

code

Code

2

description

Description

typeObject

Field

Description

1

code

Code

2

description

Description

parentObject

Field

Description

1

code

Code

2

description

Description

rootObject

Field

Description

1

code

Code

2

description

Description

statusObject

Field

Description

1

code

Code

2

description

Description

externalSystemObject

Field

Description

1

code

Code

2

description

Description

addressObject

Field

Description

1

description

Description

2

countryIsoAlphaCode

Acronym of Nation (3 letters acronym)

3

districtAcronym

Acronym of District

4

municipality

Municipality

5

municipalityCode

Municipality Code

6

locality

Locality

7

postalCode

Postal Code

8

street

Street

9

streetNumber

Street Number

10

streetNumberExtension

Street Number Extension

11

floor

Floor

12

lot

Lot

13

staircase

Staircase

14

apartment

Apartment

15

directions

Directions

16

yCoordinate

Latitude

17

xCoordinate

Longitude

18

toponym

Toponym

workCenterObject


Field

Description

1

code

Code

2

description

Description

characteristicObject

Field

Description

1

code

Code

2

value

Value


Compliant with RFC Standard https://www.rfc-editor.org/rfc/rfc9457.html

Extension fields:

Field

Description

Note

code

Extension member of a Problem Details Object that contains the error code

Only for ERROR

Response example

JSON
{
  "extension": {
     "myFieldName": "myValue"
  },
  "id": 123,
  "code": "ASS_001",
  "description": "ASSET 001",
  "note": "abcdefghif...",
  "externalCode": "EXT-01",
  "operationCenter": {
        "extension": {},
        "code": "OCGAS",
        "description": [
          {
            "lang": "en",
            "value": "Center Gass OC"
          }
        ]
      },
  "type": {
        "extension": {},
        "code": "EXT-EXCAV-IELBT",
        "description": [
          {
            "lang": "en",
            "value": "Extraordinary maintenance / Excavation / Electrical system LV"
          }
        ]
      },
  "parent": {
        "extension": {},
        "code": "ASS_002",
        "description": "ASSET 002"
          },
  "root": {
        "extension": {},
        "code": "ASS_003",
        "description": "ASSET 003"
          },
  "status": {
        "extension": {},
        "code": "5",
        "description": "Schedulable"
      },
  "externalSystem": {
        "extension": {},
        "code": "SAP",
        "description": "SAP"
      }, 
  "address": {
        "extension": {},
        "description": "INITIAL ADDRESS",
        "countryIsoAlphaCode": "IT",
        "districtAcronym": "MI",
        "municipality": "MILANO",
        "municipalityCode": "015146",
        "locality": "MILANO",
        "postalCode": "20161",
        "street": "FRATELLI BELTRAMI",
        "streetNumber": 21,
        "streetNumberExtension": "A",
        "yCoordinate": 0.1,
        "xCoordinate": 0.1,
        "toponym": "VIA"
      },
  "workCenter": {
    "extension": {},
    "code": "WC_01",
    "description": [
      {
        "lang": "it",
        "value": "Work Center 1"
      }
    ]
  },
  "characteristics": [
    {
      "extension": {},
      "code": "COLOUR",
      "value": "red"
    }
  ]
}

 Response error codes