API - Instance State

  • Last Post 4 weeks ago
  • Topic Is Solved
TheFehr posted this 4 weeks ago

OS Name/Version: Windows Server 2016

Product Name/Version: AMP Professional License

Problem Description: I am trying to build a basic Discord Bot to interact with my AMP-Server. But I don't seem to be able to find a documentation for the "State" field that is returned from the Core/GetStatus Request that I send to the Instances.

Docuementation from /API:



No description

Returns: JObject

Order By: Standard | Newest | Votes
Mike posted this 4 weeks ago

It's the following enum:

public enum ApplicationState : int
    Undefined = -1,

    Stopped = 0,
    PreStart = 5,
    /// <summary>
    /// The server is performing some first-time-start configuration.
    /// </summary>
    Configuring = 7,
    Starting = 10,
    Ready = 20,
    /// <summary>
    /// Server is in the middle of stopping, but once shutdown has finished it will automatically restart.
    /// </summary>
    Restarting = 30,
    Stopping = 40,

    PreparingForSleep = 45,
    /// <summary>
    /// The application should be able to be resumed quickly if using this state. Otherwise use Stopped.
    /// </summary>
    Sleeping = 50,

    /// <summary>
    /// The application is waiting for some external service/application to respond/become available.
    /// </summary>
    Waiting = 60,

    Installing = 70,
    Updating = 75,
    /// <summary>
    /// Used during installation, means that some user input is required to complete setup (authentication etc).
    /// </summary>
    AwaitingUserInput = 80,

    /// <summary>
    /// Something is preventing the application from starting, and the module will not try again without user action
    /// </summary>
    Failed = 100,

    Suspended = 200,
    Maintainence = 250,

    /// <summary>
    /// The state is unknown, or doesn't apply (for modules that don't start an external process)
    /// </summary>
    Indeterminate = 999,

TheFehr posted this 4 weeks ago

Thanks a lot.

Just for future problems: Was there a place I could have found this? Maybe within the SDK-Template? I'd be happy If I didn't had to bother you for such things.

Mike posted this 4 weeks ago

Indeed, the SDK template has the references for this - you can press F12 on the ApplicationState member to see all the information.

  • Liked by
  • TheFehr
TheFehr posted this 4 weeks ago

Perfect, then I can check that one first next time. Thanks a lot for the fast answer.