@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
@required {query: str={}}
@optional {operationName: str=, variables: map}
@returns(200) {data: map, errors: [map]}

@endgroup

@group openapi.json
@endpoint GET /openapi.json
@returns(200)

@endgroup

@group service_credential_types
@endpoint GET /service_credential_types
@optional {limit: int=100, offset: int=0, filter: map, sort_by: map}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]}

@endpoint GET /service_credential_types/{id}
@required {id: str}
@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)}
@errors {404}

@endgroup

@group service_credentials
@endpoint GET /service_credentials
@optional {limit: int=100, offset: int=0, filter: map, sort_by: map}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]}

@endpoint GET /service_credentials/{id}
@required {id: str}
@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)}
@errors {404}

@endgroup

@group service_instances
@endpoint GET /service_instances
@optional {limit: int=100, offset: int=0, filter: map, sort_by: map}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]}

@endpoint GET /service_instances/{id}
@required {id: str}
@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)}
@errors {404}

@endgroup

@group service_inventories
@endpoint GET /service_inventories
@optional {limit: int=100, offset: int=0, filter: map, sort_by: map}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]}

@endpoint GET /service_inventories/{id}
@required {id: str}
@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)}
@errors {404}

@endpoint POST /service_inventories/{id}/tag
@required {id: str}
@returns(201)
@errors {304}

@endpoint GET /service_inventories/{id}/tags
@required {id: str}
@optional {limit: int=100, offset: int=0, filter: map, sort_by: map}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]}
@errors {404}

@endpoint POST /service_inventories/{id}/untag
@required {id: str}
@returns(204)

@endgroup

@group service_offering_nodes
@endpoint GET /service_offering_nodes
@optional {limit: int=100, offset: int=0, filter: map, sort_by: map}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]}

@endpoint GET /service_offering_nodes/{id}
@required {id: str}
@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)}
@errors {404}

@endgroup

@group service_offerings
@endpoint GET /service_offerings
@optional {limit: int=100, offset: int=0, filter: map, sort_by: map}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]}

@endpoint GET /service_offerings/{id}
@required {id: str}
@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)}
@errors {404}

@endpoint POST /service_offerings/{id}/applied_inventories_tags
@required {id: str}
@optional {service_parameters: map}
@returns(200)
@errors {400}

@endpoint POST /service_offerings/{id}/order
@required {id: str}
@optional {service_parameters: map, provider_control_parameters: map, service_plan_id: str}
@returns(200) {task_id: str}
@errors {400}

@endpoint GET /service_offerings/{id}/service_instances
@required {id: str}
@optional {limit: int=100, offset: int=0, filter: map, sort_by: map}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]}
@errors {404}

@endpoint GET /service_offerings/{id}/service_offering_nodes
@required {id: str}
@optional {limit: int=100, offset: int=0, filter: map, sort_by: map}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]}
@errors {404}

@endpoint GET /service_offerings/{id}/service_plans
@required {id: str}
@optional {limit: int=100, offset: int=0, filter: map, sort_by: map}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]}
@errors {404}

@endgroup

@group service_plans
@endpoint GET /service_plans
@optional {limit: int=100, offset: int=0, filter: map, sort_by: map}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]}

@endpoint GET /service_plans/{id}
@required {id: str}
@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)}
@errors {404}

@endgroup

@group sources
@endpoint GET /sources
@optional {limit: int=100, offset: int=0, filter: map, sort_by: map}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]}

@endpoint GET /sources/{id}
@required {id: str}
@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)}
@errors {404}

@endpoint PATCH /sources/{id}/refresh
@required {id: str}
@returns(204)
@errors {400, 404, 429}

@endpoint PATCH /sources/{id}/incremental_refresh
@required {id: str}
@returns(204)
@errors {400, 404, 429}

@endpoint GET /sources/{id}/service_instances
@required {id: str}
@optional {limit: int=100, offset: int=0, filter: map, sort_by: map}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]}
@errors {404}

@endpoint GET /sources/{id}/service_inventories
@required {id: str}
@optional {limit: int=100, offset: int=0, filter: map, sort_by: map}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]}
@errors {404}

@endpoint GET /sources/{id}/service_offering_nodes
@required {id: str}
@optional {limit: int=100, offset: int=0, filter: map, sort_by: map}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]}
@errors {404}

@endpoint GET /sources/{id}/service_offerings
@required {id: str}
@optional {limit: int=100, offset: int=0, filter: map, sort_by: map}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]}
@errors {404}

@endpoint GET /sources/{id}/service_plans
@required {id: str}
@optional {limit: int=100, offset: int=0, filter: map, sort_by: map}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]}
@errors {404}

@endpoint GET /sources/{id}/tasks
@required {id: str}
@optional {limit: int=100, offset: int=0, filter: map, sort_by: map}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]}
@errors {404}

@endgroup

@group tags
@endpoint GET /tags
@optional {limit: int=100, offset: int=0, filter: map, sort_by: map}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]}

@endgroup

@group tasks
@endpoint GET /tasks
@optional {limit: int=100, offset: int=0, filter: map, sort_by: map}
@returns(200) {meta: map{count: int, limit: int, offset: int}, links: map{first: str, last: str, next: str, prev: str}, data: [map]}

@endpoint GET /tasks/{id}
@required {id: str}
@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}
@errors {404}

@endpoint PATCH /tasks/{id}
@required {id: str}
@optional {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(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)
@errors {400, 404}

@endgroup

@end
