Added sitearea doc
MODIFY
src/assets/server/rest/v1/docs/e-mobility-oas.json
src/assets/server/rest/v1/docs/e-mobility-oas.json
"name": "Tenant",
"description": "Tenant API"
},
+ {
+ "name": "Site Area",
+ "description": "Site Area API"
+ },
{
"name": "Authentication",
"description": "Authentication API"
}
}
},
+ "/api/site-areas": {
+ "get": {
+ "description": "Retrieve a list of Site Areas",
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/Search"
+ },
+ {
+ "$ref": "#/components/parameters/WithSite"
+ },
+ {
+ "$ref": "#/components/parameters/WithChargingStations"
+ },
+ {
+ "in": "query",
+ "name": "WithAvailableChargers",
+ "description": "Request Site Areas with their available chargers",
+ "example": false,
+ "required": false,
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "$ref": "#/components/parameters/SiteID"
+ },
+ {
+ "in": "query",
+ "name": "CompanyID",
+ "description": "Company ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "$ref": "#/components/parameters/Issuer"
+ },
+ {
+ "$ref": "#/components/parameters/LocLongitude"
+ },
+ {
+ "$ref": "#/components/parameters/LocLatitude"
+ },
+ {
+ "$ref": "#/components/parameters/LocMaxDistanceMeters"
+ },
+ {
+ "$ref": "#/components/parameters/Limit"
+ },
+ {
+ "$ref": "#/components/parameters/Skip"
+ },
+ {
+ "$ref": "#/components/parameters/SortFields"
+ },
+ {
+ "$ref": "#/components/parameters/OnlyRecordCount"
+ },
+ {
+ "$ref": "#/components/parameters/ProjectFields"
+ }
+ ],
+ "tags": [
+ "Site Area"
+ ],
+ "responses": {
+ "200": {
+ "description": "Return the site area list",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "count": {
+ "type": "number",
+ "example": 1
+ },
+ "result": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/SiteArea"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/ForbiddenError"
+ },
+ "500": {
+ "$ref": "#/components/responses/BackendError"
+ }
+ }
+ },
+ "post": {
+ "description": "Create a SiteArea",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/SiteArea"
+ }
+ }
+ }
+ },
+ "tags": [
+ "Site Area"
+ ],
+ "responses": {
+ "200": {
+ "description": "Site Area is created with success"
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/ForbiddenError"
+ },
+ "500": {
+ "$ref": "#/components/responses/BackendError"
+ }
+ }
+ }
+ },
+ "/api/site-areas/{id}": {
+ "get": {
+ "description": "Retrieve a Site Area",
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/siteAreaID"
+ },
+ {
+ "$ref": "#/components/parameters/WithSite"
+ },
+ {
+ "$ref": "#/components/parameters/WithChargingStations"
+ }
+ ],
+ "tags": [
+ "Site Area"
+ ],
+ "responses": {
+ "200": {
+ "description": "Return the site area",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/SiteArea"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/ForbiddenError"
+ },
+ "500": {
+ "$ref": "#/components/responses/BackendError"
+ },
+ "550": {
+ "$ref": "#/components/responses/ResourceDoesNotExists"
+ }
+ }
+ }
+ },
"/auth/signin": {
"post": {
"description": "Sign in",
}
}
},
+ "SiteArea": {
+ "type": "object",
+ "required": [
+ "name",
+ "siteID"
+ ],
+ "properties": {
+ "id": {
+ "type": "string",
+ "readOnly": true
+ },
+ "accessControl": {
+ "type": "boolean"
+ },
+ "address": {
+ "$ref": "#/components/schemas/Address"
+ },
+ "createdBy": {
+ "$ref": "#/components/schemas/CreatedBy"
+ },
+ "createdOn": {
+ "$ref": "#/components/schemas/CreatedOn"
+ },
+ "issuer": {
+ "type": "boolean"
+ },
+ "lastChangedBy": {
+ "$ref": "#/components/schemas/LastChangedBy"
+ },
+ "maximumPower": {
+ "type": "number",
+ "minimum": 0
+ },
+ "name": {
+ "type": "string"
+ },
+ "numberOfPhases": {
+ "type": "number",
+ "enum": [
+ 1,
+ 3
+ ]
+ },
+ "siteID": {
+ "type": "string"
+ },
+ "site": {
+ "type": "object",
+ "readOnly": true,
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ }
+ },
+ "connectorStats": {
+ "type": "object",
+ "readOnly": true,
+ "properties": {
+ "totalChargers": {
+ "type": "number"
+ },
+ "availableChargers": {
+ "type": "number"
+ },
+ "totalConnectors": {
+ "type": "number"
+ },
+ "chargingConnectors": {
+ "type": "number"
+ },
+ "suspendedConnectors": {
+ "type": "number"
+ },
+ "availableConnectors": {
+ "type": "number"
+ },
+ "unavailableConnectors": {
+ "type": "number"
+ },
+ "preparingConnectors": {
+ "type": "number"
+ },
+ "finishingConnectors": {
+ "type": "number"
+ },
+ "faultedConnectors": {
+ "type": "number"
+ }
+ }
+ },
+ "chargingStations": {
+ "type": "array",
+ "readOnly": true,
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "inactive": {
+ "type": "boolean"
+ },
+ "public": {
+ "type": "boolean"
+ },
+ "lastSeen": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "deleted": {
+ "type": "boolean",
+ "format": "date-time"
+ },
+ "connectors": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Connector"
+ }
+ }
+ }
+ }
+ },
+ "smartCharging": {
+ "type": "boolean"
+ },
+ "voltage": {
+ "type": "number",
+ "enum": [
+ 110,
+ 230
+ ]
+ }
+ }
+ },
"Address": {
"type": "object",
"properties": {
"type": "string"
},
"connectors": {
- "type": "string"
+ "$ref": "#/components/schemas/Connector"
},
"remoteAuthorizations": {
"type": "string"
"type": "number",
"example": 1
},
+ "currentInstantWatt": {
+ "type": "number",
+ "readOnly": true
+ },
+ "currentStateOfCharge": {
+ "type": "number",
+ "readOnly": true
+ },
+ "currentTotalInactivitySecs": {
+ "type": "number",
+ "readOnly": true
+ },
+ "currentInactivityStatus": {
+ "type": "string",
+ "enum": ["E", "I", "W"],
+ "readOnly": true
+ },
+ "currentTotalConsumptionWh": {
+ "type": "number",
+ "readOnly": true
+ },
+ "currentTransactionDate": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ },
+ "currentTagID": {
+ "type": "string",
+ "readOnly": true
+ },
+ "currentTransactionID": {
+ "type": "string",
+ "readOnly": true
+ },
+ "currentUserID": {
+ "type": "string",
+ "readOnly": true
+ },
+ "status": {
+ "type": "string",
+ "readOnly": true
+ },
+ "errorCode": {
+ "type": "string",
+ "readOnly": true
+ },
+ "info": {
+ "type": "string",
+ "readOnly": true
+ },
+ "vendorErrorCode": {
+ "type": "string",
+ "readOnly": true
+ },
+ "statusLastChangedOn": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true
+ },
"power": {
"type": "number"
},
"amperage": {
"type": "number"
},
+ "amperageLimit": {
+ "type": "number",
+ "readOnly": true
+ },
"currentType": {
"type": "string",
"enum": [
"example": false
}
},
+ "siteAreaID": {
+ "in": "path",
+ "name": "id",
+ "description": "Site Area ID",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
"SiteAreaID": {
"in": "query",
"name": "SiteAreaID",
"type": "boolean"
}
},
+ "WithChargingStations": {
+ "in": "query",
+ "name": "WithChargingStations",
+ "description": "With charging stations attribute",
+ "schema": {
+ "type": "boolean"
+ }
+ },
"RefundStatus": {
"in": "query",
"name": "RefundStatus",

Added sitearea doc