Login: Swarm login

Login to Swarm with SAML

Summary

Login to Swarm with SAML

POST /api/v11/saml/login

Description

Login to Swarm with SAML.

Parameters

Parameter Description Type Parameter Type Required

redirect

Options are:

  • true or not specified: Swarm redirects the user to the HTTP_REFERER url or to the specified custom logout_url if it has been set.
  • false: Swarm does not redirect the user.

string

query

No

Example usage

Login in to Swarm with SAML

Login in to Swarm with SAML.

curl -X POST -u "super:<ticket>" "https://myswarm-url/api/v11/saml/login"

On successful login Swarm responds with:

HTTP/1.1 200 OK		

{
  "error": null,
  "messages": [],
  "data" : {
    "isValid": "true",
    "url": "<url to redirect to>"
  }
}

Login in to Swarm with SAML and redirect=false

Login in to Swarm with SAML and redirect=false

curl -X POST -u "super:<ticket>" "https://myswarm-url/api/v11/saml/login?redirect=false"

On successful login Swarm responds with:

HTTP/1.1 200 OK		

{
  "error": null,
  "messages": [],
  "data" : {
    "isValid": "true"
  }
}

If a request fails

<error code>:

    400 Error occurred with the SAML login

HTTP/1.1 <response error code>		

{
  "error": <error code>,
  "messages": [{
    "code" : "<code string>",
    "text" : "<error message>"
  }],
  "data" : null
}