Liste timeCard

Namespace: microsoft.graph

Abrufen einer Liste von TimeCard-Einträgen in einem Zeitplan.

API-Verfügbarkeit

Diese API ist in den folgenden nationalen Cloudbereitstellungen verfügbar.

Weltweiter Service US Government L4 US Government L5 (DOD) China, betrieben von 21Vianet
✅ ❌ ❌ ❌

Berechtigungen

Wählen Sie die Berechtigungen aus, die für diese API als am wenigsten privilegiert markiert sind. Verwenden Sie eine höhere Berechtigung oder Berechtigungen nur, wenn Ihre App dies erfordert. Ausführliche Informationen zu delegierten Berechtigungen und Anwendungsberechtigungen finden Sie unter Berechtigungstypen. Weitere Informationen zu diesen Berechtigungen finden Sie in der Berechtigungsreferenz.

Berechtigungstyp Berechtigungen mit den geringsten Berechtigungen Berechtigungen mit höheren Berechtigungen
Delegiert (Geschäfts-, Schul- oder Unikonto) Schedule.Read.All Schedule.ReadWrite.All
Delegiert (persönliches Microsoft-Konto) Nicht unterstützt Nicht unterstützt
Application Schedule.Read.All Schedule.ReadWrite.All

HTTP-Anforderung

GET /teams/{teamsId}/schedule/timeCards

Optionale Abfrageparameter

Diese Methode unterstützt die $filterOData-Abfrageparameter , $orderby$top$skipToken , , um die Antwort anzupassen. Allgemeine Informationen finden Sie unter OData-Abfrageparameter.

Anforderungsheader

Name Beschreibung
Authorization Bearer {token}. Erforderlich. Erfahren Sie mehr über Authentifizierung und Autorisierung.
MS-APP-ACTS-AS (veraltet) Eine Benutzer-ID (GUID). Nur erforderlich, wenn das Autorisierungstoken ein Anwendungstoken ist. Andernfalls optional. Der MS-APP-ACTS-AS Header ist veraltet und bei Anwendungstoken nicht mehr erforderlich.

Anforderungstext

Geben Sie keinen Anforderungstext für diese Methode an.

Antwort

Bei erfolgreicher Ausführung gibt diese Methode einen 200 OK Antwortcode und eine Auflistung von timeCard-Objekten im Antworttext zurück.

Beispiel

Anforderung

Das folgende Beispiel zeigt eine Anfrage.

GET https://graph.microsoft.com/v1.0/teams/871dbd5c-3a6a-4392-bfe1-042452793a50/schedule/timeCards

Antwort

Das folgende Beispiel zeigt die Antwort.

Hinweis: Das hier gezeigte Antwortobjekt kann zur besseren Lesbarkeit gekürzt werden.

HTTP/1.1 200 OK
Content-Type: application/json

{
  "value": [
    {
      "id": "TCK_ed816e2c-7c7a-44ff-9761-dc3df92a17ef",
      "createdDateTime": "2025-01-07T14:40:01.601Z",
      "lastModifiedDateTime": "2025-01-07T19:43:54.555Z",
      "userId": "d56f3e8a-2b0f-42b1-88b9-e2dbd12a34d2",
      "state": "clockedOut",
      "confirmedBy": "none",
      "notes": null,
      "lastModifiedBy": {
        "application": null,
        "device": null,
        "user": {
          "id": "d56f3e8a-2b0f-42b1-88b9-e2dbd12a34d2",
          "displayName": "Alice Bradford",
        }
      },
      "clockInEvent": {
        "dateTime": "2025-01-07T14:40:01.601Z",
        "isAtApprovedLocation": null,
        "notes": null
      },
      "clockOutEvent": {
        "dateTime": "2025-01-07T19:43:54.555Z",
        "isAtApprovedLocation": null,
        "notes": null
      },
      "breaks": [
        {
          "breakId": "BRK_d659f765-8c16-4a40-a6c8-2a1cf407b859",
          "notes": null,
          "start": {
            "dateTime": "2025-01-07T16:42:35.406Z",
            "isAtApprovedLocation": null,
            "notes": null
          },
          "end": {
            "dateTime": "2025-01-07T16:53:40.671Z",
            "isAtApprovedLocation": null,
            "notes": null
          }
        }
      ],
      "originalEntry": {
        "clockInEvent": {
          "dateTime": "2025-01-07T14:40:01.601Z",
          "isAtApprovedLocation": null,
          "notes": null
        },
        "clockOutEvent": {
          "dateTime": "2025-01-07T19:43:54.555Z",
          "isAtApprovedLocation": null,
          "notes": null
        },
        "breaks": [
          {
            "breakId": "BRK_d659f765-8c16-4a40-a6c8-2a1cf407b859",
            "notes": null,
            "start": {
              "dateTime": "2025-01-07T16:42:35.406Z",
              "isAtApprovedLocation": null,
              "notes": null
            },
            "end": {
              "dateTime": "2025-01-07T16:53:40.671Z",
              "isAtApprovedLocation": null,
              "notes": null
            }
          }
        ]
      },
      "createdBy": {
        "application": null,
        "device": null,
        "user": {
          "id": "d56f3e8a-2b0f-42b1-88b9-e2dbd12a34d2",
          "displayName": "Alice Bradford"
        }
      }
    },
    {
      "id": "TCK_3e74d9a1-f45f-4da3-95df-be72a8af448d",
      "createdDateTime": "2025-01-08T15:44:09.545Z",
      "lastModifiedDateTime": "2025-01-08T19:45:25.048Z",
      "userId": "d56f3e8a-2b0f-42b1-88b9-e2dbd12a34d2",
      "state": "clockedOut",
      "confirmedBy": "none",
      "notes": null,
      "lastModifiedBy": {
        "application": null,
        "device": null,
        "user": {
          "id": "d56f3e8a-2b0f-42b1-88b9-e2dbd12a34d2",
          "displayName": "Alice Bradford",
        }
      },
      "clockInEvent": {
        "dateTime": "2025-01-08T15:44:09.545Z",
        "isAtApprovedLocation": null,
        "notes": null
      },
      "clockOutEvent": {
        "dateTime": "2025-01-07T19:45:25.048Z",
        "isAtApprovedLocation": null,
        "notes": null
      },
      "breaks": [],
      "originalEntry": {
        "clockInEvent": {
          "dateTime": "2025-01-07T15:44:09.545Z",
          "isAtApprovedLocation": null,
          "notes": null
        },
        "clockOutEvent": {
          "dateTime": "2025-01-07T19:45:25.048Z",
          "isAtApprovedLocation": null,
          "notes": null
        },
        "breaks": []
      },
      "createdBy": {
        "application": null,
        "device": null,
        "user": {
          "id": "d56f3e8a-2b0f-42b1-88b9-e2dbd12a34d2",
          "displayName": "Alice Bradford",
        }
      }
    }
  ]
}