REST API - Authenticate Request
10 min
/authentication/v1/loginex description generates an authentication token for the specified user blueprint exclusively supports basic authentication for the submission of credentials thereafter, a proprietary token is used to obtain a token, you must provide an authorization header with basic scheme refer to the quick start example # for more information to enable api access, please submit a ticket https //community blueprintsys com/ to the blueprint support team url structure \[blueprint uri]/authentication/v1/loginex supported methods get docid 7hm2r py7e84xk2msf11b notes you can obtain the token expiry by viewing the header of the authenticate response the token expiry is stored in the blueprinttokenexpirydate parameter of the authenticate response header http status codes 200 ok 201 successfully created 206 partial content 400 bad request this error can occur for a variety of reasons at least one uri or request body parameter is invalid, such as one of the filter docid\ sv9gjverxczcgqdn28j7u , traces, offset or limit parameters a required value has not been provided if you are submitting a post docid\ hsi lzxs8g rx ydudzkg or patch docid\ rcjvhrlby6de zgkehxui request and have not added the x http method override parameter to your request header 401 unauthorized the blueprint token is missing, invalid or expired 403 forbidden the applicable permissions are needed for example, this error can occur when an author or collaborate license is needed for access comment permissions are needed on the artifact edit permissions are needed on the change summary job 404 notfound item is not found in the project for example, this error can occur when artifact not found artifact type not found project not found alm target not found change summary job not found user does not have edit permissions for this artifact, project or alm target 409 conflict reason for failure can be found in the response body additional information may also be found in the log 411 length required if the content length header is missing in the request 413 request entity too large if the provided file size is larger than allowed 415 unsupported media type if the provided media type is not of mime multipart content "form data " 416 request range not satisfiable if offset points to a part of a collection that is not available 500 internal server error 501 not implemented examples xml examples request uri https //production blueprintcloud com/authentication/v1/login response header {'content length' '313', 'x xss protection' '1; mode=block', 'blueprinttokenexpirydate' 'thu, 28 nov 2013 17 47 20 gmt', 'x content type options' 'nosniff', 'expires' ' 1', 'server' 'blueprint', 'pragma' 'no cache', 'cache control' 'no cache', 'date' 'thu, 28 nov 2013 17 17 20 gmt', 'x frame options' 'deny', 'content type' 'application/xml; charset=utf 8', 'authorization' 'blueprinttoken c5veipebih0mng0pirntj+dvshgwzlgm3xe/obk8jj67d2lqnhqneaeki0glolw+1qdqaacqg0v0hc7qcmp+fhbkahsk6/yrzfl0mnz64vhxc4utjjpe91xfhl1b+ybbexrvtydzvgw4zrjrxt5qywosgr/jfi9hr82khfyiolnzzueq+wuj95337u3hdtyinqgdy2qj/ilezatoo9dqajx4fzoh3hkopg/bth1jxwc='} response body \<?xml version="1 0" encoding="utf 8"?>\<authenticationinfo xmlns="http //www blueprintsys com/blueprint/api/v1" xmlns\ i="http //www w3 org/2001/xmlschema instance">\<token>xejna6fkp734eh0fyj3t0rievubqejqwzaulgrzsz4ipfpkxrzybk6sgijd+xrjk1grgae7lbba6768botxcwvtfgddhyziv7dsgieu4uxj55suwdpnsw4uvicbsdendqd5b7jokes98kfddffk+chgmubw3un6i20nkoehj8kwtmz+4oo77ymrtknzjqotbto5wrfnnnd+indzk0lzqu7rmvhdhtjpxkbhez1tcaoa=\</token> \<tokenexpirationtime>2013 12 05t14 55 14 9131132z\</tokenexpirationtime> \<userdisplayname>default instance admin\</userdisplayname> \<userid>1\</userid> \<userlicense>author\</userlicense> \<username>admin\</username>\</authenticationinfo> json example request uri https //production blueprintcloud com/authentication/v1/login response header {'content length' '238', 'x xss protection' '1; mode=block', 'blueprinttokenexpirydate' 'thu, 28 nov 2013 17 20 34 gmt', 'x content type options' 'nosniff', 'expires' ' 1', 'server' 'blueprint', 'pragma' 'no cache', 'cache control' 'no cache', 'date' 'thu, 28 nov 2013 16 50 34 gmt', 'x frame options' 'deny', 'content type' 'application/json; charset=utf 8', 'authorization' 'blueprinttoken m6uf+rs0wsqd89d2rf+nw18g/rpoc4t01iecy0fxk+vjaoyjery3dc9zguk08wqq93yykx+v/j7s1kooxyy/se7/e7xgayv5a5aabtw0hh/lbvtzcvjdadbot91faamsqfurz5pvqhhnvktmais92qdfn/eu8cwryblazmhecvtt9hnmenvdlvujl33+wikw9xticluiiogqh9rgrxdowybpvegtqnuwyfunc81mf0o='} response body { "token" "dq5exjxq2tbpjtgto0eknqxwjceopfbvvgqnipb6armdic08awwxenfpxz1n/ko4w8ab+usccy3bs3idmyicfbdnuh7yyssl41buim1+4ocnpkgkhb6yuzy83018sotmjiexlzdpg5422bw/jwrtpwpbrhfzxiu9aotgh4wb9hks/xwhl3ki5idgabt9ofmwcsviwhsejmothpekjeels5ophgkk4htr2htzdszdx8e=", "tokenexpirationtime" "2013 12 05t14 54 49 1166224z", "username" "admin", "userdisplayname" "default instance admin", "userid" 1, "userlicense" "author"}