### Example Start Host Source: https://docs.openstack.org/api-ref/compute/index.html Example JSON for starting a host. ```json { "host": "4b392b27930343bbaa27fd5d8328a564", "power_action": "startup" } ``` -------------------------------- ### Response Example for Instance Configuration Source: https://docs.openstack.org/api-ref/database Example JSON response showing the default configuration parameters for a database instance. ```json { "instance": { "configuration": { "basedir": "/usr", "connect_timeout": 15, "datadir": "/var/lib/mysql/data", "default_storage_engine": "innodb", "innodb_buffer_pool_size": "2401M", "innodb_data_file_path": "ibdata1:10M:autoextend", "innodb_file_per_table": 1, "innodb_log_buffer_size": "25M", "innodb_log_file_size": "50M", "innodb_log_files_in_group": 2, "join_buffer_size": "1M", "key_buffer_size": "800M", "local-infile": 0, "max_allowed_packet": "16392K", "max_connections": 1600, "max_heap_table_size": "256M", "max_user_connections": 1600, "myisam-recover-options": "BACKUP,FORCE", "open_files_limit": 8196, "performance_schema": "ON", "pid-file": "/var/run/mysqld/mysqld.pid", "port": 3306, "query_cache_limit": "1M", "query_cache_size": "128M", "query_cache_type": 1, "read_buffer_size": "512K", "read_rnd_buffer_size": "512K", "server_id": 1468542390, "skip-external-locking": 1, "socket": "/var/run/mysqld/mysqld.sock", "sort_buffer_size": "1M", "table_definition_cache": 4098, "table_open_cache": 4098, "thread_cache_size": 64, "thread_stack": "192K", "tmp_table_size": "256M", "tmpdir": "/var/tmp", "user": "mysql", "wait_timeout": 120 } } } ``` -------------------------------- ### Get a mapping example Source: https://docs.openstack.org/api-ref/identity/v3-ext/index.html Example JSON response for getting a federated mapping. ```json { "mapping": { "id": "ACME", "links": { "self": "http://example.com/identity/v3/OS-FEDERATION/mappings/ACME" }, "rules": [ { "local": [ { "user": { "name": "{0}" } }, { "group": { "id": "0cd5e9" } } ], "remote": [ { "type": "UserName" }, { "type": "orgPersonType", "not_any_of": [ "Contractor", "Guest" ] } ] } ] } } ``` -------------------------------- ### Response Example: List datastore version configuration parameters Source: https://docs.openstack.org/api-ref/database Example JSON response showing the configuration parameters for a datastore version. ```json { "configuration-parameters": [ { "datastore_version_id": "b3d5c099-dbd5-4518-baa3-7c7c195671bf", "max": 1, "min": 0, "name": "autocommit", "restart_required": false, "type": "integer" }, { "datastore_version_id": "b3d5c099-dbd5-4518-baa3-7c7c195671bf", "max": 65535, "min": 1, "name": "auto_increment_increment", "restart_required": false, "type": "integer" }, { "datastore_version_id": "b3d5c099-dbd5-4518-baa3-7c7c195671bf", "max": 65535, "min": 1, "name": "auto_increment_offset", "restart_required": false, "type": "integer" }, { "datastore_version_id": "b3d5c099-dbd5-4518-baa3-7c7c195671bf", "max": 31536000, "min": 1, "name": "wait_timeout", "restart_required": false, "type": "integer" } ] } ``` -------------------------------- ### Get Archive Response Example Source: https://docs.openstack.org/api-ref/application-container/index.html Example of a successful response when getting an archive from a container. ```json { "stat": { "linkTarget": "", "size": 129, "mode": 493, "name": "ip.sh", "mtime": "2017-07-25T18:54:50-07:00" }, "data": "ARCHIVE FILE DATA" } ``` -------------------------------- ### Response Example for Creates Client (v2) Source: https://docs.openstack.org/api-ref/backup/v2 Example JSON response for the POST /v2/{project_id}/clients operation. ```json { "clients": [ { "project_id": "752d8bd43d654e7a840bbfda77ce41af", "user_id": "0cd44caf6db5486b94a04b33256a5ff4", "client": { "hostname": "szaher01", "uuid": "6f588392aa864c96b4af96a4eae005ce", "client_id": "752d8bd43d654e7a840bbfda77ce41af_szaher01" } }, { "project_id": "752d8bd43d654e7a840bbfda77ce41af", "user_id": "0cd44caf6db5486b94a04b33256a5ff4", "client": { "hostname": "szaher", "uuid": "c4031a9885384376a717a238ae975d9b", "client_id": "752d8bd43d654e7a840bbfda77ce41af_szaher" } } ] } ``` -------------------------------- ### Example GET /v1/runbooks/{runbook_id} request Source: https://docs.openstack.org/api-ref/baremetal/index.html?expanded=create-deploy-template-detail Example of a GET request to show runbook details. ```http GET /v1/runbooks/{runbook_id} Show Runbook Details detail Shows details for a runbook. Added in version 1.92: Runbook API was introduced. Normal response codes: 200 Error response codes: 400, 401, 403, 404 ``` -------------------------------- ### Response Example: Show datastore version configuration parameter Source: https://docs.openstack.org/api-ref/database Example JSON response showing the definition of a specific datastore version configuration parameter. ```json { "datastore_version_id": "b3d5c099-dbd5-4518-baa3-7c7c195671bf", "max": 31536000, "min": 1, "name": "wait_timeout", "restart_required": false, "type": "integer" } ``` -------------------------------- ### Get Endpoint Group Example Source: https://docs.openstack.org/api-ref/identity/v3-ext Example response for a successful GET request to retrieve an endpoint group. ```json { "endpoint_group": { "description": "endpoint group description", "filters": { "interface": "admin", "service_id": "1b501" }, "id": "ac4861", "links": { "self": "http://example.com/identity/v3/OS-EP-FILTER/endpoint_groups/ac4861" }, "name": "endpoint group name" } } ``` -------------------------------- ### Response Example Source: https://docs.openstack.org/api-ref/database Shows database instance details. ```json { "instance": { "id": "b76a6a76-748b-4064-adec-4c9e6c9abd68", "name": "test", "status": "BUILD", "operating_status": "", "datastore": { "type": "mysql", "version": "5.7.29", "version_number": "5.7.29" }, "flavor": { "id": "3ca76fe7-8dc1-4059-b728-de725835abcb", "links": [ { "href": "https://192.168.206.8:87 79/v1.0/c37341d7d1934ebc949c9d6b5c9f818c/flavors/3ca76fe7-8dc1-4059-b728-de725835abcb", "rel": "self" }, { "href": "https://192.168.206.8:8779/flavors/3ca76fe7-8dc1-4059-b728-de725835abcb", "rel": "bookmark" } ] }, "links": [ { "href": "https://127.0.0.1:8779/v1.0/9f8dd5eacb074c9f87d2d822c9092aa5/instances/b76a6a76-748b-4064-adec-4c9e6c9abd68", "rel": "self" }, { "href": "https://127.0.0.1:8779/instances/b76a6a76-748b-4064-adec-4c9e6c9abd68", "rel": "bookmark" } ], "region": "RegionOne", "access": { "is_public": false }, "volume": { "size": 1 }, "created": "2019-12-23T20:53:38", "updated": "2019-12-23T20:53:38", "service_status_updated": "2019-12-23T20:53:38" } } ``` -------------------------------- ### Example GET request with fields parameter Source: https://docs.openstack.org/api-ref/baremetal/index.html?expanded=change-node-provision-state-detail Example of how to request specific fields in a GET request to the nodes API. ```bash GET /v1/nodes?fields=uuid,name ``` -------------------------------- ### Response Example for Show Configuration Group Details Source: https://docs.openstack.org/api-ref/database Example JSON response showing details of a configuration group. ```json { "configuration": { "datastore_name": "mysql", "datastore_version_id": "b9f97132-467b-4f8e-b12d-947cfc223ac3", "datastore_version_name": "mysql-5.7", "datastore_version_number": "5.7.29", "updated": "2015-11-22T19:07:20", "values": { "connect_timeout": 17 }, "name": "group1", "created": "2015-11-20T20:51:24", "instance_count": 1, "id": "1c8a4fdd-690c-4e6e-b2e1-148b8d738770", "description": null } } ``` -------------------------------- ### Response Example for Show Clients (v2) Source: https://docs.openstack.org/api-ref/backup/v2 Example JSON response for the GET /v2/{project_id}/clients/{client_id} operation. ```json { "project_id": "752d8bd43d654e7a840bbfda77ce41af", "user_id": "0cd44caf6db5486b94a04b33256a5ff4", "client": { "hostname": "szaher01", "uuid": "6f588392aa864c96b4af96a4eae005ce", "client_id": "752d8bd43d654e7a840bbfda77ce41af_szaher01" } } ``` -------------------------------- ### Get default quotas response example Source: https://docs.openstack.org/api-ref/block-storage/v2 Example of a successful response for getting default quotas. ```json { "quota_set": { "gigabytes": 5, "snapshots": 10, "volumes": 20 } } ``` -------------------------------- ### Response Example for Getting Associations Source: https://docs.openstack.org/api-ref/block-storage/v2 This is an example of a successful response when getting associations for a QoS specification. ```json { "qos_specs": { "specs": { "availability": "100", "numberOfFailures": "0" }, "consumer": "back-end", "name": "reliability-spec", "id": "0388d6c6-d5d4-42a3-b289-95205c50dd15" }, "links": [ { "href": "http://23.253.228.211:8776/v2/e1cf63117ae74309a5bcc2002a23be8b/qos_specs/0388d6c6-d5d4-42a3-b289-95205c50dd15", "rel": "self" }, { "href": "http://23.253.228.211:8776/e1cf63117ae74309a5bcc2002a23be8b/qos_specs/0388d6c6-d5d4-42a3-b289-95205c50dd15", "rel": "bookmark" } ] } ``` -------------------------------- ### Request Example for Setting Keys in QoS Specification Source: https://docs.openstack.org/api-ref/block-storage/v2 This is an example of the JSON payload for setting keys in a QoS specification. ```json { "keys": [ "key1" ] } ``` -------------------------------- ### Response Example for Backup Creation Source: https://docs.openstack.org/api-ref/block-storage/v2 Example JSON response when a backup is created. ```json { "backup": { "availability_zone": "az1", "container": "volumebackups", "created_at": "2013-04-02T10:35:27.000000", "description": null, "fail_reason": null, "id": "2ef47aee-8844-490c-804d-2a8efe561c65", "links": [ { "href": "http://localhost:8776/v2/c95fc3e4afe248a49a28828f286a7b38/backups/2ef47aee-8844-490c-804d-2a8efe561c65", "rel": "self" }, { "href": "http://localhost:8776/c95fc3e4afe248a49a28828f286a7b38/backups/2ef47aee-8844-490c-804d-2a8efe561c65", "rel": "bookmark" } ], "name": "backup001", "object_count": 22, "size": 1, "status": "available", "volume_id": "e5185058-943a-4cb4-96d9-72c184c337d6", "is_incremental": true, "has_dependent_backups": false } } ``` -------------------------------- ### Request example for GET /v2.0/metering/metering-label-rules/{metering_label_rule_id} Source: https://docs.openstack.org/api-ref/network/v2 Example HTTP request to get details of a specific metering label rule. ```http GET /v2.0/metering/metering-label-rules/9536641a-7d14-4dc5-afaf-93a973ce0eb8 HTTP/1.1 Host: controlnode:9696 User-Agent: python-neutronclient Content-Type: application/json Accept: application/json X-Auth-Token: c52a1b304fec4ca0ac85dc1741eec6e2 ``` -------------------------------- ### Create Datastore Version Configuration Parameter Response Example Source: https://docs.openstack.org/api-ref/database Example of a successful response after creating a datastore version configuration parameter. ```json { "configuration-parameters": [ { "datastore_version_id": "4eb0179d-fe11-4556-9422-5267d2fc7625", "max": 65535, "min": 64, "name": "connect_timeout", "restart_required": false, "type": "integer" } ] } ``` -------------------------------- ### Migration Get Process Response Example Source: https://docs.openstack.org/api-ref/shared-file-system/index.html Example JSON response for the migration get process API. ```json { "total_progress": 100, "task_state": "migration_driver_phase1_done" } ``` -------------------------------- ### Request Example Source: https://docs.openstack.org/api-ref/block-storage/v2 Example JSON payload for creating a volume, including volume details and scheduler hints. ```json { "volume": { "size": 10, "availability_zone": null, "source_volid": null, "description": null, "multiattach": false, "snapshot_id": null, "name": null, "imageRef": null, "volume_type": null, "metadata": {}, "consistencygroup_id": null }, "OS-SCH-HNT:scheduler_hints": { "same_host": [ "a0cf03a5-d921-4877-bb5c-86d26cf818e1", "8c19174f-4220-44f0-824a-cd1eeef10287" ] } } ``` -------------------------------- ### Example Get VNC Console (os-getVNCConsole Action) Source: https://docs.openstack.org/api-ref/compute/index.html Example JSON response for getting a VNC console. ```json { "console": { "type": "novnc", "url": "http://127.0.0.1:6080/vnc_auto.html?path=%3Ftoken%3Ddaae261f-474d-4cae-8f6a-1865278ed8c9" } } ``` -------------------------------- ### Example Get SPICE Console (os-getSPICEConsole Action) Source: https://docs.openstack.org/api-ref/compute/index.html Example JSON response for getting a SPICE console. ```json { "console": { "type": "spice-html5", "url": "http://127.0.0.1:6082/spice_auto.html?token=a30e5d08-6a20-4043-958f-0852440c6af4" } } ``` -------------------------------- ### Response Example Source: https://docs.openstack.org/api-ref/block-storage/v2 Example JSON response for a volume creation request. ```json { "volumes": [ { "migration_status": null, "attachments": [ { "server_id": "f4fda93b-06e0-4743-8117-bc8bcecd651b", "attachment_id": "3b4db356-253d-4fab-bfa0-e3626c0b8405", "host_name": null, "volume_id": "6edbc2f4-1507-44f8-ac0d-eed1d2608d38", "device": "/dev/vdb", "id": "6edbc2f4-1507-44f8-ac0d-eed1d2608d38" } ], "links": [ { "href": "http://23.253.248.171:8776/v2/bab7d5c60cd041a0a36f7c4b6e1dd978/volumes/6edbc2f4-1507-44f8-ac0d-eed1d2608d38", "rel": "self" }, { "href": "http://23.253.248.171:8776/bab7d5c60cd041a0a36f7c4b6e1dd978/volumes/6edbc2f4-1507-44f8-ac0d-eed1d2608d38", "rel": "bookmark" } ], "availability_zone": "nova", "os-vol-host-attr:host": "difleming@lvmdriver-1#lvmdriver-1", "encrypted": false, "replication_status": "disabled", "snapshot_id": null, "id": "6edbc2f4-1507-44f8-ac0d-eed1d2608d38", "size": 2, "user_id": "32779452fcd34ae1a53a797ac8a1e064", "os-vol-tenant-attr:tenant_id": "bab7d5c60cd041a0a36f7c4b6e1dd978", "os-vol-mig-status-attr:migstat": null, "metadata": { "readonly": false, "attached_mode": "rw" }, "status": "in-use", "description": null, "multiattach": true, "source_volid": null, "consistencygroup_id": null, "os-vol-mig-status-attr:name_id": null, "name": "test-volume-attachments", "bootable": "false", "created_at": "2015-11-29T03:01:44.000000", "volume_type": "lvmdriver-1" }, { "migration_status": null, "attachments": [], "links": [ { "href": "http://23.253.248.171:8776/v2/bab7d5c60cd041a0a36f7c4b6e1dd978/volumes/173f7b48-c4c1-4e70-9acc-086b39073506", "rel": "self" }, { "href": "http://23.253.248.171:8776/bab7d5c60cd041a0a36f7c4b6e1dd978/volumes/173f7b48-c4c1-4e70-9acc-086b39073506", "rel": "bookmark" } ], "availability_zone": "nova", "os-vol-host-attr:host": "difleming@lvmdriver-1#lvmdriver-1", "encrypted": false, "replication_status": "disabled", "snapshot_id": null, "id": "173f7b48-c4c1-4e70-9acc-086b39073506", "size": 1, "user_id": "32779452fcd34ae1a53a797ac8a1e064", "os-vol-tenant-attr:tenant_id": "bab7d5c60cd041a0a36f7c4b6e1dd978", "os-vol-mig-status-attr:migstat": null, "metadata": {}, "status": "available", "volume_image_metadata": { "kernel_id": "8a55f5f1-78f7-4477-8168-977d8519342c", "checksum": "eb9139e4942121f22bbc2afc0400b2a4", "min_ram": "0", "ramdisk_id": "5f6bdf8a-92db-4988-865b-60bdd808d9ef", "disk_format": "ami", "image_name": "cirros-0.3.4-x86_64-uec", "image_id": "b48c53e1-9a96-4a5a-a630-2e74ec54ddcc", "container_format": "ami", "min_disk": "0", "size": "25165824" }, "description": "", "multiattach": false, "source_volid": null, "consistencygroup_id": null, "os-vol-mig-status-attr:name_id": null, "name": "test-volume", "bootable": "true", "created_at": "2015-11-29T02:25:18.000000", "volume_type": "lvmdriver-1" } ], "volumes_links": [{ "href": "https://158.69.65.111/volume/v2/4ad9f06ab8654e40befa59a2e7cac86d/volumes/detail?limit=1&marker=3b451d5d-9358-4a7e-a746-c6fd8b0e1462", "rel": "next" }] } ```