Exam4Training

In which order should the API calls be used to accomplish this task?

DRAG DROP

An administrator needs to write a script that automatically deactivates access keys that have not been used for 30 days.

In which order should the API calls be used to accomplish this task? (Drag the steps into the correct order from the first step to the last.)

Answer:

Explanation:

POST https://api.prismacloud.io/login

GET https://api.prismacloud.io/access_keys

PATCH https://api.prismacloud.io/access_keys/<id>/status/<status>

To write a script that automatically deactivates access keys that have not been used for 30 days, an administrator would need to follow an ordered sequence of API calls to the Prisma Cloud platform. The first API call must authenticate the script with the Prisma Cloud API, which is typically done using a POST request to the login endpoint. This step is necessary to establish a session and retrieve an authentication token required for subsequent API calls.

Once the script is authenticated, the next call is a GET request to the access_keys endpoint. This retrieves a list of all access keys within the environment. The script can then parse through these keys to determine which ones have not been used within the specified timeframe of 30 days.

For each access key that meets the criteria (unused for 30 days), the script must send a PATCH request to the specific access key’s endpoint, which includes the access key ID and the desired status. This request will change the status of the access key to ‘inactive’ or a similar status that denotes deactivation.

Following this ordered sequence ensures that the script systematically authenticates, evaluates, and updates the status of access keys based on their usage, thereby maintaining security and compliance within the Prisma Cloud environment.

Latest PCCSE Dumps Valid Version with 85 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Exit mobile version