System API has a number of resources you can use to manage the instance, the API is available in Asset and ETL by OppgaveASST-1718 - Løst  fix version 3.0.31.

Only users with role TTADMIN can use the system API.

Manage instance

  • /etl/system/config/instance
  • /asset/api/1/system/config/instance

The instance endpoint let you add/remove and list nodes managed by the running Asset/ETL instance.

Add instance

URI
@since 3.0.31 

/etl/system/config/instance
/asset/api/1/system/config/instance

Description

Add a new instance

URI parameters

name

description

type

default

instance

The company prefix of the instance to add.

form

 

HTTP method

POST

Example

curl $SERVER/asset/api/1/system/config/instance -d instance=$INSTANCE -u $TTUSER
response
{
"error": null,
"message": {
"reason": "OK",
"message": "added new instance"
},
"instance": [
{
"prefix": "$INSTANCE",
"nodeId": "$NODEID"
}
]

Remove instance

URI
@since 3.0.31 

/etl/system/config/instance
/asset/api/1/system/config/instance

Description

Remove existing instance

URI parameters

name

description

type

default

instance

The company prefix of the instance to add.

query

 

HTTP method

DELETE

Example

curl -XDELETE $SERVER/asset/api/1/system/config/instance -G -d instance=$INSTANCE -u $TTUSER
response
{
"error": null,
"message": {
"reason": "OK",
"message": "removed old instance"
},
"instance": [
{
"prefix": "$INSTANCE",
"nodeId": "$NODEID"
}
]

List instances

URI
@since 3.0.31  

/etl/system/config/instance
/asset/api/1/system/config/instance

Description

List all instances

URI parameters

 

HTTP method

GET

Example

curl $SERVER/asset/api/1/system/config/instance
response
{
"error": null,
"message": null,
"instance": [
{
"prefix": "$INSTANCE_1",
"nodeId": "$NODEID_2"
},
{
"prefix": "$INSTANCE_2",
"nodeId": "$NODEID_2"
}
]
}

Resources

Manage cache

  • /asset/api/1/system/cache/{name}

The cache endpoint let you apply actions to cache in the scope of a nodeId.

Refresh cache

URI
@since 3.0.33 

/asset/api/1/system/cache

Description

Refresh data in cache

URI parameters

name

description

type

default

nodeId

The nodeId for the cache to refresh

form

 

name

The name of the cache to refresh

localization

Cache containing i18n resources

mapping

Cache containing the mapping

category

Cache containing the categories

entity

Cache containing the assets

status

Cache containing the status values

path

 

HTTP method

POST

Example

curl $SERVER/asset/api/1/system/cache/mapping -d nodeId=$NODEID -u $TTUSER
response
{
"error": null,
"message": {
"reason": "OK",
"message": "mapping cache reloaded"
},
"instance": [
{
"prefix": "$INSTANCE",
"nodeId": "$NODEID"
}
]
}

Resources

Resources

 OppgaveASST-1718 - Add ability to add companyPrefix at runtime Løst

 FeilASST-1717 - EPC/Asset cache is not reloaded by admin/install.jsf Løst