Skip to content

Instantly share code, notes, and snippets.

@Krasnyanskiy
Last active August 29, 2015 14:27
Show Gist options
  • Save Krasnyanskiy/b7a592d842742c7291dd to your computer and use it in GitHub Desktop.
Save Krasnyanskiy/b7a592d842742c7291dd to your computer and use it in GitHub Desktop.
POST /rest/login HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: Jersey/2.13 (HttpUrlConnection 1.7.0_79)
Host: localhost:8085
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
Content-Length: 41
j_username=superuser&j_password=superuserGET /rest_v2/users HTTP/1.1
Accept: application/json
Cookie: JSESSIONID=37ACF82EA65FB207147BF967EF849DEF
User-Agent: Jersey/2.13 (HttpUrlConnection 1.7.0_79)
Host: 172.28.146.2:4444
Connection: keep-alive
@Krasnyanskiy
Copy link
Author

Response

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
P3P: CP="ALL"
Set-Cookie: JSESSIONID=37ACF82EA65FB207147BF967EF849DEF; Path=/; HttpOnly
Content-Type: text/xml;charset=UTF-8
Content-Length: 0
Date: Tue, 11 Aug 2015 12:58:59 GMT

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Cache-Control: private
Expires: Thu, 01 Jan 1970 03:00:00 EET
P3P: CP="ALL"
Set-Cookie: userLocale=en_US;Expires=Wed, 12-Aug-2015 12:58:59 GMT;HttpOnly
Start-Index: 0
Result-Count: 6
Total-Count: 6
Content-Type: application/json
Transfer-Encoding: chunked
Date: Tue, 11 Aug 2015 12:58:59 GMT

4d6

{
  "user": [
    {
      "username": "CaliforniaUser",
      "fullName": "California User",
      "externallyDefined": false,
      "tenantId": "organization_1",
      "type": "com.jaspersoft.jasperserver.api.metadata.user.domain.User",
      "identifier": "user:/organization_1/CaliforniaUser"
    },
    {
      "username": "anonymousUser",
      "fullName": "anonymousUser",
      "externallyDefined": false,
      "type": "com.jaspersoft.jasperserver.api.metadata.user.domain.User",
      "identifier": "user:/anonymousUser"
    },
    {
      "username": "demo",
      "fullName": "Demo User",
      "externallyDefined": false,
      "tenantId": "organization_1",
      "type": "com.jaspersoft.jasperserver.api.metadata.user.domain.User",
      "identifier": "user:/organization_1/demo"
    },
    {
      "username": "jasperadmin",
      "fullName": "jasperadmin User",
      "externallyDefined": false,
      "tenantId": "organization_1",
      "type": "com.jaspersoft.jasperserver.api.metadata.user.domain.User",
      "identifier": "user:/organization_1/jasperadmin"
    },
    {
      "username": "joeuser",
      "fullName": "Joe User",
      "externallyDefined": false,
      "tenantId": "organization_1",
      "type": "com.jaspersoft.jasperserver.api.metadata.user.domain.User",
      "identifier": "user:/organization_1/joeuser"
    },
    {
      "username": "superuser",
      "fullName": "superuser",
      "externallyDefined": false,
      "type": "com.jaspersoft.jasperserver.api.metadata.user.domain.User",
      "identifier": "user:/superuser"
    }
  ]
}

0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment