Seitenhierarchie
Zum Ende der Metadaten springen
Zum Anfang der Metadaten




VariableBeschreibungTypBeispiel

$ID
ID für den Zeit Abschnittinteger1

$CONTAINER_ID
Die Container ID, 1 für den Standard Root Containerinteger1

$NAMEDer Name des Zeit Abschnittsstring"my period 1"

$DESCRIPTION
Die Beschreibung des Zeit Abschnittsstring"my description"

$DAY

Tag der Zeitspanne:

Montag => 1,

Dienstag => 2,

Mittwoch => 3,

Donnerstag => 4,

Freitaf => 5,

Samstag => 6,

Sonntag => 7

integer1

$START_TIMEStartzeit des Zeit Abschnittsstring08:45

$END_TIMEEndzeit des Zeit Abschnittsstring10:50



1. Hole einen Zeit Abschnitt per ID

URL: https://123.123.123.123/timeperiods/$ID.json

Methode: GET

Antwort: JSON


Antwort auf erfolgreiche API Abfrage
{
    "timeperiod": {
        "Timeperiod": {
            "id": "1",
            "uuid": "41012866-6114-4853-9caf-6ffd19954e50",
            "container_id": "1",
            "name": "24x7",
            "description": "24x7",
            "created": "2015-01-05 15:11:46",
            "modified": "2015-01-05 15:11:46"
        },
        "Timerange": [
            {
                "id": "1",
                "timeperiod_id": "1",
                "day": "1",
                "start": "00:00",
                "end": "24:00"
            },
            {
                "id": "2",
                "timeperiod_id": "1",
                "day": "2",
                "start": "00:00",
                "end": "24:00"
            },
            {
                "id": "3",
                "timeperiod_id": "1",
                "day": "3",
                "start": "00:00",
                "end": "24:00"
            },
            {
                "id": "4",
                "timeperiod_id": "1",
                "day": "4",
                "start": "00:00",
                "end": "24:00"
            },
            {
                "id": "5",
                "timeperiod_id": "1",
                "day": "5",
                "start": "00:00",
                "end": "24:00"
            },
            {
                "id": "6",
                "timeperiod_id": "1",
                "day": "6",
                "start": "00:00",
                "end": "24:00"
            },
            {
                "id": "7",
                "timeperiod_id": "1",
                "day": "7",
                "start": "00:00",
                "end": "24:00"
            }
        ]
    }
}


2. Hole alle existierenden Zeit Abschnitte

URL: https://123.123.123.123/timeperiods/index.json

Methode: GET

Antwort: JSON


Antwort auf erfolgreiche API Abfrage
{
    "all_timeperiods": [
        {
            "Timeperiod": {
                "id": "1",
                "uuid": "41012866-6114-4853-9caf-6ffd19954e50",
                "container_id": "1",
                "name": "24x7",
                "description": "24x7",
                "created": "2015-01-05 15:11:46",
                "modified": "2015-01-05 15:11:46"
            }
        },
        {
            "Timeperiod": {
                "id": "2",
                "uuid": "c5251a5e-37f1-4841-b0bd-f801ee8969d4",
                "container_id": "1",
                "name": "none",
                "description": "none",
                "created": "2015-01-05 15:11:56",
                "modified": "2015-01-05 15:11:56"
            }
        },
    ]
}
  • Keine Stichwörter