Skip to main content

Submit URL Work

Submit an URL for processing by the platform.

info

Available in Contextal Platform 1.0 and later.

Request​

  • Path: /api/v1/submit_url
  • Verb: POST or PUT
  • Content-Type: application/json
  • Body: JSON object with the following fields:
    • url (required): the URL to submit
    • ttl (optional): number of seconds allowed to fully complete this work request
    • maxrec (optional): maximum recursion level a work can reach
    • org (optional): string identifying the organization (can be fully customized)
    • relation_metadata (optional): JSON object (metadata to attach to the entry object)
note
  1. The ttl param will be silently capped to MAX_WORK_TTL (compile time constant - currently = 1 day)
  2. The maxrec param will be silently capped to the range 1 -> MAX_WORK_DEPTH (compile time constant - currently = 24)

Reply​

On success:

  • Status: 201 - Created
  • Content-Type: application/json
  • Body: A JSON object in the form of:
    {
    "object_id": "String", # the id of the submitted object
    "work_id": "String", # the work id
    "ttl": Number, # the actual TTL applied to the work
    }

On failure:

  • Status: 4xx or 5xx