You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`AUTH_SOURCE`: Choose between "mock" or "jwt" (default: "jwt")
75
+
-`JWKS_URL`: JSON Web Key Set endpoint URL
76
+
-`JWT_AUDIENCE`: Intended audience for JWT tokens
77
+
-`JWT_AUTH_DISABLED_MOCK_LOCAL_PRINCIPAL`: Mock principal for development
78
+
57
79
#### OpenSearch Implementation
58
80
59
81
The OpenSearch implementation includes query templates, a searcher, and a client for interacting with the OpenSearch cluster.
@@ -162,6 +184,13 @@ go run cmd/main.go
162
184
-`CLEARBIT_MAX_RETRIES`: Maximum number of retry attempts for failed requests (default: "3")
163
185
-`CLEARBIT_RETRY_DELAY`: Delay between retry attempts (default: "1s")
164
186
187
+
**Authentication Configuration:**
188
+
189
+
-`AUTH_SOURCE`: Choose between "mock" or "jwt"
190
+
-`JWKS_URL`: JSON Web Key Set endpoint URL
191
+
-`JWT_AUDIENCE`: Intended audience for JWT tokens
192
+
-`JWT_AUTH_DISABLED_MOCK_LOCAL_PRINCIPAL`: Mock principal for development (required when AUTH_SOURCE=mock)
193
+
165
194
**Server Configuration:**
166
195
167
196
-`-p`: HTTP port (default: "8080")
@@ -170,10 +199,13 @@ go run cmd/main.go
170
199
171
200
### API Usage
172
201
173
-
The service exposes a RESTful API through the Goa framework:
202
+
The service exposes a RESTful API through the Goa framework with JWT authentication:
203
+
204
+
#### Resource Search API
174
205
175
206
```
176
207
GET /query/resources?name=committee&type=committee&v=1
208
+
Authorization: Bearer <jwt_token>
177
209
```
178
210
179
211
**Parameters:**
@@ -206,6 +238,59 @@ GET /query/resources?name=committee&type=committee&v=1
206
238
}
207
239
```
208
240
241
+
#### Organization Search API
242
+
243
+
**Query Organizations:**
244
+
245
+
```
246
+
GET /query/orgs?name=Linux Foundation&domain=linuxfoundation.org&v=1
247
+
Authorization: Bearer <jwt_token>
248
+
```
249
+
250
+
**Parameters:**
251
+
252
+
-`name`: Organization name (optional)
253
+
-`domain`: Organization domain or website URL (optional)
254
+
-`v`: API version (required)
255
+
256
+
**Response:**
257
+
258
+
```json
259
+
{
260
+
"name": "Linux Foundation",
261
+
"domain": "linuxfoundation.org",
262
+
"industry": "Non-Profit",
263
+
"sector": "Technology",
264
+
"employees": "100-499"
265
+
}
266
+
```
267
+
268
+
**Organization Suggestions API:**
269
+
270
+
```
271
+
GET /query/orgs/suggest?query=linux&v=1
272
+
Authorization: Bearer <jwt_token>
273
+
```
274
+
275
+
**Parameters:**
276
+
277
+
-`query`: Search query for organization suggestions (required, minimum 1 character)
278
+
-`v`: API version (required)
279
+
280
+
**Response:**
281
+
282
+
```json
283
+
{
284
+
"suggestions": [
285
+
{
286
+
"name": "Linux Foundation",
287
+
"domain": "linuxfoundation.org",
288
+
"logo": "https://example.com/logo.png"
289
+
}
290
+
]
291
+
}
292
+
```
293
+
209
294
## Clearbit API Integration
210
295
211
296
The service integrates with Clearbit's Company API to provide enriched organization data for search operations. This integration allows the service to fetch detailed company information including industry classification, employee count, and domain information.
0 commit comments