You can retrieve the list of contracts that your account credentials are authorized to access using either of the following:
a username and a password combination.
a token to access the API. For more information about obtaining tokens for relevant contracts, see Authentication API for Tokens.
Use the following endpoint to retrieve a list of contracts: https://api.ionos.com/activitylog/v1/contracts.
To make authenticated requests to the API, the following fields are mandatory in the request header:
A 200 Successful operation lists all the contracts.
Authorization
yes
string
You can use Basic Authentication or a Bearer token. For more information, see Authentication.
Content-Type
yes
string
Set this to application/json.
curl -X 'GET' \
'https://api.ionos.com/activitylog/v1/contracts' \
-H 'accept: application/json'[
{
"id": 12345678,
"type": "contracts",
"href": "https://api.ionos.com/activitylog/v1/contracts/12345678"
},
{
"id": 98765432,
"type": "contracts",
"href": "https://api.ionos.com/activitylog/v1/contracts/98765432"
}
]