insert

Description

Enables you to add a new config to the configs list. This operation requires passing an instance of the Config object with the ID and value fields set. An update is performed if the ID that you pass already exists.

Request

POST https://api.smartrecruiters.com/v1/configs

Path Parameters

n/a

Query Parameters

n/a

Request Body

Config object. Both id and value fields are required.

Response Body

Instance of Config

Example request

curl -i -H "X-SmartToken:abc123" -H "Content-Type: application/json;charset=utf-8" -d @body.json -X POST https://api.smartrecruiters.com/v1/configs

Example request body

{
    "id": "assessmentNotificationUrl",
    "value": "http://api.partnercompany.com/notifications"
}

Example response

{
    "id": "assessmentNotificationUrl",
    "value": "http://api.partnercompany.com/notifications"
}

update

Description

Enables you to update config in the configs list. This operation requires passing a config id and instance of the Config object with the ID and value fields set.

Request

POST https://api.smartrecruiters.com/v1/configs/{configId}

Path Parameters

Name

Type

Description

configId

string

unique id of a config entry

Query Parameters

n/a

Request Body

Config object. Both id and value fields are required.

Response Body

Updated instance of Config

Example request

curl -i -H "X-SmartToken:abc123" -H "Content-Type: application/json;charset=utf-8" -d @body.json -X POST https://api.smartrecruiters.com/v1/configs/assessmentNotificationUrl

Example request body

{
    "id": "assessmentNotificationUrl",
    "value": "http://api.partnercompany.com/notifications"
}

Example response

{
    "id": "assessmentNotificationUrl",
    "value": "http://api.partnercompany.com/notifications"
}

get

Description

Enables you to get the config value for a given Id.

Request

GET https://api.smartrecruiters.com/v1/configs/{configId}

Path Parameters

Name

Type

Description

configId

string

unique id of a config entry

Query Parameters

n/a

Request Body

n/a

Response Body

Instance of Config

Example request

curl -i -H "X-SmartToken: abc123" -X GET https://api.smartrecruiters.com/v1/configs/notificationUrl

Example response

{
    "id" : "notificationUrl",
    "value": "http://api.partnercompany.com/notifications"
}

list

Description

Enables you to get all specified configuration entries.

Request

GET https://api.smartrecruiters.com/v1/configs

Path Parameters

n/a

Query Parameters

n/a

Request Body

n/a

Response Body

ListResult containing list of Config objects

Example request

curl -i -H "X-SmartToken: abc123" -X GET https://api.smartrecruiters.com/v1/configs

Example response

{
    "limit": 100,
    "offset": 0,
    "totalFound": 3,
    "content": [
        {
            "id": "notificationUrl",
            "value": "http://api.partnercompany.com/notifications"
        },
        {
            "id": "defaultGetLimit",
            "value": "40"
        },
        {
            "id": "baseUrl",
            "value": "http://api.partnercompany.com/base"
        }
    ]
}

Did this page help you?