Revisions

Authentication: JWT | API Key

Revisions represent individual versions of resource content, providing complete version control and history tracking. Each time a resource is updated, a new revision is created with an auto-incremented number. Revisions enable content rollback, change tracking, and audit trails for all content modifications.

Revisions enable:

  • Version Control - track all changes to resource content over time
  • Content History - maintain complete audit trail of modifications
  • Rollback Capability - restore previous versions of content when needed
  • Size Tracking - monitor storage usage for billing and quota management
  • Schema Validation - ensure content conforms to current schema versions

Learn more about related resources:

  • Resources API - manage content resources that contain revisions
  • Folders API - manage folders that contain resources
  • Versions API - manage schema versions used for validation
  • Fields API - define content structure and validation rules

Path Parameters

  • Name
    :env
    Type
    string
    Description

    Unique identifier of the environment

  • Name
    :folder
    Type
    string
    Description

    Unique identifier of the folder (collection or component-based)

  • Name
    :resource
    Type
    string
    Description

    Unique identifier of the resource

  • Name
    :revision
    Type
    string
    Description

    Unique identifier of the revision

URL Pattern

Revisions use the URL pattern: /v1/:env/folders/:folder/resources/:resource/revisions/

Examples:

  • Revisions: /v1/7c9h4pwu/folders/6b4qd369/resources/8m3n7k2p/revisions/
  • Individual Revision: /v1/7c9h4pwu/folders/6b4qd369/resources/8m3n7k2p/revisions/9q5r8t1w/

Revision Object

  • Name
    key
    Type
    string
    Description

    Unique identifier for the revision.

  • Name
    resource
    Type
    string
    Description

    Key of the resource this revision belongs to.

  • Name
    schema_version
    Type
    string
    Description

    Key of the schema version used for validation.

  • Name
    number
    Type
    integer
    Description

    Sequential revision number (auto-incremented).

  • Name
    size
    Type
    integer
    Description

    Size of the revision data in bytes.

  • Name
    created_at
    Type
    datetime
    Description

    Timestamp when the revision was created, in ISO 8601 format.


GETapi.foxnose.net/v1/:env/folders/:folder/resources/:resource/revisions/

List Revisions

Retrieves all revisions for a specific resource, ordered by creation date (latest first).

Success Response: 200 OK

Errors

  • Name
    401 Unauthorized
    Description

    Authentication credentials are missing or invalid.

    • authentication_failed - authentication credentials were not provided or are invalid
  • Name
    403 Forbidden
    Description

    Insufficient permissions to view revisions.

    • permission_denied - insufficient permissions to perform this action
  • Name
    404 Not Found
    Description

    The specified resource could not be found. Specific codes:

    • environment_not_found - the specified environment does not exist
    • folder_not_found - the specified folder does not exist
    • resource_not_found - the specified resource does not exist

Request

GET
/v1/:env/folders/:folder/resources/:resource/revisions/
curl https://api.foxnose.net/v1/7c9h4pwu/folders/6b4qd369/resources/8m3n7k2p/revisions/ \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiI..." \
-H "Content-Type: application/json"

Response

{
    "count": 3,
    "next": null,
    "previous": null,
    "results": [
        {
            "key": "9q5r8t1w",
            "resource": "8m3n7k2p",
            "schema_version": "vr8x2k9m",
            "number": 3,
            "size": 2048,
            "created_at": "2025-06-16T09:15:00.000000-05:00"
        },
        {
            "key": "2x7z5v8c",
            "resource": "8m3n7k2p",
            "schema_version": "vr8x2k9m",
            "number": 2,
            "size": 1856,
            "created_at": "2025-06-15T14:30:00.000000-05:00"
        },
        {
            "key": "1a4b7e9f",
            "resource": "8m3n7k2p",
            "schema_version": "vr8x2k9m",
            "number": 1,
            "size": 1792,
            "created_at": "2025-06-15T10:30:00.000000-05:00"
        }
    ]
}

POSTapi.foxnose.net/v1/:env/folders/:folder/resources/:resource/revisions/

Create Revision

Creates a new revision for an existing resource. The new revision becomes the current active revision.

Success Response: 201 Created

Request Body

  • Name
    data
    Type
    object
    Required
    required
    Description

    The updated content data structured according to the resource's schema

Errors

  • Name
    401 Unauthorized
    Description

    Authentication credentials are missing or invalid.

    • authentication_failed - authentication credentials were not provided or are invalid
  • Name
    403 Forbidden
    Description

    Insufficient permissions to update this resource.

    • permission_denied - insufficient permissions to perform this action
  • Name
    404 Not Found
    Description

    The specified resource could not be found. Specific codes:

    • environment_not_found - the specified environment does not exist
    • folder_not_found - the specified folder does not exist
    • resource_not_found - the specified resource does not exist
    • component_not_found - the component schema does not exist
  • Name
    422 Unprocessable Content
    Description

    Validation or business logic error. Specific codes:

    • validation_error - data validation errors against schema
    • json_size_exceeded - data size exceeds 1MB limit
    • localizable_data_should_be_object - localizable fields must be objects

Request

POST
/v1/:env/folders/:folder/resources/:resource/revisions/
curl https://api.foxnose.net/v1/7c9h4pwu/folders/6b4qd369/resources/8m3n7k2p/revisions/ \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiI..." \
-H "Content-Type: application/json" \
-d '{
    "data": {
        "title": {
            "en": "Welcome to Our Updated Blog",
            "es": "Bienvenidos a Nuestro Blog Actualizado"
        },
        "content": {
            "en": "This is our updated blog post with new content...",
            "es": "Esta es nuestra entrada actualizada con nuevo contenido..."
        },
        "published": true,
        "author": "john_doe",
        "tags": ["welcome", "blog", "update"]
    }
}'

Response

{
    "key": "3c8f2h5k",
    "resource": "8m3n7k2p",
    "schema_version": "vr8x2k9m",
    "number": 4,
    "size": 2304,
    "created_at": "2025-06-16T16:45:00.000000-05:00"
}

GETapi.foxnose.net/v1/:env/folders/:folder/resources/:resource/revisions/:revision/

Retrieve Revision

Retrieves details of a specific revision.

Success Response: 200 OK

Errors

  • Name
    401 Unauthorized
    Description

    Authentication credentials are missing or invalid.

    • authentication_failed - authentication credentials were not provided or are invalid
  • Name
    403 Forbidden
    Description

    Insufficient permissions to view this revision.

    • permission_denied - insufficient permissions to perform this action
  • Name
    404 Not Found
    Description

    The specified resource could not be found. Specific codes:

    • environment_not_found - the specified environment does not exist
    • folder_not_found - the specified folder does not exist
    • resource_not_found - the specified resource does not exist
    • revision_not_found - the specified revision does not exist

Request

GET
/v1/:env/folders/:folder/resources/:resource/revisions/:revision/
curl https://api.foxnose.net/v1/7c9h4pwu/folders/6b4qd369/resources/8m3n7k2p/revisions/9q5r8t1w/ \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiI..." \
-H "Content-Type: application/json"

Response

{
    "key": "9q5r8t1w",
    "resource": "8m3n7k2p",
    "schema_version": "vr8x2k9m",
    "number": 3,
    "size": 2048,
    "created_at": "2025-06-16T09:15:00.000000-05:00"
}

DELETEapi.foxnose.net/v1/:env/folders/:folder/resources/:resource/revisions/:revision/

Delete Revision

Permanently deletes a specific revision.

Success Response: 204 No Content

Errors

  • Name
    401 Unauthorized
    Description

    Authentication credentials are missing or invalid.

    • authentication_failed - authentication credentials were not provided or are invalid
  • Name
    403 Forbidden
    Description

    Insufficient permissions to delete this revision.

    • permission_denied - insufficient permissions to perform this action
  • Name
    404 Not Found
    Description

    The specified resource could not be found. Specific codes:

    • environment_not_found - the specified environment does not exist
    • folder_not_found - the specified folder does not exist
    • resource_not_found - the specified resource does not exist
    • revision_not_found - the specified revision does not exist
  • Name
    422 Unprocessable Content
    Description

    Business logic error. Specific codes:

    • cannot_delete_current_revision - cannot delete the currently active revision

Request

DELETE
/v1/:env/folders/:folder/resources/:resource/revisions/:revision/
curl -X DELETE https://api.foxnose.net/v1/7c9h4pwu/folders/6b4qd369/resources/8m3n7k2p/revisions/2x7z5v8c/ \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiI..." \
-H "Content-Type: application/json"

Revision Management

Automatic Numbering

Revisions are automatically numbered sequentially starting from 1. Each new revision increments the number, providing clear chronological ordering.

Current Revision

Each resource maintains a reference to its current (active) revision. When a new revision is created, it automatically becomes the current revision.

Size Tracking

All revisions track their data size in bytes for:

  • Storage Billing - accurate usage tracking for cost management
  • Quota Management - enforce plan limits and restrictions
  • Performance Optimization - monitor content growth over time

Schema Validation

Each revision is validated against the schema version active at creation time:

  • Collection Resources - validated against folder's current schema version
  • Component Resources - validated against component's current published version
  • Localization - multilingual content validated per locale requirements

Data Limits

  • Maximum Size: 1MB per revision
  • Format: JSON with automatic compression
  • Validation: Real-time schema validation on creation
  • Storage: Distributed across multiple storage systems for reliability

Was this page helpful?