> ## Documentation Index
> Fetch the complete documentation index at: https://docs.compute-desk.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Resource

> Get detailed resource view including offer history.

Triggers a vendor state reconciliation if last_synced_at is older than 30 seconds.
Use force_refresh=true to bypass the cooldown.

Returns details for a single resource including connection info (IP, SSH command) and current status.

## Force refresh

Pass `?force_refresh=true` to trigger a live vendor poll instead of using cached state. This is useful when you need the most up-to-date status immediately after an operation.


## OpenAPI

````yaml GET /resources/{resource_id}
openapi: 3.1.0
info:
  title: Supply Service
  description: GPU offers querying and provisioning service
  version: 0.1.0
servers:
  - url: https://supply-api.compute-desk.com
security: []
paths:
  /resources/{resource_id}:
    get:
      tags:
        - Resources
      summary: Get Resource
      description: >-
        Get detailed resource view including offer history.


        Triggers a vendor state reconciliation if last_synced_at is older than
        30 seconds.

        Use force_refresh=true to bypass the cooldown.
      operationId: get_resource_resources__resource_id__get
      parameters:
        - name: resource_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Resource Id
        - name: force_refresh
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Force Refresh
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceSummary'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    ResourceSummary:
      properties:
        resource_id:
          type: string
          format: uuid
          title: Resource Id
        resource_type:
          type: string
          title: Resource Type
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        vendor:
          type: string
          title: Vendor
        vendor_region:
          type: string
          title: Vendor Region
        status:
          type: string
          title: Status
        status_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Status Message
        access:
          anyOf:
            - $ref: '#/components/schemas/ResourceAccessInfo'
            - type: 'null'
        spec:
          additionalProperties: true
          type: object
          title: Spec
        linked_resources:
          items:
            $ref: '#/components/schemas/LinkedResourceSummary'
          type: array
          title: Linked Resources
        offer_history:
          items:
            $ref: '#/components/schemas/OfferResourceSummary'
          type: array
          title: Offer History
        pricing_total_hourly:
          anyOf:
            - type: number
            - type: 'null'
          title: Pricing Total Hourly
        valid_from:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Valid From
        valid_to:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Valid To
        last_synced_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Synced At
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - resource_id
        - resource_type
        - vendor
        - vendor_region
        - status
        - created_at
      title: ResourceSummary
      description: Summary of a user-level resource (for list endpoint).
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ResourceAccessInfo:
      properties:
        external_ip:
          anyOf:
            - type: string
            - type: 'null'
          title: External Ip
        internal_ip:
          anyOf:
            - type: string
            - type: 'null'
          title: Internal Ip
        ssh_command:
          anyOf:
            - type: string
            - type: 'null'
          title: Ssh Command
        ssh_port:
          anyOf:
            - type: integer
            - type: 'null'
          title: Ssh Port
      type: object
      title: ResourceAccessInfo
      description: Connection details for a resource (populated from vendor item outputs).
    LinkedResourceSummary:
      properties:
        resource_id:
          type: string
          format: uuid
          title: Resource Id
        resource_type:
          type: string
          title: Resource Type
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        status:
          type: string
          title: Status
        link_type:
          type: string
          title: Link Type
        linked_since:
          type: string
          format: date-time
          title: Linked Since
        linked_until:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Linked Until
      type: object
      required:
        - resource_id
        - resource_type
        - status
        - link_type
        - linked_since
      title: LinkedResourceSummary
      description: Summary of a linked resource (e.g. storage attached to a VM).
    OfferResourceSummary:
      properties:
        offer_id:
          type: string
          format: uuid
          title: Offer Id
        offer_type:
          type: string
          title: Offer Type
        role:
          type: string
          title: Role
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - offer_id
        - offer_type
        - role
        - created_at
      title: OfferResourceSummary
      description: Summary of an offer-to-resource provenance record.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````