Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save michael-donat/ef7ecba266e22d8e7f1ad43afffd5e7b to your computer and use it in GitHub Desktop.
Save michael-donat/ef7ecba266e22d8e7f1ad43afffd5e7b to your computer and use it in GitHub Desktop.
openapi: "3.0.3"
info:
title: "CSME Service Documentation - OpenAPI 3.0"
description: "This is a CSME Service Documentation based on the OpenAPI 3.0 specification."
version: "0.0.1"
servers:
- url: "https://csme.road.io"
paths:
"/1/messages":
post:
summary: "Send message to the paired CS."
description: "Send message to the paired CS (CSMEC initiated)."
security:
- JWT: []
tags:
- Generic
requestBody:
description: "Messages Payload"
required: true
content:
"application/json":
schema:
description: "List of the messages"
type: object
properties:
"messages":
type: array
items:
type: object
properties:
"pairingId":
type: string
"protocol":
type: string
"type":
type: string
"payload":
type: array
items:
type: integer
responses:
200:
description: OK
content:
"application/json":
schema:
description: "List of the messages responses"
type: object
properties:
"messages":
type: array
items:
type: object
properties:
"success":
type: boolean
"error":
type: object
properties:
"code":
type: string
"message":
type: string
400:
$ref: "#/components/responses/BadRequest"
500:
$ref: "#/components/responses/InternalServerError"
"/1/pairings":
post:
summary: "Create pairing."
description: "Create pairing between CSMEC and CSMES (CSMEC initiated)."
security:
- JWT: []
tags:
- Generic
responses:
200:
description: OK
content:
"application/json":
schema:
type: object
"/1/pairings/{pairing_id}":
delete:
summary: "Remote pairing."
description: "Remote pairing between CSMEC and CSMES (CSMEC initiated)."
security:
- JWT: []
tags:
- Generic
parameters:
- name: "pairing_id"
description: "Pairing ID"
in: path
required: true
schema:
type: string
responses:
202:
$ref: "#/components/responses/NoContent"
400:
$ref: "#/components/responses/BadRequest"
403:
$ref: "#/components/responses/Forbidden"
404:
$ref: "#/components/responses/NotFound"
500:
$ref: "#/components/responses/InternalServerError"
components:
schemas:
"OCPPVersion":
description: "OCPP Protocol Version"
type: string
enum:
-
ocpp1.6
-
ocpp2.0.1
"SetChargingProfileRequest16":
type: object
properties:
"connectorId":
type: integer
"csChargingProfiles":
type: object
properties:
"chargingProfileId":
type: integer
"chargingProfileKind":
type: string
"chargingProfilePurpose":
type: string
"chargingSchedule":
type: object
properties:
"chargingRateUnit":
type: string
"chargingSchedulePeriod":
type: array
items:
type: object
properties:
"limit":
type: number
format: double
"numberPhases":
type: integer
"startPeriod":
type: integer
"duration":
type: integer
"minChargingRate":
type: number
format: double
"startSchedule":
type: string
format: date-time
"recurrencyKind":
type: string
"stackLevel":
type: integer
"transactionId":
type: integer
"validFrom":
type: string
format: date-time
"validTo":
type: string
format: date-time
"SetChargingProfileRequest201":
type: object
properties:
"chargingProfile":
type: object
properties:
"chargingProfileKind":
type: string
"chargingProfilePurpose":
type: string
"chargingSchedule":
type: array
items:
type: object
properties:
"absolutePriceSchedule":
type: object
properties:
"additionalSelectedServices":
type: array
items:
type: object
properties:
"serviceFee":
type: object
properties:
"exponent":
type: integer
"value":
type: integer
"serviceName":
type: string
"currency":
type: string
"language":
type: string
"maximumCost":
type: object
properties:
"exponent":
type: integer
"value":
type: integer
"minimumCost":
type: object
properties:
"exponent":
type: integer
"value":
type: integer
"overstayRules":
type: object
properties:
"overstayPowerThreshold":
type: object
properties:
"exponent":
type: integer
"value":
type: integer
"overstayRule":
type: array
items:
type: object
properties:
"overstayFee":
type: object
properties:
"exponent":
type: integer
"value":
type: integer
"overstayFeePeriod":
type: integer
"overstayRuleDesription":
type: string
"startTime":
type: integer
"overstayTimeThreshold":
type: integer
"priceAlgorithm":
type: string
"priceRuleStacks":
type: array
items:
type: object
properties:
"duration":
type: integer
"priceRule":
type: array
items:
type: object
properties:
"carbonDioxideEmission":
type: integer
"energyFee":
type: object
properties:
"exponent":
type: integer
"value":
type: integer
"parkingFee":
type: object
properties:
"exponent":
type: integer
"value":
type: integer
"parkingFeePeriod":
type: integer
"powerRangeStart":
type: object
properties:
"exponent":
type: integer
"value":
type: integer
"renewableGenerationPercentage":
type: number
format: double
"priceScheduleDescription":
type: string
"priceScheduleID":
type: number
format: double
"taxRules":
type: array
items:
type: object
properties:
"appliesToEnergyFee":
type: boolean
"appliesToMinimumMaximumCost":
type: boolean
"appliesToOverstayFee":
type: boolean
"appliesToParkingFee":
type: boolean
"taxIncludedInPrice":
type: boolean
"taxRate":
type: object
properties:
"exponent":
type: integer
"value":
type: integer
"taxRuleID":
type: number
format: double
"taxRuleName":
type: string
"timeAnchor":
type: string
format: date-time
"chargingRateUnit":
type: string
"chargingSchedulePeriod":
type: array
items:
type: object
properties:
"customData":
type: object
properties:
"vendorId":
type: string
"dischargeLimit":
type: number
format: double
"dischargeLimit_L2":
type: number
format: double
"dischargeLimit_L3":
type: number
format: double
"dynUpdateTime":
type: string
format: date-time
"limit":
type: number
format: double
"limit_L2":
type: number
format: double
"limit_L3":
type: number
format: double
"numberPhases":
type: integer
"operationMode":
type: string
"phaseToUse":
type: integer
"preconditioningRequest":
type: boolean
"setpoint":
type: number
format: double
"setpointReactive":
type: number
format: double
"setpointReactive_L2":
type: number
format: double
"setpointReactive_L3":
type: number
format: double
"setpoint_L2":
type: number
format: double
"setpoint_L3":
type: number
format: double
"startPeriod":
type: integer
"v2xFreqWattCurve":
type: array
items:
type: object
properties:
"frequency":
type: number
format: double
"power":
type: number
format: double
"v2xVoltVarCurve":
type: array
items:
type: object
properties:
"reactivePower":
type: number
format: double
"voltage":
type: number
format: double
"customData":
type: object
properties:
"vendorId":
type: string
"digestValue":
type: string
"duration":
type: integer
"id":
type: integer
"minChargingRate":
type: number
format: double
"powerTolerance":
type: number
format: double
"priceLevelSchedule":
type: object
properties:
"numberOfPriceLevels":
type: integer
"priceLevelScheduleEntries":
type: array
items:
type: object
properties:
"duration":
type: integer
"priceLevel":
type: integer
"priceScheduleDescription":
type: string
"priceScheduleID":
type: number
format: double
"timeAnchor":
type: string
format: date-time
"salesTariff":
type: object
properties:
"customData":
type: object
properties:
"vendorId":
type: string
"id":
type: integer
"numEPriceLevels":
type: integer
"salesTariffDescription":
type: string
"salesTariffEntry":
type: array
items:
type: object
properties:
"consumptionCost":
type: array
items:
type: object
properties:
"cost":
type: array
items:
type: object
properties:
"amount":
type: integer
"amountMultiplier":
type: integer
"costKind":
type: string
"customData":
type: object
properties:
"vendorId":
type: string
"customData":
type: object
properties:
"vendorId":
type: string
"startValue":
type: number
format: double
"customData":
type: object
properties:
"vendorId":
type: string
"ePriceLevel":
type: integer
"relativeTimeInterval":
type: object
properties:
"customData":
type: object
properties:
"vendorId":
type: string
"duration":
type: integer
"start":
type: integer
"signatureId":
type: integer
"startSchedule":
type: string
format: date-time
"customData":
type: object
properties:
"vendorId":
type: string
"id":
type: integer
"maxOfflineDuration":
type: integer
"recurrencyKind":
type: string
"signatureValue":
type: string
"stackLevel":
type: integer
"transactionId":
type: string
"updateInterval":
type: integer
"validFrom":
type: string
format: date-time
"validTo":
type: string
format: date-time
"customData":
type: object
properties:
"vendorId":
type: string
"evseId":
type: integer
responses:
InternalServerError:
description: "Internal Server Error Response"
content:
"application/json":
schema:
type: object
properties:
"error":
type: string
example: "internal server error"
Forbidden:
description: "Forbidden Error Response"
content:
"application/json":
schema:
type: object
properties:
"error":
type: string
example: "access denied"
NotFound:
description: "Resource Not Found Response"
content:
"application/json":
schema:
type: object
properties:
"error":
type: string
example: "resource not found"
ServiceUnavailable:
description: "Service Unavailable Response"
content:
"application/json":
schema:
type: object
properties:
"error":
type: string
example: "charging station unavailable or offline"
NoContent:
description: "Operation Accepted"
BadRequest:
description: "Bad Request Response"
content:
"application/json":
schema:
type: object
properties:
"error":
type: string
example: "invalid UUID"
securitySchemes:
JWT:
description: "CSME Client Key"
type: http
scheme: bearer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment