Facilities

Facilities represent the physical locations where your equipment is installed. They help organize your assets and provide site-wide analytics for better maintenance planning.

The facility model

The facility model contains information about your industrial sites and their organizational structure.

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the facility.

  • Name
    name
    Type
    string
    Description

    Human-readable name for the facility.

  • Name
    location
    Type
    object
    Description

    Physical location details including address and coordinates.

  • Name
    type
    Type
    string
    Description

    Type of facility (manufacturing, power plant, refinery, etc.).

  • Name
    areas
    Type
    array
    Description

    Subdivisions within the facility (production lines, departments).

  • Name
    operating_hours
    Type
    object
    Description

    Facility operating schedule information.

  • Name
    equipment_count
    Type
    number
    Description

    Total number of monitored equipment in this facility.

Create facility

Create a new facility

curl -X POST https://api.immune.dev/v1/facilities \
  -H "Authorization: Bearer {token}" \
  -d '{
    "name": "North Manufacturing Plant",
    "type": "manufacturing",
    "location": {
      "address": "123 Industrial Way",
      "city": "Springfield",
      "country": "USA",
      "coordinates": {
        "latitude": 42.1234,
        "longitude": -71.5678
      }
    },
    "areas": [
      {
        "name": "Assembly Line A",
        "type": "production"
      },
      {
        "name": "Maintenance Bay",
        "type": "maintenance"
      }
    ],
    "operating_hours": {
      "timezone": "America/New_York",
      "schedule": "24/7"
    }
  }'

List facilities

List all facilities

curl -X GET https://api.immune.dev/v1/facilities \
  -H "Authorization: Bearer {token}"

Facility overview

Get a comprehensive overview of a facility's status:

Get facility overview

curl -X GET https://api.immune.dev/v1/facilities/plant_001/overview \
  -H "Authorization: Bearer {token}"

Response:

{
  "facility_id": "plant_001",
  "name": "North Manufacturing Plant",
  "status": {
    "equipment": {
      "total": 50,
      "running": 45,
      "maintenance": 3,
      "offline": 2
    },
    "sensors": {
      "total": 250,
      "online": 248,
      "error": 2
    },
    "alerts": {
      "critical": 1,
      "warning": 5,
      "info": 12
    }
  },
  "health_metrics": {
    "overall_health": 92,
    "maintenance_efficiency": 87,
    "prediction_accuracy": 94
  }
}

Best practices

  1. Structure facilities hierarchically
  2. Define clear area boundaries
  3. Maintain accurate location data
  4. Monitor facility-wide health metrics
  5. Configure appropriate alert thresholds per area
  6. Regular review of facility performance metrics

Was this page helpful?