General guide REST API: How to automate API and Plugin systems

A guide not specific to a game

Automating Tasks with ArkServerAPI's REST API for Servers Hosts and Server Managers


This guide focuses on using ArkServerAPI's REST API to streamline server management tasks such as downloading API framework and plugins if desired.

API base URL is https://ark-server-api.com/api/

First of all, you will need an API key. You can get one by contacting us in the forum, or in discord (https://discord.gg/2uRNp99M9r, or directly message pelayori), which is quicker.
Once you have an API key, whenever you make a request to one of our endpoints, api key will need to be in the XF-Api-Key header.

API endpoint is limited to 10 requests per 10 seconds. If you go above that, you will be rate limited for 10 seconds

Then, there is multiple endpoints to get resources from, you can get all the resources posted, or directly use the endpoint to get resources of specific categories:

  • GET https://ark-server-api.com/api/resources - This one will give you all the resources on the forum, and info of its category.
    JSON:
    {    "resources": [
            {
                        "alt_support_url": "https://discord.gg/2uRNp99M9r",
                        "can_download": true,
                        "can_edit": true,
                        "can_edit_icon": true,
                        "can_edit_tags": false,
                        "can_hard_delete": true,
                        "can_soft_delete": true,
                        "can_view_description_attachments": true,
                        "Category": {
                            "allow_commercial_external": true,
                            "allow_external": true,
                            "allow_fileless": false,
                            "allow_local": true,
                            "can_add": true,
                            "can_upload_images": true,
                            "description": "Official plugins for Ark Server Api",
                            "display_order": 1,
                            "enable_support_url": true,
                            "enable_versioning": true,
                            "last_resource_id": 36,
                            "last_resource_title": "ASE ArkShop",
                            "last_update": 1713830916,
                            "min_tags": 0,
                            "parent_category_id": 3,
                            "resource_category_id": 8,
                            "resource_count": 4,
                            "title": "ASE Official Plugins",
                            "view_url": "https://ark-server-api.com/resources/categories/ase-official-plugins.8/"
                        },
                        "currency": "",
                        "custom_fields": {},
                        "download_count": 16,
                        "external_url": "https://discord.gg/2uRNp99M9r",
                        "icon_url": "https://ark-server-api.com/data/resource_icons/0/32.jpg?1713814807",
                        "is_watching": false,
                        "last_update": 1713814807,
                        "prefix": "Official",
                        "prefix_id": 3,
                        "price": "0.00",
                        "rating_avg": 0,
                        "rating_count": 0,
                        "rating_weighted": 3,
                        "resource_category_id": 8,
                        "resource_date": 1713814807,
                        "resource_id": 32,
                        "resource_state": "visible",
                        "resource_type": "download",
                        "tag_line": "API Framework for ARK: Survival Evolved",
                        "tags": [],
                        "title": "ASE: Server API",
                        "User": {
                            "activity_visible": true,
                            "avatar_urls": {
                                "o": "https://ark-server-api.com/data/avatars/o/0/1.jpg?1712742650",
                                "h": "https://ark-server-api.com/data/avatars/h/0/1.jpg?1712742650",
                                "l": "https://ark-server-api.com/data/avatars/l/0/1.jpg?1712742650",
                                "m": "https://ark-server-api.com/data/avatars/m/0/1.jpg?1712742650",
                                "s": "https://ark-server-api.com/data/avatars/s/0/1.jpg?1712742650"
                            },
                            "can_ban": false,
                            "can_converse": false,
                            "can_edit": true,
                            "can_follow": false,
                            "can_ignore": false,
                            "can_post_profile": true,
                            "can_view_profile": true,
                            "can_view_profile_posts": true,
                            "can_warn": false,
                            "custom_fields": {
                                "skype": "",
                                "facebook": "",
                                "twitter": ""
                            },
                            "custom_title": "",
                            "is_admin": true,
                            "is_banned": false,
                            "is_discouraged": false,
                            "is_followed": false,
                            "is_ignored": false,
                            "is_moderator": true,
                            "is_staff": true,
                            "is_super_admin": true,
                            "last_activity": 1715338952,
                            "location": "",
                            "message_count": 41,
                            "profile_banner_urls": {
                                "l": null,
                                "m": null
                            },
                            "question_solution_count": 0,
                            "reaction_score": 6,
                            "register_date": 1712705009,
                            "secondary_group_ids": [
                                2,
                                4
                            ],
                            "signature": "",
                            "trophy_points": 8,
                            "user_group_id": 3,
                            "user_id": 1,
                            "user_state": "valid",
                            "user_title": "Administrator",
                            "username": "Pelayori",
                            "view_url": "https://ark-server-api.com/members/pelayori.1/",
                            "visible": true,
                            "vote_score": 0,
                            "warning_points": 0,
                            "website": ""
                        },
                        "user_id": 1,
                        "username": "Pelayori",
                        "version": "3.56",
                        "view_count": 141,
                        "view_url": "https://ark-server-api.com/resources/ase-server-api.32/"
            }
        ],
        "pagination": {
            "current_page": 7,
            "last_page": 7,
            "per_page": 20,
            "shown": 13,
            "total": 133
        }
    }
  • GET https://ark-server-api.com/api/resource-categories - This one doesn't give you resources directly, but it gives you a list of all resource categories available. You can extract the category ID, and use it in the below endpoint.
    JSON:
    {    "categories": [
            {
                "allow_commercial_external": false,
                "allow_external": false,
                "allow_fileless": false,
                "allow_local": true,
                "can_add": true,
                "can_upload_images": true,
                "description": "Official plugins for Ark Server Api for ASA",
                "display_order": 1,
                "enable_support_url": true,
                "enable_versioning": true,
                "last_resource_id": 31,
                "last_resource_title": "ASA: Server API",
                "last_update": 1715262033,
                "min_tags": 0,
                "parent_category_id": 2,
                "resource_category_id": 4,
                "resource_count": 4,
                "title": "ASA Official Plugins",
                "view_url": "https://ark-server-api.com/resources/categories/asa-official-plugins.4/"
            }
        ]
    }
    [*]
  • GET https://ark-server-api.com/api/resource-categories/{id}/resources - This one will give you resources of an specific category id
    JSON:
        "resources": [
            {
                "alt_support_url": "https://discord.gg/2uRNp99M9r",
                "can_download": true,
                "can_edit": true,
                "can_edit_icon": true,
                "can_edit_tags": false,
                "can_hard_delete": true,
                "can_soft_delete": true,
                "can_view_description_attachments": true,
                "currency": "",
                "custom_fields": {},
                "download_count": 79,
                "external_url": "https://discord.gg/2uRNp99M9r",
                "icon_url": "https://ark-server-api.com/data/resource_icons/0/31.jpg?1713814232",
                "is_watching": false,
                "last_update": 1715262033,
                "prefix": "Official",
                "prefix_id": 3,
                "price": "0.00",
                "rating_avg": 5,
                "rating_count": 3,
                "rating_weighted": 3.46154,
                "resource_category_id": 4,
                "resource_date": 1713814210,
                "resource_id": 31,
                "resource_state": "visible",
                "resource_type": "download",
                "tag_line": "API Framework for ARK: Survival Ascended",
                "tags": [],
                "title": "ASA: Server API",
                "User": {
                    "activity_visible": true,
                    "avatar_urls": {
                        "o": "https://ark-server-api.com/data/avatars/o/0/1.jpg?1712742650",
                        "h": "https://ark-server-api.com/data/avatars/h/0/1.jpg?1712742650",
                        "l": "https://ark-server-api.com/data/avatars/l/0/1.jpg?1712742650",
                        "m": "https://ark-server-api.com/data/avatars/m/0/1.jpg?1712742650",
                        "s": "https://ark-server-api.com/data/avatars/s/0/1.jpg?1712742650"
                    },
                    "can_ban": false,
                    "can_converse": false,
                    "can_edit": true,
                    "can_follow": false,
                    "can_ignore": false,
                    "can_post_profile": true,
                    "can_view_profile": true,
                    "can_view_profile_posts": true,
                    "can_warn": false,
                    "custom_fields": {
                        "skype": "",
                        "facebook": "",
                        "twitter": ""
                    },
                    "custom_title": "",
                    "is_admin": true,
                    "is_banned": false,
                    "is_discouraged": false,
                    "is_followed": false,
                    "is_ignored": false,
                    "is_moderator": true,
                    "is_staff": true,
                    "is_super_admin": true,
                    "last_activity": 1715338952,
                    "location": "",
                    "message_count": 41,
                    "profile_banner_urls": {
                        "l": null,
                        "m": null
                    },
                    "question_solution_count": 0,
                    "reaction_score": 6,
                    "register_date": 1712705009,
                    "secondary_group_ids": [
                        2,
                        4
                    ],
                    "signature": "",
                    "trophy_points": 8,
                    "user_group_id": 3,
                    "user_id": 1,
                    "user_state": "valid",
                    "user_title": "Administrator",
                    "username": "Pelayori",
                    "view_url": "https://ark-server-api.com/members/pelayori.1/",
                    "visible": true,
                    "vote_score": 0,
                    "warning_points": 0,
                    "website": ""
                },
                "user_id": 1,
                "username": "Pelayori",
                "version": "1.16",
                "view_count": 401,
                "view_url": "https://ark-server-api.com/resources/asa-server-api.31/"
            }
        ],
        "pagination": {
            "current_page": 1,
            "last_page": 1,
            "per_page": 20,
            "shown": 4,
            "total": 4
        }
    }
Then, after you have the resource(s) id(s) you want, you will need to do a GET to:
  • GET https://ark-server-api.com/api/resources/{resource_id}
    [*]
    JSON:
    {
        "resource": {
            "alt_support_url": "https://discord.gg/2uRNp99M9r",
            "can_download": true,
            "can_edit": true,
            "can_edit_icon": true,
            "can_edit_tags": false,
            "can_hard_delete": true,
            "can_soft_delete": true,
            "can_view_description_attachments": true,
            "Category": {
                "allow_commercial_external": false,
                "allow_external": false,
                "allow_fileless": false,
                "allow_local": true,
                "can_add": true,
                "can_upload_images": true,
                "description": "Official plugins for Ark Server Api for ASA",
                "display_order": 1,
                "enable_support_url": true,
                "enable_versioning": true,
                "last_resource_id": 31,
                "last_resource_title": "ASA: Server API",
                "last_update": 1715262033,
                "min_tags": 0,
                "parent_category_id": 2,
                "resource_category_id": 4,
                "resource_count": 4,
                "title": "ASA Official Plugins",
                "view_url": "https://ark-server-api.com/resources/categories/asa-official-plugins.4/"
            },
            "currency": "",
            "current_files": [
                {
                    "id": 118,
                    "filename": "AsaApi_1.16.zip",
                    "size": 20732437,
                    "download_url": "https://ark-server-api.com/api/resource-versions/149/download?file=118"
                }
            ],
            "custom_fields": {},
            "description": "...",
            "description_attach_count": 0,
            "description_parsed": "...",
            "download_count": 80,
            "external_url": "https://discord.gg/2uRNp99M9r",
            "icon_url": "https://ark-server-api.com/data/resource_icons/0/31.jpg?1713814232",
            "is_watching": false,
            "last_update": 1715262033,
            "prefix": "Official",
            "prefix_id": 3,
            "price": "0.00",
            "rating_avg": 5,
            "rating_count": 3,
            "rating_weighted": 3.46154,
            "reaction_score": 0,
            "resource_category_id": 4,
            "resource_date": 1713814210,
            "resource_id": 31,
            "resource_state": "visible",
            "resource_type": "download",
            "review_count": 3,
            "tag_line": "API Framework for ARK: Survival Ascended",
            "tags": [],
            "title": "ASA: Server API",
            "update_count": 1,
            "User": {
                "activity_visible": true,
                "avatar_urls": {
                    "o": "https://ark-server-api.com/data/avatars/o/0/1.jpg?1712742650",
                    "h": "https://ark-server-api.com/data/avatars/h/0/1.jpg?1712742650",
                    "l": "https://ark-server-api.com/data/avatars/l/0/1.jpg?1712742650",
                    "m": "https://ark-server-api.com/data/avatars/m/0/1.jpg?1712742650",
                    "s": "https://ark-server-api.com/data/avatars/s/0/1.jpg?1712742650"
                },
                "can_ban": false,
                "can_converse": false,
                "can_edit": true,
                "can_follow": false,
                "can_ignore": false,
                "can_post_profile": true,
                "can_view_profile": true,
                "can_view_profile_posts": true,
                "can_warn": false,
                "custom_fields": {
                    "skype": "",
                    "facebook": "",
                    "twitter": ""
                },
                "custom_title": "",
                "is_admin": true,
                "is_banned": false,
                "is_discouraged": false,
                "is_followed": false,
                "is_ignored": false,
                "is_moderator": true,
                "is_staff": true,
                "is_super_admin": true,
                "last_activity": 1715345481,
                "location": "",
                "message_count": 41,
                "profile_banner_urls": {
                    "l": null,
                    "m": null
                },
                "question_solution_count": 0,
                "reaction_score": 6,
                "register_date": 1712705009,
                "secondary_group_ids": [
                    2,
                    4
                ],
                "signature": "",
                "trophy_points": 8,
                "user_group_id": 3,
                "user_id": 1,
                "user_state": "valid",
                "user_title": "Administrator",
                "username": "Pelayori",
                "view_url": "https://ark-server-api.com/members/pelayori.1/",
                "visible": true,
                "vote_score": 0,
                "warning_points": 0,
                "website": ""
            },
            "user_id": 1,
            "username": "Pelayori",
            "version": "1.16",
            "view_count": 408,
            "view_url": "https://ark-server-api.com/resources/asa-server-api.31/"
        }
    }
Now, you have all the info necessary to download the resource, however not all resources have downloadable files, instead some have external download/purchase URLs.
Resources that can be downloaded will have this field inside the "resource" object:
JSON:
"current_files": [
            {
                "id": 118,
                "filename": "AsaApi_1.16.zip",
                "size": 20732437,
                "download_url": "https://ark-server-api.com/api/resource-versions/149/download?file=118"
            }
        ]
Finally, if you do a GET to the url in "download_url", you will download the latest version for that resource!

Hope you find this guide useful, and don't hesitate to contact me if you have any issue, or are interested in integrating Ark Server Api and plugins in your systems!

© Pelayori. Unauthorized distribution of this work, or any derived versions, is strictly prohibited.
 
Last edited:
Back
Top