Relationships
Side resources have the following relationships for their records.
- Card Types
- Cards
- Decklists
- Factions
- Printings
Side resources have the following relationships for their records.
GET /api/v3/public/card_types?filter[side_id]=:id
| Name | Description | Type |
|---|---|---|
| id required | Id | string |
GET /api/v3/public/card_types?filter[side_id]=corp
Content-Type: application/json
Host: api-preview.netrunnerdb.com
filter={"side_id" => "corp"}
curl -g "https://api-preview.netrunnerdb.com/api/v3/public/card_types?filter[side_id]=corp" -X GET
200
content-type: application/vnd.api+json; charset=utf-8
{
"data": [
{
"id": "agenda",
"type": "card_types",
"attributes": {
"name": "Agenda",
"updated_at": "2022-12-08T12:00:00+00:00"
},
"relationships": {
"side": {
"links": {
"related": "http://localhost:3000/api/v3/public/sides/corp"
}
},
"cards": {
"links": {
"related": "http://localhost:3000/api/v3/public/cards?filter[card_type_id]=agenda"
}
},
"printings": {
"links": {
"related": "http://localhost:3000/api/v3/public/printings?filter[card_type_id]=agenda"
}
}
},
"links": {
"self": "http://localhost:3000/api/v3/public/card_types/agenda"
}
},
{
"id": "asset",
"type": "card_types",
"attributes": {
"name": "Asset",
"updated_at": "2022-12-08T12:00:00+00:00"
},
"relationships": {
"side": {
"links": {
"related": "http://localhost:3000/api/v3/public/sides/corp"
}
},
"cards": {
"links": {
"related": "http://localhost:3000/api/v3/public/cards?filter[card_type_id]=asset"
}
},
"printings": {
"links": {
"related": "http://localhost:3000/api/v3/public/printings?filter[card_type_id]=asset"
}
}
},
"links": {
"self": "http://localhost:3000/api/v3/public/card_types/asset"
}
},
{
"id": "corp_identity",
"type": "card_types",
"attributes": {
"name": "Corp Identity",
"updated_at": "2022-12-08T12:00:00+00:00"
},
"relationships": {
"side": {
"links": {
"related": "http://localhost:3000/api/v3/public/sides/corp"
}
},
"cards": {
"links": {
"related": "http://localhost:3000/api/v3/public/cards?filter[card_type_id]=corp_identity"
}
},
"printings": {
"links": {
"related": "http://localhost:3000/api/v3/public/printings?filter[card_type_id]=corp_identity"
}
}
},
"links": {
"self": "http://localhost:3000/api/v3/public/card_types/corp_identity"
}
},
{
"id": "hardware",
"type": "card_types",
"attributes": {
"name": "Hardware",
"updated_at": "2022-12-08T12:00:00+00:00"
},
"relationships": {
"side": {
"links": {
"related": "http://localhost:3000/api/v3/public/sides/corp"
}
},
"cards": {
"links": {
"related": "http://localhost:3000/api/v3/public/cards?filter[card_type_id]=hardware"
}
},
"printings": {
"links": {
"related": "http://localhost:3000/api/v3/public/printings?filter[card_type_id]=hardware"
}
}
},
"links": {
"self": "http://localhost:3000/api/v3/public/card_types/hardware"
}
},
{
"id": "upgrade",
"type": "card_types",
"attributes": {
"name": "Upgrade",
"updated_at": "2022-12-08T12:00:00+00:00"
},
"relationships": {
"side": {
"links": {
"related": "http://localhost:3000/api/v3/public/sides/corp"
}
},
"cards": {
"links": {
"related": "http://localhost:3000/api/v3/public/cards?filter[card_type_id]=upgrade"
}
},
"printings": {
"links": {
"related": "http://localhost:3000/api/v3/public/printings?filter[card_type_id]=upgrade"
}
}
},
"links": {
"self": "http://localhost:3000/api/v3/public/card_types/upgrade"
}
}
],
"links": {
"self": "http://localhost:3000/api/v3/public/card_types?filter%5Bside_id%5D=corp&page%5Bnumber%5D=1&page%5Bsize%5D=20&stats%5Btotal%5D=count",
"first": "http://localhost:3000/api/v3/public/card_types?filter%5Bside_id%5D=corp&page%5Bnumber%5D=1&page%5Bsize%5D=20&stats%5Btotal%5D=count",
"last": "http://localhost:3000/api/v3/public/card_types?filter%5Bside_id%5D=corp&page%5Bnumber%5D=1&page%5Bsize%5D=20&stats%5Btotal%5D=count"
},
"meta": {
"stats": {
"total": {
"count": 5
}
}
}
}