circle-info
The wiki should now be completely updated for 4.0. Please let us know if there are any inconsistencies.

Fika API

All our APIs (last updated for SPT 4.0, Fika 2.0)

Overview

An API key is automatically generated on first launch. You can find it in the fika.jsonc file in the configuration folder.

Use the API key to authenticate when making request. You also need to add the requestcompressed header with a value of 0.

chevron-rightAuthentication example for C#hashtag
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", config.APIKey);
client.DefaultRequestHeaders.Add("requestcompressed", "0");

In e.g. Postman, the authentication type is "API Key", with the key being "Authorization" and the value being "Bearer {apiKey}".

Get

fika/api/items

Returns all items from the SPT database, with the MongoID being the identifier, and the name, description and stackable amount being values. Example response:

{
    "items": {
        "5447a9cd4bdc2dbd208b4567": {
            "name": "Colt M4A1 5.56x45 assault rifle",
            "description": "The Colt M4A1 carbine is a fully automatic variant of the basic M4 Carbine and was primarily designed for special operations use.\nHowever, U.S. Special Operations Command (USSOCOM) was soon to adopt the M4A1 for almost all special operations units, followed later by general introduction of the M4A1 into service with the U.S. Army and Marine Corps.",
            "stackable": 10
        }
}
chevron-rightSchemahashtag

fika/api/raids

Returns all active raids.

Example response:

chevron-rightSchemahashtag

fika/api/headless

Returns all active headless clients.

chevron-rightSchemahashtag

fika/api/heartbeat

Checks whether the server is running. Primarily used by the WebApp.

fika/api/players

Returns all online players.

chevron-rightSchemahashtag

fika/api/rawprofile

Returns a raw profile in JSON format.

Input:

Key
Value
Description

profileId

{validMongoID}

The MongoID to return a raw profile of.

Example input:

{baseUrl}/fika/api/rawprofile?profileId=68e8f63d941b8a1c94c1d8bf

Post

fika/api/fleaban

Bans a player from the flea for X amount of days. 0 = infinite.

chevron-rightSchemahashtag

fika/api/createheadlessprofile

Creates one headless profile. Used by the installer, not recommended to be used.

fika/api/logout

Logs out the given MongoID from the game.

chevron-rightSchemahashtag

fika/api/restartheadless

Restarts the headless with the given MongoID.

chevron-rightSchemahashtag

fika/api/senditem

Sends X amount of items to the given MongoID.

chevron-rightSchemahashtag

fika/api/senditemtoall

Sends X amount of items to the given MongoIDs.

chevron-rightSchemahashtag

fika/api/sendmessage

Sends a message to a MongoID.

chevron-rightSchemahashtag

Last updated