Browse Community Interaction

beta · api · 0.1.0

Read anonymous aggregate reaction counts

GET /api/v1/community/comments/{commentId}/reactions

Capability Domain: Community Interaction

Authentication

projectCredential (reactions:read)

Scope: reactions:read

Parameters and request body

  • X-Correlation-ID — header, optional
    X-Correlation-ID schema
    {
        "type": "string",
        "format": "uuid"
    }
  • commentId — path, required
    commentId schema
    {
        "type": "string",
        "format": "uuid"
    }
  • resource_type — query, required
    resource_type schema
    {
        "type": "string",
        "maxLength": 120
    }
  • resource_id — query, required
    resource_id schema
    {
        "type": "string",
        "maxLength": 255
    }

Responses and errors

StatusDescription
200Anonymous aggregate reaction counts
401Invalid or revoked Project Credential
403Project Credential lacks the required scope
422Request violates the public contract

200 schema

200 response schema
{
    "type": "object",
    "required": [
        "data"
    ],
    "properties": {
        "data": {
            "type": "object",
            "additionalProperties": false,
            "required": [
                "comment_id",
                "counts"
            ],
            "properties": {
                "comment_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "counts": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                        "like",
                        "celebrate",
                        "insightful",
                        "support"
                    ],
                    "properties": {
                        "like": {
                            "type": "integer",
                            "minimum": 0
                        },
                        "celebrate": {
                            "type": "integer",
                            "minimum": 0
                        },
                        "insightful": {
                            "type": "integer",
                            "minimum": 0
                        },
                        "support": {
                            "type": "integer",
                            "minimum": 0
                        }
                    }
                }
            }
        }
    }
}

401 schema

401 response schema
{
    "type": "object",
    "required": [
        "error"
    ],
    "properties": {
        "error": {
            "type": "object",
            "required": [
                "code",
                "message",
                "retryable",
                "correlation_id",
                "details"
            ],
            "properties": {
                "code": {
                    "type": "string"
                },
                "message": {
                    "type": "string"
                },
                "retryable": {
                    "type": "boolean"
                },
                "correlation_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "details": {
                    "type": "object"
                }
            }
        }
    }
}

403 schema

403 response schema
{
    "type": "object",
    "required": [
        "error"
    ],
    "properties": {
        "error": {
            "type": "object",
            "required": [
                "code",
                "message",
                "retryable",
                "correlation_id",
                "details"
            ],
            "properties": {
                "code": {
                    "type": "string"
                },
                "message": {
                    "type": "string"
                },
                "retryable": {
                    "type": "boolean"
                },
                "correlation_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "details": {
                    "type": "object"
                }
            }
        }
    }
}

422 schema

422 response schema
{
    "type": "object",
    "required": [
        "error"
    ],
    "properties": {
        "error": {
            "type": "object",
            "required": [
                "code",
                "message",
                "retryable",
                "correlation_id",
                "details"
            ],
            "properties": {
                "code": {
                    "type": "string"
                },
                "message": {
                    "type": "string"
                },
                "retryable": {
                    "type": "boolean"
                },
                "correlation_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "details": {
                    "type": "object"
                }
            }
        }
    }
}

200 example

200 response example
{
    "data": {
        "comment_id": "51000000-0000-4000-8000-000000000001",
        "counts": {
            "like": 3,
            "celebrate": 1,
            "insightful": 0,
            "support": 2
        }
    }
}

Idempotency

Safe read; repeated requests do not change reaction state.