Tenant Configurations

TenantPreferenceRead

post

This API is used to get data that is saved as tenant preference for an organisation

  • The endpoint for Update Consent is /org/v2/preferences/read
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Authorizations
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

To make use of this API, you require authorization. Raise a request to the administrator for the use of the API. You will receive the authorization key. Specify the key received, here.

x-authenticated-user-tokenstringRequired

It is a unique token/key to authenticate the user each time an API is called. For corresponding sessions this token is used, not your actual username/password

x-authenticated-forstringOptional

Managed User token of registered MUA user performing given API request.

Body
Responses
200Success
application/json
post
POST /api/org/v2/preferences/read HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
x-authenticated-user-token: text
Content-Type: application/json
Accept: */*
Content-Length: 52

{
  "request": {
    "orgId": "all",
    "key": "selfdeclarations"
  }
}
{
  "id": "api.org.preferences.read",
  "ver": "v2",
  "ts": "2020-11-25 19:32:15:113+0000",
  "params": {
    "resmsgid": null,
    "msgid": "cb39f64aeb15c9ac0afdb5d2a8bc634b",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": {
      "updatedBy": null,
      "data": "Tenant preference data",
      "createdBy": "95e4942d-cbe8-477d-aebd-ad8e6de4bfc8",
      "updatedOn": null,
      "createdOn": 1597330354157,
      "key": "selfdeclarations",
      "orgId": "all"
    }
  }
}

TenantPreferenceCreate

post

This API is used to save data as per the tenant preference for an organisation

  • The endpoint for Update Consent is /org/v2/preferences/create
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Authorizations
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

To make use of this API, you require authorization. Raise a request to the administrator for the use of the API. You will receive the authorization key. Specify the key received, here.

x-authenticated-user-tokenstringRequired

It is a unique token/key to authenticate the user each time an API is called. For corresponding sessions this token is used, not your actual username/password

x-authenticated-forstringOptional

Managed User token of registered MUA user performing given API request.

Body
Responses
200Success
application/json
post
POST /api/org/v2/preferences/create HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
x-authenticated-user-token: text
Content-Type: application/json
Accept: */*
Content-Length: 84

{
  "request": {
    "orgId": "all",
    "key": "selfdeclarations",
    "data": "Tenant preference data"
  }
}
{
  "id": "api.org.preferences.create",
  "ver": "v2",
  "ts": "2020-11-26 17:49:14:722+0000",
  "params": {
    "resmsgid": null,
    "msgid": "cc4678bef11ed973caae3760385a3af0",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": "SUCCESS",
    "orgId": "all",
    "key": "selfdeclarations"
  }
}

TenantPreferenceUpdate

patch

This API is used to update data as per the tenant preference for an organisation

  • The endpoint for Update Consent is /org/v2/preferences/update
  • The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
Authorizations
Header parameters
tsstringOptional

Timestamp at which given API request is sent.

X-msgidstringOptional

This ID uniquely identifies a request if the same API is executed multiple times.

AuthorizationstringRequired

To make use of this API, you require authorization. Raise a request to the administrator for the use of the API. You will receive the authorization key. Specify the key received, here.

x-authenticated-user-tokenstringRequired

It is a unique token/key to authenticate the user each time an API is called. For corresponding sessions this token is used, not your actual username/password

x-authenticated-forstringOptional

Managed User token of registered MUA user performing given API request.

Body
Responses
200Success
application/json
patch
PATCH /api/org/v2/preferences/update HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
x-authenticated-user-token: text
Content-Type: application/json
Accept: */*
Content-Length: 84

{
  "request": {
    "orgId": "all",
    "key": "selfdeclarations",
    "data": "Tenant preference data"
  }
}
{
  "id": "api.org.preferences.update",
  "ver": "v2",
  "ts": "2020-11-25 19:33:57:441+0000",
  "params": {
    "resmsgid": null,
    "msgid": "8980371bc3521fe2a154e13e4772e493",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "response": "SUCCESS"
  }
}

Last updated

Was this helpful?