```json
{
"tests": [
{
"name": "root_endpoint_health_check",
"endpoint": "/",
"method": "GET",
"headers": {},
"payload": {},
"expected_status": 200,
"intent": "happy_path",
"expected_behavior": "Returns service metadata and a welcome message",
"metrics": ["latency", "status_code"],
"validation": {"field": "meta", "type": "object"}
},
{
"name": "list_addons_success",
"endpoint": "/addons/",
"method": "GET",
"headers": {},
"payload": {},
"expected_status": 200,
"intent": "happy_path",
"expected_behavior": "Returns a paginated list of addons",
"metrics": ["latency", "status_code", "accuracy"],
"validation": {"field": "data", "type": "array", "min_length": 1}
},
{
"name": "get_current_user_success",
"endpoint": "/users/me/",
"method": "GET",
"headers": {"Authorization": "Bearer ${OSF_TOKEN}"},
"payload": {},
"expected_status": 200,
"intent": "happy_path",
"expected_behavior": "Returns the authenticated user's profile",
"metrics": ["latency", "status_code"],
"validation": {"field": "data.type", "type": "string", "equals": "users"}
},
{
"name": "get_current_user_authenticated",
"endpoint": "/users/me/",
"method": "GET",
"headers": {},
"payload": {},
"expected_status": 401,
"intent": "auth",
"expected_behavior": "Rejects unauthenticated request to a protected endpoint",
"metrics": ["status_code"],
"validation": {"field": "errors", "type": "array", "min_length": 1}
},
{
"name": "list_nodes_success",
"endpoint": "/nodes/",
"method": "GET",
"headers": {},
"payload": {},
"expected_status": 200,
"intent": "happy_path",
"expected_behavior": "Returns a paginated list of public nodes",
"metrics": ["latency", "status_code", "accuracy"],
"validation": {"field": "data", "type": "array"}
},
{
"name": "list_nodes_filtered_success",
"endpoint": "/nodes/?filter[title]=reproducibility",
"method": "GET",
"headers": {},
"payload": {},
"expected_status": 200,
"intent": "happy_path",
"expected_behavior": "Returns nodes filtered by title substring",
"metrics": ["latency", "status_code"],
"validation": {"field": "data", "type": "array"}
},
{
"name": "list_nodes_paginated_success",
"endpoint": "/nodes/?page=2",
"method": "GET",
"headers": {},
"payload": {},
"expected_status": 200,
"intent": "happy_path",
"expected_behavior": "Returns the second page of nodes",
"metrics": ["latency", "status_code"],
"validation": {"field": "data", "type": "array"}
},
{
"name": "get_specific_node_success",
"endpoint": "/nodes/ezcuj/",
"method": "GET",
"headers": {},
"payload": {},
"expected_status": 200,
"intent": "happy_path",
"expected_behavior": "Returns the specified public node",
"metrics": ["latency", "status_code"],
"validation": {"field": "data.id", "type": "string", "equals": "ezcuj"}
},
{
"name": "get_nonexistent_node_404",
"endpoint": "/nodes/nonexistent/",
"method": "GET",
"headers": {},
"payload": {},
"expected_status": 404,
"intent": "validation",
"expected_behavior": "Returns a structured error for a non-existent node ID",
"metrics": ["status_code"],
"validation": {"field": "errors", "type": "array", "min_length": 1}
},
{
"name": "create_node_missing_required_fields",
"endpoint": "/nodes/",
"method": "POST",
"headers": {"Authorization": "Bearer ${OSF_TOKEN}"},
"payload": {
"data": {
"type": "nodes",
"attributes": {}
}
},
"expected_status": 400,
"intent": "validation",
"expected_behavior": "Rejects node creation without required 'title' and 'category' fields",
"metrics": ["status_code"],
"validation": {"field": "errors", "type": "array", "min_length": 1}
},
{
"name": "list_institutions_success",
"endpoint": "/institutions/",
"method": "GET",
"headers": {},
"payload": {},
"expected_status": 200,
"intent": "happy_path",
"expected_behavior": "Returns a paginated list of institutions",
"metrics": ["latency", "status_code"],
"validation": {"field": "data", "type": "array"}
},
{
"name": "get_institution_success",
"endpoint": "/institutions/cos/",
"method": "GET",
"headers": {},
"payload": {},
"expected_status": 200,
"intent": "happy_path",
"expected_behavior": "Returns the specified institution",
"metrics": ["latency", "status_code"],
"validation": {"field": "data.id", "type": "string", "equals": "cos"}