const apiInstance = new Fastly.VersionApi();
activateServiceVersion({ service_id, version_id })
Activate the current version.
const options = {
service_id: "service_id_example", // required
version_id: 56, // required
};
apiInstance.activateServiceVersion(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
Name |
Type |
Description |
Notes |
service_id |
String |
Alphanumeric string identifying the service. |
|
version_id |
Number |
Integer identifying a service version. |
|
VersionResponse
cloneServiceVersion({ service_id, version_id })
Clone the current configuration into a new version.
const options = {
service_id: "service_id_example", // required
version_id: 56, // required
};
apiInstance.cloneServiceVersion(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
Name |
Type |
Description |
Notes |
service_id |
String |
Alphanumeric string identifying the service. |
|
version_id |
Number |
Integer identifying a service version. |
|
Version
createServiceVersion({ service_id })
Create a version for a particular service.
const options = {
service_id: "service_id_example", // required
};
apiInstance.createServiceVersion(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
Name |
Type |
Description |
Notes |
service_id |
String |
Alphanumeric string identifying the service. |
|
VersionCreateResponse
deactivateServiceVersion({ service_id, version_id })
Deactivate the current version.
const options = {
service_id: "service_id_example", // required
version_id: 56, // required
};
apiInstance.deactivateServiceVersion(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
Name |
Type |
Description |
Notes |
service_id |
String |
Alphanumeric string identifying the service. |
|
version_id |
Number |
Integer identifying a service version. |
|
VersionResponse
getServiceVersion({ service_id, version_id })
Get the version for a particular service.
const options = {
service_id: "service_id_example", // required
version_id: 56, // required
};
apiInstance.getServiceVersion(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
Name |
Type |
Description |
Notes |
service_id |
String |
Alphanumeric string identifying the service. |
|
version_id |
Number |
Integer identifying a service version. |
|
VersionResponse
listServiceVersions({ service_id })
List the versions for a particular service.
const options = {
service_id: "service_id_example", // required
};
apiInstance.listServiceVersions(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
Name |
Type |
Description |
Notes |
service_id |
String |
Alphanumeric string identifying the service. |
|
[VersionResponse]
lockServiceVersion({ service_id, version_id })
Locks the specified version.
const options = {
service_id: "service_id_example", // required
version_id: 56, // required
};
apiInstance.lockServiceVersion(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
Name |
Type |
Description |
Notes |
service_id |
String |
Alphanumeric string identifying the service. |
|
version_id |
Number |
Integer identifying a service version. |
|
Version
updateServiceVersion({ service_id, version_id, [active, ][comment, ][deployed, ][locked, ][number, ][staging, ][testing] })
Update a particular version for a particular service.
const options = {
service_id: "service_id_example", // required
version_id: 56, // required
active: false,
comment: "comment_example",
deployed: true,
locked: false,
number: 56,
staging: false,
testing: false,
};
apiInstance.updateServiceVersion(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
Name |
Type |
Description |
Notes |
service_id |
String |
Alphanumeric string identifying the service. |
|
version_id |
Number |
Integer identifying a service version. |
|
active |
Boolean |
Whether this is the active version or not. |
[optional] [defaults to false] |
comment |
String |
A freeform descriptive note. |
[optional] |
deployed |
Boolean |
Unused at this time. |
[optional] |
locked |
Boolean |
Whether this version is locked or not. Objects can not be added or edited on locked versions. |
[optional] [defaults to false] |
number |
Number |
The number of this version. |
[optional] |
staging |
Boolean |
Unused at this time. |
[optional] [defaults to false] |
testing |
Boolean |
Unused at this time. |
[optional] [defaults to false] |
VersionResponse
validateServiceVersion({ service_id, version_id })
Validate the version for a particular service and version.
const options = {
service_id: "service_id_example", // required
version_id: 56, // required
};
apiInstance.validateServiceVersion(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
Name |
Type |
Description |
Notes |
service_id |
String |
Alphanumeric string identifying the service. |
|
version_id |
Number |
Integer identifying a service version. |
|
InlineResponse200
[Back to top] [Back to API list]
[Back to README]