Platform
Search…
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:
1
// POST Request to *your_bdn_host*/api/v1/jobs/
2
3
'/api/v1/jobs/',
4
data={
5
'title': 'test',
6
'location': 'test',
7
'overview': 'test',
8
'description': 'test',
9
'hours': 1,
10
},
11
HTTP_AUTH_SIGNATURE='0xe646de646dde9cee6875e3845428ce6fc13d41086e8a7f6531d1d526598cc4104122e01c38255d1e1d595710986d193f52e3dbc47cb01cb554d8e4572d6920361c',
12
HTTP_AUTH_ETH_ADDRESS='D2BE64317Eb1832309DF8c8C18B09871809f3735'
Copied!

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
1
// GET Request to *your_bdn_host*/api/v1/jobs/(?P<pk>[^/.]+)/
2
3
'/api/v1/jobs/e0e433e9-477e-43a3-8e23-dfe2686202be/',
4
HTTP_AUTH_SIGNATURE='0xe646de646dde9cee6875e3845428ce6fc13d41086e8a7f6531d1d526598cc4104122e01c38255d1e1d595710986d193f52e3dbc47cb01cb554d8e4572d6920361c',
5
HTTP_AUTH_ETH_ADDRESS='D2BE64317Eb1832309DF8c8C18B09871809f3735')
Copied!

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
1
// GET Request to *your_bdn_host*/api/v1/jobs/
2
3
'/api/v1/jobs/',
4
HTTP_AUTH_SIGNATURE='0xe646de646dde9cee6875e3845428ce6fc13d41086e8a7f6531d1d526598cc4104122e01c38255d1e1d595710986d193f52e3dbc47cb01cb554d8e4572d6920361c',
5
HTTP_AUTH_ETH_ADDRESS='D2BE64317Eb1832309DF8c8C18B09871809f3735'
Copied!

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
1
// GET Request to *your_bdn_host*/api/v1/jobs/(?P<pk>[^/.]+)/get_by_id/
2
3
'/api/v1/jobs/e0e433e9-477e-43a3-8e23-dfe2686202be/get_by_id/',
4
HTTP_AUTH_SIGNATURE='0xe646de646dde9cee6875e3845428ce6fc13d41086e8a7f6531d1d526598cc4104122e01c38255d1e1d595710986d193f52e3dbc47cb01cb554d8e4572d6920361c',
5
HTTP_AUTH_ETH_ADDRESS='D2BE64317Eb1832309DF8c8C18B09871809f3735')
Copied!

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
1
// GET Request to *your_bdn_host*/api/v1/jobs/get_by_company/?eth_address=*some_addres*
2
3
'/api/v1/jobs/get_by_company/?eth_address=0x000',
4
HTTP_AUTH_SIGNATURE='0xe646de646dde9cee6875e3845428ce6fc13d41086e8a7f6531d1d526598cc4104122e01c38255d1e1d595710986d193f52e3dbc47cb01cb554d8e4572d6920361c',
5
HTTP_AUTH_ETH_ADDRESS='D2BE64317Eb1832309DF8c8C18B09871809f3735')
Copied!

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:
1
// POST Request to *your_bdn_host*/api/v1/jobs/(?P<pk>[^/.]+)/edit_by_id/
2
3
'/api/v1/jobs/e0e433e9-477e-43a3-8e23-dfe2686202be/edit_by_id/',
4
data={
5
'title': 'test',
6
'location': 'test',
7
'overview': 'test',
8
'description': 'test',
9
'hours': 1,
10
},
11
HTTP_AUTH_SIGNATURE='0xe646de646dde9cee6875e3845428ce6fc13d41086e8a7f6531d1d526598cc4104122e01c38255d1e1d595710986d193f52e3dbc47cb01cb554d8e4572d6920361c',
12
HTTP_AUTH_ETH_ADDRESS='D2BE64317Eb1832309DF8c8C18B09871809f3735'
Copied!
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:
1
// POST Request to *your_bdn_host*/api/v1/jobs/(?P<pk>[^/.]+)/mark_featured_by_id/
2
3
'/api/v1/jobs/e0e433e9-477e-43a3-8e23-dfe2686202be/mark_featured_by_id/',
4
data={
5
},
6
HTTP_AUTH_SIGNATURE='0xe646de646dde9cee6875e3845428ce6fc13d41086e8a7f6531d1d526598cc4104122e01c38255d1e1d595710986d193f52e3dbc47cb01cb554d8e4572d6920361c',
7
HTTP_AUTH_ETH_ADDRESS='D2BE64317Eb1832309DF8c8C18B09871809f3735'
Copied!

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:
1
// POST Request to *your_bdn_host*/api/v1/jobs/(?P<pk>[^/.]+)/delete_by_id/
2
3
'/api/v1/jobs/e0e433e9-477e-43a3-8e23-dfe2686202be/delete_by_id/',
4
data={
5
},
6
HTTP_AUTH_SIGNATURE='0xe646de646dde9cee6875e3845428ce6fc13d41086e8a7f6531d1d526598cc4104122e01c38255d1e1d595710986d193f52e3dbc47cb01cb554d8e4572d6920361c',
7
HTTP_AUTH_ETH_ADDRESS='D2BE64317Eb1832309DF8c8C18B09871809f3735'
Copied!
Last modified 3yr ago