AlphaAlpha Docs

Asset Locations

Manage asset location tree

Add an asset location

POST
/asset-locations
AuthorizationBearer <token>

In: header

Query Parameters

parentId?string
idOverride?string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/asset-locations" \  -H "Content-Type: application/json" \  -d '{    "children": [      "string"    ],    "isRoot": true,    "name": "string"  }'
{
  "children": [
    "string"
  ],
  "clients": [
    "string"
  ],
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "description": "string",
  "id": "string",
  "isRoot": true,
  "name": "string",
  "tenantId": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Delete by list of ids in current tenant

DELETE
/asset-locations
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X DELETE "http://localhost:18080/api/v1/asset-locations" \  -H "Content-Type: application/json" \  -d '[    "string"  ]'
Empty
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Bulk create asset locations

POST
/asset-locations/bulk
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/asset-locations/bulk" \  -H "Content-Type: application/json" \  -d '[    {      "isRoot": true,      "name": "string"    }  ]'
[
  {
    "children": [
      "string"
    ],
    "clients": [
      "string"
    ],
    "created": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "description": "string",
    "id": "string",
    "isRoot": true,
    "name": "string",
    "tenantId": "string",
    "updated": "2019-08-24T14:15:22Z",
    "updatedBy": "string"
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Invite client to asset location

POST
/asset-locations/clients/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/asset-locations/clients/string" \  -H "Content-Type: application/json" \  -d '{    "email": "string",    "sendEmail": true,    "verificationBaseUrl": "string"  }'
{
  "children": [
    "string"
  ],
  "clients": [
    "string"
  ],
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "description": "string",
  "id": "string",
  "isRoot": true,
  "name": "string",
  "tenantId": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Remove client from asset location

DELETE
/asset-locations/clients/{id}/{email}
AuthorizationBearer <token>

In: header

Path Parameters

id*string
email*string

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "http://localhost:18080/api/v1/asset-locations/clients/string/string"
{
  "children": [
    "string"
  ],
  "clients": [
    "string"
  ],
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "description": "string",
  "id": "string",
  "isRoot": true,
  "name": "string",
  "tenantId": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Find by list of ids in current tenant

GET
/asset-locations/find
AuthorizationBearer <token>

In: header

Query Parameters

ids*array<>

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/asset-locations/find?ids=string"
[
  {
    "children": [
      "string"
    ],
    "clients": [
      "string"
    ],
    "created": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "description": "string",
    "id": "string",
    "isRoot": true,
    "name": "string",
    "tenantId": "string",
    "updated": "2019-08-24T14:15:22Z",
    "updatedBy": "string"
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Find all for current tenant

GET
/asset-locations/find-all
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/asset-locations/find-all"
[
  {
    "children": [
      "string"
    ],
    "clients": [
      "string"
    ],
    "created": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "description": "string",
    "id": "string",
    "isRoot": true,
    "name": "string",
    "tenantId": "string",
    "updated": "2019-08-24T14:15:22Z",
    "updatedBy": "string"
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Find by id in current tenant

GET
/asset-locations/find/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/asset-locations/find/string"
{
  "children": [
    "string"
  ],
  "clients": [
    "string"
  ],
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "description": "string",
  "id": "string",
  "isRoot": true,
  "name": "string",
  "tenantId": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get asset location tree for the current user

GET
/asset-locations/me
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/asset-locations/me"
[
  {
    "assetInstances": [
      {
        "address": {
          "city": "string",
          "country": "string",
          "houseNumber": "string",
          "id": "string",
          "latitude": 0.1,
          "longitude": 0.1,
          "postalCode": "string",
          "street": "string"
        },
        "assetLocationId": "string",
        "certifications": [
          {
            "critical": true,
            "description": "string",
            "documents": [
              {
                "blobId": "string",
                "created": "2019-08-24T14:15:22Z",
                "extension": "string",
                "fileSize": 0,
                "name": "string",
                "type": "IMAGE"
              }
            ],
            "expirationDate": "2019-08-24T14:15:22Z",
            "id": "string",
            "isCritical": true,
            "isRepeat": true,
            "issueDate": "2019-08-24T14:15:22Z",
            "repeat": true,
            "status": "VALID",
            "type": "string"
          }
        ],
        "created": "2019-08-24T14:15:22Z",
        "createdBy": "string",
        "currentValue": 0.1,
        "failures": [
          {
            "alerted": "2019-08-24T14:15:22Z",
            "arrival": "2019-08-24T14:15:22Z",
            "cause": "string",
            "date": "2019-08-24T14:15:22Z",
            "description": "string",
            "id": "string",
            "repaired": "2019-08-24T14:15:22Z",
            "type": "string"
          }
        ],
        "id": "string",
        "installationDate": "2019-08-24T14:15:22Z",
        "maintenance": [
          {
            "documents": [
              {
                "blobId": "string",
                "created": "2019-08-24T14:15:22Z",
                "extension": "string",
                "fileSize": 0,
                "name": "string",
                "type": "IMAGE"
              }
            ],
            "doneDate": "2019-08-24T14:15:22Z",
            "dueDate": "2019-08-24T14:15:22Z",
            "executed": true,
            "finished": true,
            "id": "string",
            "status": "PLANNED",
            "type": "MAINTENANCE"
          }
        ],
        "metadata": {
          "property1": "string",
          "property2": "string"
        },
        "name": "string",
        "objectNumber": "string",
        "productId": "string",
        "serialNumber": "string",
        "serviceIntervals": [
          {
            "description": "string",
            "id": "string",
            "intervals": [
              {
                "cost": 0.1,
                "year": 0
              }
            ],
            "partCategory": "string",
            "partId": "string"
          }
        ],
        "status": "OPERATIONAL",
        "tenantId": "string",
        "type": "string",
        "updated": "2019-08-24T14:15:22Z",
        "updatedBy": "string"
      }
    ],
    "children": [
      {}
    ],
    "clients": [
      "string"
    ],
    "created": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "description": "string",
    "enrichedClients": [
      {
        "email": "string",
        "firstName": "string",
        "hasFullAccess": true,
        "id": "string",
        "language": "string",
        "lastLogin": "2019-08-24T14:15:22Z",
        "lastName": "string",
        "profile": {
          "avatar": {
            "blobId": "string",
            "height": 0,
            "thumbnailBlobId": "string",
            "width": 0
          },
          "displayName": "string",
          "logo": {
            "blobId": "string",
            "height": 0,
            "thumbnailBlobId": "string",
            "width": 0
          }
        },
        "projectAccess": [
          "string"
        ],
        "roles": [
          "string"
        ],
        "status": "ACTIVE",
        "subsidiaryAccess": [
          "string"
        ],
        "tenantId": "string",
        "verified": true
      }
    ],
    "id": "string",
    "isRoot": true,
    "name": "string",
    "updated": "2019-08-24T14:15:22Z",
    "updatedBy": "string"
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get page by page number and size with optional sorting based on field to sortBy and direction

GET
/asset-locations/page
AuthorizationBearer <token>

In: header

Query Parameters

pageNumber?integer
Formatint32
pageSize?integer
Formatint32
sortBy?string
direction?string
Value in"ASC" | "DESC"
search?string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/asset-locations/page"
{
  "content": [
    {
      "children": [
        "string"
      ],
      "clients": [
        "string"
      ],
      "created": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "description": "string",
      "id": "string",
      "isRoot": true,
      "name": "string",
      "tenantId": "string",
      "updated": "2019-08-24T14:15:22Z",
      "updatedBy": "string"
    }
  ],
  "empty": true,
  "first": true,
  "last": true,
  "number": 0,
  "numberOfElements": 0,
  "pageable": {
    "offset": 0,
    "pageNumber": 0,
    "pageSize": 0,
    "paged": true,
    "sort": {
      "empty": true,
      "sorted": true,
      "unsorted": true
    },
    "unpaged": true
  },
  "size": 0,
  "sort": {
    "empty": true,
    "sorted": true,
    "unsorted": true
  },
  "totalElements": 0,
  "totalPages": 0
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get the subtree of an asset location

GET
/asset-locations/subtree/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/asset-locations/subtree/string"
{
  "assetInstances": [
    {
      "address": {
        "city": "string",
        "country": "string",
        "houseNumber": "string",
        "id": "string",
        "latitude": 0.1,
        "longitude": 0.1,
        "postalCode": "string",
        "street": "string"
      },
      "assetLocationId": "string",
      "certifications": [
        {
          "critical": true,
          "description": "string",
          "documents": [
            {
              "blobId": "string",
              "created": "2019-08-24T14:15:22Z",
              "extension": "string",
              "fileSize": 0,
              "name": "string",
              "type": "IMAGE"
            }
          ],
          "expirationDate": "2019-08-24T14:15:22Z",
          "id": "string",
          "isCritical": true,
          "isRepeat": true,
          "issueDate": "2019-08-24T14:15:22Z",
          "repeat": true,
          "status": "VALID",
          "type": "string"
        }
      ],
      "created": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "currentValue": 0.1,
      "failures": [
        {
          "alerted": "2019-08-24T14:15:22Z",
          "arrival": "2019-08-24T14:15:22Z",
          "cause": "string",
          "date": "2019-08-24T14:15:22Z",
          "description": "string",
          "id": "string",
          "repaired": "2019-08-24T14:15:22Z",
          "type": "string"
        }
      ],
      "id": "string",
      "installationDate": "2019-08-24T14:15:22Z",
      "maintenance": [
        {
          "documents": [
            {
              "blobId": "string",
              "created": "2019-08-24T14:15:22Z",
              "extension": "string",
              "fileSize": 0,
              "name": "string",
              "type": "IMAGE"
            }
          ],
          "doneDate": "2019-08-24T14:15:22Z",
          "dueDate": "2019-08-24T14:15:22Z",
          "executed": true,
          "finished": true,
          "id": "string",
          "status": "PLANNED",
          "type": "MAINTENANCE"
        }
      ],
      "metadata": {
        "property1": "string",
        "property2": "string"
      },
      "name": "string",
      "objectNumber": "string",
      "productId": "string",
      "serialNumber": "string",
      "serviceIntervals": [
        {
          "description": "string",
          "id": "string",
          "intervals": [
            {
              "cost": 0.1,
              "year": 0
            }
          ],
          "partCategory": "string",
          "partId": "string"
        }
      ],
      "status": "OPERATIONAL",
      "tenantId": "string",
      "type": "string",
      "updated": "2019-08-24T14:15:22Z",
      "updatedBy": "string"
    }
  ],
  "children": [
    {}
  ],
  "clients": [
    "string"
  ],
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "description": "string",
  "enrichedClients": [
    {
      "email": "string",
      "firstName": "string",
      "hasFullAccess": true,
      "id": "string",
      "language": "string",
      "lastLogin": "2019-08-24T14:15:22Z",
      "lastName": "string",
      "profile": {
        "avatar": {
          "blobId": "string",
          "height": 0,
          "thumbnailBlobId": "string",
          "width": 0
        },
        "displayName": "string",
        "logo": {
          "blobId": "string",
          "height": 0,
          "thumbnailBlobId": "string",
          "width": 0
        }
      },
      "projectAccess": [
        "string"
      ],
      "roles": [
        "string"
      ],
      "status": "ACTIVE",
      "subsidiaryAccess": [
        "string"
      ],
      "tenantId": "string",
      "verified": true
    }
  ],
  "id": "string",
  "isRoot": true,
  "name": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get the tree of asset locations

GET
/asset-locations/tree
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/asset-locations/tree"
[
  {
    "assetInstances": [
      {
        "address": {
          "city": "string",
          "country": "string",
          "houseNumber": "string",
          "id": "string",
          "latitude": 0.1,
          "longitude": 0.1,
          "postalCode": "string",
          "street": "string"
        },
        "assetLocationId": "string",
        "certifications": [
          {
            "critical": true,
            "description": "string",
            "documents": [
              {
                "blobId": "string",
                "created": "2019-08-24T14:15:22Z",
                "extension": "string",
                "fileSize": 0,
                "name": "string",
                "type": "IMAGE"
              }
            ],
            "expirationDate": "2019-08-24T14:15:22Z",
            "id": "string",
            "isCritical": true,
            "isRepeat": true,
            "issueDate": "2019-08-24T14:15:22Z",
            "repeat": true,
            "status": "VALID",
            "type": "string"
          }
        ],
        "created": "2019-08-24T14:15:22Z",
        "createdBy": "string",
        "currentValue": 0.1,
        "failures": [
          {
            "alerted": "2019-08-24T14:15:22Z",
            "arrival": "2019-08-24T14:15:22Z",
            "cause": "string",
            "date": "2019-08-24T14:15:22Z",
            "description": "string",
            "id": "string",
            "repaired": "2019-08-24T14:15:22Z",
            "type": "string"
          }
        ],
        "id": "string",
        "installationDate": "2019-08-24T14:15:22Z",
        "maintenance": [
          {
            "documents": [
              {
                "blobId": "string",
                "created": "2019-08-24T14:15:22Z",
                "extension": "string",
                "fileSize": 0,
                "name": "string",
                "type": "IMAGE"
              }
            ],
            "doneDate": "2019-08-24T14:15:22Z",
            "dueDate": "2019-08-24T14:15:22Z",
            "executed": true,
            "finished": true,
            "id": "string",
            "status": "PLANNED",
            "type": "MAINTENANCE"
          }
        ],
        "metadata": {
          "property1": "string",
          "property2": "string"
        },
        "name": "string",
        "objectNumber": "string",
        "productId": "string",
        "serialNumber": "string",
        "serviceIntervals": [
          {
            "description": "string",
            "id": "string",
            "intervals": [
              {
                "cost": 0.1,
                "year": 0
              }
            ],
            "partCategory": "string",
            "partId": "string"
          }
        ],
        "status": "OPERATIONAL",
        "tenantId": "string",
        "type": "string",
        "updated": "2019-08-24T14:15:22Z",
        "updatedBy": "string"
      }
    ],
    "children": [
      {}
    ],
    "clients": [
      "string"
    ],
    "created": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "description": "string",
    "enrichedClients": [
      {
        "email": "string",
        "firstName": "string",
        "hasFullAccess": true,
        "id": "string",
        "language": "string",
        "lastLogin": "2019-08-24T14:15:22Z",
        "lastName": "string",
        "profile": {
          "avatar": {
            "blobId": "string",
            "height": 0,
            "thumbnailBlobId": "string",
            "width": 0
          },
          "displayName": "string",
          "logo": {
            "blobId": "string",
            "height": 0,
            "thumbnailBlobId": "string",
            "width": 0
          }
        },
        "projectAccess": [
          "string"
        ],
        "roles": [
          "string"
        ],
        "status": "ACTIVE",
        "subsidiaryAccess": [
          "string"
        ],
        "tenantId": "string",
        "verified": true
      }
    ],
    "id": "string",
    "isRoot": true,
    "name": "string",
    "updated": "2019-08-24T14:15:22Z",
    "updatedBy": "string"
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Delete by id in current tenant

DELETE
/asset-locations/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

curl -X DELETE "http://localhost:18080/api/v1/asset-locations/string"
Empty
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Update an asset location

PUT
/asset-locations/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PUT "http://localhost:18080/api/v1/asset-locations/string" \  -H "Content-Type: application/json" \  -d '{    "children": [      "string"    ],    "isRoot": true,    "name": "string"  }'
{
  "children": [
    "string"
  ],
  "clients": [
    "string"
  ],
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "description": "string",
  "id": "string",
  "isRoot": true,
  "name": "string",
  "tenantId": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}