Sockets
Connector/socket state and details
GET /chargers/{charger_id}/sockets List connectors for a charger
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
charger_id | path | string | required |
Responses
200 Socket list
| Property | Type | Required | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | array<Socket> | ||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
401 Missing or invalid API key application/problem+json
| Property | Type | Required | Description |
|---|---|---|---|
type | stringformat: uri | required | |
title | string | required | |
status | integer | required | |
detail | stringnullable | ||
instance | stringnullable |
404 Resource not found application/problem+json
| Property | Type | Required | Description |
|---|---|---|---|
type | stringformat: uri | required | |
title | string | required | |
status | integer | required | |
detail | stringnullable | ||
instance | stringnullable |
Request example
curl -X GET "https://api.ampr.dev/v1/chargers/chg_example/sockets" \
-H "Authorization: Bearer $AMPR_API_KEY" const res = await fetch('https://api.ampr.dev/v1/chargers/chg_example/sockets', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.AMPR_API_KEY}`,
},
});
const data = await res.json(); Note
This endpoint requires an API key. Send it as a Bearer token in the Authorization header.
GET /chargers/{charger_id}/sockets/{socket_id} Get connector detail with live state
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
charger_id | path | string | required | |
socket_id | path | string | required |
Responses
200 Socket detail
| Property | Type | Required | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | Socket | ||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
401 Missing or invalid API key application/problem+json
| Property | Type | Required | Description |
|---|---|---|---|
type | stringformat: uri | required | |
title | string | required | |
status | integer | required | |
detail | stringnullable | ||
instance | stringnullable |
404 Resource not found application/problem+json
| Property | Type | Required | Description |
|---|---|---|---|
type | stringformat: uri | required | |
title | string | required | |
status | integer | required | |
detail | stringnullable | ||
instance | stringnullable |
Request example
curl -X GET "https://api.ampr.dev/v1/chargers/chg_example/sockets/skt_example" \
-H "Authorization: Bearer $AMPR_API_KEY" const res = await fetch('https://api.ampr.dev/v1/chargers/chg_example/sockets/skt_example', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.AMPR_API_KEY}`,
},
});
const data = await res.json(); Note
This endpoint requires an API key. Send it as a Bearer token in the Authorization header.