Note
All URIs are relative to https://api.fastly.com
Method | HTTP request | Description |
---|---|---|
diff_service_versions | GET /service/{service_id}/diff/from/{from_version_id}/to/{to_version_id} | Diff two service versions |
DiffResponse diff_service_versions(service_id, from_version_id, to_version_id)
Diff two service versions
Get diff between two versions.
- Api Key Authentication (token):
import time
import fastly
from fastly.api import diff_api
from fastly.model.diff_response import DiffResponse
from pprint import pprint
# Defining the host is optional and defaults to https://api.fastly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = fastly.Configuration(
host = "https://api.fastly.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: token
configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['token'] = 'Bearer'
# Enter a context with an instance of the API client
with fastly.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = diff_api.DiffApi(api_client)
service_id = "SU1Z0isxPaozGVKXdv0eY" # str | Alphanumeric string identifying the service.
from_version_id = 1 # int | The version number of the service to which changes in the generated VCL are being compared. Can either be a positive number from 1 to your maximum version or a negative number from -1 down (-1 is latest version etc).
to_version_id = 2 # int | The version number of the service from which changes in the generated VCL are being compared. Uses same numbering scheme as `from`.
format = "text" # str | Optional method to format the diff field. (optional) if omitted the server will use the default value of "text"
# example passing only required values which don't have defaults set
try:
# Diff two service versions
api_response = api_instance.diff_service_versions(service_id, from_version_id, to_version_id)
pprint(api_response)
except fastly.ApiException as e:
print("Exception when calling DiffApi->diff_service_versions: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Diff two service versions
api_response = api_instance.diff_service_versions(service_id, from_version_id, to_version_id, format=format)
pprint(api_response)
except fastly.ApiException as e:
print("Exception when calling DiffApi->diff_service_versions: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
service_id | str | Alphanumeric string identifying the service. | |
from_version_id | int | The version number of the service to which changes in the generated VCL are being compared. Can either be a positive number from 1 to your maximum version or a negative number from -1 down (-1 is latest version etc). | |
to_version_id | int | The version number of the service from which changes in the generated VCL are being compared. Uses same numbering scheme as from . |
|
format | str | Optional method to format the diff field. | [optional] if omitted the server will use the default value of "text" |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]