Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Enhance docs for reporting endpoint query params #150

Closed
ion9 opened this issue Oct 6, 2021 · 6 comments
Closed

Enhance docs for reporting endpoint query params #150

ion9 opened this issue Oct 6, 2021 · 6 comments
Assignees
Labels
compute-api Compute (CWP) API issue

Comments

@ion9
Copy link

ion9 commented Oct 6, 2021

Describe the problem

Is this a request for improvement.
In the LIVEcommunity we have questions on how some of the options work for the API,

https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/prisma-cloud-compute-api-filtering/td-p/321159

Suggested fix

Enumerate, provide examples for the api options.

E.G. sort=entityInfo.scanTime ... short of seeing it in a call to the api, where would we know entityInfo from?

@welcome-to-palo-alto-networks
Copy link

🎉 Thanks for opening your first issue here! Welcome to the community!

@Kagemusha-san
Copy link

Is there any news on this? I would really like to slim down responses by only retrieving relevant data. I always get
{ "err": "unknown filtering field <fieldName>" }

where <fieldName> is whatever I pass as query param (e.g. hostname). Interestingly, it seems to split by "," because if I pass ?fields=hostname,type it still says "err": "unknown filtering field hostname".

@ion9
Copy link
Author

ion9 commented Oct 15, 2021

I'm not sure what endpoint you are trying to use. but on the registry I have see a "compact=true" https://prisma.pan.dev/api/cloud/cwpp/registry#operation/get-registry it can help to cut down on some of the size.

That option looks to be missing from the serverless endpoint.
https://prisma.pan.dev/api/cloud/cwpp/serverless#operation/get-serverless

@Kagemusha-san
Copy link

I tried it on images and hosts endpoints. The problem with compact=true is that it does not return vulnerabilities, but that's the information I'm after (among some other data).

@iansk iansk added the compute-api Compute (CWP) API issue label Oct 19, 2021
@iansk iansk removed their assignment Oct 19, 2021
@iansk iansk changed the title [DOCUMENTATION] Enhance docs for reporting endpoint query params Oct 19, 2021
@jeremyp-synopsys
Copy link

Not the answer that any of us are looking for or want, but apparently the fields parameter is not exposed through the API and is supposed to be removed from the documentation.

twistlock/docs#232

from customer case, the 'field' from the query string is internal and should be removed from API docs

Does the extend to other API calls that have a fields query parameter? For example, /hosts/info also has fields. Is this issue saying that the field is not exposed to the API anywhere or only this specific call?

Yes, this extends to the other api calls that expect a fields input

Feature request posted here - https://prismacloud.ideas.aha.io/ideas/PANW-I-3140

@ssugandh ssugandh assigned iansk and unassigned ssugandh Jan 31, 2022
@iansk
Copy link
Collaborator

iansk commented Oct 10, 2022

Partially resolved with doc updates. See here PaloAltoNetworks/prisma-cloud-docs#365

The Aha issue PANW-I-3140 will continue to stay open, with the request to enhance the API and the corresponding OpenAPI spec.

@iansk iansk closed this as completed Oct 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compute-api Compute (CWP) API issue
Projects
None yet
Development

No branches or pull requests

5 participants