Skycloud API

The Skycloud API will be Live around the 15th of September 2019. (Stay Tuned)
Skycloud's API uses a simple JSON format for retrieval and insertion.
NOTE: You will need your auto generated api key from within your account
to be able to make a successful API call.

We have made our Api simple to understand and have also provided usage examples in various programming languages to help developers explore them.
Skycloud Api uses the {JSON} Protocol that returns JSON-encoded responses and uses standard HTTP response codes, authentication.

This first section describes connecting to the API with endpoints and then also how to connect using the SDK and also non SDK examples.
If you prefer to not use the endpoints directly you can jump straight in using a ready made Library/SDK


Getting Started

Endpoint https://skycloud.pro/Apiv1/Cloud

You need to register your app in the developers console before you can use the API.

1. User authentication and authorizing your app

Skycloud uses OAuth 2.0 for API authentication, authorization and to generate access tokens.

Authorization flow

  • web flow
  • code flow
  • web flow

    GET https://api.skycloud.pro/oauth2?client_id={client_id}&scope={scope}
    &response_type=token&redirect_uri={redirect_uri}

    code flow

    GET https://api.skycloud.pro/oauth2?client_id={client_id}&scope={scope}
    &response_type=token&redirect_uri={redirect_uri}


    Once your app is authorized and has received an access token, it can then make requests to the Skycloud endpoint.

    curl -X POST "https://skycloud.pro/Apiv1/Cloud" \
    --header "Authorization: Bearer < OAUTH2_ACCESS_TOKEN >"



    2. Call Requests

    A simple JSON API call:

    [Cloud]
    Raw JSON response - Example
    cloud":
    { "storage_used":"132GB",
    "Video":[["example.pm4",
    "example2.mp4","example4.mp4","example5.mp4","..."]]
    "Images":[["1.jpg","2.JPG","3.JPG","4.JPG"]]
    }"

    simple example using (php) file_get_contents($url)
    the $json_data array will contain all information relating to the account
    connected to the access key.

    Example using our SDK


    [Cloud] resource
    php javascript ajax java
    $url = "https://skycloud.pro/Apiv1/API.php?api_key=26ba6ba27725kj";
    $json = file_get_contents($url);
    $json_data = json_decode($json, true);
    //print_r($json_data);


    $storage_used=$json_data[cloud][storage_used];
    //echo $storage_used;

    //or

    //array containing File Names of videos in the Videos folder
    $videos=$json_data[cloud]['videos'];
    print_r($videos);


    for example you can get the 22nd file by using
    php javascript ajax java
    $json_data[cloud][Images][0][22];

    OUTPUT:
    suncloudinthesky.png


    Account - Accessing Account information


    To access account related information you could do this
    copy | php javascript ajax java
    $json_data[account][username];
    $json_data[account][email];//will be obsolete in the future
    $json_data[account][account_type];//free or premium $json_data[account][creation_date];//date account was created

    Parameters:

    Cloud
    Read Functions

    [cloud][Images]
    [cloud][Videos]
    [cloud][storage_used]

    [account][username]
    [account][email]
    [account][account_type]
    [account][creation_date]
    Web

    Write Functions

    Create_Folder+name=example_folder_name
    delete_file+exampe_file
    add_file+file_name (Coming in API V2)
    Public
    Files
    Web

    SDKS:

    PHP
    Skycloud Logo


    Proudly Made in the Uk - sCloud formerly Skycloud 2019