@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Catalog Inventory
@base https://cloud.redhat.com//api/catalog-inventory/v1.0
@version 1.0.0
@auth Bearer basic
@endpoints 38
@hint download_for_search
@toc graphql(1), openapi.json(1), service_credential_types(2), service_credentials(2), service_instances(2), service_inventories(5), service_offering_nodes(2), service_offerings(7), service_plans(2), sources(10), tags(1), tasks(3)

@group graphql
@endpoint POST /graphql
@desc Perform a GraphQL Query
@required {query: str={} # The GraphQL query}
@optional {operationName: str= # If the Query contains several named operations, the operationName controls which one should be executed, variables: map # Optional Query variables}
@returns(200) {data: map, errors: [map]} # GraphQL Query Response

@endgroup

@group openapi.json
@endpoint GET /openapi.json
@desc Return this API document in JSON format
@returns(200) The API document for this version of the API

@endgroup

@group service_credential_types
@endpoint GET /service_credential_types
@desc List ServiceCredentialTypes
@optional {limit: int=100 # The numbers of items to return per page., offset: int=0 # The number of items to skip before starting to collect the result set., filter: map # Filter for querying collections., sort_by: map # The list of attribute and order to sort the result set by.}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]} # ServiceCredentialTypes collection

@endpoint GET /service_credential_types/{id}
@desc Show an existing ServiceCredentialType
@required {id: str # ID of the resource}
@returns(200) {archived_at: str(date-time), created_at: str(date-time), description: str, id: str, kind: str, last_seen_at: str(date-time), name: str, namespace: str, refresh_state_part_id: str, source_created_at: str(date-time), source_deleted_at: str(date-time), source_id: str, source_ref: str, updated_at: str(date-time)} # ServiceCredentialType info
@errors {404: Not found}

@endgroup

@group service_credentials
@endpoint GET /service_credentials
@desc List ServiceCredentials
@optional {limit: int=100 # The numbers of items to return per page., offset: int=0 # The number of items to skip before starting to collect the result set., filter: map # Filter for querying collections., sort_by: map # The list of attribute and order to sort the result set by.}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]} # ServiceCredentials collection

@endpoint GET /service_credentials/{id}
@desc Show an existing ServiceCredential
@required {id: str # ID of the resource}
@returns(200) {archived_at: str(date-time), created_at: str(date-time), description: str, id: str, last_seen_at: str(date-time), name: str, refresh_state_part_id: str, service_credential_type_id: str, source_created_at: str(date-time), source_id: str, source_ref: str, source_updated_at: str(date-time), type_name: str, updated_at: str(date-time)} # ServiceCredential info
@errors {404: Not found}

@endgroup

@group service_instances
@endpoint GET /service_instances
@desc List ServiceInstances
@optional {limit: int=100 # The numbers of items to return per page., offset: int=0 # The number of items to skip before starting to collect the result set., filter: map # Filter for querying collections., sort_by: map # The list of attribute and order to sort the result set by.}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]} # ServiceInstances collection

@endpoint GET /service_instances/{id}
@desc Show an existing ServiceInstance
@required {id: str # ID of the resource}
@returns(200) {archived_at: str(date-time), created_at: str(date-time), external_url: str, extra: map, id: str, last_seen_at: str(date-time), name: str, refresh_state_part_id: str, root_service_instance_id: str, service_inventory_id: str, service_offering_id: str, service_plan_id: str, source_created_at: str(date-time), source_deleted_at: str(date-time), source_id: str, source_ref: str(uuid), updated_at: str(date-time)} # ServiceInstance info
@errors {404: Not found}

@endgroup

@group service_inventories
@endpoint GET /service_inventories
@desc List ServiceInventories
@optional {limit: int=100 # The numbers of items to return per page., offset: int=0 # The number of items to skip before starting to collect the result set., filter: map # Filter for querying collections., sort_by: map # The list of attribute and order to sort the result set by.}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]} # ServiceInventories collection

@endpoint GET /service_inventories/{id}
@desc Show an existing ServiceInventory
@required {id: str # ID of the resource}
@returns(200) {archived_at: str(date-time), created_at: str(date-time), description: str, extra: map, id: str, last_seen_at: str(date-time), name: str, refresh_state_part_id: str, source_created_at: str(date-time), source_id: str, source_ref: str, source_updated_at: str(date-time), updated_at: str(date-time)} # ServiceInventory info
@errors {404: Not found}

@endpoint POST /service_inventories/{id}/tag
@desc Tag a ServiceInventory
@required {id: str # ID of the resource}
@returns(201) ServiceInventory tagged successful
@errors {304: Not modified}

@endpoint GET /service_inventories/{id}/tags
@desc List Tags for ServiceInventory
@required {id: str # ID of the resource}
@optional {limit: int=100 # The numbers of items to return per page., offset: int=0 # The number of items to skip before starting to collect the result set., filter: map # Filter for querying collections., sort_by: map # The list of attribute and order to sort the result set by.}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]} # Tags collection
@errors {404: Not found}

@endpoint POST /service_inventories/{id}/untag
@desc Untag a ServiceInventory
@required {id: str # ID of the resource}
@returns(204) ServiceInventory untagged successfully

@endgroup

@group service_offering_nodes
@endpoint GET /service_offering_nodes
@desc List ServiceOfferingNodes
@optional {limit: int=100 # The numbers of items to return per page., offset: int=0 # The number of items to skip before starting to collect the result set., filter: map # Filter for querying collections., sort_by: map # The list of attribute and order to sort the result set by.}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]} # ServiceOfferingNodes collection

@endpoint GET /service_offering_nodes/{id}
@desc Show an existing ServiceOfferingNode
@required {id: str # ID of the resource}
@returns(200) {archived_at: str(date-time), created_at: str(date-time), extra: map, id: str, last_seen_at: str(date-time), name: str, refresh_state_part_id: str, root_service_offering_id: str, service_inventory_id: str, service_offering_id: str, source_created_at: str(date-time), source_id: str, source_ref: str, source_updated_at: str(date-time), updated_at: str(date-time)} # ServiceOfferingNode info
@errors {404: Not found}

@endgroup

@group service_offerings
@endpoint GET /service_offerings
@desc List ServiceOfferings
@optional {limit: int=100 # The numbers of items to return per page., offset: int=0 # The number of items to skip before starting to collect the result set., filter: map # Filter for querying collections., sort_by: map # The list of attribute and order to sort the result set by.}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]} # ServiceOfferings collection

@endpoint GET /service_offerings/{id}
@desc Show an existing ServiceOffering
@required {id: str # ID of the resource}
@returns(200) {archived_at: str(date-time), created_at: str(date-time), description: str, display_name: str, distributor: str, documentation_url: str, extra: map, id: str, last_seen_at: str(date-time), long_description: str, name: str, refresh_state_part_id: str, service_inventory_id: str, source_created_at: str(date-time), source_deleted_at: str(date-time), source_id: str, source_ref: str, support_url: str, updated_at: str(date-time)} # ServiceOffering info
@errors {404: Not found}

@endpoint POST /service_offerings/{id}/applied_inventories_tags
@desc Invokes computing of ServiceInventories tags for given ServiceOffering
@required {id: str # ID of the resource}
@optional {service_parameters: map # The provider specific parameters needed to compute list of used service inventories}
@returns(200) Returns an array of inventories tags for the computing result
@errors {400: BadRequest}

@endpoint POST /service_offerings/{id}/order
@desc Order an existing ServiceOffering
@required {id: str # ID of the resource}
@optional {service_parameters: map # JSON object with provisioning parameters, provider_control_parameters: map # The provider specific parameters needed to provision this service. This might include namespaces, special keys, service_plan_id: str # ID of the resource}
@returns(200) {task_id: str} # Returns a task ID for the order
@errors {400: BadRequest}

@endpoint GET /service_offerings/{id}/service_instances
@desc List ServiceInstances for ServiceOffering
@required {id: str # ID of the resource}
@optional {limit: int=100 # The numbers of items to return per page., offset: int=0 # The number of items to skip before starting to collect the result set., filter: map # Filter for querying collections., sort_by: map # The list of attribute and order to sort the result set by.}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]} # ServiceInstances collection
@errors {404: Not found}

@endpoint GET /service_offerings/{id}/service_offering_nodes
@desc List ServiceOfferingNodes for ServiceOffering
@required {id: str # ID of the resource}
@optional {limit: int=100 # The numbers of items to return per page., offset: int=0 # The number of items to skip before starting to collect the result set., filter: map # Filter for querying collections., sort_by: map # The list of attribute and order to sort the result set by.}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]} # ServiceOfferingNodes collection
@errors {404: Not found}

@endpoint GET /service_offerings/{id}/service_plans
@desc List ServicePlans for ServiceOffering
@required {id: str # ID of the resource}
@optional {limit: int=100 # The numbers of items to return per page., offset: int=0 # The number of items to skip before starting to collect the result set., filter: map # Filter for querying collections., sort_by: map # The list of attribute and order to sort the result set by.}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]} # ServicePlans collection
@errors {404: Not found}

@endgroup

@group service_plans
@endpoint GET /service_plans
@desc List ServicePlans
@optional {limit: int=100 # The numbers of items to return per page., offset: int=0 # The number of items to skip before starting to collect the result set., filter: map # Filter for querying collections., sort_by: map # The list of attribute and order to sort the result set by.}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]} # ServicePlans collection

@endpoint GET /service_plans/{id}
@desc Show an existing ServicePlan
@required {id: str # ID of the resource}
@returns(200) {archived_at: str(date-time), create_json_schema: map, created_at: str(date-time), description: str, extra: map, id: str, last_seen_at: str(date-time), name: str, refresh_state_part_id: str, resource_version: str, service_offering_id: str, source_created_at: str(date-time), source_deleted_at: str(date-time), source_id: str, source_ref: str(uuid), update_json_schema: str, updated_at: str(date-time)} # ServicePlan info
@errors {404: Not found}

@endgroup

@group sources
@endpoint GET /sources
@desc List Sources
@optional {limit: int=100 # The numbers of items to return per page., offset: int=0 # The number of items to skip before starting to collect the result set., filter: map # Filter for querying collections., sort_by: map # The list of attribute and order to sort the result set by.}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]} # Sources collection

@endpoint GET /sources/{id}
@desc Show an existing Source
@required {id: str # ID of the resource}
@returns(200) {archived_at: str(date-time), created_at: str(date-time), id: str, info: map, name: str, cloud_connector_id: str, enabled: bool, refresh_state: str, refresh_started_at: str(date-time), refresh_finished_at: str(date-time), last_refresh_message: str, refresh_task_id: str(uuid), availability_status: str, availability_message: str, last_successful_refresh_at: str(date-time), last_checked_at: str(date-time), last_available_at: str(date-time), previous_sha: str, previous_size: int, uid: str, updated_at: str(date-time)} # Source info
@errors {404: Not found}

@endpoint PATCH /sources/{id}/refresh
@desc Refresh an existing Source
@required {id: str # ID of the resource}
@returns(204) Updated, no content
@errors {400: Bad request, 404: Not found, 429: Too many requests}

@endpoint PATCH /sources/{id}/incremental_refresh
@desc Incremental Refresh an existing Source
@required {id: str # ID of the resource}
@returns(204) Updated, no content
@errors {400: Bad request, 404: Not found, 429: Too many requests}

@endpoint GET /sources/{id}/service_instances
@desc List ServiceInstances for Source
@required {id: str # ID of the resource}
@optional {limit: int=100 # The numbers of items to return per page., offset: int=0 # The number of items to skip before starting to collect the result set., filter: map # Filter for querying collections., sort_by: map # The list of attribute and order to sort the result set by.}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]} # ServiceInstances collection
@errors {404: Not found}

@endpoint GET /sources/{id}/service_inventories
@desc List ServiceInventories for Source
@required {id: str # ID of the resource}
@optional {limit: int=100 # The numbers of items to return per page., offset: int=0 # The number of items to skip before starting to collect the result set., filter: map # Filter for querying collections., sort_by: map # The list of attribute and order to sort the result set by.}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]} # ServiceInventories collection
@errors {404: Not found}

@endpoint GET /sources/{id}/service_offering_nodes
@desc List ServiceOfferingNodes for Source
@required {id: str # ID of the resource}
@optional {limit: int=100 # The numbers of items to return per page., offset: int=0 # The number of items to skip before starting to collect the result set., filter: map # Filter for querying collections., sort_by: map # The list of attribute and order to sort the result set by.}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]} # ServiceOfferingNodes collection
@errors {404: Not found}

@endpoint GET /sources/{id}/service_offerings
@desc List ServiceOfferings for Source
@required {id: str # ID of the resource}
@optional {limit: int=100 # The numbers of items to return per page., offset: int=0 # The number of items to skip before starting to collect the result set., filter: map # Filter for querying collections., sort_by: map # The list of attribute and order to sort the result set by.}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]} # ServiceOfferings collection
@errors {404: Not found}

@endpoint GET /sources/{id}/service_plans
@desc List ServicePlans for Source
@required {id: str # ID of the resource}
@optional {limit: int=100 # The numbers of items to return per page., offset: int=0 # The number of items to skip before starting to collect the result set., filter: map # Filter for querying collections., sort_by: map # The list of attribute and order to sort the result set by.}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]} # ServicePlans collection
@errors {404: Not found}

@endpoint GET /sources/{id}/tasks
@desc List Tasks for Source
@required {id: str # ID of the resource}
@optional {limit: int=100 # The numbers of items to return per page., offset: int=0 # The number of items to skip before starting to collect the result set., filter: map # Filter for querying collections., sort_by: map # The list of attribute and order to sort the result set by.}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]} # Tasks collection
@errors {404: Not found}

@endgroup

@group tags
@endpoint GET /tags
@desc List Tags
@optional {limit: int=100 # The numbers of items to return per page., offset: int=0 # The number of items to skip before starting to collect the result set., filter: map # Filter for querying collections., sort_by: map # The list of attribute and order to sort the result set by.}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]} # Tags collection

@endgroup

@group tasks
@endpoint GET /tasks
@desc List Tasks
@optional {limit: int=100 # The numbers of items to return per page., offset: int=0 # The number of items to skip before starting to collect the result set., filter: map # Filter for querying collections., sort_by: map # The list of attribute and order to sort the result set by.}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]} # Tasks collection

@endpoint GET /tasks/{id}
@desc Show an existing Task
@required {id: str # UUID of task}
@returns(200) {archived_at: str(date-time), completed_at: str(date-time), input: map, output: map, created_at: str(date-time), id: str(uuid), name: str, source_id: str, state: str, status: str, type: str, message: str, controller_message_id: str(uuid), child_task_id: str(uuid), target_source_ref: str, target_type: str, updated_at: str(date-time), owner: str} # Task info
@errors {404: Not found}

@endpoint PATCH /tasks/{id}
@desc Update an existing Task
@required {id: str # UUID of task}
@optional {archived_at: str(date-time), completed_at: str(date-time), input: map, output: map, created_at: str(date-time), id: str(uuid) # UUID of task, name: str, source_id: str # ID of the resource, state: str(pending/queued/running/timedout/completed), status: str(ok/warn/unchanged/error), type: str, message: str, controller_message_id: str(uuid), child_task_id: str(uuid), target_source_ref: str, target_type: str, updated_at: str(date-time), owner: str}
@returns(204) Updated, no content
@errors {400: Bad request, 404: Not found}

@endgroup

@end
