Home > developer > integration development > OneOps 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://
This can be used to get the ciId of the component for use in procedures to perform actions on components
https://<your-server>/<ORGANIZATION-NAME>/assemblies/<ASSEMBLY-NAME>/operations/environments/<ENV_NAME>/platforms/<PLATFORM-NAME>/components/<COMPONENT-NAME>
Sample url
https://baseurl/testorg/assemblies/testassembly/operations/environments/testenv/platforms/testplat/components/compute
{
"rfcId": 0,
"releaseId": 0,
"ciId": 12345678,
"nsPath": "/testorg/testassembly/testenv/manifest/testplatf/1",
"ciClassName": "manifest.testorg.1.Compute",
"impl": null,
"ciName": "compute",
"ciGoid": "12345678-12345-1234557665",
"ciState": "default",
"rfcAction": null,
"releaseType": null,
"createdBy": "testuser",
"updatedBy": null,
"rfcCreatedBy": null,
"rfcUpdatedBy": null,
"execOrder": 0,
"lastAppliedRfcId": 123456789,
"comments": null,
"isActiveInRelease": false,
"rfcCreated": null,
"rfcUpdated": null,
"created": 1527673973525,
"updated": 1527673973525,
"hint": null,
"ciAttributes": {
"required_availability_zone": null,
"size": "M-WIN",
"accelerated_flag": "false",
"require_public_ip": "false",
"ports": "{}"
},
"ciBaseAttributes": {},
"ciAttrProps": {}
}
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:
Sample Url
https://baseurl/testorg/operations/proceudres
{
"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\"}"
}
}
{
"ciId": 123456789,
"procedureCiId": 0,
"procedureState": "active",
"arglist": "",
"definition": null,
"procedureName": "reboot",
"procedureId": 123456789,
"maxExecOrder": 1,
"createdBy": "testuser",
"created": 1560845775523,
"updated": 1560845775523,
"nsPath": null,
"forceExecution": false,
"actions": [
{
"actionId": 12345678,
"actionName": "reboot",
"ciId": 372633437,
"actionState": "pending",
"execOrder": 1,
"isCritical": true,
"extraInfo": null,
"arglist": "",
"payLoadDef": null,
"createdBy": null,
"created": 1560845775523,
"updated": 1560845775523,
"procedureId": 123456789
}
],
"currentStep": 0
}
The procedureid property can be used to get the status of the procedure.
Use procedure_id from previous call:
https://<your-server>/<ORGANIZATION-NAME>/operations/procedures/<Procedure-id>
Sample Url
https://baseurl/testorg/operations/procedures/123456789
{
"procedureId": 123456789,
"procedureName": "reboot",
"ciId": 372632818,
"procedureState": "complete",
"maxExecOrder": 1,
"arglist": "",
"createdBy": "testuser",
"definition": null,
"procedureCiId": 0,
"created": 12345678907656,
"updated": 23455766788886,
"nsPath": null,
"forceExecution": false,
"actions": [
{
"actionId": 1223455667565,
"actionName": "reboot",
"ciId": 372633437,
"actionState": "complete",
"execOrder": 1,
"isCritical": true,
"extraInfo": null,
"arglist": "",
"payLoadDef": null,
"createdBy": null,
"created": 12345678907656,
"updated": 12345678907656,
"procedureId": 123456789
}
],
"currentStep": 0
}
https://<your-server>/<ORGANIZATION-NAME>/assemblies/<ASSEMBLY-NAME>/operations/environments/<ENV-NAME>/platforms/<PLATFORM-NAME>/components/compute/instances.json?instances_state=all