CloudSigma API ver. 2.0
  • Release Notes
    • 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
  • 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
    • Meta
    • 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
    • Allowed HTTP methods
    • Listing
    • Detailed listing
    • Creating
    • Editing
    • Attach a drive
    • Meta
    • Deleting
    • Server Runtime and Server Details
    • Server Actions
    • Server NIC Configurations
    • Availability groups
    • Advanced settings
    • Server State Diagram
    • Schema
  • Server Context
    • Setting up the virtual serial port
    • Server Context Protocol
    • Context schema
    • 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
    • Meta
    • Deleting
    • Attaching To servers
    • Allowed HTTP methods
    • Listing
    • Detailed listing
    • Get single IP
    • Creating
    • Editing
    • Meta
    • Deleting
    • Attaching To servers
    • Schema
  • Firewall Policies
    • Allowed HTTP methods
    • Listing
    • Detailed listing
    • Create
    • Editing
    • Attach policy to a server
    • Default restrictions
    • Schema
  • Tags
    • Allowed HTTP methods
    • Listing
    • Detailed listing
    • List single tag
    • Creating
    • Editing
    • Deleting
    • Filter Servers, Drives, IPs or VLANs listing by tag
  • Jobs
    • How it works
    • Schema
  • Objects’ meta field
    • 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
    • Schema
    • Actions
    • Errors
    • Example
  • 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
  • Current Usage
    • Allowed HTTP methods
    • Listing
  • Asynchronous server
    • Authentication
    • Information
 
CloudSigma API ver. 2.0
  • Docs »
  • Pagination
  • View page source

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_4",
                "owner": {
                    "resource_uri": "/api/2.0/user/80cb30fb-0ea3-43db-b27b-a125752cc0bf/",
                    "uuid": "80cb30fb-0ea3-43db-b27b-a125752cc0bf"
                },
                "resource_uri": "/api/2.0/servers/43b1110a-31c5-41cc-a3e7-0b806076a913/",
                "runtime": null,
                "status": "stopped",
                "uuid": "43b1110a-31c5-41cc-a3e7-0b806076a913"
            },
            {
                "name": "test_server_2",
                "owner": {
                    "resource_uri": "/api/2.0/user/80cb30fb-0ea3-43db-b27b-a125752cc0bf/",
                    "uuid": "80cb30fb-0ea3-43db-b27b-a125752cc0bf"
                },
                "resource_uri": "/api/2.0/servers/3be1ebc6-1d03-4c4b-88ff-02557b940d19/",
                "runtime": null,
                "status": "stopped",
                "uuid": "3be1ebc6-1d03-4c4b-88ff-02557b940d19"
            },
            {
                "name": "test_server_0",
                "owner": {
                    "resource_uri": "/api/2.0/user/80cb30fb-0ea3-43db-b27b-a125752cc0bf/",
                    "uuid": "80cb30fb-0ea3-43db-b27b-a125752cc0bf"
                },
                "resource_uri": "/api/2.0/servers/b1defe23-e725-474d-acba-e46baa232611/",
                "runtime": null,
                "status": "stopped",
                "uuid": "b1defe23-e725-474d-acba-e46baa232611"
            },
            {
                "name": "test_server_3",
                "owner": {
                    "resource_uri": "/api/2.0/user/80cb30fb-0ea3-43db-b27b-a125752cc0bf/",
                    "uuid": "80cb30fb-0ea3-43db-b27b-a125752cc0bf"
                },
                "resource_uri": "/api/2.0/servers/cff0f338-2b84-4846-a028-3ec9e1b86184/",
                "runtime": null,
                "status": "stopped",
                "uuid": "cff0f338-2b84-4846-a028-3ec9e1b86184"
            },
            {
                "name": "test_server_1",
                "owner": {
                    "resource_uri": "/api/2.0/user/80cb30fb-0ea3-43db-b27b-a125752cc0bf/",
                    "uuid": "80cb30fb-0ea3-43db-b27b-a125752cc0bf"
                },
                "resource_uri": "/api/2.0/servers/93a04cd5-84cb-41fc-af17-683e3868ee95/",
                "runtime": null,
                "status": "stopped",
                "uuid": "93a04cd5-84cb-41fc-af17-683e3868ee95"
            }
        ]
    }
    

Meta information¶

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

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

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

© Copyright 2012, CloudSigma. Last updated on Jan 30, 2014.

Sphinx theme provided by Read the Docs
Read the Docs v: 2.10
Versions
latest
2.10
2.9
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.