Skip to content

Instantly share code, notes, and snippets.

@tkruse
Created December 18, 2015 09:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkruse/c125f5ce7258fecd49ec to your computer and use it in GitHub Desktop.
Save tkruse/c125f5ce7258fecd49ec to your computer and use it in GitHub Desktop.
{"apiVersion":"2.4-SNAPSHOT","apis":[{"description":"getGateway","operations":[{"method":"GET","summary":"Get gateway attributes by the specified deviceId","notes":"All names are for display purposes only, not Business Keys or Ids. While currently maximally one Business Unit can be returned, the strucutre allows multiple return values in case the funtion is changed to also return all Business Units of attached equipments.","nickname":"getGateway","produces":["*/*"],"consumes":["application/json"],"parameters":[{"allowMultiple":false,"defaultValue":"","description":"A unique identifier of a gateway","name":"deviceId","paramType":"path","type":"string","required":true}],"responseMessages":[{"code":200,"message":null,"responseModel":"GatewayJson"},{"code":401,"message":"Access forbidden","responseModel":"Void"},{"code":404,"message":"Unknown deviceId","responseModel":"Void"}],"deprecated":"false","type":"GatewayJson"}],"path":"/deviceManagement/gateways/{deviceId}"},{"description":"invalidateCurrentOpenVPNCertificate","operations":[{"method":"DELETE","summary":"Invalidate current Gateway OpenVPN Certificate","notes":"This must fail unless there are currently 2 valid certificates (current and new). If the new current one is invalidated, the new one becomes the current one. The invalidated certificate will be added to the revocation list.","nickname":"invalidateCurrentOpenVPNCertificate","produces":["*/*"],"consumes":["application/json"],"parameters":[{"allowMultiple":false,"defaultValue":"","description":"deviceId","name":"deviceId","paramType":"path","type":"string","required":true}],"responseMessages":[{"code":200,"message":null,"responseModel":"ResultJson"},{"code":400,"message":"If certificate not known, or only one certificate is valid.","responseModel":"Void"},{"code":401,"message":"Access forbidden","responseModel":"Void"},{"code":404,"message":"Unknown deviceId","responseModel":"Void"}],"deprecated":"false","type":"ResultJson"}],"path":"/deviceManagement/gateways/{deviceId}/certificates/currentOpenVPNCertificate"},{"description":"invalidateNewOpenVPNCertificate","operations":[{"method":"DELETE","summary":"Invalidate new Gateway OpenVPN Certificate","notes":"This can be used in special situations if a new certificate was requested, but was then not deployed on gateway and will never be deployed on gateway. TODO: Decide and document relevant scenarios","nickname":"invalidateNewOpenVPNCertificate","produces":["*/*"],"consumes":["application/json"],"parameters":[{"allowMultiple":false,"defaultValue":"","description":"deviceId","name":"deviceId","paramType":"path","type":"string","required":true}],"responseMessages":[{"code":200,"message":null,"responseModel":"ResultJson"},{"code":401,"message":"Access forbidden","responseModel":"Void"},{"code":404,"message":"Unknown deviceId","responseModel":"Void"}],"deprecated":"false","type":"ResultJson"}],"path":"/deviceManagement/gateways/{deviceId}/certificates/newOpenVPNCertificate"},{"description":"createNewOpenVPNCertificate","operations":[{"method":"POST","summary":"Request creation of new Gateway OpenVPN Certificate","notes":"This is only possible if there currently is only one certificate (the current one). After the call, the new certificate can be used immediately, but the current one will still remain the current one. The certificate expiry duration is defined in DI Backend. The current certificate will remain usable (not on revocation list) until explicitly invalidated.","nickname":"createNewOpenVPNCertificate","produces":["*/*"],"consumes":["application/json"],"parameters":[{"allowMultiple":false,"defaultValue":"","description":"createCertificateJson","name":"body","paramType":"body","type":"CreateCertificateJson","required":false}],"responseMessages":[{"code":200,"message":null,"responseModel":"CertificateJson"},{"code":400,"message":"If signature algorithm name not known / allowed, if already 2 valid certificates exist","responseModel":"Void"},{"code":401,"message":"Access forbidden","responseModel":"Void"},{"code":404,"message":"Unknown deviceId","responseModel":"Void"}],"deprecated":"false","type":"CertificateJson"}],"path":"/deviceManagement/gateways/{deviceId}/certificates/newOpenVPNCertificate"},{"description":"createNewProSystCertificate","operations":[{"method":"POST","summary":"Request creation of new Gateway ProSyst Certificate","notes":"This is only possible if there currently is only one (current) certificate.The new certificate can be used immediately, but the current one will still remain the current one. The current one will remain usable (not on revocation list) until explicitly invalidated.","nickname":"createNewProSystCertificate","produces":["*/*"],"consumes":["application/json"],"parameters":[{"allowMultiple":false,"defaultValue":"","description":"createCertificateJson","name":"body","paramType":"body","type":"CreateCertificateJson","required":false}],"responseMessages":[{"code":200,"message":null,"responseModel":"CertificateJson"},{"code":400,"message":"If signature algorithm name not known / allowed, if already 2 valid certificates exist","responseModel":"Void"},{"code":401,"message":"Access forbidden","responseModel":"Void"},{"code":404,"message":"Unknown deviceId","responseModel":"Void"}],"deprecated":"false","type":"CertificateJson"}],"path":"/deviceManagement/gateways/{deviceId}/certificates/newProSystCertificate"},{"description":"getGatewayOpenVPNCertificate","operations":[{"method":"GET","summary":"Get current (and new) gateway OpenVPN Certificate in PEM Format","notes":"During a transition phase before the certificate expires, it is possible that two certificates are defined, the current one, and the one mPrm has requested to be put onto a gateway via USB.","nickname":"getGatewayOpenVPNCertificate","produces":["*/*"],"consumes":["application/json"],"parameters":[{"allowMultiple":false,"defaultValue":"","description":"A unique identifier of a gateway","name":"deviceId","paramType":"path","type":"string","required":true}],"responseMessages":[{"code":200,"message":null,"responseModel":"AllCertificatesJson"},{"code":401,"message":"Access forbidden","responseModel":"Void"},{"code":404,"message":"Unknown deviceId","responseModel":"Void"}],"deprecated":"false","type":"AllCertificatesJson"}],"path":"/deviceManagement/gateways/{deviceId}/certificates/openVPNCertificates"},{"description":"publishConnectionChangeEvent","operations":[{"method":"PUT","summary":"Publish a change of the gateway connection state","notes":"publishConnectionChangeEvent","nickname":"publishConnectionChangeEvent","produces":["*/*"],"consumes":["application/json"],"parameters":[{"allowMultiple":false,"defaultValue":"","description":"deviceId","name":"deviceId","paramType":"path","type":"string","required":true},{"allowMultiple":false,"defaultValue":"","description":"connectionState","name":"body","paramType":"body","type":"ConnectionStateChangeEventJson","required":false}],"responseMessages":[{"code":200,"message":null,"responseModel":"ResultJson"},{"code":401,"message":"Access forbidden","responseModel":"Void"},{"code":404,"message":"Unknown deviceId","responseModel":"Void"}],"deprecated":"false","type":"ResultJson"}],"path":"/deviceManagement/gateways/{deviceId}/connectionState"},{"description":"publishCertificateRenewalRequiredEvent","operations":[{"method":"POST","summary":"Request notification of user to put gateway online.","notes":"Request sending of user notification event that certificates must be renewed but cannot be renewed because gateway is offline.","nickname":"publishCertificateRenewalRequiredEvent","produces":["*/*"],"consumes":["application/json"],"parameters":[{"allowMultiple":false,"defaultValue":"","description":"deviceId","name":"body","paramType":"body","type":"string","required":false}],"responseMessages":[{"code":200,"message":null,"responseModel":"ResultJson"},{"code":401,"message":"Access forbidden","responseModel":"Void"},{"code":404,"message":"Unknown deviceId","responseModel":"Void"}],"deprecated":"false","type":"ResultJson"}],"path":"/deviceManagement/gateways/{deviceId}/notifications/certificateRenewalRequired"},{"description":"publishCertificateRenewalSuccessEvent","operations":[{"method":"POST","summary":"Request sending of user notification event that certificates have been successfully updated.","notes":"This may or may not trigger a notification to users, depending on business rules, such as whether a prior warning about lack of connection was sent","nickname":"publishCertificateRenewalSuccessEvent","produces":["*/*"],"consumes":["application/json"],"parameters":[{"allowMultiple":false,"defaultValue":"","description":"deviceId","name":"body","paramType":"body","type":"string","required":false}],"responseMessages":[{"code":200,"message":null,"responseModel":"ResultJson"},{"code":401,"message":"Access forbidden","responseModel":"Void"},{"code":404,"message":"Unknown deviceId","responseModel":"Void"}],"deprecated":"false","type":"ResultJson"}],"path":"/deviceManagement/gateways/{deviceId}/notifications/certificateRenewalSuccessful"},{"description":"publishVpnConnectionChangeEvent","operations":[{"method":"PUT","summary":"Publish a change of the gateway VPN connection state","notes":"publishVpnConnectionChangeEvent","nickname":"publishVpnConnectionChangeEvent","produces":["*/*"],"consumes":["application/json"],"parameters":[{"allowMultiple":false,"defaultValue":"","description":"deviceId","name":"deviceId","paramType":"path","type":"string","required":true},{"allowMultiple":false,"defaultValue":"","description":"connectionState","name":"body","paramType":"body","type":"ConnectionStateChangeEventJson","required":false}],"responseMessages":[{"code":200,"message":null,"responseModel":"ResultJson"},{"code":401,"message":"Access forbidden","responseModel":"Void"},{"code":404,"message":"Unknown deviceId","responseModel":"Void"}],"deprecated":"false","type":"ResultJson"}],"path":"/deviceManagement/gateways/{deviceId}/vpnConnectionState"}],"basePath":"/api","consumes":["application/json"],"models":{"GatewayJson":{"description":"","id":"GatewayJson","properties":{"deviceId":{"description":"A unique identifier of a gateway","required":true,"type":"string"},"gatewayName":{"description":"A display name for a gateway","required":true,"type":"string"},"locationName":{"description":"Name of the gateway location or null","required":true,"type":"string"},"isActive":{"description":"Whether the gateway is in operation (=true) or not (=false). For Lyconsyst Gateways, active is implied by whether the BU is a pseudo-BU at Lyconsyst or an end-customer BU.","required":true,"type":"boolean"},"businessUnitNames":{"description":"Name of business units that are related to the gateway. This is an arbitrarily ordered list of Business Units of the equipments attached to the gateway.","items":{"type":"string"},"required":true,"type":"array","uniqueItems":true}}},"CertificateJson":{"description":"","id":"CertificateJson","properties":{"certificate":{"description":"The certificate that is assumed to be on the Gateway in PEM Format","required":true,"type":"string"},"certificatePrivateKey":{"description":"The private key generated for the certificate","required":true,"type":"string"}}},"AllCertificatesJson":{"description":"","id":"AllCertificatesJson","properties":{"currentCertificate":{"description":"The certificate that is assumed to be on the Gateway in PEM Format","required":true,"type":"CertificateJson"},"newCertificate":{"description":"The certificate that should be put onto the gateway next in PEM Format, if any.","required":false,"type":"CertificateJson"}}},"ResultJson":{"description":"","id":"ResultJson","properties":{"status":{"enum":["ok","error"],"description":"if ok, the other fields should be null. Else, the other fields may have additional information for debugging / display","required":true,"type":"string"},"message":{"description":"Generic field, may contain the cause in case of an error","required":false,"type":"string"},"translatedMessage":{"description":"Generic field, may contain the translation in case of an error or the translation key if no translation is present","required":false,"type":"string"},"info":{"description":"Generic field, may contain additional information in some cases of an error","required":false,"type":"object"}}},"ConnectionStateChangeEventJson":{"description":"","id":"ConnectionStateChangeEventJson","properties":{"deviceId":{"description":"A unique identifier of a gateway","required":true,"type":"string"},"isOnline":{"description":"Whether the status is online (=true) or not (=false)","required":true,"type":"boolean"}}},"CreateCertificateJson":{"description":"","id":"CreateCertificateJson","properties":{"deviceId":{"description":"A unique identifier of a gateway","required":true,"type":"string"},"signatureAlgorithm":{"enum":["RSA_WITH_SSH1"],"description":"A name of the signature algorithm as accepted by JSSE providers","required":true,"type":"string"}}}},"produces":["*/*"],"resourcePath":"/deviceManagement/gateways/{deviceId}","swaggerVersion":"1.2"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment