# Return WordPress installation

This function returns a single WordPress installation, addressed by its
numeric WordPress Toolkit instance id parameter. The returned row is
identical to one element of the list_websites response, so the same
consumer mapping works for both.

  Note:

  - This is a lightweight by-id read intended for resolving one
    installation directly, without listing every installation. A direct
    lookup is not subject to the brief eventual-consistency lag that can
    keep a freshly created installation out of list_websites.
  - A valid id parameter that does not exist, or that belongs to another
    account, is not an error: the call succeeds with an empty (null)
    data field. An installation owned by another account is
    indistinguishable from one that does not exist.
  - A missing or non-integer id parameter, or a backend failure, returns
    a failure status with a message in the errors field.

Endpoint: GET /WPX/get_website
Version: 11.138.0.10
Security: BasicAuth

## Query parameters:

  - `id` (integer, required)
    The WordPress Toolkit installation id, as returned in the wptk_id field of list_websites.
    Example: 17

## Response 200 fields (application/json):

  - `apiversion` (integer)
    The version of the API.
    Example: 3

  - `func` (string)
    The name of the method called.
    Example: "get_website"

  - `module` (string)
    The name of the module called.
    Example: "WPX"

  - `result` (object)

  - `result.data` (object,null)
    The installation row, or null when no installation with the given id value is owned by the caller.

  - `result.data.admin_url` (string)
    The WordPress administrator login URL.
    Example: "https://blog.example.com/wp-login.php"

  - `result.data.alive` (integer)
    Whether the installation is responding.
    Enum: 1, 0

  - `result.data.broken` (integer)
    Whether WordPress Toolkit reports the installation as broken.
    Enum: 1, 0

  - `result.data.documentroot` (string)
    The filesystem path to the WordPress root.
    Example: "/home/user/public_html"

  - `result.data.domain` (string)
    The normalized bare hostname of the site.
    Example: "blog.example.com"

  - `result.data.infected` (integer)
    Whether WordPress Toolkit reports the installation as infected.
    Enum: 1, 0

  - `result.data.outdated_php` (integer)
    Whether the installation runs an outdated PHP version.
    Enum: 1, 0

  - `result.data.outdated_wp` (integer)
    Whether the installation runs an outdated WordPress version.
    Enum: 1, 0

  - `result.data.title` (string)
    The WordPress site title. May be empty.
    Example: "My Blog"

  - `result.data.unsupported_php` (integer)
    Whether the installation runs an unsupported PHP version.
    Enum: 1, 0

  - `result.data.unsupported_wp` (integer)
    Whether the installation runs an unsupported WordPress version.
    Enum: 1, 0

  - `result.data.url` (string)
    The public site URL.
    Example: "https://blog.example.com"

  - `result.data.version` (string)
    The WordPress version. May be empty if unknown.
    Example: "6.4.2"

  - `result.data.wptk_id` (integer,null)
    The WordPress Toolkit instance id. This is null when the
upstream record carries no id. Guard against that before
you send the value to a function that takes an id
parameter, because WordPress Toolkit ids are positive
integers and there is no valid 0.
    Example: 17

  - `result.errors` (array,null)
    List of errors if the API failed.

  - `result.messages` (array,null)
    List of messages generated by the API.

  - `result.metadata` (object)

  - `result.metadata.transformed` (integer)
    Post-processing may have transformed the data.
    Enum: 1

  - `result.status` (integer)
    - 1 - Success. A found installation, or an empty
  (null) data when no such installation exists.
- 0 - Failed: Check the errors field for more details.
    Enum: 1, 0

  - `result.warnings` (array,null)
    List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running an API.


