REST-API

Die Nimbuscloud-API.

Organisatorische Informationen

Hinweis. Für die meisten Anwendungsfälle von Webseiteneinbindungen ist die Verwendung der iFrame-Schnittstelle zu empfehlen. Alle Infos zu den verfügbaren Widgets findest du in deiner Nimbuscloud unter System > Einstellungen > Online-Anmeldung.

Technische Grundlagen

Codebeispiele zum Zugriff

Beispielhafter Zugriff mittels GuzzleHTTP (composer require guzzlehttp/guzzle) Mehr Infos

1 · GET-Request

dashboard-iframe-token-info PHP

$client = new GuzzleHttpClient();

try {
    $response = $client->get("https://xyz.nimbuscloud.at/backend/v2/user/auth/sso/dashboard-iframe-token-info", [
        RequestOptions::HEADERS => [
            "Content-Type" => "application/json",
            "X-API-Key" => "yourapikey"
        ],
        RequestOptions::QUERY => [
            "token" => $token
        ]
    ]);
    $response = json_decode($response->getBody()->getContents(), true);
    var_dump($response);
} catch (GuzzleHttpExceptionGuzzleException $e) {
    echo $e->getMessage();
}

2 · POST-Request

create-login-token PHP

try {
    $client = new GuzzleHttpClient();
    $response = $client->post("https://xyz.nimbuscloud.at/backend/v2/user/auth/sso/create-login-token", [
        RequestOptions::HEADERS => [
            "Content-Type" => "application/json",
            "X-API-Key" => "yourapikey"
        ],
        RequestOptions::BODY => json_encode([
            "data" => [
                "applicationName" => ...,
                "forwardUrl" => ...,
                "cancelUrl" => ...,
            ]
        ])
    ]);
    $response = json_decode($response->getBody()->getContents(), true);
    $link = $response["data"]; //data contains the result
} catch (GuzzleHttpExceptionClientException $e) {
    if($e->getCode() === 404) {
        echo "Result hat error code 404!";
    }
    else {
        echo $e->getMessage();
    }
}
Vollständige Referenz

Swagger / OpenAPI