Instances

List Instances

get
Authorizations
OAuth2implicitRequired

OAuth2 flow

Authorization URL:
Query parameters
servicesinteger · int64[]Optional
namesstring[]Optional

Names, example: resource01,!resource02,resource42

typesstring[]Optional

Types, example: WINDOWS,AIX,LINUX

familiesstring[]Optional

Families, example: DEBIAN,CENTOS,RHEL

environmentsstring[]Optional

Environments, example: PRODUCTION,DEVELOPMENT

statusesstring[]Optional

Status, example: ACTIVE,INACTIVE

tagsstring[]Optional

Tags, example: mytagkey:mytagvalue,application:itcare

backupStatusbooleanOptional

Filter list by backup status

recoveryStatusbooleanOptional

Filter list by DRP status

includedInPatchPartybooleanOptional

Filter list by patch party status

azstring[]Optional

Availability Zone, example: EB-A, EB-B, EB-C, etc...

ipstring[]Optional

IPs, example: 10.59.13.29

vlanstring[]Optional

VLAN, example: EB_1125_DMZ8

cloudsintegerOptional
pagestringOptional

Results page you want to retrieve (0..N)

sizestringOptional

Number of records per page.

sortanyOptional

Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria is not supported.

Responses
chevron-right
200

OK

*/*
emptybooleanOptional
firstbooleanOptional
lastbooleanOptional
numberinteger · int32Optional
numberOfElementsinteger · int32Optional
sizeinteger · int32Optional
totalElementsinteger · int64Optional
totalPagesinteger · int32Optional
get
/compute/instances

Create an instance

post

This method allows to create an instance.

You will have to know at the minimum :

  • the area or availability zone of the region (area & az attributes).
  • which product to create
  • name of instance (name attribute)
  • sizing of instance (resourceId attribute)
  • service in which you want to put your instance (serviceId attribute)

This method is asynchronous (status code 202) and you'll have to wait for async action to be completed by checking its status.

POST /instances { "name": "PINSTANCE01", "region": "EB4", "serviceId": 13, "productCode": "deb8", "resourceId": "1cpu2gb"}   

This will create a Debian 8 machine (1cpu 2gb RAM) in EB4 region, named PINSTANCE01, and put it into service of ID 13.

By setting only these parameters, ITCare will use default profile of image (disk configuration) and choose most appropriate Availability Zone and network to host your instance. If you want to specify those parameters take a look at other examples in this documentation.

Response :

  {
    "id": "1333",
    "status": "IN_PROGRESS"
    
  }

With some python code, you can create instance and wait for completion like this:

instance = {
	"name": "PINSTANCE01",
	"region": "EB4",
	"serviceId": 13,
	"productCode": "deb8",
	"resourceId": "1cpu2gb"
}

action = itcare.post('/api/instances', payload=instance)

while action['status']=='IN_PROGRESS':
    time.sleep(1)
    action = itcare.get('/api/actions/{}'.format(action['id']))

print action['status']

Choose target Platform and properties

You'll have to know which platform you want to create, and so use Platforms methods to properly fill in relevant attributes (disks / custom properties / allocated resources...).

Choose Availability Zone and Network

You may want to choose your availability zone and network, you can do this by adding availabilityZone and networkId parameters to your request.

To discover both availability zones and networks, you can use methods Regions, AZ, and Networks.

Authorizations
OAuth2implicitRequired

OAuth2 flow

Authorization URL:
Body

Describes the instance to be created.

areastringOptional

Area. Refer to an Area of a Region, that is a low-latency network area, available in List Regions method. If absent, default Area of Region will be used.

authenticationDomainIdstringOptional

authentication domain id, if not set, will take default, example: CGDM-EMEA

availabilityZonestringOptional

Availability zone id. Refer to AZ available in List Availability Zones method. If absent, default AZ of region will be used.

azstringOptional
backupEnabledbooleanOptional

Indicates if backup has to be setup on instance. If absent, backup will be setup automatically if instance is in a production service.

backupOffSiteEnabledbooleanOptional

Indicates if backup off site (data replicated to another region) has to be setup on instance. If absent, backup off site will be setup automatically if instance is in a production service.

cloudIdinteger · int64Optional
dbBackupPolicyIdstringOptional

BackupPolicy id. Refers to desired backup policy to be applied for the database, must be set when backup is enabled.

namestringRequired

hostname of instance. Must be unique, and fit naming rules convention., example: PEB4MYAPP01

networkIdinteger · int64Optional

Network id. Refer to networks available in List Networks method. If absent, a default network of AZ will be used.

noBackupProdReasonstringOptional

Indicates why a production resource is not under backup.

noMonitoringProdReasonstringOptional

Indicates why a production resource is not under monitoring.

noReplicationProdReasonstringOptional

Indicates why a production resource is not replicated.

platformstringOptional

id of platform (image) of instance. To discover available platforms, use ListPlatforms method, example: deb8 for Debian 8

productCodestringOptional

code of product., example: rmq11 for RabbitMQ 11

regionstringRequired

Region. that is a low-latency network area, available in List Regions method. If absent, default Area of Region will be used.

regulationstringOptional

Regulation. Refer to the regulation of the Area (HDS|STANDARD). If absent, default 'STANDARD' will be used.

replicationEnabledbooleanOptional

Indicates if replication will be setup. If absent, it will be automatically be setup if this is an production environment

resourceIdstringRequired

identifier of resources (cpu/ram) that will be allocated to the instance. Use List Platforms method to see resources available for each of them., example: 1cpu2gb

serverBackupPolicyIdstringOptional

BackupPolicy id. Refers to desired backup policy to be applied for the virtual machine, must be set when backup is enabled.

serviceIdinteger · int64Required

id of service to put instance in.

specificRequeststringOptional

specific request to be done by an administrator. Can differ delivery of instance up to 24h., example: Could you please install .NET framework 4.5 on instance ? Thanks.

storagePoolstringOptional
supportLevelstring · enumOptional

Indicates monitoring and support level, if absent then we use boolean variables to describe which level

Possible values:
Responses
chevron-right
200

OK

application/vnd.cegedim-it.v1+json

An action gives status about processing of a task previously launched by an API call and asynchronously processed.

familystringOptional
idinteger · int32Optional
internalIdinteger · int64Optional
lastUpdatedAtstring · date-timeOptional
messagestringOptional

Human readable message of status

processstringOptional

Code of action performed

resourceNamestringOptional
resourceTypestringOptional
statusstring · enumOptional

Status label of action

Possible values:
post
/compute/instances

Delete an instance

delete

This method allows to delete an instance.

Instance has to be in INACTIVE status, meaning that you have to stop it before deleting it. Use Update Instance PATCH method with stop operation prior to this deletion.

This operation cannot be undone afterwards.

This method is asynchronous (status code 202) and you'll have to wait for async action to be completed by checking its status.

Example (no body required) :

DELETE /instances/1233

With additional change reference :

DELETE /instances/1233
{
   "changeReference": "RFC_123"
}
Authorizations
OAuth2implicitRequired

OAuth2 flow

Authorization URL:
Path parameters
idinteger · int64Required

id, example: 123

Body

Parameters when deleting a resource

changeReferencestring · max: 10Optional

Optional reference for change

Responses
chevron-right
200

OK

application/vnd.cegedim-it.v1+json

An action gives status about processing of a task previously launched by an API call and asynchronously processed.

familystringOptional
idinteger · int32Optional
internalIdinteger · int64Optional
lastUpdatedAtstring · date-timeOptional
messagestringOptional

Human readable message of status

processstringOptional

Code of action performed

resourceNamestringOptional
resourceTypestringOptional
statusstring · enumOptional

Status label of action

Possible values:
delete
/compute/instances/{id}

Get detailled information for an instance.

get
Authorizations
OAuth2implicitRequired

OAuth2 flow

Authorization URL:
Path parameters
idinteger · int64Required

Resource Id, example: 123

Responses
chevron-right
200

OK

application/vnd.cegedim-it.v1+json

Instance object

authenticationDomainstringOptional
backupStatusbooleanOptional
categorystringOptional
cloudIdinteger · int64Optional
cloudNamestringOptional
commentstringOptional
cpuinteger · int64Optional

CPU of the resource

creationTimestringOptional
creationUserstringOptional
endOfSalesAtstring · date-timeOptional
endOfSupportAtstring · date-timeOptional
environmentstringOptional
extendedSupportAtstring · date-timeOptional
familystringOptional
idinteger · int64Optional
imageCodestringOptional

Internal Image linked to this instance

internalResourceIdinteger · int64Optional
internalTypestringOptional
ipAddressstringOptional
isExternalIngressNodebooleanOptional

This instance is ingress external node

isInternalIngressNodebooleanOptional

This instance is ingress internal node

isMemberOFLoadBalancerbooleanOptional

Instance is member of load balancer

labelstringOptional
labelAreastringOptional

Area pretty name

labelAvailabilityZonestringOptional

Availability Zone pretty name

labelDataCenterstringOptional

DataCenter pretty name

labelRegionstringOptional

Region pretty name

metrologyUrlstringOptional
monitoringRequestedbooleanOptional
namestringOptional
osNamestringOptional

OS name of this instance

osTypestringOptional

OS type of this instance

parentResourceTypestringOptional
pathstringOptional
prettyLabelstringOptional
productCodestringOptional
productNamestringOptional
productVersionstringOptional
raminteger · int64Optional

RAM of the resource

releasedAtstring · date-timeOptional
replicationStatusbooleanOptional
resourceTypestringOptional
serviceIdinteger · int64Optional
serviceKeystringOptional
serviceNamestringOptional
statusstringOptional
storagenumberOptional

Storage after disks format in GB of the resource

storageMoveInProgressbooleanOptional

Information about storage replication in Progress

supportLevelstring · enumOptionalPossible values:
supportPhasestringOptional
technologystringOptional
totalSizeDisksstringOptionalDeprecated

Total Disk size of the resource

typestringOptional
get
/compute/instances/{id}

Update an instance

patch

This method allows to update an instance.

Structure of payload is generic and describes :

  • operation you want to be performed
  • options to pass to operation to have the operation performed.

Below are different operations currently implemented.

Stop an Instance

Use the stop operation to perform the stop of instance.

This method is asynchronous (status code 202) and you'll have to wait for async action to be completed by checking its status.

Use this method only if instance is running and is in the ACTIVE state. Otherwise a 400 status error code will be returned.

PATCH /instances/1234
{
	"operation": "stop"
}

You can also put an optional changeReference if you want ITCare keep a reference to external change management system :

PATCH /instances/1234
{
	"operation": "stop",
	"options": {
	   "changeReference": "RFC_123"
	}
}

Start an Instance

Use the start operation to perform the start of instance.

This method is asynchronous (status code 202) and you'll have to wait for async action to be completed by checking its status.

Use this method only if instance is not running and is in the INACTIVE state. Otherwise a 400 status error code will be returned.

PATCH /instances/1234
{
	"operation": "start"
}

You can also put an optional changeReference if you want ITCare keep a reference to external change management system :

PATCH /instances/1234
{
	"operation": "start",
	"options": {
	   "changeReference": "RFC_123"
	}
}

Reset an Instance

Use the reset operation to perform the reset of instance.

Reset operation will perform a hard reset of instance, like power off/power on.

This operation may result in data loss, your applications and services will not be stopped gracefully.

This method is asynchronous (status code 202) and you'll have to wait for async action to be completed by checking its status.

Use this method only if instance is running and is in the ACTIVE state. Otherwise a 400 status error code will be returned.

PATCH /instances/1234
{
	"operation": "reset"
}

You can also put an optional comment that will be display in monitoring system :

PATCH /instances/1234
{
	"operation": "reset",
	"options": {
	   "comment": "Reset instance because OS is freezed"
	}
}

Resize an Instance

Use the resize operation to perform the resize of instance.

This method is asynchronous (status code 202) and you'll have to wait for async action to be completed by checking its status.

Use this method only if instance is not running and is in the INACTIVE or ACTIVE state. Otherwise a 400 status error code will be returned.

PATCH /instances/1234
{
    "operation": "resize",
    "options": {
        "sizing": "2cpu4gb",
        "changeReference": ""
    }
}

Update Patch Party Statuses

Use the operation update_patch_party to manage the patch party settings of your instances.

2 options are available :

  • If the instance is to be excluded from the patch parties, an explanation must be given.
PATCH /instances/1234
{
	"operation": "update_patch_party",
	"options": {
	   "patchParty": {
	      "excluded": true,
	      "exclusionReason": "I want to handle this App. by myself"
	   }
	}
}
  • If the instance is to be included to a patch party, you can specify the group on which the instance will be patched.

There are 3 groups available defining the sequence on which the instance should be updated: 1 (First Group), 2 (Second Group) or 3 (Third Group).

If no group is set, it means that you have no preference while defining the sequences.

PATCH /instances/1234
{
	"operation": "update_patch_party",
	"options": {
	   "patchParty": {
	      "excluded": false,
	      "patchGroup": 3
	   }
	}
}

Replication management

Use the operation update_storage_replication to manage the replication settings of your instances.

2 options are available :

  • Deactivation of replication.
PATCH /instances/1234
{
	"operation": "update_storage_replication",
	"options": {
	   "state": false
	}
}
  • Activation of replication.
PATCH /instances/1234
{
	"operation": "update_storage_replication",
	"options": {
	   "state": true
	}
}
  • For production resource, if the replication is to be deactivated , an explanation must be given.
PATCH /instances/1234
{
	"operation": "update_storage_replication",
	"options": {
	   "state": true,
	   "deactivationReason": "I want it ..."
	}
}

Instance Backup Management

Use the update_backup operation to enable/disable instance backup.

Requirements to update manage backup are :

  • The platform supporting the instance must allow backup
  • Only virtual appliances are manageable For 'disable backup'
  • For production resource, a reason must be given under the 'option' attribute

2 options are available:

  • Enable backup.
PATCH /instances/1234
{
    "operation": "update_backup",
    "options": {
       "state": true
    }
}
  • Disable backup.
PATCH /instances/1234
{
    "operation": "update_backup",
    "options": {
       "state": false,
       "deactivationReason": "Because.."    
    }
}
Authorizations
OAuth2implicitRequired

OAuth2 flow

Authorization URL:
Path parameters
idinteger · int64Required

id, example: 123

Body
operationstringOptional
Responses
chevron-right
200

OK

application/vnd.cegedim-it.v1+json

An action gives status about processing of a task previously launched by an API call and asynchronously processed.

familystringOptional
idinteger · int32Optional
internalIdinteger · int64Optional
lastUpdatedAtstring · date-timeOptional
messagestringOptional

Human readable message of status

processstringOptional

Code of action performed

resourceNamestringOptional
resourceTypestringOptional
statusstring · enumOptional

Status label of action

Possible values:
patch
/compute/instances/{id}

Get network information

get
Authorizations
OAuth2implicitRequired

OAuth2 flow

Authorization URL:
Path parameters
idinteger · int64Required

Resource Id, example: 123

Responses
chevron-right
200

OK

application/vnd.cegedim-it.v1+json
areastringOptional
cidrstringOptional
cloudstringOptional
defaultNetworkbooleanOptional
descriptionstringOptional
environmentstringOptional
gatewaystringOptional
idinteger · int64Optional
ipAddressstringOptional
ipFreeNumberinteger · int32Optional
isIpRangePublicbooleanOptional
maskstringOptional
networkShortDescriptionstringOptional
regionstringOptional
scopestringOptional
shortDescriptionstringOptional
technicalIdstringOptional
usedPercentinteger · int32Optional
get
/compute/instances/{id}/networks

Get Snapshot

get
Authorizations
OAuth2implicitRequired

OAuth2 flow

Authorization URL:
Path parameters
idinteger · int64Required

Resource Id, example: 123

Responses
chevron-right
200

OK

application/vnd.cegedim-it.v1+json

Snapshot of an instance

changeReferencestring · max: 10Optional

Optional change reference

createdAtstring · date-timeOptional

Ignored at creation. Creation date of snapshot

createdBystringOptional

Ignored at creation. User full-name who created snapshot

descriptionstring · max: 100Optional

Snapshot description

expiresAtstring · date-timeOptional

Ignored at creation. Expiration date of snapshot

idstringOptional

Ignored at creation. Indicates the snapshot identifiant

labelstringOptional

Ignored at creation. Indicates the label

recoveredAtstring · date-timeOptional

Ignored at creation. Recovery date of snapshot

snapshotSizenumber · floatOptional

Ignored at creation. Size in Gb of snapshot

get
/compute/instances/{id}/snapshots

Recover a snapshot

patch
Authorizations
OAuth2implicitRequired

OAuth2 flow

Authorization URL:
Path parameters
idinteger · int64Required

Resource Id, example: 123

Responses
chevron-right
200

OK

application/vnd.cegedim-it.v1+json

An action gives status about processing of a task previously launched by an API call and asynchronously processed.

familystringOptional
idinteger · int32Optional
internalIdinteger · int64Optional
lastUpdatedAtstring · date-timeOptional
messagestringOptional

Human readable message of status

processstringOptional

Code of action performed

resourceNamestringOptional
resourceTypestringOptional
statusstring · enumOptional

Status label of action

Possible values:
patch
/compute/instances/{id}/snapshots

Create a snapshot

post
Authorizations
OAuth2implicitRequired

OAuth2 flow

Authorization URL:
Path parameters
idinteger · int64Required

Resource Id, example: 123

Body
changeReferencestring · max: 10Optional

Optional change reference

descriptionstring · max: 100Optional

Snapshot description

Responses
chevron-right
200

OK

application/vnd.cegedim-it.v1+json

An action gives status about processing of a task previously launched by an API call and asynchronously processed.

familystringOptional
idinteger · int32Optional
internalIdinteger · int64Optional
lastUpdatedAtstring · date-timeOptional
messagestringOptional

Human readable message of status

processstringOptional

Code of action performed

resourceNamestringOptional
resourceTypestringOptional
statusstring · enumOptional

Status label of action

Possible values:
post
/compute/instances/{id}/snapshots

Delete a Snapshot

delete
Authorizations
OAuth2implicitRequired

OAuth2 flow

Authorization URL:
Path parameters
idinteger · int64Required

Resource Id, example: 123

snapshotIdstringRequired

Snapshot Id, example: 123-snap-42

Responses
chevron-right
200

OK

application/vnd.cegedim-it.v1+json

An action gives status about processing of a task previously launched by an API call and asynchronously processed.

familystringOptional
idinteger · int32Optional
internalIdinteger · int64Optional
lastUpdatedAtstring · date-timeOptional
messagestringOptional

Human readable message of status

processstringOptional

Code of action performed

resourceNamestringOptional
resourceTypestringOptional
statusstring · enumOptional

Status label of action

Possible values:
delete
/compute/instances/{id}/snapshots/{snapshotId}

Get storage

get
Authorizations
OAuth2implicitRequired

OAuth2 flow

Authorization URL:
Path parameters
idinteger · int64Required

Resource Id, example: 123

Responses
chevron-right
200

OK

application/vnd.cegedim-it.v1+json

Information about a Storage of an Instance

totalSizeDisksnumberOptional

total size of all disks

totalSizeFileSystemsnumberOptional

total size of all file systems

get
/compute/instances/{id}/storage

Last updated