Get tenant details¶
GET/
Partner API · Tenants
Get a tenant by ID.
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
X-Partner-ID | header | string (uuid) | Yes | Partner ID. |
tenantId | path | string (uuid) | Yes | Tenant ID. |
fields | query | array of string | No | The fields to return in a partial response. |
Request samples¶
curl -X GET "https://api.central.sophos.com/partner/v1/tenants/<tenantId>" -H "Authorization: Bearer <access-token>" -H "X-Partner-ID: <partner-id>"
import requests
response = requests.get(
"https://api.central.sophos.com/partner/v1/tenants/<tenantId>",
headers={
"Authorization": "Bearer <access-token>",
"X-Partner-ID": "<partner-id>",
},
)
print(response.json())
$headers = @{
"Authorization" = "Bearer <access-token>"
"X-Partner-ID" = "<partner-id>"
}
Invoke-RestMethod -Method GET -Uri "https://api.central.sophos.com/partner/v1/tenants/<tenantId>" -Headers $headers
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api.central.sophos.com/partner/v1/tenants/<tenantId>", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer <access-token>")
req.Header.Set("X-Partner-ID", "<partner-id>")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
const response = await fetch("https://api.central.sophos.com/partner/v1/tenants/<tenantId>", {
method: "GET",
headers: {
"Authorization": "Bearer <access-token>",
"X-Partner-ID": "<partner-id>",
},
});
const data = await response.json();
console.log(data);
Responses¶
200 — Existing tenant.¶
Response fields
idstring (uuid)requiredTenant ID.
namestringrequiredName set when the tenant was created.
dataGeographystringrequiredGeographical location where the tenant data is stored.
Must be one of:
Must be one of:
US, IE, DE, CA, AU, JP, IN, BR, AE.dataRegionstringrequiredThe data region where tenant data is stored.
Must be one of:
Must be one of:
eu01, eu02, us01, us02, us03, ca01, au01, jp01, in01, br01, ae01.billingTypestringrequiredBilling type.
Must be one of:
Must be one of:
term, trial, usage, ordered.partnerobjectrequiredRepresents a referenced object.
Show child attributesHide child attributes
idstring (uuid)requiredThe ID of the referenced object.
organizationobjectRepresents a referenced object.
Show child attributesHide child attributes
idstring (uuid)requiredThe ID of the referenced object.
apiHoststring (uri)requiredTenant API host URL.
productsarray of objectProducts list.
Items must be unique.
Items must be unique.
Sophos product code with an optional quantity.
Show child attributesHide child attributes
codestringrequiredSophos product code.
Must match the pattern
Must match the pattern
^[A-Z][a-zA-Z]{0,19}([0-9]{0,4})([-_][a-zA-Z0-9]{0,20}([0-9]{0,3})){0,5}$.quantityintegerQuantity for the number of seats.
statusstringTenant account status.
Must be one of:
Must be one of:
active, suspended, canceled.primarybooleanIndicates whether tenant is primary subestate or not.
managedbooleanIndicates if tenant has enabled management by this partner.
contactobjectContact information for a partner, organization or tenant.
Show child attributesHide child attributes
firstNamestringrequiredFirst name.
lastNamestringrequiredLast name.
emailstring (email)Email address.
phonestringrequiredPhone number.
mobilestringMobile number.
faxstringFax number.
addressobjectrequiredAddress of a partner, organization or tenant.
Show child attributesHide child attributes
address1stringrequiredLine 1 of the address.
address2stringLine 2 of the address.
address3stringLine 3 of the address.
citystringrequiredCity.
statestringState.
countryCodestringrequiredCountry code.
postalCodestringrequiredPostal code.
Errors¶
| Status | Meaning |
|---|---|
500 | Unexpected error. |
All error responses share the same shape — see the error response object.
Response examples¶
200¶
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"dataGeography": "US",
"dataRegion": "eu01",
"billingType": "term",
"partner": {
"id": "00000000-0000-0000-0000-000000000000"
},
"organization": {
"id": "00000000-0000-0000-0000-000000000000"
},
"apiHost": "https://example.com",
"products": [
{
"code": "string",
"quantity": 0
}
],
"status": "active",
"primary": true,
"managed": true,
"contact": {
"firstName": "string",
"lastName": "string",
"email": "user@example.com",
"phone": "string",
"mobile": "string",
"fax": "string",
"address": {
"address1": "string",
"address2": "string",
"address3": "string",
"city": "string",
"state": "string",
"countryCode": "string",
"postalCode": "string"
}
}
}
See the guide for a narrative walkthrough of this API.