# Create Shared Job

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Create Shared Job"}
>
</Heading>

<MethodEndpoint
  method={"post"}
  path={"/api/v2/workspaces/{workspace_id}/jobs/share"}
  context={"endpoint"}
>
  
</MethodEndpoint>

Creates a link to a job prototype you can then share with others to see a query results report.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"in":"path","name":"workspace_id","required":true,"schema":{"format":"uuid","title":"Workspace ID","type":"string"}}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"content":{"application/json":{"schema":{"properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Explain how you expect the users to use this shared job. Users who visit the shared job will see this text. ","title":"Description"},"expiration_date":{"description":"The date after which the generated link will expire and become invalid. The expiration date must be within 365 days from the current date.","format":"date-time","title":"Expiration date","type":"string"},"job_id":{"description":"Type the ID of the Job you want to share.","format":"uuid","title":"Job ID","type":"string"},"login_required":{"default":false,"description":"Select `True` if you want to require users to login to access the shared job.","title":"Login required","type":"boolean"},"show_files":{"default":false,"description":"Select `True` if you want your users to be able to view the pipeline files.","title":"Show files","type":"boolean"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The title of the shared job.","title":"Title"},"workspace_name":{"description":"Type the name of the workspace where the job is located.","title":"Workspace name","type":"string"}},"required":["expiration_date","job_id","workspace_name"],"title":"PostSharedJob","type":"object"}}},"required":true}}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"201":{"content":{"application/json":{"schema":{"properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Explain how you expect the users to use this shared job. Users who visit the shared job will see this text. ","title":"Description"},"expiration_date":{"description":"The date after which the generated link will expire and become invalid. The expiration date must be within 365 days from the current date.","format":"date-time","title":"Expiration date","type":"string"},"is_revoked":{"description":"If a shared job is revoked, it's no longer accessible with the link.","title":"Is revoked","type":"boolean"},"job_id":{"description":"Type the ID of the Job you want to share.","format":"uuid","title":"Job ID","type":"string"},"link":{"description":"The link you can share with others to allow them to access the shared job.","title":"Shared job link","type":"string"},"login_required":{"description":"Select `True` if you want to require users to login to access the shared job.","title":"Login required","type":"boolean"},"shared_job_id":{"description":"Unique identifier of the shared job. You can use this ID to manage the shared job.","format":"uuid","title":"Shared job ID","type":"string"},"show_files":{"default":false,"description":"Select `True` if you want your users to be able to view the pipeline files.","title":"Show files","type":"boolean"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The title of the shared job.","title":"Title"},"workspace_id":{"description":"Type the ID of the workspace where the job is located.","format":"uuid","title":"Workspace ID","type":"string"},"workspace_name":{"description":"Type the name of the workspace where the job is located.","title":"Workspace name","type":"string"}},"required":["expiration_date","shared_job_id","job_id","workspace_id","workspace_name","link","is_revoked","login_required"],"title":"SharedJobResponse","type":"object"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"}}},"description":"Validation Error"}}}
>
  
</StatusCodes>
