FixFX

API References

Artifacts

Usage guides and information for our Artifacts API.

The Artifacts API provides access to FiveM and RedM server artifacts, which are essential for running your game servers. This API helps you stay up-to-date with the latest server versions and manage your server installations programmatically.

Overview

The Artifacts API is a powerful tool that provides programmatic access to FiveM and RedM server artifacts. It's designed to help server administrators and developers:

  • Automate server updates and installations
  • Monitor version support status
  • Stay informed about critical updates
  • Manage multiple server instances efficiently

The API provides detailed information about each artifact version, including:

  • Version numbers and release dates
  • Download links for different platforms (Windows/Linux)
  • Support status and lifecycle information
  • Critical update flags
  • Artifact URLs for direct access

Base URL

https://fixfx.wiki/api/artifacts

Authentication

The Artifacts API is currently public and doesn't require authentication. However, we recommend implementing rate limiting in your applications to ensure fair usage.

Endpoints

GET /api/artifacts

Retrieves a list of all available artifacts with detailed information about each version.

Query Parameters

ParameterTypeDescriptionDefault
platformstringFilter by platform (windows or linux)All platforms
productstringFilter by product (fivem or redm)All products
versionstringFilter by specific version numberAll versions
statusstringFilter by support status (recommended, latest, active, deprecated, eol)All statuses
searchstringSearch artifacts by version numberNo search
limitnumberMaximum number of results per platform (max 500)100
offsetnumberNumber of results to skip (for pagination)0
includeEolbooleanInclude End of Life artifacts in resultsfalse
sortBystringSort field (version or date)version
sortOrderstringSort direction (asc or desc)desc
beforestringFilter artifacts released before this date (ISO format)No limit
afterstringFilter artifacts released after this date (ISO format)No limit

Response Format

{
  "data": {
    "windows": {
      "version_number": {
        "version": "string",
        "recommended": boolean,
        "critical": boolean,
        "download_urls": {
          "zip": "string",
          "7z": "string"
        },
        "artifact_url": "string",
        "published_at": "string",
        "eol": boolean,
        "supportStatus": "string",
        "supportEnds": "string"
      }
    },
    "linux": {
      // Same structure as windows
    }
  },
  "metadata": {
    "platforms": ["windows", "linux"],
    "recommended": {
      "windows": {
        "version": "string",
        // ... artifact details
      },
      "linux": {
        "version": "string",
        // ... artifact details
      }
    },
    "latest": {
      "windows": {
        "version": "string",
        // ... artifact details
      },
      "linux": {
        "version": "string",
        // ... artifact details
      }
    },
    "stats": {
      "windows": {
        "total": number,
        "filtered": number,
        "recommended": number,
        "latest": number,
        "active": number,
        "deprecated": number,
        "eol": number
      },
      "linux": {
        // Same structure as windows
      }
    },
    "pagination": {
      "limit": number,
      "offset": number,
      "filtered": number,
      "total": number,
      "currentPage": number,
      "totalPages": number
    },
    "filters": {
      "search": "string",
      "platform": "string",
      "supportStatus": "string",
      "includeEol": boolean,
      "beforeDate": "string",
      "afterDate": "string",
      "sortBy": "string",
      "sortOrder": "string"
    },
    "supportSchedule": {
      "recommended": "6 weeks after next release",
      "latest": "2 weeks after next release",
      "eol": "3 months after release"
    },
    "supportStatusExplanation": {
      "recommended": "Fully supported, recommended for production use",
      "latest": "Most recent build, supported for testing",
      "active": "Currently supported",
      "deprecated": "Support ended, but still usable",
      "eol": "End of life, not supported and may be inaccessible from server browser",
      "info": "https://aka.cfx.re/eol"
    }
  }
}

GET /api/artifacts/changes

Retrieves changelog information for specified artifact versions by analyzing GitHub commits and issues. This endpoint provides a comprehensive view of changes between versions, including commit diffs and file changes.

Query Parameters

ParameterTypeDescriptionDefault
fromstringThe starting version to fetch changes fromRequired
tostringThe ending version to fetch changes toRequired
platformstringFilter changes by platform (windows/linux)Optional
formatstringResponse format (json, markdown, or html)json
includeDiffsbooleanInclude file diffs in the responsefalse

Response Format

{
  "data": {
    "commits": [
      {
        "sha": "string",
        "message": "string",
        "author": {
          "name": "string",
          "email": "string",
          "date": "string"
        },
        "url": "string",
        "stats": {
          "additions": number,
          "deletions": number,
          "total": number
        }
      }
    ],
    "files": [
      {
        "filename": "string",
        "status": "string",
        "additions": number,
        "deletions": number,
        "changes": number,
        "blob_url": "string",
        "raw_url": "string",
        "patch": "string"
      }
    ],
    "issues": [
      {
        "number": number,
        "title": "string",
        "url": "string",
        "state": "string",
        "labels": ["string"]
      }
    ],
    "metadata": {
      "from": "string",
      "to": "string",
      "platform": "string",
      "totalCommits": number,
      "totalFiles": number,
      "totalIssues": number,
      "stats": {
        "additions": number,
        "deletions": number,
        "changes": number
      }
    }
  }
}

Example Usage

// Fetch changes between versions with diffs
const response = await fetch(
  'https://fixfx.wiki/api/artifacts/changes?from=1234&to=5678&platform=windows&includeDiffs=true'
);
const data = await response.json();
 
// Process commits with stats
data.data.commits.forEach(commit => {
  console.log(`Commit: ${commit.message}`);
  console.log(`Author: ${commit.author.name}`);
  console.log(`Date: ${commit.date}`);
  console.log(`Stats: +${commit.stats.additions} -${commit.stats.deletions}`);
});
 
// Process file changes
data.data.files.forEach(file => {
  console.log(`File: ${file.filename}`);
  console.log(`Status: ${file.status}`);
  console.log(`Changes: +${file.additions} -${file.deletions}`);
  if (file.patch) {
    console.log('Patch:', file.patch);
  }
});
 
// Access overall stats
console.log('Total changes:', data.data.metadata.stats.changes);
console.log('Total additions:', data.data.metadata.stats.additions);
console.log('Total deletions:', data.data.metadata.stats.deletions);

GET /api/artifacts/check

Retrieves GitHub issues related to specific artifact versions, helping you track reported problems and their status.

Query Parameters

ParameterTypeDescriptionDefault
versionstringFilter issues by specific artifact versionAll versions
statestringFilter by issue state (open or closed)All states
pagenumberPage number for pagination1
perPagenumberNumber of results per page20

Response Format

{
  "data": [
    {
      "number": number,
      "title": "string",
      "state": "string",
      "artifact_version": "string",
      "created_at": "string",
      "updated_at": "string",
      "url": "string",
      "report_count": number
    }
  ],
  "metadata": {
    "total": number,
    "totalPages": number,
    "currentPage": number,
    "perPage": number,
    "versions": ["string"],
    "states": {
      "open": number,
      "closed": number
    }
  }
}

Example Usage

// Check issues for a specific version
const response = await fetch(
  'https://fixfx.wiki/api/artifacts/check?version=1234&state=open'
);
const data = await response.json();
 
// Process issues
data.data.forEach(issue => {
  console.log(`Issue #${issue.number}: ${issue.title}`);
  console.log(`State: ${issue.state}`);
  console.log(`Version: ${issue.artifact_version}`);
  console.log(`Report Count: ${issue.report_count}`);
  console.log(`URL: ${issue.url}`);
});
 
// Access metadata
console.log(`Total Issues: ${data.metadata.total}`);
console.log(`Open Issues: ${data.metadata.states.open}`);
console.log(`Closed Issues: ${data.metadata.states.closed}`);

Use Cases

Server Setup Automation

#!/bin/bash
 
# Get recommended version with pagination
PAGE=1
LIMIT=10
OFFSET=$(( (PAGE - 1) * LIMIT ))
 
RESPONSE=$(curl -s "https://fixfx.wiki/api/artifacts?platform=linux&status=recommended&limit=$LIMIT&offset=$OFFSET")
RECOMMENDED=$(echo "$RESPONSE" | jq -r '.metadata.recommended.linux.version')
 
# Download and install
curl -L "https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/$RECOMMENDED/fx.tar.xz" | tar xJ

Version Monitoring

#!/bin/bash
 
# Configuration
CURRENT_VERSION="1234"
PLATFORM="linux"
 
# Get recommended version with stats
RESPONSE=$(curl -s "https://fixfx.wiki/api/artifacts?platform=$PLATFORM&status=recommended")
RECOMMENDED=$(echo "$RESPONSE" | jq -r '.metadata.recommended.linux.version')
TOTAL_ARTIFACTS=$(echo "$RESPONSE" | jq -r '.metadata.stats.linux.total')
 
if [ "$CURRENT_VERSION" != "$RECOMMENDED" ]; then
    echo "Update available: $RECOMMENDED"
    echo "Current version: $CURRENT_VERSION"
    echo "Total artifacts available: $TOTAL_ARTIFACTS"
    
    # Get artifact URL
    ARTIFACT_URL=$(echo "$RESPONSE" | jq -r ".data.$PLATFORM[\"$RECOMMENDED\"].artifact_url")
    echo "View artifact: $ARTIFACT_URL"
fi

Support Status Check

#!/bin/bash
 
# Configuration
VERSION="1234"
PLATFORM="linux"
 
# Get version status with support schedule
RESPONSE=$(curl -s "https://fixfx.wiki/api/artifacts?version=$VERSION&platform=$PLATFORM")
STATUS=$(echo "$RESPONSE" | jq -r ".data.$PLATFORM[\"$VERSION\"].supportStatus")
SUPPORT_ENDS=$(echo "$RESPONSE" | jq -r ".data.$PLATFORM[\"$VERSION\"].supportEnds")
SCHEDULE=$(echo "$RESPONSE" | jq -r '.metadata.supportSchedule')
 
case $STATUS in
    "eol")
        echo "WARNING: Version $VERSION is End of Life!"
        echo "Support ended: $SUPPORT_ENDS"
        echo "EOL schedule: $(echo "$SCHEDULE" | jq -r '.eol')"
        ;;
    "deprecated")
        echo "Warning: Version $VERSION is deprecated."
        echo "Support ends: $SUPPORT_ENDS"
        ;;
    "active")
        echo "Version $VERSION is actively supported."
        echo "Support ends: $SUPPORT_ENDS"
        ;;
    "recommended")
        echo "Version $VERSION is the recommended version."
        echo "Support schedule: $(echo "$SCHEDULE" | jq -r '.recommended')"
        ;;
    *)
        echo "Unknown status for version $VERSION"
        ;;
esac

Rate Limiting

The API implements rate limiting to ensure fair usage and prevent abuse. Here's what you need to know:

  • Requests are limited to 100 per minute per IP address
  • Exceeding the limit will result in a 429 (Too Many Requests) response
  • Include appropriate delays between requests in your applications
  • Implement caching to reduce the number of API calls

Error Handling

The API uses standard HTTP status codes to indicate request status:

  • 200: Success - The request was successful
  • 400: Bad Request - Invalid parameters or malformed request
  • 429: Too Many Requests - Rate limit exceeded
  • 500: Server Error - Internal server error

Example error response:

{
  "error": "string",
  "message": "string",
  "statusCode": number
}

Caching

The API implements a 1-hour cache for artifact data. This means:

  • New versions may not appear immediately in the API response
  • Cache is shared across all users
  • Cache is automatically invalidated after 1 hour
  • Critical updates may bypass the cache

Best Practices

  1. Version Management

    • Always check the recommended status when setting up new servers
    • Monitor the supportStatus of your current version
    • Keep track of critical updates for security patches
  2. Performance

    • Implement proper caching in your applications
    • Use appropriate delays between requests
    • Consider using webhooks for version updates
  3. Error Handling

    • Implement proper error handling and retry logic
    • Log API errors for debugging
    • Handle rate limiting gracefully
  4. Security

    • Validate all API responses
    • Use HTTPS for all requests
    • Keep your integration code up to date
  5. Monitoring

    • Set up alerts for version updates
    • Monitor support status changes
    • Track API response times

Support

For questions or issues with the Artifacts API, please contact us on Discord. Our support team is available to help you with:

  • API integration issues
  • Version management questions
  • Best practices guidance
  • Feature requests
  • Bug reports

Explore our other API offerings:

  • Natives API - Access FiveM and RedM native functions and documentation
  • Contributors API - GitHub contributors and repository statistics
  • Search API - Search documentation and content across the platform
  • Chat API - AI-powered assistance for development questions

All our APIs work together to provide a comprehensive development experience for FiveM and RedM.