icgc-argo / icgc-argo/program-service

Partially Update (PATCH) Data Center REST Endpoint

Open
#418 0 comments 0 reactions 1 assignee View on GitHub

@Azher2Ali is already working on this.

Since Aug 30, 2023.

new-feature
Dominant language
Java
Stars
3
Forks
0
Avg merge
14h 34m
Merged PRs (30d)
2

Description

This ticket is part of the effort to add functionality of a Data Center Registry to the Program Service:
The Program Service scope is being expanded to also act as a Data Center Registry. Data Centers represent the Regional Data Processing Centers (RDPC) that ARGO will support a network of. Each program registered in the program-service must belong to a single Data Center. The Data Centers have various connection details that also need to be stored.

Add REST Endpoint to perform partial updates of a Data Center.

Detailed Description

Request

PATCH /datacenters/{datacenter_short_name}

Inputs
Parameter Type Required Value Description
datacenter_id path Yes String Short Name of a Data Center

This request accepts a JSON object in the body with the properties of the Data Center that the user wants to update. Only the provided values will be changed. If any of the properties in the provided object are immutable then the entire request should be rejected.

Resposne

JSON Object with the entire updated Data Center.

If the request body includes invalid properties then an error 400 should be returned that includes a message indicating the reason this request was invalid.

If the provided short name in the path is not found in the Data Center table, return an error 404 not found.

Auth Rules

This endpoint is restricted to DCC Admin and RDPC Admins.

DCC Admin is identified by having WRITE permission for the Program Service system scope (ie. PROGRAMSERVICE.WRITE scope).

RDPC Admin is identified by having WRITE permission for a policy formatting like RDPC-{datacenter_short_name} where the datacenter_short_name is taken from the path parameter.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.