Subscribe
This endpoint is deprecated. Please do not use it for new projects. The documentation remains here for legacy API consumers.
Creating a new job posting subscription
Request with tokens
A POST with the endpoint /jobabo allows you to create a new subscription:
1 |
curl -i -H "Authorization: Bearer TOKEN" -H "Content-Type: application/json" -X POST "https://api.softgarden.io/api/rest/v2/frontend/jobabo?channel={channelId}&types={types}&email={email}" -d "{searchParams}" |
with TOKEN being either a client access token or a user access token. The {channelId} corresponds to the desired channel for the subscription, The other two query parameters define the type of subscription, more details are given below.
Furthermore, the body of the POST message must contain an JSON-encoded Java Map from String to String[] that associates the IDs of the categories with the values one wants to subscribe to. In the curl example marked as {searchParams}. An example is given further down.
A newly created subscription has the status ‘unconfirmed‘, for confirming a subscription see this page.
Request with basic authorization
As an alternative, you can use here the basic authorization method. Just write
1 |
curl -i -u "{clientId}:" -H "Content-Type: application/json" -X POST "https://api.softgarden.io/api/rest/v2/frontend/jobabo?channel={channelId}&types={types}&email={email}" -d "{searchParams}" |
{clientId} is the ID for your application to develop given to you by softgarden. The colon seen in the example is obligatory.
Path parameters
– none –
Query parameters
Name | Description | Data Type |
---|---|---|
channelId | The channel to subscribe to. | String |
types | The desired subscription types, at the time of writing, rss and email are supported. Multiple types must be separated using the StringUtil.DEFAULT_SEPARATOR_SHORT of Java (::). | String |
Mail address to send new information to, is only used when an email-type is requested. | String |
Response values
Upon | Returned value | Description |
---|---|---|
success | JSON-encoded Java Map<string, string[]=””></string,> | Maps the type to the result of the demanded subscription: For RSS, the public ID and for E-Mail the string ok are put in the map upon success, otherwise an error message is used. |
failure | 500 – INTERNAL SERVER ERROR | When an error appears while processing your request. |
authorization error | 401 / 403 | See here for details. |
Examples:
Request body:
1 |
curl -i -H "Authorization: Bearer c193342dae0c433c99f3a33444695930" -H "Content-Type: application/json" -X POST "https://api.softgarden.io/api/rest/v2/frontend/jobabo?channel=release72_extern&types=rss::email&email=s.meyer@softgarden.de" -d '{"audience":["00005"],"jobcategory":["00007"],"geoLocation":[49.872775000000004,8.651177,50], "geoLocationName":["Darmstadt"]}' |
With a closer look to the -d parameter:
1 2 3 4 5 6 |
{ "audience": ["00005"], "jobcategory": ["00007"], "geoLocation":[49.872775000000004,8.651177,50], "geoLocationName":["Darmstadt"]}' } |
The values in the list of the geoLocation field are latitude, longitude and radius. The third value, the radius is optional. If not provided it defaults to 50.
Return value:
1 2 3 4 |
{ "rss": "e1eda64ab37f46a991b80170edf03ae6", "email": "ok" } |