Audit Logs

Available in SwaggerHub SaaS, SwaggerHub On-Premise 1.19.1 and later.

Organization owners can download the audit log to review the changes made to the organization, its APIs and domain within the last 90 days. The audit log contains details about the actions performed, who performed the action, and when it was performed.

Download the audit log

Organization owners can download the audit log in the CSV format from the Organization Settings page:

  1. Go to My Hub and click next to the organization name in the sidebar.

    – or –

    In SwaggerHub On-Premise 1.21 and earlier: click your username and select Settings. Then switch to the My Organizations tab and click Details next to the organization name.

  2. Under Audit Logs, click Download CSV.

    Download the organization audit log

Log format

The audit log is a CSV file that contains the following fields:

Field name

Description

AUTHOR

The user who triggered the event.

ORGANIZATION

The organization name. This is the organization whose audit log you downloaded.

EVENT_TYPE

The event type.

DATA

A JSON object containing the event details.

Note: This JSON object uses single quotes (') instead of double quotes (") around the key names and values. To parse this data with JSON parsers, you will need to first replace ' with ".

TIME

The event timestamp in the YYYY-MM-DD HH:MM:SS.ZZZZZZ format. All timestamps are UTC.

Event types

Note

In SwaggerHub On-Premise, audit logs downloaded by the admin user include additional NEW_USER, LOGIN_USER, and USER_CHANGE events that are not available to non-admin owners.

APIs and domains

Event type

Description

API_LIFECYCLE

An API was published or unpublished.

API_RENAME

An API was renamed.

API_SAVED

An API definition was updated (saved in the editor).

API_TRANSFER

An API was transferred from or to your organization.

DOMAIN_LIFECYCLE

A domain was published or unpublished.

DOMAIN_SAVED

A domain definition was updated (saved in the editor).

DOMAIN_TRANSFER

A domain was transferred from or to your organization.

FORK_API

An organization-owned API was forked, or someone else’s API was forked into your organization.

FORK_DOMAIN

An organization-owned domain was forked, or someone else’s domain was forked into your organization.

NEW_API

A new API was created or imported into the organization.

NEW_API_VERSION

A new version of an API was created.

NEW_DOMAIN

A new domain was created in the organization.

NEW_DOMAIN_VERSION

A new version of a domain was created.

NEW_DRAFT_API

An API draft was auto-saved while a user was editing this API in the SwaggerHub editor. (Drafts are auto-saved every 2 minutes.)

NEW_DRAFT_DOMAIN

A domain draft was auto-saved while a user was editing this domain in the SwaggerHub editor. (Drafts are auto-saved every 2 minutes.)

REMOVE_API

An API was deleted.

REMOVE_API_VERSION

A specific version of an API was deleted.

REMOVE_DOMAIN

A domain was deleted.

REMOVE_DRAFT_API

A user reverted unsaved API changes by using the Revert to Last Saved command in the SwaggerHub editor.

REMOVE_DRAFT_DOMAIN

A user reverted unsaved domain changes by using the Revert to Last Saved command in the SwaggerHub editor.

REMOVE_DOMAIN_VERSION

A specific version of a domain was deleted.

RENAME_DOMAIN

A domain was renamed.

Organizations, teams and users

Event type

Description

ACCEPT_ORG_MEMBER_INVITE

A user accepted an invitation to join the organization.

BILLING_CHANGE

(SwaggerHub SaaS only.) The organization’s billing information was changed.

LOGIN_USER

(SwaggerHub On-Premise only.) An organization member has logged in to SwaggerHub. The username is specified in the name field in the event data.

Note: This event is included only in audit logs downloaded by the admin user.

NEW_COLLABORATION

A new role was assigned to an existing organization member (either an organization member role or an API/domain collaborator role). For example, a user was added as an Editor collaborator to an API or domain, or a Consumer member was made a Designer.

NEW_ORGANIZATION

The organization was created.

NEW_ORGANIZATION_MEMBER

A user was invited to join the organization. In SwaggerHub On-Premise, this event is also triggered when a new user automatically joins the default organization.

NEW_TEAM

A new team was created in the organization.

NEW_TEAM_MEMBER

A user was added to a team.

NEW_USER

(SwaggerHub On-Premise only.) A new user was created in SwaggerHub.

Note: This event is included only in audit logs downloaded by the admin user.

ORGANIZATION_CHANGE

Organization details were changed. Possible changes include the organization name, description, email address, location, or website.

PRODUCT_PLAN_CHANGE

(SwaggerHub SaaS only.) The organization’s billing plan or payment method was changed.

PRODUCT_PLAN_CANCELLATION_SCHEDULED

(SwaggerHub SaaS only.) The organization’s billing plan is pending cancellation.

REMOVE_COLLABORATION

A specific role was removed from an organization member. For example, this user was removed from API collaborators.

REMOVE_ORGANIZATION_MEMBER

A user left the organization or was removed from the organization by an owner.

REMOVE_TEAM

A team was deleted.

REMOVE_TEAM_MEMBER

A user was removed from a team.

UPDATE_ORGANIZATION_MEMBER

A user’s role in the organization was changed. For example, a user was made an owner.

USER_CHANGE

(SwaggerHub On-Premise only.) A user updated their username, email address or password. The old and new values (other than passwords) are specified in the oldValue and newValue fields in the event data.

Note: This event is included only in audit logs downloaded by the admin user.

Terms and conditions (SwaggerHub On-Premise 1.22.0 and later)

The following events are related to custom terms and conditions. These events are always added to the audit log of the default organization regardless of the actual user membership.

Event type

Description

ACCEPTED_TERMS_AND_CONDITIONS

A user accepted custom terms and conditions at signup or login.

CANCELLED_TERMS_AND_CONDITIONS

A user did not accept custom terms and conditions at signup or login.

PUBLISHED_TERMS_AND_CONDITIONS

The admin has enabled, disabled, or updated custom terms and conditions in the Admin Center.

See Also

Publication date: