# Contract resources

## Get Contract Information

> Retrieves the properties of the user's contract. This operation allows you to obtain the resource limits and the general contract information.

```json
{"openapi":"3.0.3","info":{"title":"CLOUD API","version":"6.0"},"tags":[{"name":"Contract resources"}],"servers":[{"url":"https://api.ionos.com/cloudapi/v6"}],"security":[{"BasicAuthentication":[]},{"TokenAuthentication":[]}],"components":{"securitySchemes":{"BasicAuthentication":{"type":"http","description":"You will need to base64 encode the string containing your credentials. <div style=\"padding: 15px; border: 1px solid #d1ecf1; background-color: #d1ecf1; color: #0c5460; margin-bottom: 15px;\">\n  <strong>Note:</strong><br/><br/>\n  <ul><li><b>Basic Authentication</b> is supported only when <b>2-Factor \n  Authentication</b> is not configured.</li>\n  <li>Users with <b>2-Factor \n  Authentication</b> activated must generate new 2FA-secured tokens in the DCD using [Token Manager](https://docs.ionos.com/cloud/set-up-ionos-cloud/management/identity-access-management/token-manager). \n  These tokens do not inherit the <b>2FA-secured</b> property by default.</li><li>Token deletion is only possible using the <b>Token Manager</b>.</li>\n</div> Separate your username and password with a colon, i.e., username:password and send it as 'Authorization' request header. More details: https://en.wikipedia.org/wiki/Basic_access_authentication","scheme":"basic"},"TokenAuthentication":{"type":"apiKey","description":"Please provide header value as 'Bearer <token>' and don't forget to add 'Bearer' HTTP Authorization Scheme before the token.","name":"Authorization","in":"header"}},"schemas":{"Contracts":{"type":"object","properties":{"id":{"type":"string","description":"The resource's unique identifier.","readOnly":true},"type":{"type":"string","description":"The type of object that has been created.","allOf":[{"$ref":"#/components/schemas/Type"}]},"href":{"type":"string","description":"The URL to the object representation (absolute path).","format":"uri","readOnly":true},"items":{"type":"array","description":"Array of items in the collection.","readOnly":true,"items":{"$ref":"#/components/schemas/Contract"}}}},"Type":{"type":"string","enum":["datacenter","server","volume","nic","loadbalancer","location","firewall-rule","flow-log","image","snapshot","lan","ipblock","pcc","contract","user","group","collection","resource","request","request-status","s3key","backupunit","label","k8s","nodepool","template","networkloadbalancer","forwarding-rule","natgateway","natgateway-rule","node","applicationloadbalancer","target-group","security-group","gpu"]},"Contract":{"required":["properties"],"type":"object","properties":{"type":{"type":"string","description":"The type of the resource.","allOf":[{"$ref":"#/components/schemas/Type"}]},"properties":{"$ref":"#/components/schemas/ContractProperties"}}},"ContractProperties":{"type":"object","properties":{"contractNumber":{"type":"integer","description":"The contract number.","format":"int64","readOnly":true},"owner":{"type":"string","description":"The contract owner's user name.","readOnly":true},"status":{"type":"string","description":"The contract status.","readOnly":true},"regDomain":{"type":"string","description":"The registration domain of the contract.","readOnly":true},"resourceLimits":{"$ref":"#/components/schemas/ResourceLimits"}}},"ResourceLimits":{"required":["coresPerContract","coresPerServer","coresProvisioned","dasVolumeProvisioned","hddLimitPerContract","hddLimitPerVolume","hddVolumeProvisioned","k8sClusterLimitTotal","k8sClustersProvisioned","natGatewayLimitTotal","natGatewayProvisioned","nlbLimitTotal","nlbProvisioned","ramPerContract","ramPerServer","ramProvisioned","reservableIps","reservedIpsInUse","reservedIpsOnContract","ssdLimitPerContract","ssdLimitPerVolume","ssdVolumeProvisioned","securityGroupsPerVdc","securityGroupsPerResource","rulesPerSecurityGroup"],"type":"object","properties":{"coresPerServer":{"type":"integer","description":"The maximum number of CPU cores per server.","format":"int32"},"coresPerContract":{"type":"integer","description":"The maximum number of CPU cores per contract.","format":"int32"},"coresProvisioned":{"type":"integer","description":"The number of CPU cores provisioned.","format":"int32"},"ramPerServer":{"type":"integer","description":"The maximum amount of RAM (in MB) that can be provisioned for a particular server under this contract.","format":"int32"},"ramPerContract":{"type":"integer","description":"The maximum amount of RAM (in MB) that can be provisioned under this contract.","format":"int32"},"ramProvisioned":{"type":"integer","description":"The amount of RAM (in MB) provisioned under this contract.","format":"int32"},"hddLimitPerVolume":{"type":"integer","description":"The maximum size (in MB) of an idividual hard disk volume.","format":"int64"},"hddLimitPerContract":{"type":"integer","description":"The maximum amount of disk space (in MB) that can be provided under this contract.","format":"int64"},"hddVolumeProvisioned":{"type":"integer","description":"The amount of hard disk space (in MB) that is currently provisioned.","format":"int64"},"ssdLimitPerVolume":{"type":"integer","description":"The maximum size (in MB) of an individual solid state disk volume.","format":"int64"},"ssdLimitPerContract":{"type":"integer","description":"The maximum amount of solid state disk space (in MB) that can be provisioned under this contract.","format":"int64"},"ssdVolumeProvisioned":{"type":"integer","description":"The amount of solid state disk space (in MB) that is currently provisioned.","format":"int64"},"dasVolumeProvisioned":{"type":"integer","description":"The amount of DAS disk space (in MB) in a Cube server that is currently provisioned.","format":"int64"},"reservableIps":{"type":"integer","description":"The maximum number of static public IP addresses that can be reserved by this customer across contracts.","format":"int32"},"reservedIpsOnContract":{"type":"integer","description":"The maximum number of static public IP addresses that can be reserved for this contract.","format":"int32"},"reservedIpsInUse":{"type":"integer","description":"The number of static public IP addresses in use.","format":"int32"},"k8sClusterLimitTotal":{"type":"integer","description":"The maximum number of Kubernetes clusters that can be created under this contract.","format":"int32"},"k8sClustersProvisioned":{"type":"integer","description":"The amount of Kubernetes clusters that is currently provisioned.","format":"int32"},"nlbLimitTotal":{"type":"integer","description":"The NLB total limit.","format":"int32"},"nlbProvisioned":{"type":"integer","description":"The NLBs provisioned.","format":"int32"},"natGatewayLimitTotal":{"type":"integer","description":"The NAT Gateway total limit.","format":"int32"},"natGatewayProvisioned":{"type":"integer","description":"The NAT Gateways provisioned.","format":"int32"},"securityGroupsPerVdc":{"type":"integer","description":"The maximum number of security groups per VDC.","format":"int32"},"securityGroupsPerResource":{"type":"integer","description":"The maximum number of security groups that can be attached to a NIC or a VM individually. For example, a user can have maximum 10 security groups per NIC and 10 per VM.","format":"int32"},"rulesPerSecurityGroup":{"type":"integer","description":"The maximum number of rules per security group.","format":"int32"}}},"Error":{"type":"object","properties":{"httpStatus":{"type":"integer","description":"HTTP status code of the operation.","format":"int32","readOnly":true},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ErrorMessage"}}}},"ErrorMessage":{"type":"object","properties":{"errorCode":{"type":"string","description":"Application internal error code.","readOnly":true},"message":{"type":"string","description":"A human-readable message.","readOnly":true}}}}},"paths":{"/contracts":{"get":{"tags":["Contract resources"],"summary":"Get Contract Information","description":"Retrieves the properties of the user's contract. This operation allows you to obtain the resource limits and the general contract information.","operationId":"contractsGet","parameters":[{"name":"pretty","in":"query","description":"Controls whether the response is pretty-printed (with indentations and new lines).","schema":{"type":"boolean","default":true}},{"name":"depth","in":"query","description":"Controls the detail depth of the response objects. \nGET /datacenters/[ID]\n\t- depth=0: Only direct properties are included; children (servers and other elements) are not included.\n\t- depth=1: Direct properties and children references are included.\n\t- depth=2: Direct properties and children properties are included.\n\t- depth=3: Direct properties and children properties and children's children are included.\n\t- depth=... and so on","schema":{"maximum":10,"minimum":0,"type":"integer","format":"int32","default":0}},{"name":"X-Contract-Number","in":"header","description":"Users with multiple contracts must provide the contract number, for which all API requests are to be executed.","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Successful operation","headers":{"X-RateLimit-Remaining":{"description":"The number of requests that can still be made without triggering a failure response.","schema":{"type":"integer","format":"int32"}},"X-RateLimit-Limit":{"description":"The average number of requests per minute allowed.","schema":{"type":"integer","format":"int32"}},"X-RateLimit-Burst":{"description":"The maximum number of concurrent API requests allowed.","schema":{"type":"integer","format":"int32"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contracts"}}}},"default":{"description":"Any erroneous status code: 400 (parse error), 401 (auth error), 402 (trial access), 403 (insufficient privileges), 404 (not found), 405 (unsupported HTTP method), 415 (unsupported content type, 422 (validation error), 429 (request rate limit exceeded), 500 (server error), or 503 (maintenance).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```
