openapi: 3.0.3 info: description: Session ID Authentication Test version: 1.0.0 title: REST API Specification servers: - url: 'http://{deviceIP}/wcd?' variables: deviceIP: # default: 10.5.226.134 default: 10.5.226.150 description: Device IP Address tags: - name: Login description: 'Login to the device with usename and password' - name: Keep-alive request description: 'Periodically sending keep-alive request' paths: /System.xml: get: tags: - Login summary: Login request. description: >- The server response includes a sessionID in HTTP header in case of successful authentication. parameters: - name: action in: query description: login action required: true schema: type: string enum: - login - logout example: login - name: user in: query description: login username required: true schema: type: string example: marvell - name: password in: query description: login password required: true schema: type: string example: Marvell123 responses: '200': description: An XML object headers: sessionID: schema: type: string description: The sessionID returned by the server after successful authentication content: application/xml: schema: $ref: '#/components/schemas/ResponseData' # ----------------------------------------------------- # Links # ----------------------------------------------------- links: GetNewSessionID: # <---- Name of the link operationId: getSessionID parameters: sessionID: '$response.header.sessionID' description: > The `sessionID` should be returned in the server response # ------------------------------------------------------------- /device/authenticate_user.xml: get: tags: - Keep-alive request summary: Keep-alive request operationId: getSessionID parameters: - in: header name: sessionID schema: type: string required: true responses: '200': description: An XML object content: application/xml: schema: $ref: '#/components/schemas/ResponseData' components: schemas: ResponseData: type: object xml: name: ResponseData properties: ActionStatus: $ref: '#/components/schemas/ActionStatus' ActionStatus: type: object xml: name: ActionStatus properties: version: type: string requestURL: type: string statusCode: type: integer deviceStatusCode: type: integer statusString: type: string example: OK