{"type":"api","title":"Obtain a JWT Token","meta":{"id":"/apps/pubhub/media/conp-api/b9861fe2e1aca02803f44af045abe0e5033ce2e9/262737b2-b3c2-32cd-b07b-fdbdcd23918f","info":{"title":"Cisco Optical Network Planner API","description":"Cisco Optical Network Planner api documentation","contact":{},"license":{"name":"CONP-AE-License","url":"http://www.cisco.com"},"version":"24.3.1+2024.10.03"},"x-parser-conf":{"overview":{"markdownPath":"reference/overview.md"}},"openapi":"3.0.1","securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT Authentication Token"}}},"spec":{"description":"Obtain a JWT token for authentication purposes, the token can then be used to access other protected API endpoints within the system.","tags":["authentication-controller"],"operationId":"login","summary":"Obtain a JWT Token","parameters":[{"name":"Accept","description":"Header String","in":"header","schema":{"type":"string","enum":["application/json"]}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["password","username"],"properties":{"password":{"description":"User Strong Password","type":"string","example":"1235678fr"},"username":{"description":"User Name","type":"string","example":"user"}},"description":"LoginDTO object","$$ref":"#/components/schemas/LoginDTO"}}},"required":true},"responses":{"200":{"description":"OK","headers":{"Date":{"description":"The date and time when the response was generated","schema":{"pattern":"^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \\d{1,2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \\d{4} \\d{2}:\\d{2}:\\d{2} GMT$","type":"string","example":"Thu, 15 Aug 2024 09:48:17 GMT"}},"Cache-Control":{"description":"Directives for caching mechanisms in responses","schema":{"type":"string","example":"private, no-cache, no-store, max-age=0, must-revalidate"}},"TrackingID":{"description":"A unique tracking ID for this request","schema":{"type":"string","example":"23e3c120"}}},"content":{"*/*":{"schema":{"type":"object","properties":{"passwordChangeRequired":{"description":"Password Change Required","type":"boolean","example":true},"validation":{"type":"object","properties":{"valid":{"description":"Valid","type":"boolean","example":true},"warnings":{"description":"Warnings","type":"array","items":{"type":"string"},"example":["warning-Message"]},"confirmations":{"description":"Confirmations","type":"array","items":{"type":"string"},"example":["Yes"]},"errors":{"description":"Errors","type":"array","items":{"type":"string"},"example":["invalid"]}},"description":"ValidationResults object","$$ref":"#/components/schemas/ValidationResults","example":{"valid":true}},"authentication":{"description":"Authentication","example":{"token":"yty5646-675675t","tokenLifetimeInMillis":6785555},"type":"object","properties":{"tokenLifetimeInMillis":{"format":"int64","description":"Token Lifetime in Millis","type":"integer","example":123},"token":{"description":"Token","type":"string","example":"tyuihtryui-uiopyt"}},"$$ref":"#/components/schemas/AuthDTO"}},"description":"LoginResponseDTO object","$$ref":"#/components/schemas/LoginResponseDTO"},"example":{"validation ":{"errors ":[],"warnings ":[],"confirmations":[],"valid ":true},"authentication":{"token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxM","tokenLifetimeInMills":3600000},"passwordChangeRequired":false}}}},"400":{"description":"Bad Request","headers":{"Date":{"description":"The date and time when the response was generated","schema":{"pattern":"^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \\d{1,2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \\d{4} \\d{2}:\\d{2}:\\d{2} GMT$","type":"string","example":"Thu, 15 Aug 2024 09:48:17 GMT"}},"Cache-Control":{"description":"Directives for caching mechanisms in responses","schema":{"type":"string","example":"private, no-cache, no-store, max-age=0, must-revalidate"}},"TrackingID":{"description":"A unique tracking ID for this request","schema":{"type":"string","example":"23e3c120"}}},"content":{"*/*":{"schema":{"required":["code","message"],"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"A machine-readable code identifying the error type","example":200},"message":{"type":"string","description":"A human-readable message providing more details about the error","example":"Internal server error has occurred"},"fieldValidationErrors":{"type":"array","description":"An array of field validation errors","items":{"description":"Field validation error object","type":"object","properties":{"field":{"type":"string","description":"The name of the field that has been validated","example":"baudRate"},"message":{"type":"string","description":"A human-readable message providing more details about the error","example":"Not valid number"}},"$$ref":"#/components/schemas/FieldValidationDTO"},"example":[{"field":"baudRate","message":"Not valid number"}]},"timestamp":{"type":"string","format":"date-time","description":"The timestamp in ISO format","example":"2024-09-11T09:55:23.213Z"}},"description":"ErrorInfoDTO object","$$ref":"#/components/schemas/ErrorInfoDTO"},"example":{"code":400,"error":"Bad Request","message":"JSON parse error","path":"/api/v2/users/login"}}}},"401":{"description":"Unauthorized","headers":{"Date":{"description":"The date and time when the response was generated","schema":{"pattern":"^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \\d{1,2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \\d{4} \\d{2}:\\d{2}:\\d{2} GMT$","type":"string","example":"Thu, 15 Aug 2024 09:48:17 GMT"}},"Cache-Control":{"description":"Directives for caching mechanisms in responses","schema":{"type":"string","example":"private, no-cache, no-store, max-age=0, must-revalidate"}},"TrackingID":{"description":"A unique tracking ID for this request","schema":{"type":"string","example":"23e3c120"}}},"content":{"*/*":{"schema":{"required":["code","message"],"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"A machine-readable code identifying the error type","example":200},"message":{"type":"string","description":"A human-readable message providing more details about the error","example":"Internal server error has occurred"},"fieldValidationErrors":{"type":"array","description":"An array of field validation errors","items":{"description":"Field validation error object","type":"object","properties":{"field":{"type":"string","description":"The name of the field that has been validated","example":"baudRate"},"message":{"type":"string","description":"A human-readable message providing more details about the error","example":"Not valid number"}},"$$ref":"#/components/schemas/FieldValidationDTO"},"example":[{"field":"baudRate","message":"Not valid number"}]},"timestamp":{"type":"string","format":"date-time","description":"The timestamp in ISO format","example":"2024-09-11T09:55:23.213Z"}},"description":"ErrorInfoDTO object","$$ref":"#/components/schemas/ErrorInfoDTO"},"example":{"code":401,"error":"Unauthorized","message":"Authentication is required and has failed or has not yet been provided.","path":"/api/v2/users/login"}}}},"403":{"description":"Forbidden","headers":{"Date":{"description":"The date and time when the response was generated","schema":{"pattern":"^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \\d{1,2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \\d{4} \\d{2}:\\d{2}:\\d{2} GMT$","type":"string","example":"Thu, 15 Aug 2024 09:48:17 GMT"}},"Cache-Control":{"description":"Directives for caching mechanisms in responses","schema":{"type":"string","example":"private, no-cache, no-store, max-age=0, must-revalidate"}},"TrackingID":{"description":"A unique tracking ID for this request","schema":{"type":"string","example":"23e3c120"}}},"content":{"*/*":{"schema":{"required":["code","message"],"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"A machine-readable code identifying the error type","example":200},"message":{"type":"string","description":"A human-readable message providing more details about the error","example":"Internal server error has occurred"},"fieldValidationErrors":{"type":"array","description":"An array of field validation errors","items":{"description":"Field validation error object","type":"object","properties":{"field":{"type":"string","description":"The name of the field that has been validated","example":"baudRate"},"message":{"type":"string","description":"A human-readable message providing more details about the error","example":"Not valid number"}},"$$ref":"#/components/schemas/FieldValidationDTO"},"example":[{"field":"baudRate","message":"Not valid number"}]},"timestamp":{"type":"string","format":"date-time","description":"The timestamp in ISO format","example":"2024-09-11T09:55:23.213Z"}},"description":"ErrorInfoDTO object","$$ref":"#/components/schemas/ErrorInfoDTO"},"example":{"code":403,"error":"Forbidden","message":"You are not authorized to access this operation.","path":"/api/v2/users/login"}}}},"500":{"description":"Internal Server Error","headers":{"Date":{"description":"The date and time when the response was generated","schema":{"pattern":"^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \\d{1,2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \\d{4} \\d{2}:\\d{2}:\\d{2} GMT$","type":"string","example":"Thu, 15 Aug 2024 09:48:17 GMT"}},"Cache-Control":{"description":"Directives for caching mechanisms in responses","schema":{"type":"string","example":"private, no-cache, no-store, max-age=0, must-revalidate"}},"TrackingID":{"description":"A unique tracking ID for this request","schema":{"type":"string","example":"23e3c120"}}},"content":{"*/*":{"schema":{"required":["code","message"],"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"A machine-readable code identifying the error type","example":200},"message":{"type":"string","description":"A human-readable message providing more details about the error","example":"Internal server error has occurred"},"fieldValidationErrors":{"type":"array","description":"An array of field validation errors","items":{"description":"Field validation error object","type":"object","properties":{"field":{"type":"string","description":"The name of the field that has been validated","example":"baudRate"},"message":{"type":"string","description":"A human-readable message providing more details about the error","example":"Not valid number"}},"$$ref":"#/components/schemas/FieldValidationDTO"},"example":[{"field":"baudRate","message":"Not valid number"}]},"timestamp":{"type":"string","format":"date-time","description":"The timestamp in ISO format","example":"2024-09-11T09:55:23.213Z"}},"description":"ErrorInfoDTO object","$$ref":"#/components/schemas/ErrorInfoDTO"},"example":{"timestamp":"2024-09-10T14:21:02.790+00:00","code":500,"error":"Internal Server Error","message":"No message available","path":"/api/v2/users/login"}}}}},"security":[{"bearerAuth":[]}],"__originalOperationId":"login","method":"post","path":"/api/v2/users/login"}}