Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Goal: Expose the AuditLog dataset as a REST API for consumption by the UI
    • Fields returned
      • totalResults - the total number of results for the query
      • offset - The starting offset of the first result
      • results - An array of result records with a max length of pageSize
    • REST API Design

      HTTP Request Type

      Endpoint:

      Request Params

      Response Status

      Response Body

      GET/namespaces/{namespace-id}/apps/Tracker/services/AuditLog/methods/auditlogtype - REQUIRED, name - REQUIRED, startTime - OPTIONAL - default is 0, endTime - OPTIONAL - default is Now(), offset - OPTIONAL - default is 0, pageSize - OPTIONAL - default is
      nameis RequiredDescriptionDefault Value
      typeyesThe type of the entity to search for, e.g. dataset or stream 
      nameyesThe name of the entity to search for 
      startTimenoThe start time to search for. Accepts "now - 1d" syntax0
      endTimenoThe end time to search for. Accepts "now - 1d" syntaxnow
      offsetnoThe offset to start the results at for paging0
      pageSizenoThe max number of results to return in the results10

      200 returns the audit log entries requested

      500 error while searching

      Code Block
      {
      	totalResults: 1,
      	results: [{
      		time: 1457467029557,
      		entityId: {
      			namespace: "default",
      			application: "testCubeAdapter",
      			type: "Workflow",
      			program: "ETLWorkflow",
      			entity: "PROGRAM"
      		},
      		user: "unknown",
      		type: "METADATA_CHANGE",
      		payload: {
      			previous: {
      				SYSTEM: {
      					properties: { },
      					tags: [ ]
      				}
      			},
      			additions: {
      				SYSTEM: {
      					properties: { },
      					tags: [
      						"ETLMapReduce",
      						"Batch",
      						"Workflow",
      						"ETLWorkflow"
      					]
      				}
      			},
      			deletions: {
      				SYSTEM: {
      					properties: { },
      					tags: [ ]
      				}
      			}
      		}
      	}]
      	offset: 0
      }

...