POST

Add changeset

Stores a changeset in the audit log

Request

Request bodyapplication/json

the changeset to store

author

AuditLogAuthorRestDTO

authorId

integer

authorName

string

authorType

string

entities

array<AuditLogEntityRestDTO>

entityId

integer

entityName

string

entityType

string

entries

array<AuditLogEntryRestDTO>

eventMessage

string

Responses

returned if the given changeset was stored in audit log

POST/rest/admin/1.0/auditlog
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 curl --request POST \ --url 'http://{baseurl}/rest/rest/admin/1.0/auditlog' \ --header 'Content-Type: application/json' \ --data '{ "id": 1, "timestamp": "2017-04-26T00:00:00.000+0300", "author": { "id": 1, "name": "admin", "displayName": null, "originalName": null, "type": "USER", "subtype": null }, "authorType": null, "authorId": null, "authorName": null, "eventType": "APPLICATION_CREATED", "entityType": null, "entityId": null, "entityName": null, "entities": [ { "id": 12, "name": "Jira 7.4", "displayName": null, "originalName": null, "type": "APPLICATION", "subtype": "JIRA", "primary": true } ], "ipAddress": "127.0.0.1", "eventMessage": "Application modified", "source": null, "entries": [ { "propertyName": "name", "oldValue": "JIRA 7.2", "newValue": "Jira 7.4" } ] }'
GET

Get configuration

Retrieves current audit log configuration

Request

This request has no parameters.

Responses

returned if configuration was successfully retrieved

application/json

any

GET/rest/admin/1.0/auditlog/configuration
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/rest/admin/1.0/auditlog/configuration' \ --header 'Accept: application/json'
200Response
1 2 3 { "retentionPeriod": "UNLIMITED" }
PUT

Set configuration

Saves new audit log configuration

Request

Request bodyapplication/json

the changeset to store

retentionPeriod

string

Responses

returned if configuration was successfully saved

application/json

any

PUT/rest/admin/1.0/auditlog/configuration
1 2 3 4 5 6 7 curl --request PUT \ --url 'http://{baseurl}/rest/rest/admin/1.0/auditlog/configuration' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "retentionPeriod": "UNLIMITED" }'
200Response
1 2 3 { "retentionPeriod": "UNLIMITED" }
POST

Search

Searches audit log for entries matching given restrictions. Multiple restrictions for a single category (for example multiple authors) are treated as logical ORs - the resulting changesets must match at least one of them.Restrictions of different categories (for example specifying an author and event type) are treated as logical ANDs - the resulting changesets must match all of them

Request

Query parameters

start

integer

limit

integer

Request bodyapplication/json

search criteria

actions

array<string>

applications

array<AuditLogEntityRestrictionRestDTO>

authors

array<AuditLogAuthorRestrictionRestDTO>

beforeOrOn

string

directories

array<AuditLogEntityRestrictionRestDTO>

groups

array<AuditLogEntityRestrictionRestDTO>

onOrAfter

string

sources

array<string>

users

array<AuditLogEntityRestrictionRestDTO>

Responses

search criteria was valid and operation was successful

application/json

any

POST/rest/admin/1.0/auditlog/query
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 curl --request POST \ --url 'http://{baseurl}/rest/rest/admin/1.0/auditlog/query' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "onOrAfter": "2017-04-26T00:00:00.000+0300", "beforeOrOn": "2017-05-26T00:00:00.000+0300", "actions": [ "USER_UPDATED", "APPLICATION_CREATED" ], "sources": [], "authors": [ { "id": 1, "name": "admin", "type": "USER" }, { "id": null, "name": "jira", "type": "APPLICATION" } ], "users": [ { "id": 2, "name": "user" } ], "groups": [ { "id": 4, "name": "jira-administrators" } ], "applications": [ { "id": 5, "name": "jira" } ], "directories": [ { "id": 6, "name": "ad" } ] }'
200Response
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 { "values": [ { "id": 1, "timestamp": "2017-04-26T00:00:00.000+0300", "author": { "id": 1, "name": "admin", "displayName": null, "originalName": null, "type": "USER", "subtype": null }, "authorType": null, "authorId": null, "authorName": null, "eventType": "APPLICATION_CREATED", "entityType": null, "entityId": null, "entityName": null, "entities": [ { "id": 12, "name": "Jira 7.4", "displayName": null, "originalName": null, "type": "APPLICATION", "subtype": "JIRA", "primary": true } ], "ipAddress": "127.0.0.1", "eventMessage": "Application modified", "source": null, "entries": [ { "propertyName": "name", "oldValue": "JIRA 7.2", "newValue": "Jira 7.4" } ] } ], "size": 1, "start": 0, "limit": 1, "isLastPage": false }
POST

Get filter values

Returns a list of unique items of the chosen type that exist in changesets matching the specified search restriction

Request

Query parameters

start

integer

limit

integer

search

string

projection

string

Request bodyapplication/json

search criteria

actions

array<string>

applications

array<AuditLogEntityRestrictionRestDTO>

authors

array<AuditLogAuthorRestrictionRestDTO>

beforeOrOn

string

directories

array<AuditLogEntityRestrictionRestDTO>

groups

array<AuditLogEntityRestrictionRestDTO>

onOrAfter

string

sources

array<string>

users

array<AuditLogEntityRestrictionRestDTO>

Responses

search criteria was valid and operation was successful

application/json

any

POST/rest/admin/1.0/auditlog/query/filter
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 curl --request POST \ --url 'http://{baseurl}/rest/rest/admin/1.0/auditlog/query/filter' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "onOrAfter": "2017-04-26T00:00:00.000+0300", "beforeOrOn": "2017-05-26T00:00:00.000+0300", "actions": [ "USER_UPDATED", "APPLICATION_CREATED" ], "sources": [], "authors": [ { "id": 1, "name": "admin", "type": "USER" }, { "id": null, "name": "jira", "type": "APPLICATION" } ], "users": [ { "id": 2, "name": "user" } ], "groups": [ { "id": 4, "name": "jira-administrators" } ], "applications": [ { "id": 5, "name": "jira" } ], "directories": [ { "id": 6, "name": "ad" } ] }'
200Response
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 58 59 { "values": [ { "id": null, "timestamp": null, "author": null, "authorType": "USER", "authorId": 5, "authorName": "user1", "eventType": null, "entityType": null, "entityId": null, "entityName": null, "entities": [], "ipAddress": null, "eventMessage": null, "source": null, "entries": [] }, { "id": null, "timestamp": null, "author": null, "authorType": "USER", "authorId": null, "authorName": "user3", "eventType": null, "entityType": null, "entityId": null, "entityName": null, "entities": [], "ipAddress": null, "eventMessage": null, "source": null, "entries": [] }, { "id": 12345, "timestamp": null, "author": null, "authorType": "APPLICATION", "authorId": null, "authorName": "jira1", "eventType": null, "entityType": null, "entityId": null, "entityName": null, "entities": [], "ipAddress": null, "eventMessage": null, "source": null, "entries": [] } ], "size": 3, "start": 0, "limit": 50, "isLastPage": true }

Rate this page: