Quickstart
This guide will get you up and running with the UpCloud API. We'll cover the API endpoint, authentication, and how to make your first request.
API endpoint
The base URL for all UpCloud API operations is:
https://api.upcloud.com/1.3/
All API operations require authentication using either Bearer tokens (recommended) or HTTP Basic authentication.
API Base URL
# All requests go to this base URL
https://api.upcloud.com/1.3/
Make your first request
After obtaining your API credentials, you can make your first request. The example shows how to retrieve your account information, which is a good way to verify your authentication is working correctly.
Required headers
- Name
Authorization- Type
- string
- Description
Your Bearer token or Basic auth credentials.
Request
curl -X GET https://api.upcloud.com/1.3/account \
-H "Authorization: Bearer ucat_YOUR_API_TOKEN"
API versioning
The API uses versioning to allow backwards-incompatible modifications without affecting clients using older versions. The versioning uses an X.Y.Z scheme where X.Y is shown in the URL.
Version behavior
- Name
Backwards compatible- Description
Changes like adding new features or modifying error messages increment the Z version.
- Name
Backwards incompatible- Description
Small or large incompatible changes increment the Y or X version respectively.
Error codes
- Name
API_VERSION_INVALID- Description
Returned when an invalid or non-existent API version is requested.
- Name
API_VERSION_OBSOLETE- Description
Returned when an obsolete API version is requested.
API Versions
# Current API version
https://api.upcloud.com/1.3/
# Version is included in the URL path
/1.3/server
/1.3/storage
/1.3/account
Data formats
The API supports both JSON and XML data formats. JSON is the default and recommended format. The format is specified using HTTP headers.
Content headers
- Name
Accept- Type
- string
- Description
Defines the expected response format. Use
application/jsonorapplication/xml.
- Name
Content-Type- Type
- string
- Description
Defines the request body format. Use
application/jsonorapplication/xml.
Request Headers
curl -X POST https://api.upcloud.com/1.3/server \
-H "Authorization: Bearer ucat_YOUR_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"server": {"title": "My Server"}}'