{
  "args": {
    "app_id": {
      "desc": "Required if calling with user token",
      "required": false
    },
    "datastore": {
      "desc": "Name of the datastore",
      "required": true,
      "type": "string"
    },
    "expression": {
      "desc": "A query filter expression",
      "example": "#artist = :artist_name",
      "required": false,
      "type": "string"
    },
    "expression_attributes": {
      "desc": "A map of attributes referenced in expression",
      "example": "{ \"#artist\": \"artist\" }",
      "required": false,
      "type": "object"
    },
    "expression_values": {
      "desc": "A map of values referenced in expression",
      "example": "{ \":artist_name\": \"Fred Rogers\" }",
      "required": false,
      "type": "object"
    }
  },
  "desc": "Count the number of items in a datastore that match a query",
  "errors": {
    "app_not_hosted": "The app developer is not using a Slack-hosted environment. App datastores are exclusively available for Slack-hosted apps.",
    "datastore_error": "Datastore error",
    "datastore_migration_in_progress": "The datastore is currently unavailable due to an in progress Enterprise org migration.",
    "free_team_not_allowed": "Datastore query not allowed on a free team.",
    "invalid_app_id": "The app\\_id provided is not valid for team and user.",
    "invalid_datastore": "The provided datastore is invalid.",
    "restricted_plan_level": "Feature is not available on this team",
    "team_quota_exceeded": "Total number of requests exceeded team quota."
  },
  "rate_limit": {
    "label": "Tier 3: 50+ per minute",
    "url": "https://docs.slack.dev/apis/web-api/rate-limits"
  },
  "scopes": {
    "bot": [
      {
        "name": "datastore:read",
        "url": "https://docs.slack.dev/reference/scopes/datastore.read"
      }
    ]
  }
}

