Events

Get a list of events

GET /api/{spaceId}/events

Also reachable at /api/events, /api/spaces/{spaceIdentifier}/events.

A list of all audit events collected to date, ordered by the date of the event in descending order. Events can be filtered by various criteria and can be returned as a csv file when the optional parameter ‘asCsv’ is set to true.

Path Parameters

  • spaceId string (required)

Query Parameters

  • asCsv boolean
    Returns list of events as a csv file when set to true.
  • documentTypes array of string
    The document types to be matched, provided as a comma separated list of strings.
  • environments array of string
    The environment ids to be matched, provided as a comma separated list of strings.
  • eventAgents array of string
    The event agents to be matched, provided as a comma separated list of strings.
  • eventCategories array of string
    The event categories to be matched, provided as a comma separated list of strings.
  • eventGroups array of string
    The event groups to be matched, provided as a comma separated list of strings.
  • excludeDifference boolean
    Omits the change details of all events when set to true.
  • from string
    Filter events that occurred after this datetime. Format date-time.
  • fromAutoId integer
    Filter events after specified autoId.
  • ids string
    The event ids to be matched, provided as a comma separated list of strings.
  • includeInternalEvents boolean
    Exclude the machine-related CRUD events that were added for auto-deploy events.
  • projectGroups array of string
    The project group ids to be matched, provided as a comma separated list of strings.
  • projects array of string
    The project ids to be matched, provided as a comma separated list of strings.
  • regarding array of string
    The related document ids to be matched, provided as a comma separated list of strings.
  • regardingAny array of string
    The related document ids to be matched, provided as a comma separated list of strings.
  • skip integer
    Number of items to skip. Defaults to zero. Minimum 0.
  • tags array of string
    The canonical tag ids to be matched, provided as a comma separated list of strings.
  • take integer
    Number of items to take. Defaults to 30. Minimum 0.
  • tenants array of string
    The tenant ids to be matched, provided as a comma separated list of strings.
  • to string
    Filter events that occurred before this datetime. Format date-time.
  • toAutoId integer
    Filter events before specified autoId.
  • user string
  • users array of string
    The user ids to be matched, provided as a comma separated list of strings.

Response

200 — OK

Return the list of event agents

GET /api/{spaceId}/events/agents

Also reachable at /api/events/agents, /api/spaces/{spaceIdentifier}/events/agents.

Path Parameters

  • spaceId string (required)

Response

200 — The requested event agents

  • Id string
  • Links object
  • Name string

Example Response

JSON
[
  {
    "Id": "string",
    "Links": {
      "additionalProp1": "string",
      "additionalProp2": "string",
      "additionalProp3": "string"
    },
    "Name": "string"
  }
]

List event categories

GET /api/{spaceId}/events/categories

Also reachable at /api/events/categories, /api/spaces/{spaceIdentifier}/events/categories.

Path Parameters

  • spaceId string (required)

Query Parameters

  • appliesTo string

Response

200 — The requested Event Categories

  • Id string
  • Links object
  • Name string

Example Response

JSON
[
  {
    "Id": "string",
    "Links": {
      "additionalProp1": "string",
      "additionalProp2": "string",
      "additionalProp3": "string"
    },
    "Name": "string"
  }
]

List subscription event document types

GET /api/{spaceId}/events/documenttypes

Also reachable at /api/events/documenttypes, /api/spaces/{spaceIdentifier}/events/documenttypes.

Path Parameters

  • spaceId string (required)
    The ID of the space containing the resource(s).

Response

200 — A list of subscription event document types.

  • Id string
  • Name string

Example Response

JSON
[
  {
    "Id": "string",
    "Name": "string"
  }
]

List subscription event groups

GET /api/{spaceId}/events/groups

Also reachable at /api/events/groups, /api/spaces/{spaceIdentifier}/events/groups.

Path Parameters

  • spaceId string (required)
    The ID of the space containing the resource(s).

Query Parameters

  • appliesTo string
    Filter results to only include Event Groups which are related to the provided string. eg. ‘Machine’.

Response

200 — A list of subscription event groups.

  • EventCategories array of string
  • Id string
  • Links object
  • Name string

Example Response

JSON
[
  {
    "EventCategories": [
      "string"
    ],
    "Id": "string",
    "Links": {
      "additionalProp1": "string",
      "additionalProp2": "string",
      "additionalProp3": "string"
    },
    "Name": "string"
  }
]

Get a single event by ID

GET /api/{spaceId}/events/{id}

Also reachable at /api/events/{id}, /api/spaces/{spaceIdentifier}/events/{id}.

Path Parameters

  • id string (required)
    The ID of the event.
  • spaceId string (required)
    The ID of the space containing the resource(s).

Response

200 — The requested event

  • ApiKeyHint string
    Gets or sets the obfuscated hint of the API key used to authenticate the request, if applicable.
  • ApiKeyId string
    Gets or sets the ID of the API key used to authenticate the request, if applicable.
  • Category string
    Gets or sets the event category.
  • ChangeDetails object
    • Differences string
    • DocumentContext string
  • Comments string
    Gets or sets any user-provided comments that were recorded with the event.
  • Details string
    Gets or sets the details of the event. For events representing a modification to a document use the ChangeDetails property.
  • Id string
    Gets or sets a unique identifier for this resource.
  • IdentityEstablishedWith string
    Gets or sets a description of how the user performing the event identified themselves to Octopus.
  • IpAddress string
    The IP address of the user that created the event.
  • IsService boolean
    Gets or sets whether the user who created the event is a service user or an interactive user.
  • LastModifiedBy string
    Gets or sets the username of the user who last modified this resource.
  • LastModifiedOn string
    Gets or sets the date/time that this resource was last modified. Format date-time.
  • Links object
    Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
  • Message string
    Gets or sets the message text that summarizes the event.
  • MessageHtml string
    Gets or sets the message text that summarizes the event, HTML formatted with links to the related documents.
  • MessageReferences array of object
    Gets or sets an array of document ID’s and indexes where they are mentioned in the message text.
    • Length integer
    • ReferencedDocumentId string
    • StartIndex integer
  • Occurred string
    Gets or sets the date/time that the event took place. Format date-time.
  • RelatedDocumentIds array of string
    Gets or sets a collection of document ID’s that this event relates to. Note that the document ID’s may no longer exist.
  • SpaceId string
    Gets or sets the SpaceId of the event. This represents the space in which the event was raised.
  • UserAgent string
    Gets or sets the user agent header value from the request that triggered the event.
  • UserId string
    Gets or sets the ID of the user who created the event.
  • Username string
    Gets or sets the name of the user who created the event.

Example Response

JSON
{
  "ApiKeyHint": "string",
  "ApiKeyId": "string",
  "Category": "string",
  "ChangeDetails": {
    "Differences": "string",
    "DocumentContext": "string"
  },
  "Comments": "string",
  "Details": "string",
  "Id": "string",
  "IdentityEstablishedWith": "string",
  "IpAddress": "string",
  "IsService": true,
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "Message": "string",
  "MessageHtml": "string",
  "MessageReferences": [
    {
      "Length": 0,
      "ReferencedDocumentId": "string",
      "StartIndex": 0
    }
  ],
  "Occurred": "2020-01-01T00:00:00.000Z",
  "RelatedDocumentIds": [
    "string"
  ],
  "SpaceId": "string",
  "UserAgent": "string",
  "UserId": "string",
  "Username": "string"
}