Back-uplijst van service ophalen

Hiermee haalt u de lijst met back-ups op die beschikbaar zijn voor elke partitie in deze service.

Retourneert een lijst met back-ups die beschikbaar zijn voor elke partitie in deze Service Fabric-service. De server inventariseert alle back-ups die beschikbaar zijn in het back-uparchief dat is geconfigureerd in het back-upbeleid. U kunt ook het resultaat filteren op basis van de begin- en einddatum of alleen de meest recente beschikbare back-up voor elke partitie ophalen.

Aanvraag

Methode Aanvraag-URI
GET /Services/{serviceId}/$/GetBackups?api-version=6.4&timeout={timeout}&Latest={Latest}&StartDateTimeFilter={StartDateTimeFilter}&EndDateTimeFilter={EndDateTimeFilter}&ContinuationToken={ContinuationToken}&MaxResults={MaxResults}

Parameters

Naam Type Vereist Locatie
serviceId tekenreeks Ja Pad
api-version tekenreeks Ja Query’s uitvoeren
timeout geheel getal (int64) Nee Query’s uitvoeren
Latest booleaans No Query’s uitvoeren
StartDateTimeFilter tekenreeks (datum-tijd) Nee Query’s uitvoeren
EndDateTimeFilter tekenreeks (datum-tijd) Nee Query’s uitvoeren
ContinuationToken tekenreeks No Query’s uitvoeren
MaxResults geheel getal (int64) Nee Query’s uitvoeren

serviceId

Type: tekenreeks
Vereist: Ja

De identiteit van de service. Deze id is doorgaans de volledige naam van de service zonder het URI-schema 'fabric:'. Vanaf versie 6.0 worden hiërarchische namen gescheiden door het teken '~'. Als de servicenaam bijvoorbeeld 'fabric:/myapp/app1/svc1' is, is de service-id 'myapp~app1~svc1' in 6.0+ en 'myapp/app1/svc1' in eerdere versies.


api-version

Type: tekenreeks
Vereist: Ja
Standaardinstelling: 6.4

De versie van de API. Deze parameter is vereist en de waarde moet '6.4' zijn.

Service Fabric REST API-versie is gebaseerd op de runtimeversie waarin de API is geïntroduceerd of gewijzigd. Service Fabric-runtime ondersteunt meer dan één versie van de API. Deze versie is de meest recente ondersteunde versie van de API. Als een lagere API-versie wordt doorgegeven, kan het geretourneerde antwoord afwijken van het antwoord dat in deze specificatie wordt beschreven.

Daarnaast accepteert de runtime elke versie die hoger is dan de meest recente ondersteunde versie tot de huidige versie van de runtime. Dus als de nieuwste API-versie 6.0 is en de runtime 6.1 is, accepteert de runtime versie 6.1 voor die API. Het gedrag van de API is echter volgens de gedocumenteerde versie 6.0.


timeout

Type: geheel getal (int64)
Vereist: Nee
Standaardinstelling: 60
InclusiveMaximum: 4294967295
InclusiefMinimum: 1

De time-out van de server voor het uitvoeren van de bewerking in seconden. Deze time-out geeft de tijdsduur aan die de client bereid is te wachten totdat de aangevraagde bewerking is voltooid. De standaardwaarde voor deze parameter is 60 seconden.


Latest

Type: booleaanse waarde
Vereist: Nee
Standaardinstelling: false

Hiermee geeft u op of alleen de meest recente back-up die beschikbaar is voor een partitie voor het opgegeven tijdsbereik.


StartDateTimeFilter

Type: tekenreeks (datum-tijd)
Vereist: Nee

Geef de begindatum op vanaf welke back-ups u wilt opsommen, in datum/tijd-indeling. De datum/tijd moet worden opgegeven in ISO8601-notatie. Dit is een optionele parameter. Als dit niet is opgegeven, worden alle back-ups vanaf het begin geïnventariseerd.


EndDateTimeFilter

Type: tekenreeks (datum-tijd)
Vereist: Nee

Geef de einddatum op tot welke u back-ups wilt opsommen, in datum/tijd-indeling. De datum/tijd moet worden opgegeven in ISO8601-notatie. Dit is een optionele parameter. Als dit niet is opgegeven, wordt de opsomming uitgevoerd tot de meest recente back-up.


ContinuationToken

Type: tekenreeks
Vereist: Nee

De vervolgtokenparameter wordt gebruikt om de volgende set resultaten te verkrijgen. Een vervolgtoken met een niet-lege waarde wordt opgenomen in het antwoord van de API wanneer de resultaten van het systeem niet in één antwoord passen. Wanneer deze waarde wordt doorgegeven aan de volgende API-aanroep, retourneert de API de volgende set resultaten. Als er geen verdere resultaten zijn, bevat het vervolgtoken geen waarde. De waarde van deze parameter mag niet worden gecodeerd met een URL.


MaxResults

Type: geheel getal (int64)
Vereist: Nee
Standaardinstelling: 0
InclusiefMinimum: 0

Het maximum aantal resultaten dat moet worden geretourneerd als onderdeel van de paginaquery's. Deze parameter definieert de bovengrens voor het aantal geretourneerde resultaten. De geretourneerde resultaten kunnen kleiner zijn dan de opgegeven maximumresultaten als ze niet in het bericht passen volgens de beperkingen voor maximale berichtgrootte die in de configuratie zijn gedefinieerd. Als deze parameter nul is of niet is opgegeven, bevat de wisselquery zoveel mogelijk resultaten die in het retourbericht passen.

Antwoorden

HTTP-statuscode Beschrijving Antwoordschema
200 (OK) Een geslaagde bewerking retourneert de statuscode 200 en een paginalijst met back-upgegevens.
PagedBackupInfoList
Alle andere statuscodes Het gedetailleerde foutantwoord.
FabricError

Voorbeelden

Back-ups van toepassingen ophalen binnen een tijdsbereik

In dit voorbeeld ziet u hoe u een lijst met serviceback-ups binnen een tijdsbereik kunt ophalen.

Aanvraag

GET http://localhost:19080/Services/CalcApp/CalcService/$/GetBackups?api-version=6.4&StartDateTimeFilter=2018-01-01T00:00:00Z&EndDateTimeFilter=2018-01-01T23:59:59Z

200-antwoord

Hoofdtekst
{
  "ContinuationToken": "",
  "Items": [
    {
      "BackupId": "3a056ac9-7206-43c3-8424-6f6103003eba",
      "BackupChainId": "3a056ac9-7206-43c3-8424-6f6103003eba",
      "ApplicationName": "fabric:/CalcApp",
      "ServiceManifestVersion": "1.0.0",
      "ServiceName": "fabric:/CalcApp/CalcService",
      "PartitionInformation": {
        "LowKey": "-9223372036854775808",
        "HighKey": "9223372036854775807",
        "ServicePartitionKind": "Int64Range",
        "Id": "1daae3f5-7fd6-42e9-b1ba-8c05f873994d"
      },
      "BackupLocation": "CalcApp\\CalcService\\1daae3f5-7fd6-42e9-b1ba-8c05f873994d\\2018-01-01 09.00.55.zip",
      "BackupType": "Full",
      "EpochOfLastBackupRecord": {
        "DataLossVersion": "131462452931584510",
        "ConfigurationVersion": "8589934592"
      },
      "LsnOfLastBackupRecord": "261",
      "CreationTimeUtc": "2018-01-01T09:00:55Z",
      "FailureError": null
    },
    {
      "BackupId": "7903dc2a-228d-44b0-b7c8-a13a6c9b46bd",
      "BackupChainId": "3a056ac9-7206-43c3-8424-6f6103003eba",
      "ApplicationName": "fabric:/CalcApp",
      "ServiceManifestVersion": "1.0.0",
      "ServiceName": "fabric:/CalcApp/CalcService",
      "PartitionInformation": {
        "LowKey": "-9223372036854775808",
        "HighKey": "9223372036854775807",
        "ServicePartitionKind": "Int64Range",
        "Id": "1daae3f5-7fd6-42e9-b1ba-8c05f873994d"
      },
      "BackupLocation": "CalcApp\\CalcService\\1daae3f5-7fd6-42e9-b1ba-8c05f873994d\\2018-01-01 17.01.02.zip",
      "BackupType": "Incremental",
      "EpochOfLastBackupRecord": {
        "DataLossVersion": "131462452931584510",
        "ConfigurationVersion": "8589934592"
      },
      "LsnOfLastBackupRecord": "446",
      "CreationTimeUtc": "2018-01-01T17:01:02Z",
      "FailureError": null
    },
    {
      "BackupId": "0ff4fdbe-131c-4dfb-8249-7b4029ddc014",
      "BackupChainId": "0ff4fdbe-131c-4dfb-8249-7b4029ddc014",
      "ApplicationName": "fabric:/CalcApp",
      "ServiceManifestVersion": "1.0.0",
      "ServiceName": "fabric:/CalcApp/CalcService",
      "PartitionInformation": {
        "LowKey": "-9223372036854775808",
        "HighKey": "9223372036854775807",
        "ServicePartitionKind": "Int64Range",
        "Id": "81645ec7-d260-4c59-9533-8f129bde8e83"
      },
      "BackupLocation": "CalcApp\\CalcService\\81645ec7-d260-4c59-9533-8f129bde8e83\\2018-01-01 09.01.02.zip",
      "BackupType": "Full",
      "EpochOfLastBackupRecord": {
        "DataLossVersion": "131462452931584510",
        "ConfigurationVersion": "8589934592"
      },
      "LsnOfLastBackupRecord": "161",
      "CreationTimeUtc": "2018-01-01T09:01:02Z",
      "FailureError": null
    },
    {
      "BackupId": "d55a2d98-258b-4a34-8fe5-2063e81af9dc",
      "BackupChainId": "0ff4fdbe-131c-4dfb-8249-7b4029ddc014",
      "ApplicationName": "fabric:/CalcApp",
      "ServiceManifestVersion": "1.0.0",
      "ServiceName": "fabric:/CalcApp/CalcService",
      "PartitionInformation": {
        "LowKey": "-9223372036854775808",
        "HighKey": "9223372036854775807",
        "ServicePartitionKind": "Int64Range",
        "Id": "81645ec7-d260-4c59-9533-8f129bde8e83"
      },
      "BackupLocation": "CalcApp\\CalcService\\81645ec7-d260-4c59-9533-8f129bde8e83\\2018-01-01 17.00.34.zip",
      "BackupType": "Incremental",
      "EpochOfLastBackupRecord": {
        "DataLossVersion": "131462452931584510",
        "ConfigurationVersion": "8589934592"
      },
      "LsnOfLastBackupRecord": "246",
      "CreationTimeUtc": "2018-01-01T17:00:34Z",
      "FailureError": null
    }
  ]
}

Meest recente back-up ophalen

In dit voorbeeld ziet u hoe u de meest recente back-up voor elke partitie in een service krijgt.

Aanvraag

GET http://localhost:19080/Services/CalcApp/CalcService/$/GetBackups?api-version=6.4&Latest=True

200-antwoord

Hoofdtekst
{
  "ContinuationToken": "",
  "Items": [
    {
      "BackupId": "7903dc2a-228d-44b0-b7c8-a13a6c9b46bd",
      "BackupChainId": "3a056ac9-7206-43c3-8424-6f6103003eba",
      "ApplicationName": "fabric:/CalcApp",
      "ServiceManifestVersion": "1.0.0",
      "ServiceName": "fabric:/CalcApp/CalcService",
      "PartitionInformation": {
        "LowKey": "-9223372036854775808",
        "HighKey": "9223372036854775807",
        "ServicePartitionKind": "Int64Range",
        "Id": "1daae3f5-7fd6-42e9-b1ba-8c05f873994d"
      },
      "BackupLocation": "CalcApp\\CalcService\\1daae3f5-7fd6-42e9-b1ba-8c05f873994d\\2018-01-01 17.01.02.zip",
      "BackupType": "Incremental",
      "EpochOfLastBackupRecord": {
        "DataLossVersion": "131462452931584510",
        "ConfigurationVersion": "8589934592"
      },
      "LsnOfLastBackupRecord": "446",
      "CreationTimeUtc": "2018-01-01T17:01:02Z",
      "FailureError": null
    },
    {
      "BackupId": "d55a2d98-258b-4a34-8fe5-2063e81af9dc",
      "BackupChainId": "0ff4fdbe-131c-4dfb-8249-7b4029ddc014",
      "ApplicationName": "fabric:/CalcApp",
      "ServiceManifestVersion": "1.0.0",
      "ServiceName": "fabric:/CalcApp/CalcService",
      "PartitionInformation": {
        "LowKey": "-9223372036854775808",
        "HighKey": "9223372036854775807",
        "ServicePartitionKind": "Int64Range",
        "Id": "81645ec7-d260-4c59-9533-8f129bde8e83"
      },
      "BackupLocation": "CalcApp\\CalcService\\81645ec7-d260-4c59-9533-8f129bde8e83\\2018-01-01 17.00.34.zip",
      "BackupType": "Incremental",
      "EpochOfLastBackupRecord": {
        "DataLossVersion": "131462452931584510",
        "ConfigurationVersion": "8589934592"
      },
      "LsnOfLastBackupRecord": "246",
      "CreationTimeUtc": "2018-01-01T17:00:34Z",
      "FailureError": null
    }
  ]
}

Maximum aantal resultaten beperken

In dit voorbeeld ziet u hoe u een lijst met serviceback-ups kunt ophalen. Het aantal resultaten op een pagina is beperkt tot maximaal twee met behulp van de parameter MaxResult.

Aanvraag

GET http://localhost:19080/Services/CalcApp/CalcService/$/GetBackups?api-version=6.4&MaxResults=2

200-antwoord

Hoofdtekst
{
  "ContinuationToken": "fabric:/CalcApp/CalcService#1daae3f5-7fd6-42e9-b1ba-8c05f873994d#7903dc2a-228d-44b0-b7c8-a13a6c9b46bd",
  "Items": [
    {
      "BackupId": "3a056ac9-7206-43c3-8424-6f6103003eba",
      "BackupChainId": "3a056ac9-7206-43c3-8424-6f6103003eba",
      "ApplicationName": "fabric:/CalcApp",
      "ServiceManifestVersion": "1.0.0",
      "ServiceName": "fabric:/CalcApp/CalcService",
      "PartitionInformation": {
        "LowKey": "-9223372036854775808",
        "HighKey": "9223372036854775807",
        "ServicePartitionKind": "Int64Range",
        "Id": "1daae3f5-7fd6-42e9-b1ba-8c05f873994d"
      },
      "BackupLocation": "CalcApp\\CalcService\\1daae3f5-7fd6-42e9-b1ba-8c05f873994d\\2018-01-01 09.00.55.zip",
      "BackupType": "Full",
      "EpochOfLastBackupRecord": {
        "DataLossVersion": "131462452931584510",
        "ConfigurationVersion": "8589934592"
      },
      "LsnOfLastBackupRecord": "261",
      "CreationTimeUtc": "2018-01-01T09:00:55Z",
      "FailureError": null
    },
    {
      "BackupId": "7903dc2a-228d-44b0-b7c8-a13a6c9b46bd",
      "BackupChainId": "3a056ac9-7206-43c3-8424-6f6103003eba",
      "ApplicationName": "fabric:/CalcApp",
      "ServiceManifestVersion": "1.0.0",
      "ServiceName": "fabric:/CalcApp/CalcService",
      "PartitionInformation": {
        "LowKey": "-9223372036854775808",
        "HighKey": "9223372036854775807",
        "ServicePartitionKind": "Int64Range",
        "Id": "1daae3f5-7fd6-42e9-b1ba-8c05f873994d"
      },
      "BackupLocation": "CalcApp\\CalcService\\1daae3f5-7fd6-42e9-b1ba-8c05f873994d\\2018-01-01 17.01.02.zip",
      "BackupType": "Incremental",
      "EpochOfLastBackupRecord": {
        "DataLossVersion": "131462452931584510",
        "ConfigurationVersion": "8589934592"
      },
      "LsnOfLastBackupRecord": "446",
      "CreationTimeUtc": "2018-01-01T17:01:02Z",
      "FailureError": null
    }
  ]
}

Pagina met vervolgtoken

In dit voorbeeld ziet u hoe u een lijst met serviceback-ups kunt ophalen. Het aantal resultaten op een pagina is beperkt tot maximaal twee met behulp van de parameter MaxResult. In dit voorbeeld wordt de parameter ContinuationToken gebruikt. De waarde van deze parameter wordt opgegeven uit de vorige query; in dit geval het bovenstaande voorbeeld. Het antwoord bevat de resterende resultaten en een leeg ContinuationToken. Het lege ContinuationToken geeft aan dat er geen aanvullende resultaten beschikbaar zijn.

Aanvraag

GET http://localhost:19080/Services/CalcApp/CalcService/$/GetBackups?api-version=6.4&ContinuationToken=fabric:/CalcApp/CalcService#1daae3f5-7fd6-42e9-b1ba-8c05f873994d#7903dc2a-228d-44b0-b7c8-a13a6c9b46bd&MaxResults=2

200-antwoord

Hoofdtekst
{
  "ContinuationToken": "",
  "Items": [
    {
      "BackupId": "0ff4fdbe-131c-4dfb-8249-7b4029ddc014",
      "BackupChainId": "0ff4fdbe-131c-4dfb-8249-7b4029ddc014",
      "ApplicationName": "fabric:/CalcApp",
      "ServiceManifestVersion": "1.0.0",
      "ServiceName": "fabric:/CalcApp/CalcService",
      "PartitionInformation": {
        "LowKey": "-9223372036854775808",
        "HighKey": "9223372036854775807",
        "ServicePartitionKind": "Int64Range",
        "Id": "81645ec7-d260-4c59-9533-8f129bde8e83"
      },
      "BackupLocation": "CalcApp\\CalcService\\81645ec7-d260-4c59-9533-8f129bde8e83\\2018-01-01 09.01.02.zip",
      "BackupType": "Full",
      "EpochOfLastBackupRecord": {
        "DataLossVersion": "131462452931584510",
        "ConfigurationVersion": "8589934592"
      },
      "LsnOfLastBackupRecord": "161",
      "CreationTimeUtc": "2018-01-01T09:01:02Z",
      "FailureError": null
    },
    {
      "BackupId": "d55a2d98-258b-4a34-8fe5-2063e81af9dc",
      "BackupChainId": "0ff4fdbe-131c-4dfb-8249-7b4029ddc014",
      "ApplicationName": "fabric:/CalcApp",
      "ServiceManifestVersion": "1.0.0",
      "ServiceName": "fabric:/CalcApp/CalcService",
      "PartitionInformation": {
        "LowKey": "-9223372036854775808",
        "HighKey": "9223372036854775807",
        "ServicePartitionKind": "Int64Range",
        "Id": "81645ec7-d260-4c59-9533-8f129bde8e83"
      },
      "BackupLocation": "CalcApp\\CalcService\\81645ec7-d260-4c59-9533-8f129bde8e83\\2018-01-01 17.00.34.zip",
      "BackupType": "Incremental",
      "EpochOfLastBackupRecord": {
        "DataLossVersion": "131462452931584510",
        "ConfigurationVersion": "8589934592"
      },
      "LsnOfLastBackupRecord": "246",
      "CreationTimeUtc": "2018-01-01T17:00:34Z",
      "FailureError": null
    }
  ]
}