Common Room · Schema

ApiActivity

Information about an activity that occurred

Community IntelligenceGo-to-MarketMember SignalsGitHubSlackDiscordLinkedInSales IntelligenceContact ManagementWebhooks

Properties

Name Type Description
id string Unique identifier for the activity within this source. This ID must be unique for each individual activity, and should be generated by the third party system you are pulling data from (this ID does _n
activityType string Type of activity being added or edited. Check /activityTypes route for accepted values. Used to deduplicate and keep the latest values for a given activity when combined with the id.
user object
activityTitle object An optional title to use when rendering the activity. Useful for things like a post title, merge request title, etc.
content object Optional content to display when rendering the activity, used to hold a message which was posted or information about what occurred.
timestamp string Time the activity occurred, in standard ISO 8601 format (YYYY-MM-DDThh:mm:ss.sssZ). Current UTC time is used if not supplied
url string URL pointing to the activity on a third party source, allows linking from Common Room to the source activity
tags array Optional list of activity tags to assign to this activity
parentActivity object Optional field which allows for "conversational threading", structuring activities as nested, associated with or in reply to another activity.
subSource object Optional "sub source" the activity took place in. This allows further sub-dividing the sources data into third-party concepts like a slack channel, github repository or meetup group. Common examples i
View JSON Schema on GitHub

JSON Schema

common-room-core-apiactivity-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://api.commonroom.io/schemas/core/apiactivity",
  "title": "ApiActivity",
  "type": "object",
  "description": "Information about an activity that occurred",
  "properties": {
    "id": {
      "description": "Unique identifier for the activity within this source. This ID must be unique for each individual activity, and should be generated by the third party system you are pulling data from (this ID does _not_ come from Common Room). Used to deduplicate and keep the latest values for a given activity when combined with the activityType.",
      "type": "string"
    },
    "activityType": {
      "description": "Type of activity being added or edited. Check /activityTypes route for accepted values. Used to deduplicate and keep the latest values for a given activity when combined with the id.",
      "type": "string"
    },
    "user": {
      "$ref": "#/components/schemas/ApiUser"
    },
    "activityTitle": {
      "description": "An optional title to use when rendering the activity. Useful for things like a post title, merge request title, etc.",
      "type": "object",
      "oneOf": [
        {
          "$ref": "#/components/schemas/TextContent"
        }
      ],
      "discriminator": {
        "propertyName": "type",
        "mapping": {
          "text": "#/components/schemas/TextContent"
        }
      },
      "nullable": true
    },
    "content": {
      "description": "Optional content to display when rendering the activity, used to hold a message which was posted or information about what occurred.",
      "type": "object",
      "oneOf": [
        {
          "$ref": "#/components/schemas/TextContent"
        },
        {
          "$ref": "#/components/schemas/MarkdownContent"
        }
      ],
      "discriminator": {
        "propertyName": "type",
        "mapping": {
          "text": "#/components/schemas/TextContent",
          "markdown": "#/components/schemas/MarkdownContent"
        }
      },
      "nullable": true
    },
    "timestamp": {
      "description": "Time the activity occurred, in standard ISO 8601 format (YYYY-MM-DDThh:mm:ss.sssZ). Current UTC time is used if not supplied",
      "type": "string",
      "format": "date-time"
    },
    "url": {
      "description": "URL pointing to the activity on a third party source, allows linking from Common Room to the source activity",
      "type": "string",
      "nullable": true
    },
    "tags": {
      "description": "Optional list of activity tags to assign to this activity",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ApiTagAssignment"
      }
    },
    "parentActivity": {
      "description": "Optional field which allows for \"conversational threading\", structuring activities as nested, associated with or in reply to another activity.",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier of another activity which should be treated as a conversational \"parent\" of this activity."
        },
        "activityType": {
          "type": "string",
          "description": "Activity type of the parent activity"
        }
      },
      "required": [
        "id",
        "activityType"
      ],
      "nullable": true
    },
    "subSource": {
      "description": "Optional \"sub source\" the activity took place in. This allows further sub-dividing the sources data into third-party concepts like a slack channel, github repository or meetup group. Common examples include a slack channel name, meetup group hosting an event, a github repo an issue was created in.",
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "name"
          ]
        },
        "name": {
          "type": "string",
          "description": "Name of the sub source",
          "example": "slack-channel-1"
        }
      },
      "required": [
        "type",
        "name"
      ],
      "nullable": true
    }
  },
  "required": [
    "id",
    "activityType",
    "user"
  ]
}