Service

A Service represents the configuration for a website, app, API, or anything else to be served through Fastly. A Service can have many Versions, through which Backends, Domains, and more can be configured.

Data model

commentstringA freeform descriptive note.
customer_idstringAlphanumeric string identifying the customer.
namestringThe name of the service.
typestringThe type of this service.
active_versionobject
created_atstringDate and time in ISO 8601 format. Read-only.
deleted_atstringDate and time in ISO 8601 format. Read-only.
environmentsarrayA list of environments where the service has been deployed.
idstringAlphanumeric string identifying the service. Read-only.
pausedbooleanWhether the service is paused. Services are paused due to a lack of traffic for an extended period of time. Services are resumed either when a draft version is activated or a locked version is cloned and reactivated.
publish_keystringUnused at this time.
updated_atstringDate and time in ISO 8601 format. Read-only.
versionobject
versionsarrayA list of versions associated with the service.
activebooleanWhether this is the active version or not. [Default false]
backendsarrayList of backends associated to this service.
cache_settingsarrayList of cache settings associated to this service.
conditionsarrayList of conditions associated to this service.
deployedbooleanUnused at this time.
directorsarrayList of directors associated to this service.
domainsarrayList of domains associated to this service.
gzipsarrayList of gzip rules associated to this service.
headersarrayList of headers associated to this service.
healthchecksarrayList of healthchecks associated to this service.
lockedbooleanWhether this version is locked or not. Objects can not be added or edited on locked versions. [Default false]
numberintegerThe number of this version. Read-only.
request_settingsarrayList of request settings for this service.
response_objectsarrayList of response objects for this service.
service_idstringAlphanumeric string identifying the service. Read-only.
settingsobjectList of default settings for this service.
snippetsarrayList of VCL snippets for this service.
stagingbooleanUnused at this time. [Default false]
testingbooleanUnused at this time. [Default false]
vclsarrayList of VCL files for this service.
wordpressarrayA list of Wordpress rules with this service.

Endpoints

List services

GET/service

Create a service

POST/service

Get service details

GET/service/service_id/details

Search for a service by name

GET/service/search

Get a service

GET/service/service_id

Update a service

PUT/service/service_id

Delete a service

DELETE/service/service_id

List the domains within a service

GET/service/service_id/domain