All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
create_note | POST /v1alpha1/{parent=projects/*}/notes | Creates a new `Note`. |
create_occurrence | POST /v1alpha1/{parent=projects/*}/occurrences | Creates a new `Occurrence`. Use this method to create `Occurrences` for a resource. |
create_operation | POST /v1alpha1/{parent=projects/*}/operations | Creates a new `Operation`. |
delete_note | DELETE /v1alpha1/{name=projects//notes/} | Deletes the given `Note` from the system. |
delete_occurrence | DELETE /v1alpha1/{name=projects//occurrences/} | Deletes the given `Occurrence` from the system. Use this when an `Occurrence` is no longer applicable for the given resource. |
get_note | GET /v1alpha1/{name=projects//notes/} | Returns the requested `Note`. |
get_occurrence | GET /v1alpha1/{name=projects//occurrences/} | Returns the requested `Occurrence`. |
get_occurrence_note | GET /v1alpha1/{name=projects//occurrences/}/notes | Gets the `Note` attached to the given `Occurrence`. |
list_note_occurrences | GET /v1alpha1/{name=projects//notes/}/occurrences | Lists `Occurrences` referencing the specified `Note`. Use this method to get all occurrences referencing your `Note` across all your customer projects. |
list_notes | GET /v1alpha1/{parent=projects/*}/notes | Lists all `Notes` for a given project. |
list_occurrences | GET /v1alpha1/{parent=projects/*}/occurrences | Lists active `Occurrences` for a given project matching the filters. |
update_note | PATCH /v1alpha1/{name=projects//notes/} | Updates an existing `Note`. |
update_occurrence | PATCH /v1alpha1/{name=projects//occurrences/} | Updates an existing occurrence. |
update_operation | PATCH /v1alpha1/{name=projects//operations/} | Updates an existing operation returns an error if operation does not exist. The only valid operations are to update mark the done bit change the result. |
ApiNote create_note(parent, body)
Creates a new Note
.
from __future__ import print_function
import time
import grafeas
from grafeas.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = grafeas.GrafeasApi()
parent = 'parent_example' # str | This field contains the project Id for example: \"project/{project_id}
body = grafeas.ApiNote() # ApiNote | The Note to be inserted
try:
# Creates a new `Note`.
api_response = api_instance.create_note(parent, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling GrafeasApi->create_note: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
parent | str | This field contains the project Id for example: "project/{project_id} | |
body | ApiNote | The Note to be inserted |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiOccurrence create_occurrence(parent, body)
Creates a new Occurrence
. Use this method to create Occurrences
for a resource.
from __future__ import print_function
import time
import grafeas
from grafeas.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = grafeas.GrafeasApi()
parent = 'parent_example' # str | This field contains the project Id for example: \"projects/{project_id}\"
body = grafeas.ApiOccurrence() # ApiOccurrence | The occurrence to be inserted.
try:
# Creates a new `Occurrence`. Use this method to create `Occurrences` for a resource.
api_response = api_instance.create_occurrence(parent, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling GrafeasApi->create_occurrence: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
parent | str | This field contains the project Id for example: "projects/{project_id}" | |
body | ApiOccurrence | The occurrence to be inserted. |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GooglelongrunningOperation create_operation(parent, body)
Creates a new Operation
.
from __future__ import print_function
import time
import grafeas
from grafeas.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = grafeas.GrafeasApi()
parent = 'parent_example' # str | The projectId that this operation should be created under.
body = grafeas.ApiCreateOperationRequest() # ApiCreateOperationRequest |
try:
# Creates a new `Operation`.
api_response = api_instance.create_operation(parent, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling GrafeasApi->create_operation: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
parent | str | The projectId that this operation should be created under. | |
body | ApiCreateOperationRequest |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object delete_note(name)
Deletes the given Note
from the system.
from __future__ import print_function
import time
import grafeas
from grafeas.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = grafeas.GrafeasApi()
name = 'name_example' # str | The name of the note in the form of \"providers/{provider_id}/notes/{NOTE_ID}\"
try:
# Deletes the given `Note` from the system.
api_response = api_instance.delete_note(name)
pprint(api_response)
except ApiException as e:
print("Exception when calling GrafeasApi->delete_note: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
name | str | The name of the note in the form of "providers/{provider_id}/notes/{NOTE_ID}" |
object
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object delete_occurrence(name)
Deletes the given Occurrence
from the system. Use this when an Occurrence
is no longer applicable for the given resource.
from __future__ import print_function
import time
import grafeas
from grafeas.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = grafeas.GrafeasApi()
name = 'name_example' # str | The name of the occurrence in the form of \"projects/{project_id}/occurrences/{OCCURRENCE_ID}\"
try:
# Deletes the given `Occurrence` from the system. Use this when an `Occurrence` is no longer applicable for the given resource.
api_response = api_instance.delete_occurrence(name)
pprint(api_response)
except ApiException as e:
print("Exception when calling GrafeasApi->delete_occurrence: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
name | str | The name of the occurrence in the form of "projects/{project_id}/occurrences/{OCCURRENCE_ID}" |
object
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiNote get_note(name)
Returns the requested Note
.
from __future__ import print_function
import time
import grafeas
from grafeas.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = grafeas.GrafeasApi()
name = 'name_example' # str | The name of the note in the form of \"providers/{provider_id}/notes/{NOTE_ID}\"
try:
# Returns the requested `Note`.
api_response = api_instance.get_note(name)
pprint(api_response)
except ApiException as e:
print("Exception when calling GrafeasApi->get_note: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
name | str | The name of the note in the form of "providers/{provider_id}/notes/{NOTE_ID}" |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiOccurrence get_occurrence(name)
Returns the requested Occurrence
.
from __future__ import print_function
import time
import grafeas
from grafeas.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = grafeas.GrafeasApi()
name = 'name_example' # str | The name of the occurrence of the form \"projects/{project_id}/occurrences/{OCCURRENCE_ID}\"
try:
# Returns the requested `Occurrence`.
api_response = api_instance.get_occurrence(name)
pprint(api_response)
except ApiException as e:
print("Exception when calling GrafeasApi->get_occurrence: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
name | str | The name of the occurrence of the form "projects/{project_id}/occurrences/{OCCURRENCE_ID}" |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiNote get_occurrence_note(name)
Gets the Note
attached to the given Occurrence
.
from __future__ import print_function
import time
import grafeas
from grafeas.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = grafeas.GrafeasApi()
name = 'name_example' # str | The name of the occurrence in the form \"projects/{project_id}/occurrences/{OCCURRENCE_ID}\"
try:
# Gets the `Note` attached to the given `Occurrence`.
api_response = api_instance.get_occurrence_note(name)
pprint(api_response)
except ApiException as e:
print("Exception when calling GrafeasApi->get_occurrence_note: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
name | str | The name of the occurrence in the form "projects/{project_id}/occurrences/{OCCURRENCE_ID}" |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiListNoteOccurrencesResponse list_note_occurrences(name, filter=filter, page_size=page_size, page_token=page_token)
Lists Occurrences
referencing the specified Note
. Use this method to get all occurrences referencing your Note
across all your customer projects.
from __future__ import print_function
import time
import grafeas
from grafeas.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = grafeas.GrafeasApi()
name = 'name_example' # str | The name field will contain the note name for example: \"provider/{provider_id}/notes/{note_id}\"
filter = 'filter_example' # str | The filter expression. (optional)
page_size = 56 # int | Number of notes to return in the list. (optional)
page_token = 'page_token_example' # str | Token to provide to skip to a particular spot in the list. (optional)
try:
# Lists `Occurrences` referencing the specified `Note`. Use this method to get all occurrences referencing your `Note` across all your customer projects.
api_response = api_instance.list_note_occurrences(name, filter=filter, page_size=page_size, page_token=page_token)
pprint(api_response)
except ApiException as e:
print("Exception when calling GrafeasApi->list_note_occurrences: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
name | str | The name field will contain the note name for example: "provider/{provider_id}/notes/{note_id}" | |
filter | str | The filter expression. | [optional] |
page_size | int | Number of notes to return in the list. | [optional] |
page_token | str | Token to provide to skip to a particular spot in the list. | [optional] |
ApiListNoteOccurrencesResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiListNotesResponse list_notes(parent, filter=filter, page_size=page_size, page_token=page_token)
Lists all Notes
for a given project.
from __future__ import print_function
import time
import grafeas
from grafeas.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = grafeas.GrafeasApi()
parent = 'parent_example' # str | This field contains the project ID for example: \"projects/{project_id}\".
filter = 'filter_example' # str | The filter expression. (optional)
page_size = 56 # int | Number of notes to return in the list. (optional)
page_token = 'page_token_example' # str | Token to provide to skip to a particular spot in the list. (optional)
try:
# Lists all `Notes` for a given project.
api_response = api_instance.list_notes(parent, filter=filter, page_size=page_size, page_token=page_token)
pprint(api_response)
except ApiException as e:
print("Exception when calling GrafeasApi->list_notes: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
parent | str | This field contains the project ID for example: "projects/{project_id}". | |
filter | str | The filter expression. | [optional] |
page_size | int | Number of notes to return in the list. | [optional] |
page_token | str | Token to provide to skip to a particular spot in the list. | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiListOccurrencesResponse list_occurrences(parent, filter=filter, page_size=page_size, page_token=page_token)
Lists active Occurrences
for a given project matching the filters.
from __future__ import print_function
import time
import grafeas
from grafeas.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = grafeas.GrafeasApi()
parent = 'parent_example' # str | This contains the project Id for example: projects/{project_id}.
filter = 'filter_example' # str | The filter expression. (optional)
page_size = 56 # int | Number of occurrences to return in the list. (optional)
page_token = 'page_token_example' # str | Token to provide to skip to a particular spot in the list. (optional)
try:
# Lists active `Occurrences` for a given project matching the filters.
api_response = api_instance.list_occurrences(parent, filter=filter, page_size=page_size, page_token=page_token)
pprint(api_response)
except ApiException as e:
print("Exception when calling GrafeasApi->list_occurrences: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
parent | str | This contains the project Id for example: projects/{project_id}. | |
filter | str | The filter expression. | [optional] |
page_size | int | Number of occurrences to return in the list. | [optional] |
page_token | str | Token to provide to skip to a particular spot in the list. | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiNote update_note(name, body)
Updates an existing Note
.
from __future__ import print_function
import time
import grafeas
from grafeas.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = grafeas.GrafeasApi()
name = 'name_example' # str | The name of the note. Should be of the form \"projects/{provider_id}/notes/{note_id}\".
body = grafeas.ApiNote() # ApiNote | The updated note.
try:
# Updates an existing `Note`.
api_response = api_instance.update_note(name, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling GrafeasApi->update_note: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
name | str | The name of the note. Should be of the form "projects/{provider_id}/notes/{note_id}". | |
body | ApiNote | The updated note. |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiOccurrence update_occurrence(name, body)
Updates an existing occurrence.
from __future__ import print_function
import time
import grafeas
from grafeas.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = grafeas.GrafeasApi()
name = 'name_example' # str | The name of the occurrence. Should be of the form \"projects/{project_id}/occurrences/{OCCURRENCE_ID}\".
body = grafeas.ApiOccurrence() # ApiOccurrence | The updated occurrence.
try:
# Updates an existing occurrence.
api_response = api_instance.update_occurrence(name, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling GrafeasApi->update_occurrence: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
name | str | The name of the occurrence. Should be of the form "projects/{project_id}/occurrences/{OCCURRENCE_ID}". | |
body | ApiOccurrence | The updated occurrence. |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GooglelongrunningOperation update_operation(name, body)
Updates an existing operation returns an error if operation does not exist. The only valid operations are to update mark the done bit change the result.
from __future__ import print_function
import time
import grafeas
from grafeas.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = grafeas.GrafeasApi()
name = 'name_example' # str | The name of the Operation. Should be of the form \"projects/{provider_id}/operations/{operation_id}\".
body = grafeas.ApiUpdateOperationRequest() # ApiUpdateOperationRequest |
try:
# Updates an existing operation returns an error if operation does not exist. The only valid operations are to update mark the done bit change the result.
api_response = api_instance.update_operation(name, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling GrafeasApi->update_operation: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
name | str | The name of the Operation. Should be of the form "projects/{provider_id}/operations/{operation_id}". | |
body | ApiUpdateOperationRequest |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]