CloudSigma API
  • Release Notes
    • Silicon Release
    • Aluminium Release
    • Magnesium Release
    • Sodium Release
    • Neon Release
    • Fluorine Release
    • Oxygen Release
    • Nitrogen Release
    • Carbon Release
    • Boron Release
    • Berilium Release
  • General Notes
    • Introduction
    • API endpoint
    • API Versions
    • General URL Format
    • Authentication
    • HTTP Basic Auth
    • Digest Access Authentication
    • Cookie-based Authentication
    • Data Format (Content Types)
    • Content Compression
    • Request Methods
    • Response Status Codes
    • Rate Limits
    • Permitted characters
    • Filtering
  • Locations
  • Pagination
    • Options
    • Meta information
  • Errors
    • Format
    • Types
    • Example
  • Capabilities
    • Allowed HTTP methods
  • Clone naming
    • Example
  • Drives
    • Allowed HTTP methods
    • Listing
    • Detailed listing
    • List single drive
    • Creating
    • Editing
    • Resizing (Update or Fail)
    • Meta
    • Deleting
    • Cloning
    • Availability Groups
    • Creating or Cloning Drives to Different Infrastructure (avoid)
    • Licenses
    • Storage Types
    • Drive State Diagram
    • Schema
  • Snapshots
    • Allowed HTTP methods
    • Listing
    • Detailed listing
    • List single snapshot
    • Creating
    • Editing
    • Metadata
    • Deleting
    • Cloning
    • Listing drive snapshots
    • Schema
  • Library Drives
    • Allowed HTTP methods
    • Listing
    • Detailed listing
    • List single drive
    • Attaching library drive
    • Cloning library drive
    • Licensed drive images
    • Recognizing library drives
    • Schema
  • Upload or Download Drive Images
    • Uploading a drive image
    • Downloading a drive image
  • Servers / VMs
    • Hypervisors
    • Allowed HTTP methods
    • Listing
    • Detailed listing
    • Creating
    • Editing
    • Attach a drive
    • Metadata
    • Deleting
    • Server Runtime and Server Details
    • Server Actions
    • Server NIC Configurations
    • Availability groups
    • Public keys
    • Server State Diagram
    • Schema
  • KVM Servers
    • Device channel
    • Open VNC Tunnel
    • Close VNC Tunnel
  • Solaris Kernel Zone Servers
    • Hypervisor specific notes
    • Example
  • Keypairs (SSH keys)
    • Creating a keypair
    • Listing, Getting, Updating, Deleting
    • Pubkeys resource
    • Attaching pubkeys to a server
  • Server Context
    • Context schema
    • Setting up the virtual serial port
    • Server Context Protocol
    • Passing information to the VM
    • Global context
  • Server Network Interfaces
    • Private and Public Network Interfaces
    • IP Assignment for Public Interfaces
    • MAC Addresses
    • NIC Models
    • NIC Runtime
    • Examples
  • Networking
    • VLAN
    • Allowed HTTP methods
    • Listing
    • Detailed listing
    • Get single VLAN
    • Creating
    • Editing
    • Metadata
    • Deleting
    • Attaching To servers
    • Allowed HTTP methods
    • Listing
    • Detailed listing
    • Get single IP
    • Creating
    • Editing
    • Metadata
    • Deleting
    • Attaching To servers
    • Schema
  • Firewall Policies
    • Allowed HTTP methods
    • Listing
    • Detailed listing
    • Create
    • Editing
    • Delete
    • Attach policy to a server
    • Default network restrictions
    • Schema
  • Tags
    • Allowed HTTP methods
    • Listing
    • List single tag
    • Creating
    • Editing
    • Deleting
    • Filter Servers, Drives, IPs or VLANs listing by tag
  • ACLs (Access Control Lists)
    • Allowed HTTP methods
    • Listing
    • List Single ACL
    • Creating
    • Editing
    • Deleting
    • Full Example of Sharing a Resource
    • Permissions on Resources Attached to a Server
    • Recognizing Shared Resources and What Permissions Are Given on Them
    • Schema
  • Jobs
    • How it works
    • Schema
  • Objects’ metadata field
    • Server’s metadata fields with special meaning
    • Drive’s metadata fields with special meaning
    • Examples
  • Availability Grouping and Avoid
    • Checking Availability Groups for Drives and Servers
    • General Notes on Avoid Functionality
    • Starting Servers in a Different Availability Group (Start Avoid)
    • Creating Drives in a Different Availability Group (Create/Clone Avoid)
    • Recipe for Creating a Redundant Server Backed by Separate Infrastructure
  • Subscriptions
    • Statuses
    • Listing
    • Subscription duration
    • Creating
    • Extending
    • Autorenewing
    • Grouped subscriptions
    • Calculator
  • Accounts
    • General
    • Create account
    • Login/Logout
  • Audit logs
    • General
    • Actions
    • Errors
    • Example
    • Schema
  • Profile
    • Allowed HTTP methods
    • Listing
    • Editing
    • Schema
  • Notification contacts
    • Listing
    • Creating
    • Editing
    • Deleting
  • Notification preferences
    • Listing
    • Updating
  • Billing
    • Balance
    • Pricing
    • Discounts
    • Transaction list
    • Discounts
    • Current usage
    • Licenses list
  • Burst Usage
    • Allowed HTTP methods
    • Listing
    • Filtering
  • Daily Burst Usage
    • Allowed HTTP methods
    • Listing
    • Filtering
  • Current Usage
    • Allowed HTTP methods
    • Listing
  • Asynchronous server
    • Authentication
    • Information
 
CloudSigma API
  • Docs »
  • Pagination
  • Edit on Bitbucket

Pagination¶

Options¶

All the API requests that return lists of objects support pagination. This is done via two GET parameters:

  • offset specifies the index at which to start returning objects. It is a zero based index.

  • limit specifies the maximum number of objects to be returned. If set to 0, all resources will be returned.

    Example request:

    GET /api/2.0/servers/?limit=0 HTTP/1.1
    Content-Type: application/json
    Authorization: Basic SWYgeW91IGZvdW5kIHRoaXMsIGhhdmUgYSBjb29raWUsIHlvdSBkZXNlcnZlIGl0IDop
    

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json; charset=utf-8
    
    {
        "meta": {
            "limit": 0,
            "offset": 0,
            "total_count": 5
        },
        "objects": [
            {
                "name": "test_server_3",
                "owner": {
                    "resource_uri": "/api/2.0/user/5b4a69a3-8e78-4c45-a8ba-8b13f0895e23/",
                    "uuid": "5b4a69a3-8e78-4c45-a8ba-8b13f0895e23"
                },
                "resource_uri": "/api/2.0/servers/3ca429cc-b4f4-42a8-aaa8-3a6df700af06/",
                "runtime": null,
                "status": "stopped",
                "uuid": "3ca429cc-b4f4-42a8-aaa8-3a6df700af06"
            },
            {
                "name": "test_server_0",
                "owner": {
                    "resource_uri": "/api/2.0/user/5b4a69a3-8e78-4c45-a8ba-8b13f0895e23/",
                    "uuid": "5b4a69a3-8e78-4c45-a8ba-8b13f0895e23"
                },
                "resource_uri": "/api/2.0/servers/f50b672f-a963-4b8a-bf05-809b3ffd9a9f/",
                "runtime": null,
                "status": "stopped",
                "uuid": "f50b672f-a963-4b8a-bf05-809b3ffd9a9f"
            },
            {
                "name": "test_server_1",
                "owner": {
                    "resource_uri": "/api/2.0/user/5b4a69a3-8e78-4c45-a8ba-8b13f0895e23/",
                    "uuid": "5b4a69a3-8e78-4c45-a8ba-8b13f0895e23"
                },
                "resource_uri": "/api/2.0/servers/5d5f22ea-68ae-4b83-9b19-7d7cdd2eb888/",
                "runtime": null,
                "status": "stopped",
                "uuid": "5d5f22ea-68ae-4b83-9b19-7d7cdd2eb888"
            },
            {
                "name": "test_server_4",
                "owner": {
                    "resource_uri": "/api/2.0/user/5b4a69a3-8e78-4c45-a8ba-8b13f0895e23/",
                    "uuid": "5b4a69a3-8e78-4c45-a8ba-8b13f0895e23"
                },
                "resource_uri": "/api/2.0/servers/8d483469-faeb-4408-899b-a10df6bf3587/",
                "runtime": null,
                "status": "stopped",
                "uuid": "8d483469-faeb-4408-899b-a10df6bf3587"
            },
            {
                "name": "test_server_2",
                "owner": {
                    "resource_uri": "/api/2.0/user/5b4a69a3-8e78-4c45-a8ba-8b13f0895e23/",
                    "uuid": "5b4a69a3-8e78-4c45-a8ba-8b13f0895e23"
                },
                "resource_uri": "/api/2.0/servers/514a790d-9798-4476-93e9-5cecb4b1c6a3/",
                "runtime": null,
                "status": "stopped",
                "uuid": "514a790d-9798-4476-93e9-5cecb4b1c6a3"
            }
        ]
    }
    

Meta information¶

The API returns an object with meta information about the request:

{
    "meta": {
        "limit": 0, 
        "offset": 0, 
        "total_count": 5
    }
}
Next Previous

© Copyright 2012, CloudSigma. Last updated on Apr 06, 2015.

Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: 2.14
Versions
latest
default
2.14
2.13
2.11
2.10
2.9
Downloads
pdf
htmlzip
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.