-
Notifications
You must be signed in to change notification settings - Fork 1
/
authApi.raml
57 lines (57 loc) · 2.46 KB
/
authApi.raml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#%RAML 0.8
title: Jira Authorization API
schemas:
- userSession: !include schemas/userSession-schema.json
- credentials: !include schemas/credentials-schema.json
- credentialsReq: !include schemas/credentialsReq-schema.json
resourceTypes:
- base: !include resourceTypes/base.raml
/rest/auth/1:
type: base
/session:
type: base
get:
description: "Returns information about the currently authenticated user's session. If the caller is not authenticated they will get a 401 Unauthorized status code."
responses:
200:
body:
application/json:
schema: userSession
example: !include examples/userSession-example.json
401:
description: Returned if the caller is not authenticated.
post:
description: |
Creates a new session for a user in JIRA. Once a session has been successfully created it can be used to access any of JIRA's remote APIs and also the web UI by passing the appropriate HTTP Cookie header.
Note that it is generally preferrable to use HTTP BASIC authentication with the REST API. However, this resource may be used to mimic the behaviour of JIRA's log-in page (e.g. to display log-in errors to a user).
body:
application/json:
schema: credentialsReq
example: !include examples/credentialsReq-example.json
responses:
200:
body:
application/json:
schema: credentials
example: !include examples/credentials-example.json
401:
description: Returned if the login fails due to invalid credentials.
403:
description: Returned if the login is denied due to a CAPTCHA requirement, throtting, or any other reason. In case of a 403 status code it is possible that the supplied credentials are valid but the user is not allowed to log in at this point in time.
delete:
description: Logs the current user out of JIRA, destroying the existing session, if any.
responses:
204:
description: Returned if the user was successfully logged out.
401:
description: Returned if the caller is not authenticated.
/websudo:
type: base
delete:
description: This method invalidates the any current WebSudo session.
responses:
204:
description: Returned if no error occurs
documentation:
- title: Headline
content: !include docs/authApi/headline.md