---
raw: true
search:
  tags:
    - Spaces
    - GET
seo:
  description: >-
    Returns the space's traffic rules in the order the edge reads them, each
    with… Reference for the GET /v1/spaces/{spaceId}/rules endpoint in the
    Spacefast API.
sidebar:
  label: List a space's traffic rules
  badge: GET
title: List a space's traffic rules
type: openapi-operation
---
Returns the space's traffic rules in the order the edge reads them, each with where it was declared and what the edge last said about it. `collapsed` names the declared rules the edge never got because an earlier rule already covers them. The edge is read only for the quota count, so an edge that does not answer still gets you the rules, with `quota.stale` set and `quota.limit` null.

`GET /v1/spaces/{spaceId}/rules`

**Responses**

- `200` — Response for status 200
- `default` — Problem details (RFC 9457). Any 4xx/5xx response is one \`application/problem+json\` document.

Response example, 200:

```json
{
  "$schema": "http://example.com",
  "data": {
    "rules": [
      {
        "id": "string",
        "name": "string",
        "handle": "string",
        "kind": "firewall",
        "origin": "file",
        "sourceRef": "string",
        "placement": "edge",
        "placementReason": "string",
        "desiredState": "enabled",
        "edgeState": "pending",
        "definition": {
          "name": "string",
          "description": "string",
          "action": "block",
          "status": 400,
          "match": {
            "path": "string",
            "host": "string",
            "method": "string",
            "ip": "string",
            "country": "string",
            "asn": "string",
            "userAgent": "string",
            "referer": "string",
            "header": {
              "property1": "string",
              "property2": "string"
            },
            "cookie": {
              "property1": "string",
              "property2": "string"
            },
            "query": {
              "property1": "string",
              "property2": "string"
            },
            "extension": "string",
            "ja3": "string",
            "ja4": "string"
          },
          "any": true
        },
        "lastError": {
          "code": "string",
          "message": "string"
        }
      }
    ],
    "quota": {
      "used": -9007199254740991,
      "limit": -9007199254740991,
      "stale": true
    },
    "paused": true,
    "hostnames": [
      "string"
    ],
    "collapsed": [
      {
        "ruleName": "string",
        "origin": "file",
        "reason": "fingerprint"
      }
    ]
  }
}
```
