Repository navigation
Expand file tree
/
Copy pathtest.http
More file actions
97 lines (71 loc) · 2.75 KB
/
Copy pathtest.http
File metadata and controls
97 lines (71 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
### SciFIND Backend API Tests
### Test file for HTTP requests to the SciFIND Backend server
### Use with VS Code REST Client extension or similar tools
@baseUrl = http://localhost:8080
### Root endpoint - Basic server info
GET {{baseUrl}}/
### Health check endpoints
GET {{baseUrl}}/health
### Liveness probe
GET {{baseUrl}}/health/live
### Readiness probe
GET {{baseUrl}}/health/ready
### API documentation endpoint
GET {{baseUrl}}/docs
### Search for papers - Basic query
GET {{baseUrl}}/v1/search?query=quantum+computing&limit=5
### Search with more parameters
GET {{baseUrl}}/v1/search?query=machine+learning&limit=10&sort=relevance&year_from=2020
### Search with specific provider filter
GET {{baseUrl}}/v1/search?query=artificial+intelligence&providers=arxiv,semantic_scholar&limit=3
### Get search providers list
GET {{baseUrl}}/v1/search/providers
### Get provider metrics
GET {{baseUrl}}/v1/search/providers/metrics
### Get specific paper by provider and ID (example - replace with actual ID)
GET {{baseUrl}}/v1/search/papers/arxiv/2301.12345
### List papers (local database)
GET {{baseUrl}}/v1/papers
### Get specific paper by ID (example - replace with actual UUID)
GET {{baseUrl}}/v1/papers/550e8400-e29b-41d4-a716-446655440000
### Create a new paper (POST request)
POST {{baseUrl}}/v1/papers
Content-Type: application/json
{
"title": "Test Paper Title",
"abstract": "This is a test abstract for demonstration purposes.",
"authors": ["John Doe", "Jane Smith"],
"published_date": "2024-01-15T00:00:00Z",
"doi": "10.1234/test.doi.2024",
"url": "https://example.com/test-paper",
"categories": ["Computer Science", "Machine Learning"]
}
### Update paper (example - replace UUID with actual ID)
PUT {{baseUrl}}/v1/papers/550e8400-e29b-41d4-a716-446655440000
Content-Type: application/json
{
"title": "Updated Test Paper Title",
"abstract": "This is an updated test abstract.",
"authors": ["John Doe", "Jane Smith", "Bob Johnson"]
}
### Delete paper (example - replace UUID with actual ID)
DELETE {{baseUrl}}/v1/papers/550e8400-e29b-41d4-a716-446655440000
### List authors
GET {{baseUrl}}/v1/authors
### Get specific author by ID (example - replace with actual UUID)
GET {{baseUrl}}/v1/authors/550e8400-e29b-41d4-a716-446655440000
### Get papers by specific author
GET {{baseUrl}}/v1/authors/550e8400-e29b-41d4-a716-446655440000/papers
### Configure provider (example for Semantic Scholar)
PUT {{baseUrl}}/v1/search/providers/semantic_scholar/configure
Content-Type: application/json
{
"api_key": "your-api-key-here",
"rate_limit": "100/h",
"timeout": "30s",
"enabled": true
}
### Test error handling - Invalid endpoint
GET {{baseUrl}}/v1/invalid-endpoint
### Test error handling - Invalid paper ID format
GET {{baseUrl}}/v1/papers/invalid-uuid-format