Snapshots

Relationships

Snapshot resources have the following relationships for their records.

  • Card Pool
  • Format
  • Restriction

Filter - Get Snapshots filtered by Format Id

Endpoint

GET /api/v3/public/snapshots?filter[format_id]=:format_id

Parameters

Name Description Type
card_cycle_id required Card cycle string

Request

Route

GET /api/v3/public/snapshots?filter[format_id]=startup

Headers

Content-Type: application/json
Host: api-preview.netrunnerdb.com

Query Parameters

filter={"format_id" => "startup"}

cURL

curl -g "https://api-preview.netrunnerdb.com/api/v3/public/snapshots?filter[format_id]=startup" -X GET 

Response

Simulated Response

Status

200

Headers

content-type: application/vnd.api+json; charset=utf-8

Body

{
  "data": [
    {
      "id": "startup_01",
      "type": "snapshots",
      "attributes": {
        "format_id": "startup",
        "active": false,
        "card_cycle_ids": [
          "core"
        ],
        "card_set_ids": [
          "core"
        ],
        "card_pool_id": "startup_01",
        "restriction_id": null,
        "num_cards": 4,
        "date_start": "2019-01-01",
        "updated_at": "2022-12-08T12:00:00+00:00"
      },
      "relationships": {
        "format": {
          "links": {
            "related": "http://localhost:3000/api/v3/public/formats/startup"
          }
        },
        "card_pool": {
          "links": {
            "related": "http://localhost:3000/api/v3/public/card_pools/startup_01"
          }
        },
        "restriction": {
          "links": {
            "related": null
          }
        }
      },
      "links": {
        "self": "http://localhost:3000/api/v3/public/snapshots/startup_01"
      }
    },
    {
      "id": "startup_02",
      "type": "snapshots",
      "attributes": {
        "format_id": "startup",
        "active": true,
        "card_cycle_ids": [
          "core",
          "borealis"
        ],
        "card_set_ids": [
          "midnight_sun",
          "parhelion"
        ],
        "card_pool_id": "startup_02",
        "restriction_id": null,
        "num_cards": 4,
        "date_start": "2022-09-01",
        "updated_at": "2022-12-08T12:00:00+00:00"
      },
      "relationships": {
        "format": {
          "links": {
            "related": "http://localhost:3000/api/v3/public/formats/startup"
          }
        },
        "card_pool": {
          "links": {
            "related": "http://localhost:3000/api/v3/public/card_pools/startup_02"
          }
        },
        "restriction": {
          "links": {
            "related": null
          }
        }
      },
      "links": {
        "self": "http://localhost:3000/api/v3/public/snapshots/startup_02"
      }
    }
  ],
  "links": {
    "self": "http://localhost:3000/api/v3/public/snapshots?filter%5Bformat_id%5D=startup&page%5Bnumber%5D=1&page%5Bsize%5D=1000&stats%5Btotal%5D=count",
    "first": "http://localhost:3000/api/v3/public/snapshots?filter%5Bformat_id%5D=startup&page%5Bnumber%5D=1&page%5Bsize%5D=1000&stats%5Btotal%5D=count",
    "last": "http://localhost:3000/api/v3/public/snapshots?filter%5Bformat_id%5D=startup&page%5Bnumber%5D=1&page%5Bsize%5D=1000&stats%5Btotal%5D=count"
  },
  "meta": {
    "stats": {
      "total": {
        "count": 2
      }
    }
  }
}