Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

The members Cost allocations are uniquely identified by their name and can be created by a member of the Cost Allocation Team can create new cost allocations with a descriptive name (e.g. ampad, nih-r01-12345) that matches how costs should be broken down in Synapse. When a new cost allocation being created, project sizes can be calculated by group to determine that cost allocation's total impact.After a cost allocation is created, a project can be assigned to itby 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 pointed to used by all versions of all file entities in a project) will be included in the total cost of that cost allocation.

All requests can only be made members of the Synapse Cost Allocation Team

Lists all existing CostAllocations
VerbURIRequest bodyResponse bodyNotesGET/costAllocation

None

CostAllocationPage

body: Array<CostAllocation>

nextPageToken: String

POST/costAllocation/report/csv/async/start

CostAllocationReportRequest

numberOfResults: Long

allocated: Booleantype: 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 results will contain the top <numberOfResults> cost allocations/unallocated projects by descending size.If allocated is true, the report will include the largest cost allocations. If allocated is false, the report will include type describes the type of report will be generated. COST_ALLOCATIONS will generate a report of the largest 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 currently assigned to a cost allocation.

This request can only be made by a member of the Synapse Cost Allocation Team

allocations. See examples below.

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/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 replaced with a new one.

Name is case-insensitive (will be coerced to lowercase) and can include alphanumeric, "-", ".", and "_".

GET/entity/{entityId}/costAllocationNone

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}/costAllocationNoneNone

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.

Sample Reports

CostAllocation report (default, allocated=TRUE)Type: COST_ALLOCATION

Cost Allocation IDNameSize (B)Proportion of Synapse Storage
18
cost_alloc_1
amp-ad4244830139853910.6534
1
amp-ad
grant123535798138753830.0824
4
grant123
smith_projects
27148247242841
314824724284170.0414
............
0unallocated895732857987190.2139

Unallocated projects report (allocated=FALSE)

Type: ALLOCATED_PROJECTS

Project IDNameSize (B)Proportion of Synapse Storage
syn154314Project Onc-RNA1244830139853910.1244
syn428582Super Cool Data745798138753830.0644
syn523913Smith Lab Repository 1314824724284170.0311
............
0unallocated4244830139853910.8538

Type: UNALLOCATED_PROJECTS

Project IDNameSize (B)Proportion of Synapse Storage
syn123456Cool Project 123144830139853910.12441829
syn999999Research Group Data757981387538385798138753830.06441041
syn583725Smith Lab Repository 2314824724284151482472428410.03110612
............
0allocated4244830139853910.85387538

Implementation Details

Note

This section is unrelated to the API. Feel free to ignore it if it is not within your scope of concern.

...