Home > developer > integration development > Uniphy API Documentation
Note: all calls will use the api token - see Get Auth Token:
https://<your-server>/account/profile#authentication
Sample curl using the auth-token:
curl -i -u <AUTH-TOKEN>: -H "Content-Type:application/json" -H "Accept:application/json" -X GET -v https://<your-server>/account/organizations
https://<your-server>/account/organizations
https://<your-server>/<ORGANIZATION-NAME>/clouds
https://<your-server>/<ORGANIZATION-NAME>/clouds/<CLOUD-NAME>
https://<your-server>/<ORGANIZATION-NAME>/clouds
https://<your-server>/<ORGANIZATION-NAME>/clouds/locations.json
https://<your-server>/<ORGANIZATION-NAME>/clouds/<CLOUD-NAME>/services/available.json
https://<your-server>/<ORGANIZATION-NAME>/clouds/<CLOUD-NAME>/services/<SERVICE-NAME>
First fetch the new service body content using:
https://<your-server>/<ORGANIZATION-NAME>/clouds/<CLOUD-NAME>/services/<SERVICE-NAME>/new.json
Then:
POST: https://<your-server>/<ORGANIZATION-NAME>/clouds/<CLOUD-NAME>/services/
Body: Take the response from new call and update all necessary fields/attributes to create body
First fetch the new service body content using:
https://<your-server>/<ORGANIZATION-NAME>/clouds/<CLOUD-NAME>/services/<SERVICE-NAME>
Then:
PUT https://<your-server>/<ORGANIZATION-NAME>/clouds/<CLOUD-NAME>/services/<SERVICE-NAME>
Body: Take the response from get call and update all necessary fields/attributes to create body
https://<your-server>/<ORGANIZATION-NAME>/reports/compute.json
The response has two major sections:
https://<your-server>/<ORGANIZATION-NAME>/reports/compute.json?grouping=cloud
https://<your-server>/<ORGANIZATION-NAME>/assemblies
https://<your-server>/<ORGANIZATION-NAME>/assemblies/<ASSEMBLY-NAME>
https://<your-server>/<ORGANIZATION-NAME>/assemblies
Body:
{
"cms_ci": {
"comments": "<COMMENT>",
"ciName": "<ASSEMBL-NAME>",
"ciAttributes": {
"description": "<description>",
"owner": "<EMAIL ADDRESS>"
}
}
}
https://<your-server>/<ORGANIZATION-NAME>/assemblies/<ASSEMBLY-NAME>
https://<your-server>/<ORGANIZATION-NAME>/assemblies/<ASSEMBLY-NAME>/design/platforms
https://<your-server>/<ORGANIZATION-NAME>/assemblies/<ASSEMBLY-NAME>/design/platforms/<PLATFORM-NAME>
https://<your-server>/<ORGANIZATION-NAME>/assemblies/<ASSEMBLY-NAME>/design/platforms
Body:
{
"cms_dj_ci": {
"comments": "<my comment>",
"ciName": "<PLATFORM-NAME>",
"ciAttributes": {
"source": "<PACKSOURCE>",
"description": "<description>",
"major_version": "<MAJOR-VERSION>",
"pack": "<pack>",
"version": "<VERSION>"
}
}
}
https://<your-server>/<ORGANIZATION-NAME>/assemblies/<ASSEMBLY-NAME>/design/platforms/<PLATFORM-NAME>/components
Body:
{
"cms_dj_ci": {
"createdBy": "klohia",
"execOrder": 0,
"ciName": "user-app",
"ciId": "12752422",
"nsPath": "/testing/testassm/_design/t1",
"ciClassName": "catalog.User",
"ciAttributes": {
"username": "app",
"system_account": "true",
"description": "App User",
"login_shell": "/bin/bash",
"home_directory": "/app",
"authorized_keys": "<SSH-KEY>",
"ulimit": "16384",
"sudoer": "true"
}
}
}
Attributes of component are very specific to each component.
https://<your-server>/<ORGANIZATION-NAME>/assemblies/<ASSEMBLY-NAME>/design/platforms/<PLATFORM-NAME>/variables
Body:
{
"cms_dj_ci": {
"comments": "",
"impl": "oo::chef-11.4.0",
"createdBy": "klohia",
"execOrder": 0,
"ciName": "appVersion",
"ciId": "12752469",
"nsPath": "/testing/testassm/_design/t1",
"ciGoid": "12752412-1873-12752469",
"ciClassName": "catalog.Localvar",
"ciAttributes": {
"value": "1.0"
}
}
}
https://<your-server>/<ORGANIZATION-NAME>/assemblies/<ASSEMBLY-NAME>/design/platforms/<PLATFORM-NAME>
https://<your-server>/<ORGANIZATION-NAME>/assemblies/<ASSEMBLY-NAME>/transition/environments/<ENVIRONMENT-NAME>
https://<your-server>/<ORGANIZATION-NAME>/assemblies/<ASSEMBLY-NAME>/transition/environments/<ENVIRONMENT-NAME>
Body:
{
"clouds": {"<CLOUD_CID>":"<Priority>",
"<CLOUD_CID>":"<Priority>"
},
"platform_availability": {
"<PLATFORM-DESIGN-ID>": "redundant"
},
"cms_ci": {
"ciName": "<ENVIRONMENT-NAME>",
"nsPath": "<ORGANIZATION-NAME>/<ASSEMBLY-NAME>",
"ciAttributes": {
"autorepair": "true",
"monitoring": "true",
"description": "<DESCRIPTION>",
"dpmtdelay": "60",
"subdomain": "<ENVIRONMENT-NAME>.<ASSEMBLY-NAME>.<ORGANIZATION-NAME>",
"codpmt": "false",
"debug": "false",
"global_dns": "true",
"autoscale": "true",
"availability": "redundant/single"
}
}
}
https://<your-server>/<ORGANIZATION-NAME>/assemblies/<ASSEMBLY-NAME>/transition/environments/<ENVIRONMENT-NAME>/platforms/<PLATFORM_NAME>/cloud_configuration
Body:
{
"cloud_id": "<cloud ci-id>",
"attributes": {
"adminstatus": "active OR inactive OR offline",
"priority": "1 OR 2",
"pct_scale": ...,
"dpmt_order": ...
}
}
All attributes are optional (pass in only what needs to be updated).
Attributes:
1
or secondary => 2
)https://<your-server>/<ORGANIZATION-NAME>/assemblies/<ASSEMBLY-NAME>/transition/environments/<ENVIRONMENT-NAME>/commit
https://<your-server>/<ORGANIZATION-NAME>/assemblies/<ASSEMBLY-NAME>/transition/environments/<ENVIRONMENT-NAME>/releases/bom
https://<your-server>/<ORGANIZATION-NAME>/assemblies/<ASSEMBLY-NAME>/transition/environments/<ENVIRONMENT-NAME>/releases/latest
https://<your-server>/<ORGANIZATION-NAME>/assemblies/<ASSEMBLY-NAME>/transition/environments/<ENVIRONMENT-NAME>/deployments/
Body:
{
"cms_deployment": {
"releaseId": "<LATEST-RELEASE-BOM>",
"nsPath": "/<ORGANIZATION-NAME>/<ASSEMBLY-NAME>/<ENVIRONMENT-NAME>/bom"
}
}
https://<your-server>/<ORGANIZATION-NAME>/assemblies/<ASSEMBLY-NAME>/transition/environments/<ENVIRONMENT-NAME>/deployments/<DEPLOYMENT_ID>/status
https://<your-server>/<ORGANIZATION-NAME>/assemblies/<ASSEMBLY-NAME>/transition/environments/<ENVIRONMENT-NAME>/disable
Body:
{ "platformCiIds" : ["<platformCiId>","<PlatformCiId>",...] }
https://<your-server>/<ORGANIZATION-NAME>/assemblies/<ASSEMBLY-NAME>/transition/environments/<ENVIRONMENT-NAME>/pull
https://<your-server>/<ORGANIZATION-NAME>/assemblies/<ASSEMBLY-NAME>/transition/environments/<ENVIRONMENT-NAME>
https://
https://<your-server>/<ORGANIZATION-NAME>/assemblies/<ASSEMBLY-NAME>/operations/environments/<ENV_NAME>/platforms/<PLATFORM-NAME>/components/<COMPONENT-NAME>/instances/<INSTANCE_ID>/state
Body:
{ "state" : "replace" }
https://<your-server>/<ORGANIZATION-NAME>/assemblies/<ASSEMBLY-NAME>/operations/environments/<ENV_NAME>/platforms/<PLATFORM-NAME>/components/<COMPONENT-NAME>/actions
https://<your-server>/<ORGANIZATION-NAME>/assemblies/<ASSEMBLY-NAME>/operations/environments/<ENV_NAME>/platforms/<PLATFORM-NAME>/components/<COMPONENT-NAME>/instances?instances_state=all
https://<your-server>/<ORGANIZATION-NAME>/operations/procedures
Body:
{
"cms_procedure": {
"procedureCiId": "0",
"procedureName": "<Name>",
"ciId": "<Component_id>",
"procedureState": "active",
"definition": "{"flow":[{"targetIds":["<Instance_id>"],"relationName":"base.RealizedAs","direction":"from","actions":[{"actionName":"<Action-name>","stepNumber":1,"isCritical":true}]}],"name":"<Action-name>"}"
}
}
For example:
{
"cms_procedure": {
"procedureCiId": "0",
"procedureName": "reboot",
"ciId": "9277281",
"procedureState": "active"
"definition": "{"flow":[{"targetIds":["9277720"],"relationName":"base.RealizedAs","direction":"from","actions":[{"actionName":"reboot","stepNumber":1,"isCritical":true}]}],"name":"reboot"}"
}
}
Use procedure_id from previous call:
https://<your-server>/<ORGANIZATION-NAME>/assemblies/<Assembly-name>/operations/environments/<ENV-NAME>/platforms/<Platform-name>/procedures/<Procedure-id>
https://<your-server>/<ORGANIZATION-NAME>/assemblies/<ASSEMBLY-NAME>/operations/environments/<ENV-NAME>/platforms/<PLATFORM-NAME>/components/compute/instances.json?instances_state=all