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

# Get job results per platform

> Get enforcement job results per platform



## OpenAPI

````yaml GET /enforcement/jobs/{jobID}/results
openapi: 3.1.0
info:
  title: Phosra API
  description: Universal Parental Controls API - Define once, push everywhere
  version: 1.0.0
  contact:
    name: Phosra Developer Support
    url: https://docs.phosra.com
  license:
    name: Proprietary
    url: https://phosra.com/terms
servers:
  - url: https://phosra-api-sandbox-production.up.railway.app/api/v1
    description: >-
      Hosted sandbox — the one canonical, stable, partner-facing testing
      endpoint (seeded demo family + phosra_test_ keys). Default so the inline
      Try it never touches production. Same base the CLI uses.
  - url: https://prodapi.phosra.com/api/v1
    description: Production
  - url: http://localhost:8080/api/v1
    description: Local development
security:
  - BearerAuth: []
paths:
  /enforcement/jobs/{jobID}/results:
    parameters:
      - name: jobID
        in: path
        required: true
        schema:
          type: string
          format: uuid
    get:
      tags:
        - Enforcement
      summary: Get enforcement job results per platform
      description: >-
        Returns the per-platform outcome of an enforcement job, so you can see
        which platforms applied the policy and which failed.
      operationId: getEnforcementJobResultsPerPlatform
      responses:
        '200':
          description: Per-platform enforcement results
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EnforcementResult'
              example:
                - id: 5c1e9a37-6b48-42df-90a1-3e8f7c04b2d6
                  enforcement_job_id: b8f04d2e-1c93-4a56-8e7f-05a91d6c3b28
                  compliance_link_id: e1a7c3f9-45b2-4d68-9c01-72f6b8d34a05
                  platform_id: nextdns
                  status: pending
                  rules_applied: 0
                  rules_skipped: 0
                  rules_failed: 0
                  error_message: null
                  details: {}
                  started_at: '2026-06-30T09:15:44Z'
                  completed_at: '2026-06-30T09:15:52Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      x-codeSamples:
        - lang: JavaScript
          label: SDK (@phosra/sdk)
          source: >
            import { PhosraClient } from "@phosra/sdk";


            const phosra = new PhosraClient({
              baseUrl: "https://phosra-api-sandbox-production.up.railway.app/api/v1",
              accessToken: process.env.PHOSRA_API_KEY,
            });


            const result = await
            phosra.enforcement.getResults("9b2f4a1e-5c3d-4e2a-8f1b-2c963f66afa6");

            console.log(result);
        - lang: Shell
          label: cURL
          source: >
            curl -sS
            "https://phosra-api-sandbox-production.up.railway.app/api/v1/enforcement/jobs/9b2f4a1e-5c3d-4e2a-8f1b-2c963f66afa6/results"
            \
              -H "Authorization: Bearer $PHOSRA_API_KEY"
        - lang: Python
          label: Python
          source: |
            import os, requests

            BASE = "https://phosra-api-sandbox-production.up.railway.app/api/v1"
            res = requests.get(
                f"{BASE}/enforcement/jobs/9b2f4a1e-5c3d-4e2a-8f1b-2c963f66afa6/results",
                headers={"Authorization": f"Bearer {os.environ['PHOSRA_API_KEY']}"},
            )
            print(res.status_code, res.json())
        - lang: Go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tbase := \"https://phosra-api-sandbox-production.up.railway.app/api/v1\"\n\treq, _ := http.NewRequest(\"GET\", base+\"/enforcement/jobs/9b2f4a1e-5c3d-4e2a-8f1b-2c963f66afa6/results\", nil)\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"PHOSRA_API_KEY\"))\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\tout, _ := io.ReadAll(resp.Body)\n\tfmt.Println(resp.Status, string(out))\n}\n"
components:
  schemas:
    EnforcementResult:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for this resource.
        enforcement_job_id:
          type: string
          format: uuid
          description: Unique identifier (UUID) for the related resource.
        compliance_link_id:
          type: string
          format: uuid
          description: Unique identifier (UUID) for the related resource.
        platform_id:
          type: string
          description: Identifier of the associated platform.
        status:
          type: string
          enum:
            - pending
            - running
            - completed
            - failed
            - partial
          description: Current lifecycle state of the resource.
        rules_applied:
          type: integer
          description: Number of rules successfully applied to the target during this run.
        rules_skipped:
          type: integer
          description: >-
            Number of rules skipped because the target does not support that
            category.
        rules_failed:
          type: integer
          description: Number of rules that returned an error while being applied.
        error_message:
          type:
            - string
            - 'null'
          description: >-
            Human-readable error detail when the operation failed; null on
            success.
        details:
          type: object
          description: Free-form provider response payload captured for debugging.
          additionalProperties: true
        started_at:
          type:
            - string
            - 'null'
          format: date-time
          description: RFC 3339 timestamp of when the job started running.
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
          description: RFC 3339 timestamp of when the job finished.
      additionalProperties: true
    Error:
      type: object
      properties:
        error:
          type: string
          description: >-
            Short, stable, machine-readable error class — matches the HTTP
            status text (e.g. `Not Found`).
        message:
          type: string
          description: >-
            Human-readable explanation of what went wrong and, where possible,
            how to fix it.
        code:
          type: integer
          description: Numeric HTTP status code, duplicated in the body for convenience.
      description: Standard error envelope returned for every 4xx and 5xx response.
      example:
        error: Not Found
        message: policy not found
        code: 404
      additionalProperties: true
  responses:
    BadRequest:
      description: >-
        The request was malformed — a required field is missing, a value failed
        validation, or an identifier is not a well-formed UUID.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Bad Request
            message: child_name is required
            code: 400
    Unauthorized:
      description: >-
        Authentication failed. Send a Bearer WorkOS JWT, or a
        `phosra_live_`/`phosra_test_` developer API key, in the `Authorization`
        header.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Unauthorized
            message: missing or invalid Authorization header
            code: 401
    Forbidden:
      description: >-
        Authenticated, but not permitted to act on this resource — for example,
        you are not a member of the target family.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Forbidden
            message: not a member of this family
            code: 403
    NotFound:
      description: No resource matches the identifier supplied in the path.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Not Found
            message: policy not found
            code: 404
    RateLimited:
      description: >-
        Too many requests. Back off and retry after the interval given in the
        `Retry-After` response header.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Too Many Requests
            message: rate limit exceeded
            code: 429
    ServerError:
      description: >-
        An unexpected error occurred inside Phosra. The request is safe to retry
        with exponential backoff; contact support if it persists.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Internal Server Error
            message: internal error
            code: 500
    BadGateway:
      description: >-
        A downstream provider returned an invalid response while Phosra was
        fulfilling the request. Retry with backoff.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Bad Gateway
            message: downstream provider error
            code: 502
    ServiceUnavailable:
      description: >-
        A downstream provider or dependency is temporarily unavailable. Retry
        with backoff.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Service Unavailable
            message: downstream provider unavailable
            code: 503
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````