Creates a new membership
post
/learn.rest/v1/memberships
Request
Supported Media Types
- application/json
Membership object that needs to be created.
Root Schema : MembershipRequest
Type:
object
Membership request object. This object comprises all the parameters required to create a new membership.
Show Source
-
learnCenterId:
number(int32)
Minimum Value:
178409
Maximum Value:1.0E18
Unique identifier for the LearnCenter.Example:178784
-
status:
string
Status of the membership.Example:
approved
-
userId:
number
Minimum Value:
112867
Maximum Value:1.0E18
User ID of the user being added to the membership.Example:112900
-
validFromDate(optional):
string(date-time)
The date the membership is valid from.Example:
2016-02-23T07:21:00-05:00
-
validUntilDate(optional):
string(date-time)
The date the membership is valid until.Example:
2016-02-23T07:21:00-05:00
Example:
{
"learnCenterId":178784,
"userId":112900,
"status":"approved",
"validFromDate":"2016-02-23T07:21:00-05:00",
"validUntilDate":"2016-02-23T07:21:00-05:00"
}
Security
-
auth: basic
Type:
basic
Description:Basic Authentication
Response
Supported Media Types
- application/json
201 Response
New membership resource created.
Root Schema : MembershipResponse
Type:
object
The Membership response object.
Show Source
-
createdDate(optional):
string
Date the membership was created.Example:
2016-02-23T07:21:00-05:00
-
id(optional):
number(int32)
Id of the membership.Example:
1345
-
learnCenter(optional):
array learnCenter
Link to the LearnCenter items.
-
learnCenterId(optional):
number(int32)
Minimum Value:
178409
Maximum Value:1.0E18
Unique identifier of the Learn Center.Example:178784
-
links(optional):
object MembershipLinkItems
-
status(optional):
string
Status of the membership.Example:
approved
-
statusChangedByUser(optional):
array statusChangedByUser
The link to the user who changed the status.
-
statusChangedByUserId(optional):
string
User Id of the user who changed the membership status.Example:
135131
-
statusChangedDate(optional):
string
The date the status of the membership was changed.Example:
2016-02-23T07:21:00-05:00
-
user(optional):
array user
Link to the users.
-
userId(optional):
number
Minimum Value:
112867
Maximum Value:1.0E18
Unique Identifier for the user.Example:112900
-
validFromDate(optional):
string(date-time)
The date from which the membership is valid.Example:
2016-02-23T07:21:00-05:00
-
validUntilDate(optional):
string(date-time)
The date until which the membership is valid.Example:
2016-02-23T07:21:00-05:00
Example:
{
"id":1,
"learnCenterId":178784,
"learnCenter":[
{
"rel":"canonical",
"href":"{url}/learn.rest/v1/learncenters/123456"
},
{
"rel":"canonical",
"href":"{url}/learn.rest/v1/learncenters/123456"
}
],
"userId":112900,
"user":[
{
"rel":"canonical",
"href":"{url}/learn.rest/v1/users/456"
},
{
"rel":"canonical",
"href":"{url}/learn.rest/v1/users/456"
}
],
"statusChangedDate":"2016-02-23T07:21:00-05:00",
"statusChangedByUser":[
{
"rel":"canonical",
"href":"{url}/learn.rest/v1/users/456"
},
{
"rel":"canonical",
"href":"{url}/learn.rest/v1/users/456"
}
],
"validUntilDate":"2016-02-23T07:21:00-05:00",
"createdDate":"2016-02-23T07:21:00-05:00",
"statusChangedByUserId":"135131",
"validFromDate":"2016-02-23T07:21:00-05:00",
"links":{
"rel":"canonical",
"href":"{url}/learn.rest/v1/memberships/456"
},
"status":"approved"
}
Nested Schema : learnCenter
Type:
array
Link to the LearnCenter items.
Show Source
-
Array of:
object LearnCenterLinkItems
Learn Center Link Item object. This object comprises links to the Learn Center Items.
Nested Schema : MembershipLinkItems
Type:
Show Source
object
-
href(optional):
string
Example:
{url}/learn.rest/v1/memberships/456
-
rel(optional):
string
Example:
canonical
Example:
{
"rel":"canonical",
"href":"{url}/learn.rest/v1/memberships/456"
}
Nested Schema : statusChangedByUser
Type:
array
The link to the user who changed the status.
Show Source
-
Array of:
object UserLinkItems
Link to user items.
Nested Schema : user
Type:
array
Link to the users.
Show Source
-
Array of:
object UserLinkItems
Link to user items.
Nested Schema : LearnCenterLinkItems
Type:
object
Learn Center Link Item object. This object comprises links to the Learn Center Items.
Show Source
-
href(optional):
string
Example:
{url}/learn.rest/v1/learncenters/178477
-
rel(optional):
string
Example:
canonical
Example:
{
"rel":"canonical",
"href":"{url}/learn.rest/v1/learncenters/178477"
}
Nested Schema : UserLinkItems
Type:
object
Link to user items.
Show Source
-
href(optional):
string
Example:
{url}/learn.rest/v1/users/456
-
rel(optional):
string
Example:
canonical
Example:
{
"rel":"canonical",
"href":"{url}/learn.rest/v1/users/456"
}
400 Response
Request has incorrect syntax or does not contain a field that is required.
409 Response
Another resource with the same identifier already exists.
500 Response
Internal server error.