curl -X GET "https://api.omophub.com/v1/concepts/201826/relationships/options" \ -H "Authorization: Bearer YOUR_API_KEY"
{ "success": true, "data": { "concept_id": 201826, "available_relationships": [ { "id": "Is a", "name": "Is a" }, { "id": "Maps to", "name": "Maps to" }, { "id": "Mapped from", "name": "Mapped from" }, { "id": "Subsumes", "name": "Subsumes" } ] }, "meta": { "request_id": "req_relationship_options_123", "timestamp": "2024-12-22T10:00:00Z", "vocab_release": "2025.1" } }
Get available relationship types for a specific concept
Show data
Show available_relationships
Show meta
curl -X GET "https://api.omophub.com/v1/concepts/201826/relationships/options?vocab_release=2025.1" \ -H "Authorization: Bearer YOUR_API_KEY"
async function loadRelationshipOptions(conceptId) { const response = await fetch(`/v1/concepts/${conceptId}/relationships/options`, { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }); const result = await response.json(); return result.data.available_relationships.map(rel => ({ value: rel.id, label: rel.name })); } // Use in UI const options = await loadRelationshipOptions(201826); const selectHtml = options.map(opt => `<option value="${opt.value}">${opt.label}</option>` ).join('');
Was this page helpful?