API Documentation

API Endpoint

PageVersions

PageVersions

Supported filter params

  • id

  • page_id

  • person_id

  • restored_from_version_id

Supported sort params

  • name

  • created_at

  • updated_at

GET /api/v2/page_versions
Requestsreturns page_versions

GET  /api/v2/page_versions

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": [
    {
      "id": "1",
      "type": "page_versions",
      "attributes": {
        "body_snapshot": null,
        "created_at": "2025-08-02T02:08:34.664+02:00",
        "name": null,
        "restored_from_version_id": null,
        "title_snapshot": null,
        "updated_at": "2025-08-02T02:08:34.664+02:00",
        "prosemirror_steps": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": "799"
          }
        },
        "page": {
          "meta": {
            "included": false
          }
        },
        "person": {
          "meta": {
            "included": false
          }
        }
      }
    }
  ],
  "links": {
    "first": "http://api-test.productive.io/api/v2/page_versions?page%5Bnumber%5D=1&page%5Bsize%5D=30",
    "last": "http://api-test.productive.io/api/v2/page_versions?page%5Bnumber%5D=1&page%5Bsize%5D=30"
  },
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 1,
    "page_size": 30,
    "max_page_size": 200
  }
}

Get page_versions
GET/api/v2/page_versions


GET /api/v2/page_versions/1
Requestsreturns page_version

GET  /api/v2/page_versions/2

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "2",
    "type": "page_versions",
    "attributes": {
      "body_snapshot": null,
      "created_at": "2025-08-02T02:08:34.812+02:00",
      "name": null,
      "restored_from_version_id": null,
      "title_snapshot": null,
      "updated_at": "2025-08-02T02:08:34.812+02:00",
      "prosemirror_steps": []
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "800"
        }
      },
      "page": {
        "meta": {
          "included": false
        }
      },
      "person": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

Gets a page_version
GET/api/v2/page_versions/{id}

URI Parameters
HideShow
id
number (required) Example: 1

page_version id


POST /api/v2/page_versions
Requestscreates page_versionreturns error

POST  /api/v2/page_versions

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "page_versions",
    "attributes": {
      "name": "test name",
      "restored_from_version_id": "4"
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "5",
    "type": "page_versions",
    "attributes": {
      "body_snapshot": "body_snap",
      "created_at": "2025-08-02T02:08:35.048+02:00",
      "name": "test name",
      "restored_from_version_id": 4,
      "title_snapshot": "title_snap",
      "updated_at": "2025-08-02T02:08:35.048+02:00",
      "prosemirror_steps": null
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "801"
        }
      },
      "page": {
        "meta": {
          "included": false
        }
      },
      "person": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

POST  /api/v2/page_versions

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "page_versions",
    "attributes": {
      "page_id": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/page"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/restored_from_version_id"
      }
    }
  ]
}

Create a page_version
POST/api/v2/page_versions

URI Parameters
HideShow
page_id
number (required) Example: 1

page id

person_id
number (required) Example: 1

person id

restored_from_version_id
number (required) Example: 1

restored from version id


PATCH /api/v2/page_versions/1
Requestsupdates page_versionreturns error

PATCH  /api/v2/page_versions/8

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "page_versions",
    "attributes": {
      "name": "named version"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "8",
    "type": "page_versions",
    "attributes": {
      "body_snapshot": null,
      "created_at": "2025-08-02T02:08:35.379+02:00",
      "name": "named version",
      "restored_from_version_id": null,
      "title_snapshot": null,
      "updated_at": "2025-08-02T02:08:35.391+02:00",
      "prosemirror_steps": []
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "803"
        }
      },
      "page": {
        "meta": {
          "included": false
        }
      },
      "person": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

PATCH  /api/v2/page_versions/9

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "page_versions",
    "attributes": {
      "name": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/name"
      }
    }
  ]
}

Update a page_version
PATCH/api/v2/page_versions/{id}

URI Parameters
HideShow
id
number (required) Example: 1

page_version id


Generated by aglio on 02 Aug 2025