Streams - Query Stream By Id

Return Audit Stream with id of streamId if one exists otherwise throw

GET https://auditservice.dev.azure.com/{organization}/_apis/audit/streams/{streamId}?api-version=6.0-preview.1

URI Parameters

Name In Required Type Description
organization
path True

string

The name of the Azure DevOps organization.

streamId
path True

integer

int32

Id of stream entry to retrieve

api-version
query True

string

Version of the API to use. This should be set to '6.0-preview.1' to use this version of the api.

Responses

Name Type Description
200 OK

AuditStream

successful operation

Security

accessToken

Personal access token. Use any value for the user name and the token as the password.

Type: basic

Examples

Query a stream by its id

Sample Request

GET https://auditservice.dev.azure.com/fabrikam/_apis/audit/streams/{streamId}?api-version=6.0-preview.1

Sample Response

{
  "id": 1,
  "consumerType": "Splunk",
  "displayName": "https://input-prd-p-instance.cloud.splunk.com:8088",
  "consumerInputs": {
    "SplunkUrl": "https://input-prd-p-instance.cloud.splunk.com:8088",
    "SplunkEventCollectorToken": "************************"
  },
  "status": 1,
  "statusReason": null,
  "updatedTime": "/Date(1565715592526)/"
}

Definitions

Name Description
AuditStream

This class represents an audit stream

AuditStreamStatus

Status of the stream, Enabled, Disabled

AuditStream

This class represents an audit stream

Name Type Description
consumerInputs

object

Inputs used to communicate with external service. Inputs could be url, a connection string, a token, etc.

consumerType

string

Type of the consumer, i.e. splunk, azureEventHub, etc.

createdTime

string

The time when the stream was created

displayName

string

Used to identify individual streams

id

integer

Unique stream identifier

status

AuditStreamStatus

Status of the stream, Enabled, Disabled

statusReason

string

Reason for the current stream status, i.e. Disabled by the system, Invalid credentials, etc.

updatedTime

string

The time when the stream was last updated

AuditStreamStatus

Status of the stream, Enabled, Disabled

Name Type Description
backfilling

string

The stream is delivering old events

deleted

string

The stream has been marked for deletion

disabledBySystem

string

The stream has been disabled by the system

disabledByUser

string

The stream has been disabled by a user

enabled

string

The stream is enabled and can deliver events

unknown

string

The state has not been set, The stream is new