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

# Get a task

> Get a single task by name, if it is available to the caller's org.



## OpenAPI

````yaml https://api.cloud.wherobots.com/openapi.json get /tasks/{taskName}
openapi: 3.1.0
info:
  title: Wherobots Cloud API
  description: |-
    Wherobots Cloud API OpenAPI specification.

        These are the API docs for the Wherobots API. You can use this to test out the API and see what it does.
        The underlying OPENAPI spec can be found at /openapi.json. This can be used to generate clients for the API.

        The Authorize button below will allow you to input an access token to authenticate to our API.
        Then all of the requests on the page should work.
        
  version: 0.0.1
servers:
  - url: https://api.cloud.wherobots.com
    description: Wherobots Cloud API
security: []
paths:
  /tasks/{taskName}:
    get:
      tags:
        - tasks
      summary: Get a task
      description: Get a single task by name, if it is available to the caller's org.
      operationId: getTask
      parameters:
        - name: taskName
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 255
            pattern: ^[a-zA-Z0-9_\-\.]+$
            description: The name of the task.
            title: Taskname
          description: The name of the task.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
      security:
        - bearerToken: []
        - wherobotsApiKey: []
components:
  schemas:
    Task:
      properties:
        taskId:
          anyOf:
            - type: string
            - type: 'null'
          title: Taskid
        organizationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Organizationid
        name:
          type: string
          maxLength: 255
          minLength: 1
          pattern: ^[a-zA-Z0-9_\-\.]+$
          title: Name
        displayName:
          type: string
          maxLength: 255
          title: Displayname
        description:
          anyOf:
            - type: string
              maxLength: 4096
            - type: 'null'
          title: Description
        regions:
          items:
            type: string
          type: array
          title: Regions
        definition:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/PlatformPythonScriptDefinition-Output'
                - $ref: '#/components/schemas/PlatformJarScriptDefinition-Output'
              discriminator:
                propertyName: scriptKind
                mapping:
                  jar: '#/components/schemas/PlatformJarScriptDefinition-Output'
                  python: '#/components/schemas/PlatformPythonScriptDefinition-Output'
            - oneOf:
                - $ref: '#/components/schemas/PythonScriptDefinition'
                - $ref: '#/components/schemas/JarScriptDefinition'
              discriminator:
                propertyName: scriptKind
                mapping:
                  jar: '#/components/schemas/JarScriptDefinition'
                  python: '#/components/schemas/PythonScriptDefinition'
            - type: 'null'
          title: Definition
        inputSchema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Inputschema
        outputSchema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Outputschema
        examples:
          items:
            $ref: '#/components/schemas/TaskExample'
          type: array
          title: Examples
      type: object
      required:
        - name
        - displayName
      title: Task
      description: >-
        e.g.

        {
          "taskId": "task_abc123",
          "organizationId": "org_abc123",
          "name": "process_data",
          "displayName": "Process data",
          "description": "Run a Python script.",
          "regions": ["aws-us-west-2"],
          "definition": {
            "scriptKind": "python",
            "uri": "s3://example-bucket/process.py"
          },
          "inputSchema": {
            "title": "ScriptInputs",
            "type": "object",
            "properties": {"runtime": ..., "args": ..., "environment": ...},
            "additionalProperties": false
          },
          "examples": []
        }


        A script task's row stores only a reference to the platform input schema

        (see ``script_input_schema_reference``); the validator below resolves
        it,

        so the wire always carries the full schema, never the reference.
    ErrorBody:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ErrorInfo'
          type: array
          title: Errors
          description: A list of errors that occurred
        requestId:
          type: string
          title: Requestid
          description: A unique identifier for the request that caused the error
      type: object
      required:
        - errors
        - requestId
      title: ErrorBody
    PlatformPythonScriptDefinition-Output:
      properties:
        scriptKind:
          type: string
          const: python
          title: Scriptkind
          description: Script type; python runs the Python file at uri.
        uri:
          type: string
          pattern: ^s3://[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]/[^\s?#\x00]+$
          title: Uri
          description: >-
            S3 URI of the script artifact, including a bucket and object key;
            whitespace, query strings, and fragments are not supported.
        environment:
          $ref: '#/components/schemas/PlatformScriptFixedEnvironment-Output'
      additionalProperties: false
      type: object
      required:
        - scriptKind
        - uri
        - environment
      title: PlatformPythonScriptDefinition
      description: Platform Python entrypoint and its complete fixed environment.
    PlatformJarScriptDefinition-Output:
      properties:
        scriptKind:
          type: string
          const: jar
          title: Scriptkind
          description: Script type; jar runs the JAR at uri.
        uri:
          type: string
          pattern: ^s3://[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]/[^\s?#\x00]+$
          title: Uri
          description: >-
            S3 URI of the script artifact, including a bucket and object key;
            whitespace, query strings, and fragments are not supported.
        mainClass:
          anyOf:
            - type: string
              pattern: ^[^\s\x00]+$
            - type: 'null'
          title: Mainclass
          description: >-
            Optional JAR main class; omit to use the artifact's default
            entrypoint. Must not contain whitespace or NUL characters.
        environment:
          $ref: '#/components/schemas/PlatformScriptFixedEnvironment-Output'
      additionalProperties: false
      type: object
      required:
        - scriptKind
        - uri
        - environment
      title: PlatformJarScriptDefinition
      description: Platform JAR entrypoint and its complete fixed environment.
    PythonScriptDefinition:
      properties:
        scriptKind:
          type: string
          const: python
          title: Scriptkind
          description: Script type; python runs the Python file at uri.
        uri:
          type: string
          pattern: ^s3://[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]/[^\s?#\x00]+$
          title: Uri
          description: >-
            S3 URI of the script artifact, including a bucket and object key;
            whitespace, query strings, and fragments are not supported.
      additionalProperties: false
      type: object
      required:
        - scriptKind
        - uri
      title: PythonScriptDefinition
      description: |-
        An S3 Python file executed by a task. Pass arguments through task
        inputs, not the script definition.
    JarScriptDefinition:
      properties:
        scriptKind:
          type: string
          const: jar
          title: Scriptkind
          description: Script type; jar runs the JAR at uri.
        uri:
          type: string
          pattern: ^s3://[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]/[^\s?#\x00]+$
          title: Uri
          description: >-
            S3 URI of the script artifact, including a bucket and object key;
            whitespace, query strings, and fragments are not supported.
        mainClass:
          anyOf:
            - type: string
              pattern: ^[^\s\x00]+$
            - type: 'null'
          title: Mainclass
          description: >-
            Optional JAR main class; omit to use the artifact's default
            entrypoint. Must not contain whitespace or NUL characters.
      additionalProperties: false
      type: object
      required:
        - scriptKind
        - uri
      title: JarScriptDefinition
      description: |-
        An S3 JAR executed by a task, with an optional main class. Pass
        arguments through task inputs.
    TaskExample:
      properties:
        name:
          type: string
          maxLength: 255
          title: Name
        inputs:
          additionalProperties: true
          type: object
          title: Inputs
      additionalProperties: false
      type: object
      required:
        - name
      title: TaskExample
      description: |-
        e.g., from ``predict_mosaic_geometries_recipe``:
        {
          "name": "Detect College Park roofs",
          "inputs": {
            "aoi_uri": "s3://wherobots-examples/rasterflow/aois/collegepark.parquet",
            "start": "2023-01-01T00:00:00Z",
            "end": "2024-01-01T00:00:00Z",
            "model_recipe": "sam3-text-geometry",
            "text_prompt": ["roofs"],
            "confidence_threshold": 0.3,
            "target_crs": "EPSG:3857"
          }
        }
    ErrorInfo:
      properties:
        code:
          $ref: '#/components/schemas/ErrorClass'
          description: The error code
        message:
          type: string
          title: Message
          description: A human-readable message describing the error
        details:
          type: string
          title: Details
          description: Details about the error
        path:
          type: string
          title: Path
          description: The path to the field that caused the error
        suggestion:
          type: string
          title: Suggestion
          description: Suggested action to resolve the error
          default: >-
            Contact us at support@wherobots.com to get help with resolving your
            error.
        documentation_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Documentation Url
          description: URL to related documentation
        field:
          anyOf:
            - type: string
            - type: 'null'
          title: Field
          description: The field that caused the error if applicable
      type: object
      required:
        - code
        - message
        - details
        - path
      title: ErrorInfo
    PlatformScriptFixedEnvironment-Output:
      properties:
        dependencies:
          items:
            anyOf:
              - $ref: '#/components/schemas/ScriptPyPiDependency'
              - $ref: '#/components/schemas/PlatformScriptFileDependency-Output'
          type: array
          title: Dependencies
        sparkConfigs:
          additionalProperties:
            type: string
          type: object
          title: Sparkconfigs
      additionalProperties: false
      type: object
      title: PlatformScriptFixedEnvironment
      description: Execution settings fixed by the platform publisher, never by callers.
    ErrorClass:
      type: string
      enum:
        - BAD_REQUEST_ERROR
        - CONFLICT_ERROR
        - INVALID_INPUT_ERROR
        - INTERNAL_SERVER_ERROR
        - UNAUTHORIZED_ERROR
        - INSUFFICIENT_PERMISSIONS_ERROR
        - THIRD_PARTY_PERMISSIONS_ERROR
        - NOT_FOUND_ERROR
        - INSUFFICIENT_QUOTA_ERROR
        - REQUEST_ENTITY_TOO_LARGE
        - FOREIGN_CATALOG_CONNECTION_FAILED
        - RATE_LIMIT_ERROR
        - RESOURCE_BUSY
        - TIMEOUT_ERROR
        - ACCOUNT_NOT_PROVISIONED
        - BAD_GATEWAY_ERROR
        - GATEWAY_TIMEOUT_ERROR
        - NOT_IMPLEMENTED_ERROR
        - GONE_ERROR
      title: ErrorClass
    ScriptPyPiDependency:
      properties:
        sourceType:
          type: string
          const: PYPI
          title: Sourcetype
          default: PYPI
        libraryName:
          type: string
          title: Libraryname
        libraryVersion:
          anyOf:
            - type: string
            - type: 'null'
          title: Libraryversion
      additionalProperties: false
      type: object
      required:
        - libraryName
      title: ScriptPyPiDependency
      description: Shared library fields with unknown script dependency settings rejected.
    PlatformScriptFileDependency-Output:
      properties:
        sourceType:
          type: string
          const: FILE
          title: Sourcetype
          default: FILE
        filePath:
          type: string
          pattern: \.(jar|whl|zip|json)$
          title: Filepath
        fileType:
          $ref: '#/components/schemas/DependencyFileType'
          description: Get the type of the file
          readOnly: true
      additionalProperties: false
      type: object
      required:
        - filePath
        - fileType
      title: PlatformScriptFileDependency
      description: Accept the matching computed fileType from a publisher's GET read view.
    DependencyFileType:
      type: string
      enum:
        - JAR
        - PYTHON_WHEEL
        - ZIP
        - OTHER
      title: DependencyFileType
      description: Enum for the file type of dependency
  securitySchemes:
    bearerToken:
      type: http
      scheme: bearer
    wherobotsApiKey:
      type: apiKey
      description: A Wherobots-generated API key
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.