Skip to content

REST API Endpoints

REST API endpoint definitions store HTTP requests made against REST API data sources as Compass records in the Compass module.

When a REST API data source added in the Port module is selected, a REST definition form opens in Compass. The endpoint path, HTTP method, query parameters, and request-specific headers are configured; after testing, the request is saved.

Naming

For REST API, no query is written in Compass — instead, an endpoint is defined on top of the Base URL (path + method + parameters). That is why the action name in this module is "Define Endpoint" / "Edit Endpoint".

Demo Factory — REST mock endpoints

The Demo Factory REST stream provides these mock endpoints (registered in Port as Demo Fabrika - REST):

Endpoint Response Description
GET /api/oee/today single object Daily OEE summary
GET /api/sayac/anlik single object Instant production counter
GET /api/sicaklik/trend?hat={{hat_id}}&hours={{hours}} array (~289) 5-min granular temperature trend
GET /api/vardiya/dun array (3) Yesterday's shift production totals
GET /api/durus/dagilim?gun={{day}} array (5) 7-day breakdown type distribution
GET /api/alarm/son50 array (50) Last 50 alarms
GET /api/recete?makine={{makine_id}} array (8 / 4) Recipe parameter list

Port data source name: Demo Fabrika - REST.

To start the same endpoints in your own environment → Synthetic Data Generation — REST API


Strengths

Feature Description
Universal Compatibility Works with any service that supports HTTP: ERP, MES, CMMS, cloud APIs
Dynamic Paths The Port Base URL stays fixed while each definition can have its own endpoint path
Parameterized Requests Query string parameters can be bound to dashboard filters
Custom Headers Define HTTP headers per endpoint (in addition to Port global headers)
GET / POST Support Read (GET) and write (POST) operations
JSON / XML Preview Response data displayed with syntax-highlighted preview in the editor

What You Can Do in Pirivision

Action Example Scenario
ERP KPI Pull daily production target from SAP or Oracle ERP
Weather Monitor environmental conditions by plant location
External Service Integration Open work order count from a CMMS system
Periodic Reports Pull shift reports via REST API and display them on a dashboard
Authentication Access endpoints protected by Bearer token or API key

Requirements

Requirement Description
REST API data source in Port Base URL and any global headers must be added
Endpoint information The endpoint path and HTTP method must be known

Guides

Guide Description
Define REST Endpoint Define and save a REST endpoint in Compass
Edit REST Endpoint Update an existing REST endpoint definition
Move Compass Record Move the record to a different folder
Duplicate Compass Record Copy the same record
Delete Compass Record Remove the record

Next Step

After the REST endpoint is saved, create a chart / KPI widget using this record in the Cartography module.

Define REST Endpoint