...
We can create a new Cost Allocation service in Synapse that can be used by members of a "Synapse Cost Allocation Team", a bootstrapped team with users that have the authority to manage these cost allocations.
Cost allocations in Synapse are groupings of projects that should be pooled for cost services. Projects can only have 0 or 1 cost allocation.
Cost allocations are uniquely identified by their name and can be created by a member of the Cost Allocation Team by assigning one to a project. Cost allocations can have many projects, but a project can be assigned to at most one cost allocation.
When a project is assigned to a cost allocation, the underlying files associated with that project (that is, the file handles used by all versions of all file entities in a project) will be included in the total cost of that cost allocation.
A member of the cost allocation team can make an asynchronous query to retrieve a CSV report with the sizes of their choice of all cost allocations, all allocated projects, or all unallocated projects.
All requests can only be made members of the Synapse Cost Allocation Team
Verb | URI | Request body | Response body | Notes |
---|---|---|---|---|
POST | /entity/{entityId}/costAllocation | name: String | CostAllocation id: String name: String bucket: String projects: Array<String> eTag: String createdBy: Long createdOn: Date | Associates a project with a cost allocation. If the cost allocation doesn't exist, it creates a new one. If the project is currently associated with a different cost allocation, it will be |
associated with |
the new one. Name is case-insensitive (will be coerced to lowercase) and can include alphanumeric, "-", ".", and "_". | ||||
GET | /entity/{entityId}/costAllocation | None | CostAllocation | Gets the cost allocation for a specific project. This request can only be made by a member of the Synapse Cost Allocation Team |
DELETE | /entity/{entityId}/costAllocation | None | None | Removes the cost allocation tied to a project. The contents of the project that are in the cost allocation storage location will be moved to the default Synapse storage. After all of the contents have been moved, the project is removed from the cost allocation. |
GET | /costAllocation/report/csv/async/get/{token} | None | CostAllocationReportResult: resultsFileHandleId: String timestamp: Date | Get an object containing a file handle that points to a Cost Allocation Report CSV |
POST | /costAllocation/report/csv/async/start | CostAllocationReportRequest type: Enum (COST_ALLOCATIONS, ALLOCATED_PROJECTS, UNALLOCATED_PROJECTS) | AsyncJobId | Initiates a job to create a CSV report for the sizes of cost allocations or unallocated projects in Synapse. The type describes the type of report will be generated. COST_ALLOCATIONS will generate a report of all cost allocations, ALLOCATED_PROJECTS will generate a report of the largest projects that are assigned to cost allocations, and UNALLOCATED_PROJECTS will generate a report of the largest projects that are not assigned to cost allocations. See examples below. |
Sample Reports
Type: COST_ALLOCATION
...