Delivery Service Requests
A DSR is a request to create a new Delivery Service, delete an existing Delivery Service, or modify an existing Delivery Service. The model for a DSR is, therefore, somewhat nebulous as it depends on the model of a Delivery Service. This concept is not to be confused with deliveryservices/request.
See also
Delivery Service Requests for information about how to use DSRs in
See also
The API reference for Delivery Service-related endpoints such as deliveryservice_requests contains definitions of the Delivery Service object(s) returned and/or accepted by those endpoints.
See also
The github.com/apache/trafficcontrol/lib/go-tc.DeliveryServiceRequestV30
Go structure documentation.
The model for a DSR in the most recent version of the Traffic Ops API is given in Delivery Service Request as a Typescript Interface as a Typescript interface.
interface DeliveryServiceRequest {
assignee: string | null;
author: string;
changeType: 'create' | 'delete' | 'update';
createdAt: Date; // RFC3339 string - response-only field
id?: number; // response-only field
lastEditedBy: string; // response-only field
lastUpdated: Date; // RFC3339 string - response-only field
original?: DeliveryService;
requested?: DeliveryService;
status: 'draft' | 'pending' | 'submitted' | 'rejected' | 'complete';
}
// Specifically, every DSR will be one of the following more "concrete" types.
interface CreateDSR extends DeliveryServiceRequest {
changeType: 'create';
original: undefined;
requested: DeliveryService;
}
interface DeleteDSR extends DeliveryServiceRequest {
changeType: 'delete';
original: DeliveryService;
requested: undefined;
}
interface CreateDSR extends DeliveryServiceRequest {
changeType: 'update';
original: DeliveryService;
requested: DeliveryService;
}
Assignee
Assignee is the username of the user to whom the DSR is assigned. It may be null-typed if there is no assignee for a given DSR.
Name |
Use(s) |
Type |
---|---|---|
assigneeId |
older API versions, internally in Traffic Control code |
unsigned integer |
Change Type
This string indicates the action that will be taken in the event that the DSR is fulfilled. It can be one of the following values:
- create
A new Delivery Service will be created
- delete
An existing Delivery Service will be deleted
- update
An existing Delivery Service will be modified
Created At
This is the date and time at which the DSR was created. In the context of the Traffic Ops API, it is formatted as an RFC 3339 date string except where otherwise noted.
ID
An integral, unique identifier for the DSR.
Last Edited By
This is the username of the user by whom the DSR was last edited. Author is the username of the user who created the DSR.
Name |
Use(s) |
Type |
---|---|---|
lastEditedById |
older API versions, internally in Traffic Control code |
unsigned integer |
Original
If this property of a DSR exists, then it represents the original Delivery Service before the DSR was/would have been/is fulfilled. This property only exists on DSRs that have a Change Type of “update” or “delete”. This is a full representation of a Delivery Service, and so in the context of Traffic Ops API has the same structure as a request to or response from the deliveryservices endpoint, as appropriate for its Change Type.
Name |
Use(s) |
Type |
---|---|---|
deliveryservice |
older API versions combined the concepts of Original and Requested into this single field |
unchanged (Delivery Service representation) |
Requested
If this property of a DSR exists, then it is represents the Delivery Service the creator wishes to exist - possibly in place of an existing Delivery Service that shares its identifying properties. This property only exists on DSRs that have a Change Type of “update” or “create”. This is a full representation of a Delivery Service, and so in the context of Traffic Ops API has the same structure as a request to or response from the deliveryservices endpoint, as appropriate for its Change Type.
Name |
Use(s) |
Type |
---|---|---|
deliveryservice |
older API versions combined the concepts of Original and Requested into this single field |
unchanged (Delivery Service representation) |
Status
Status is a string that indicates the point in the DSR workflow lifecycle at which a given DSR is. Generally a DSR may be either “open” - meaning that it is available to be modified, reviewed, and possibly either completed or rejected - or “closed” - meaning that it has been completed or rejected. More specifically, “open” DSRs have one of the following Statuses:
- draft
The DSR is not yet ready for completion or review that might result in rejection, as it is still being actively worked on.
- submitted
The DSR has been submitted for review, but has not yet been reviewed.
… while a “closed” DSR has one of these Statuses:
- complete
The DSR was approved and its declared action was taken.
- pending
The DSR was approved and the changes are applied, but the new configuration is not yet disseminated to other ATC components - usually meaning that it cannot be considered truly complete until a Snapshot is taken or a Queue Updates performed.
- rejected
The DSR was rejected and closed; it cannot be completed.
A “closed” DSR cannot be edited - except to change a “pending” Status to “complete” or “rejected”.