Authentication test routes allow 3rd party integrations against Suran-API to validate access to other resource routes will not throw an error due to authentication.


GET /api/v2/authenticated_test_system
Test system authentication

Headers

Header name Description
Provision
required
Web/Mobile/API Provision UUID

Returns

Code: 200

Description:

Authenticated for system request

Param name Description
data
required

Information about system request authentication

Validations:

  • Must be a Hash

data[message]
required

Message to state request was successful

Validations:

  • Must be a String

data[provision]
required

Provision header from request

Validations:

  • Must be a String

Code: 401

Description:

Unauthorized

Param name Description
errors
required

Errors returned by request

Validations:

  • Must be an Array of nested elements

errors[error]
required

Why the request failed

Validations:

  • Must be a String

errors[status]
required

HTTP response code

Validations:

  • Must be a Integer

Code: 404

Description:

Not Found

Param name Description
errors
required

Errors returned by request

Validations:

  • Must be an Array of nested elements

errors[error]
required

Why the request failed

Validations:

  • Must be a String

errors[status]
required

HTTP response code

Validations:

  • Must be a Integer

Code: 422

Description:

Unprocessable Entity

Param name Description
errors
required

Errors returned by request

Validations:

  • Must be an Array of nested elements

errors[error]
required

Why the request failed

Validations:

  • Must be a String

errors[status]
required

HTTP response code

Validations:

  • Must be a Integer

Code: 500

Description:

Internal Server Error

Param name Description
errors
required

Errors returned by request

Validations:

  • Must be an Array of nested elements

errors[error]
required

Why the request failed

Validations:

  • Must be a String

errors[status]
required

HTTP response code

Validations:

  • Must be a Integer

Errors

Code Description
404 Data source query failed
422 Invalid parameter(s)
422 Provision header missing
422 Invalid provision
422 Under maintenance
422 Incorrect host for provision
422 Establishing session failed
422 Privilege to perform the action was not found
500 No connection to data source

Examples

GET /api/v2/authenticated_test_system
200
{
  "data": {
    "message": "System request authenticated",
    "provision": "3fd36f9a-a02e-11e5-a8b2-8cfcc2b18ac3"
  }
}

GET /api/v2/authenticated_test_session
Test session authentication

Also see login endpoint for starting authenticated session and logout endpoint for ending authenticated session .

Headers

Header name Description
Cookie
required
Login session cookie
Provision
required
Web/Mobile/API Provision UUID

Returns

Code: 200

Description:

Authenticated for session request

Param name Description
data
required

Information about system request authentication

Validations:

  • Must be a Hash

data[message]
required

Message to state request was successful

Validations:

  • Must be a String

data[provision]
required

Provision header from request

Validations:

  • Must be a String

Code: 401

Description:

Unauthorized

Param name Description
errors
required

Errors returned by request

Validations:

  • Must be an Array of nested elements

errors[error]
required

Why the request failed

Validations:

  • Must be a String

errors[status]
required

HTTP response code

Validations:

  • Must be a Integer

Code: 404

Description:

Not Found

Param name Description
errors
required

Errors returned by request

Validations:

  • Must be an Array of nested elements

errors[error]
required

Why the request failed

Validations:

  • Must be a String

errors[status]
required

HTTP response code

Validations:

  • Must be a Integer

Code: 422

Description:

Unprocessable Entity

Param name Description
errors
required

Errors returned by request

Validations:

  • Must be an Array of nested elements

errors[error]
required

Why the request failed

Validations:

  • Must be a String

errors[status]
required

HTTP response code

Validations:

  • Must be a Integer

Code: 500

Description:

Internal Server Error

Param name Description
errors
required

Errors returned by request

Validations:

  • Must be an Array of nested elements

errors[error]
required

Why the request failed

Validations:

  • Must be a String

errors[status]
required

HTTP response code

Validations:

  • Must be a Integer

Errors

Code Description
404 Data source query failed
422 Invalid parameter(s)
422 Provision header missing
422 Invalid provision
422 Under maintenance
422 Incorrect host for provision
422 Establishing session failed
422 Privilege to perform the action was not found
422 Not logged in
422 Provision does not match logged in provision
500 No connection to data source

Examples

GET /api/v2/authenticated_test_session
200
{
  "data": {
    "message": "Session request authenticated",
    "provision": "3fd36f9a-a02e-11e5-a8b2-8cfcc2b18ac3"
  }
}