ImageApi
All URIs are relative to https://app.coactive.ai
AssetResponse get_metadata_for_image(coactive_image_id)
Get metadata for image by coactive image id
Example
- Bearer Authentication (HTTPBearer):
| import time
import coactive
from coactive.apis import ImageApi
from coactive.model.asset_response import AssetResponse
from coactive.model.http_validation_error import HTTPValidationError
from coactive.model.error_response import ErrorResponse
# Defining the host is optional and defaults to https://app.coactive.ai.
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Example with auth is provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: HTTPBearer
# See configuration.py for a list of all supported configuration parameters.
from YOUR_ENV import CLIENT_ID, CLIENT_SECRET
configuration = coactive.Configuration(
host = "https://app.coactive.ai",
access_token = f"{CLIENT_ID}:{CLIENT_SECRET}",
)
# Enter a context with an instance of the API client
with coactive.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ImageApi(api_client)
coactive_image_id = "a6894d72-612d-4c20-b4d0-8f3f21c2bb10"
# example passing only required values which don't have defaults set
try:
# Get metadata for image
api_response = api_instance.get_metadata_for_image(coactive_image_id)
print(api_response)
except coactive.ApiException as e:
print("Exception when calling ImageApi->get_metadata_for_image: %s\n" % e)
|
Parameters
Name |
Type |
Description |
Notes |
coactive_image_id |
str |
The coactive image id to fetch metadata for |
|
Return type
AssetResponse
Authorization
HTTPBearer
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
200 |
Image metadata |
- |
403 |
Authentication error |
- |
401 |
Unauthorized |
- |
404 |
Image not found |
- |
422 |
Validation Error |
- |
[Back to top] [Back to API list] [Back to Model list] [Back to home]
MetadataForImagesResponse get_metadata_for_images(coactive_image_ids)
Get metadata for images by coactive image id
Example
- Bearer Authentication (HTTPBearer):
| import time
import coactive
from coactive.apis import ImageApi
from coactive.model.http_validation_error import HTTPValidationError
from coactive.model.error_response import ErrorResponse
from coactive.model.metadata_for_images_response import MetadataForImagesResponse
# Defining the host is optional and defaults to https://app.coactive.ai.
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Example with auth is provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: HTTPBearer
# See configuration.py for a list of all supported configuration parameters.
from YOUR_ENV import CLIENT_ID, CLIENT_SECRET
configuration = coactive.Configuration(
host = "https://app.coactive.ai",
access_token = f"{CLIENT_ID}:{CLIENT_SECRET}",
)
# Enter a context with an instance of the API client
with coactive.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ImageApi(api_client)
coactive_image_ids = ["a6894d72-612d-4c20-b4d0-8f3f21c2bb10"]
# example passing only required values which don't have defaults set
try:
# Get metadata for images
api_response = api_instance.get_metadata_for_images(coactive_image_ids)
print(api_response)
except coactive.ApiException as e:
print("Exception when calling ImageApi->get_metadata_for_images: %s\n" % e)
|
Parameters
Name |
Type |
Description |
Notes |
coactive_image_ids |
[str] |
Coactive image ids of images to get metadata for |
|
Return type
MetadataForImagesResponse
Authorization
HTTPBearer
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
200 |
Images metadata |
- |
403 |
Authentication error |
- |
401 |
Unauthorized |
- |
404 |
Not found |
- |
422 |
Validation Error |
- |
[Back to top] [Back to API list] [Back to Model list] [Back to home]
get_statuses_for_images
StatusesForImagesResponse get_statuses_for_images(dataset_id, paths)
For each given image, get the status of what stage the image is in for being ingested into the dataset by the image path and dataset id
Example
- Bearer Authentication (HTTPBearer):
| import time
import coactive
from coactive.apis import ImageApi
from coactive.model.http_validation_error import HTTPValidationError
from coactive.model.error_response import ErrorResponse
from coactive.model.statuses_for_images_response import StatusesForImagesResponse
# Defining the host is optional and defaults to https://app.coactive.ai.
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Example with auth is provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: HTTPBearer
# See configuration.py for a list of all supported configuration parameters.
from YOUR_ENV import CLIENT_ID, CLIENT_SECRET
configuration = coactive.Configuration(
host = "https://app.coactive.ai",
access_token = f"{CLIENT_ID}:{CLIENT_SECRET}",
)
# Enter a context with an instance of the API client
with coactive.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ImageApi(api_client)
dataset_id = "556f4d52-a557-461e-a204-69236fd9c1e2"
paths = ["s3://your-s3-bucket/path/to/image.jpg"]
# example passing only required values which don't have defaults set
try:
# Get statuses for images
api_response = api_instance.get_statuses_for_images(dataset_id, paths)
print(api_response)
except coactive.ApiException as e:
print("Exception when calling ImageApi->get_statuses_for_images: %s\n" % e)
|
Parameters
Name |
Type |
Description |
Notes |
dataset_id |
str |
The unique identifier of the dataset |
|
paths |
[str] |
Paths of the images to get statuses for |
|
Return type
StatusesForImagesResponse
Authorization
HTTPBearer
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code |
Description |
Response headers |
200 |
Images statuses |
- |
403 |
Authentication error |
- |
401 |
Unauthorized |
- |
404 |
Not found |
- |
422 |
Validation Error |
- |
[Back to top] [Back to API list] [Back to Model list] [Back to home]