Service Fabric Names and JSON Serialization

Many requests and responses include names and IDs of the Service Fabric application, service, partition, or replicas. These names and IDs must not be URL encoded when sent in the body or as query parameters.

For example, the ContinuationToken parameter for getting the list of applications in a paged manner may include the name of the application. When sending this back to get the next page, it must not be encoded.

Request

Get first page of applications.

http://localhost:19080/Applications?api-version=6.0

Response

{
  "ContinuationToken": "fabric:/samples/PQueueApp1",
  "Items": [
    {
      "Id": "samples~CalculatorApp",
      "Name": "fabric:/samples/CalculatorApp",
      "TypeName": "CalculatorApp",
      "TypeVersion": "1.0",
      "Status": "Ready",
      "Parameters": [],
      "HealthState": "Error"
    },
    {
      "Id": "samples~PQueueApp1",
      "Name": "fabric:/samples/PQueueApp1",
      "TypeName": "PersistentQueueApp",
      "TypeVersion": "1.0",
      "Status": "Ready",
      "Parameters": [],
      "HealthState": "Ok"
    }
  ]
}

Request

Get second page of applications by passing the ContinuationToken from the first response. The value of the ContinuationToken parameter in the request is not encoded.

http://localhost:19080/Applications?api-version=6.0&ContinuationToken=fabric:/samples/PQueueApp1

Response

{
  "ContinuationToken": "",
  "Items": [
    {
      "Id": "samples~VQueueApp1",
      "Name": "fabric:/samples/VQueueApp1",
      "TypeName": "VolatileQueueApp",
      "TypeVersion": "1.0",
      "Status": "Ready",
      "Parameters": [],
      "HealthState": "Ok"
    }
  ]
}