For the complete documentation index, see llms.txt. This page is also available as Markdown.

Job

These instructions will explain you about how to work with jobs upload and getting API.

Job model fields

Job model in database contains next fields:

  • Required:

    • id (uuid)

    • title (CharField)

    • location (CharField)

    • overview (TextField)

    • description (TextField)

    • posted (DateField auto_now_add=True)

    • is_featured (BooleanField)

  • Optional:

    • salary (CharField)

    • image_url (URLField)

    • company (ForeignKey to Company, setting to Null, if Company was deleted)

    • industries (ManyToManyField)

    • skills (ManyToManyField)

    • closes (DateField)

    • experience (CharField)

    • hours (PositiveSmallIntegerField)

    • languages (ArrayField of CharFields)

Job View Set

Create new job

Method create(self, request) acccepting POST requests with JSON information about new job.

Returns

  • If ok:

    • Code status 200

    • pk JSON with Job id on bdn

  • Else:

    • Code status 400

    • error JSON with errors

Example:

Get job info

Method retrieve(self, request, pk=None) acccepting GET requests with job id and reply with JSON information about job and company academy profile.

Returns

  • If ok:

    • Code status 200

    • JSON with Job data and Academy data

Example

Get jobs list

Method list(self, request) acccepting GET requests reply with JSON information about jobs.

Returns

  • If ok:

    • Code status 200

    • JSON with Jobs list data

Example

Get job by id

Method get_by_id(self, request, pk=None) acccepting GET requests with job id and reply with JSON information about job.

Returns

  • If ok:

    • Code status 200

    • JSON with Job data

Example

Get jobs by company

Method get_by_company(self, request) acccepting GET requests with inline eth_address and reply with JSON information about jobs by this company.

Returns

  • If ok:

    • Code status 200

    • JSON with Jobs data

Example

Edit job by id

Method edit_by_id(self, request, pk=None) acccepting POST requests with new JSON information about job and inline id.

Returns

  • If ok:

    • Code status 200

-Else if user is not creator of this job:

  • Code status 401

  • Else:

    • Code status 400

    • error JSON with errors

Example:

Method mark_featured_by_id(self, request, pk=None) acccepting POST requests with inline id.

Returns

  • If ok:

    • Code status 200

-Else if user is not creator of this job:

  • Code status 401

Example:

Delete job by id

Method delete_by_id(self, request, pk=None) acccepting POST requests with inline id.

Returns

  • If ok:

    • Code status 200

-Else if user is not creator of this job:

  • Code status 401

Example:

Last updated

Was this helpful?