> ## Documentation Index
> Fetch the complete documentation index at: https://specbeeconsultingservices.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# GET Company Activity

> Retrieves the activity for a given company.

The most reliable method to ingest all activity from Rippling is to use a pagination cursor via the 'next' parameter. This will ensure that events are not skipped or duplicated due to the lack of timestamp precision.

The general sequence of steps to leverage the next parameter:

1. Issue an initial request using startDate with a value set to some date in the last 90 days
2. Retrieve the next page of events through the next value from the response data.
3. Issue the paginated request
4. Retrieve the next page of events through the next value from the response data
5. Pause and repeat the previous step




## OpenAPI

````yaml get /platform/api/company_activity
openapi: 3.0.0
info:
  title: API Reference
  version: '1.0'
  contact:
    name: Rippling Support
    email: support@rippling.com
  license:
    name: MIT
  description: >-
    Using Rippling's API requires either an API key or an access token retrieved
    from an OAuth exchange. Each is tied to a single Rippling Company.


    If you are a partner building an integration to Rippling,you can use
    [Rippling's Installation
    Guide](https://developer.rippling.com/docs/rippling-api/fucwnbc121hiu-installation-guide)
    to learn how to retrieve an access token to start using Rippling APIs.


    If you are a customer, you can go
    [here](https://developer.rippling.com/docs/rippling-api/9rw6guf819r5f-introduction-for-customers)
    to learn create your API keys to start using Rippling APIs.


    ### Using the Interactive Documentation


    Rippling's Documentation Portal allows you to test the API endpoints
    directly within the documentation. To do so, provide your API key or Access
    Token as a header parameter with the form Authorization Bearer: Bearer.
  termsOfService: https://app.rippling.com/developer/tos
servers:
  - url: https://api.rippling.com
    description: Production
security:
  - Token: []
tags:
  - name: A. Companies
  - name: B. Employees
  - name: C. Payroll
  - name: D. 401k
  - name: F. Groups
  - name: G. SAML
  - name: E. Current User
  - name: H. ATS
  - name: I. Application Management
  - name: J. Reports
  - name: Deprecated
paths:
  /platform/api/company_activity:
    parameters: []
    get:
      tags:
        - A. Companies
      summary: GET Company Activity
      description: >
        Retrieves the activity for a given company.


        The most reliable method to ingest all activity from Rippling is to use
        a pagination cursor via the 'next' parameter. This will ensure that
        events are not skipped or duplicated due to the lack of timestamp
        precision.


        The general sequence of steps to leverage the next parameter:


        1. Issue an initial request using startDate with a value set to some
        date in the last 90 days

        2. Retrieve the next page of events through the next value from the
        response data.

        3. Issue the paginated request

        4. Retrieve the next page of events through the next value from the
        response data

        5. Pause and repeat the previous step
      operationId: get-company_activity
      parameters:
        - schema:
            type: string
            format: date
          in: query
          name: startDate
          description: >-
            Timestamp to list activity after (inclusive). This should be less
            than 90 days from now. Defaults to 90 days.
        - schema:
            type: string
            format: date
          in: query
          name: endDate
          description: Timestamp to list activity before (inclusive).
        - schema:
            type: string
          in: query
          name: next
          description: Specifies the pagination cursor to the next page
        - schema:
            type: string
          in: query
          name: limit
          description: >-
            Specifies the number of results to page (maximum: 1000) (default:
            1000)
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    nullable: true
                    properties:
                      events:
                        type: array
                        nullable: true
                        items:
                          $ref: '#/components/schemas/Event'
                      next:
                        type: string
                  error:
                    type: string
                    nullable: true
              examples:
                Success:
                  value:
                    data:
                      events:
                        - id: 5ed7052182a6a429a4af3fb9
                          request_data: null
                          linked_events: []
                          subjects:
                            - instance: 5c6324b602bf9a760b7a4329
                              type: GROUP
                              display_name: Everyone
                              icon: null
                            - instance: 5c6324b502bf9a760b7a4318
                              type: SPOKE_USER
                              display_name: apps+test@rippling.com
                              icon: null
                            - instance: 5ca35d3b6ab9e20acc4e83e3
                              type: ROLE
                              display_name: Swag Test
                              icon: null
                          event_type: EXTERNAL_GROUP_MEMBER_REMOVE
                          timestamp: '2020-06-02T19:04:17.375000-07:00'
                          company: 595f75ffd2a5f80ae22ce88e
                          spoke: 5c63187a3698be3692ce328f
                          owner: 5c63232bc5929135ddadbfab
                          initiator:
                            type: EXTERNAL
                            role: null
                            display_name: External
                            icon: null
                          event_reason:
                            reason: CHANGE_SYNCED_FROM_EXTERNAL_APP
                            message: Activity emanated from External App
                          name: Account removed from group
                      next: 5f4d9d82f6c26e0a83aa6ea8
                    error: null
      security:
        - Token: []
components:
  schemas:
    Event:
      title: Event
      type: object
      description: |
        The event model for company activity.

        Please note, the event type can be one of the following:

        - EXTERNAL_ACCONT_CREATE
        - EXTERNAL_ACCOUNT_INVITE
        - EXTERNAL_ACCOUNT_DELETE
        - EXTERNAL_ACCOUNT_SUSPEND
        - EXTERNAL_ACCOUNT_PASSWORD_RESET
        - EXTERNAL_GROUP_ADD
        - EXTERNAL_GROUP_REMOVE
        - EXTERNAL_GROUP_MEMBER_REMOVE
        - EXTERNAL_GROUP_MEMBER_ADD
        - EXTERNAL_SSO_GRANT
        - EXTERNAL_SSO_REVOKE
        - EXTERNAL_SSO_SIGNIN
        - RPASS_ITEM_SHARED
        - RPASS_ITEM_UNSHARED
        - RPASS_ITEM_USED
        - USER_LOGIN_SUCCESS
        - USER_LOGIN_FAILED
        - ACCOUNT_PASSWORD_RESET
        - ACCOUNT_PASSWORD_CHANGED
        - TWO_FACTOR_DEVICE_RESET
      properties:
        id:
          type: string
          description: Unique identifier of the event.
        request_data:
          type: object
          nullable: true
          description: Geographic details from where the event was recorded.
          properties:
            ip:
              type: string
              description: Event IP addresss.
            city:
              type: string
              description: City the event was triggered from.
            country:
              type: string
              description: Country the event was triggered from.
            latitude:
              type: string
              description: Latitude the event was triggered from.
            longitude:
              type: string
              description: Longitude the event was triggered from.
        linked_events:
          type: array
          description: An array of event identifiers that are linked to the event.
          items:
            type: string
        subjects:
          type: array
          description: The list of objects of the event.
          items:
            type: object
            nullable: true
            properties:
              instance:
                type: string
                description: Unique key for the event object.
              type:
                type: string
                description: An ENUM value for the type of object.
                enum:
                  - ROLE
                  - SPOKE
                  - RPASS_ITEM
                  - SPOKE_USER
                  - GROUP
              display_name:
                type: string
                description: Name used within Rippling.
              icon:
                type: string
                nullable: true
                description: Icon used within Rippling.
        event_type:
          type: string
          description: An ENUM value for the type of the event.
          enum:
            - EXTERNAL_ACCOUNT_CREATE
            - EXTERNAL_ACCOUNT_INVITE
            - EXTERNAL_ACCOUNT_DELETE
            - EXTERNAL_ACCOUNT_SUSPEND
            - EXTERNAL_ACCOUNT_PASSWORD_RESET
            - EXTERNAL_GROUP_ADD
            - EXTERNAL_GROUP_REMOVE
            - EXTERNAL_SSO_GRANT
            - EXTERNAL_SSO_REVOKE
            - EXTERNAL_SSO_SIGNIN
            - RPASS_ITEM_SHARED
            - RPASS_ITEM_UNSHARED
            - RPASS_ITEM_USED
            - USER_LOGIN_SUCCESS
            - USER_LOGIN_FAILED
            - ACCOUNT_PASSWORD_RESET
            - ACCOUNT_PASSWORD_CHANGED
            - TWO_FACTOR_DEVICE_RESET
            - EXTERNAL_GROUP_MEMBER_REMOVE
        timestamp:
          type: string
          description: Timestamp at which the event was recorded.
        company:
          type: string
          description: Unique identifier for the company.
        spoke:
          type: string
          nullable: true
          description: >-
            Unique identifier for the external application for which the event
            was recorded. This will be Null for events that don't correspond to
            an external appliction (e.g. Rippling system and RPass events).
        initiator:
          type: object
          nullable: true
          description: The actor of the event.
          properties:
            type:
              type: string
              description: ENUM value for the type of actor.
              enum:
                - ROLE
                - SYSTEM
                - EXTERNAL
            role:
              type: string
              nullable: true
              description: >-
                A unique identifier for the employee that initiated the action,
                if the type is ROLE.
            display_name:
              type: string
              description: The name used within Rippling.
            icon:
              type: string
              nullable: true
              description: The icon used within Rippling.
        event_reason:
          type: object
          nullable: true
          description: Reason for the event, tied to the type of eveent.
          properties:
            reason:
              type: string
              description: Reason for the event.
            message:
              type: string
              description: Message of the event.
        name:
          type: string
          description: Display name for the event, tied to the type of event.
      x-tags:
        - Models
  securitySchemes:
    Token:
      type: http
      scheme: bearer

````