Download OpenAPI specification:Download
UserDataService API spec (Default Adapter)
API documentation for OrderService default adapter. Includes features such as:
{- "status": "ok",
- "packageInfo": {
- "gitCommitHash": "82fc145",
- "sdkVersion": "3.2.0",
- "serviceAdapterAPIVersion": "^3.5.0",
- "serviceName": "@basaldev/blocks-user-service",
- "serviceVersion": "2.14.1"
}
}
Send an email to user with an invitation link. Once clicked, this link will redirect to invitation page.
Validation
- valid Authorization specified in request header
- Authorization meets one of the following requirements:
- it is super user token or a system internal token
- it is a non-super user token, and the user has
owner
oradmin
role in the organization (specified in the request body), and the Organization API is provided in the adapter.
Side effects
- Invitation email will be sent to user's email address,
- when
inviteUser
config is true when setting up the adapter
This endpoint is disabled when the invitation feature is disabled.
When Organization API is not provided in the adapter, the
orgId
androle
fields are optional. Otherwise, they are required.
Create an invite for a user to an organization
email required | string <email> (userEmail.field) The email address of the user. |
fromUserId required | string (objectId.field) ^[0-9a-z]{24}$ The user ID that sent the invite to the invited user |
orgId | string (objectId.field) ^[0-9a-z]{24}$ The organization ID that the user is invited to. *Optional when Organization API is not provided in the adapter, but required when Organization API is provided |
role | string (userOrganizationRole.field) Enum: "owner" "admin" "member" "guest" The role of the invited user in the organization. *Optional when Organization API is not provided in the adapter, but required when Organization API is provided) |
{- "email": "mouri@basal.dev",
- "fromUserId": "0123456789ab0123456789ab",
- "orgId": "0123456789ab0123456789ab",
- "role": "owner"
}
{- "id": "0123456789ab0123456789ab",
- "fromUserId": "0123456789ab0123456789ab",
- "orgId": "0123456789ab0123456789ab",
- "email": "mouri@basal.dev",
- "role": "owner",
- "status": "waiting_accept",
- "acceptedAt": "2022-01-01T00:00:000Z",
- "createdAt": "2022-01-01T00:00:000Z",
- "invitedAt": "2022-01-01T00:00:000Z",
- "updatedAt": "2022-01-01T00:00:000Z"
}
Retrieve list of invitations. System admin user can list all invitations, without filter. Organization owner/admin can specify their orgId in the filter query parameter to get invitations of their own organization.
Validation
- valid Authorization specified in request header
- Authorization meets one of the following requirements:
- it is super user token or a system internal token
- it is a non-super user token, and the user has
owner
oradmin
role in the organization (specified in the request body), and the Organization API is provided in the adapter.
$top | integer number of object want to fetch | |||||||||||||||||||||||||||||||||
$skip | integer number of object want to skip | |||||||||||||||||||||||||||||||||
$nextToken | string Token for get next batch of list data | |||||||||||||||||||||||||||||||||
$previousToken | string Token for get previous batch of list data | |||||||||||||||||||||||||||||||||
$filter | string Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).
| |||||||||||||||||||||||||||||||||
$orderBy | string Return sorted items based on property values. It can contains a comma-separated list of expressions. The expression may include the suffix "asc" for ascending or "desc" for descending, separated from the property name by one or more spaces. If "asc" or "desc" is not specified, the service MUST order by the specified property in ascending order. The sort order is the inherent order for the type of the property. Examples:Return all orders sorted by closedAt in descending order and a secondary sort order of updatedAt in ascending order. | |||||||||||||||||||||||||||||||||
orgId | string OrganizationId |
{- "total": 100,
- "count": 100,
- "value": [
- {
- "id": "0123456789ab0123456789ab",
- "fromUserId": "0123456789ab0123456789ab",
- "orgId": "0123456789ab0123456789ab",
- "email": "mouri@basal.dev",
- "role": "owner",
- "status": "waiting_accept",
- "acceptedAt": "2022-01-01T00:00:000Z",
- "createdAt": "2022-01-01T00:00:000Z",
- "invitedAt": "2022-01-01T00:00:000Z",
- "updatedAt": "2022-01-01T00:00:000Z"
}
]
}
Checks invitation token. If valid, create user using payload information, and add user to invited organization (if any).
Validation
- valid Authorization specified in request header
- Authorization is one-time-token generated for this user's invitation verification use, and not been used before.
name | string [ 2 .. 50 ] characters |
password required | string [ 8 .. 64 ] characters |
typeId required | string |
avatar | string |
{- "name": "string",
- "password": "stringst",
- "typeId": "string",
- "avatar": "string"
}
{- "id": "0123456789ab0123456789ab",
- "fromUserId": "0123456789ab0123456789ab",
- "orgId": "0123456789ab0123456789ab",
- "email": "mouri@basal.dev",
- "role": "owner",
- "status": "waiting_accept",
- "acceptedAt": "2022-01-01T00:00:000Z",
- "createdAt": "2022-01-01T00:00:000Z",
- "invitedAt": "2022-01-01T00:00:000Z",
- "updatedAt": "2022-01-01T00:00:000Z"
}
Delete an invitation
Validation
- valid Authorization specified in request header
- Authorization meets one of the following requirements:
- it is the user that created the invitation
- it is super user token or a system internal token
- if organizationAPI is set
- it is a non-super user token, and the user has
owner
oradmin
role in the organization (specified in the request body)
{- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- { }
], - "innererror": {
- "code": "string",
- "innererror": { }
}
}
get user upload url
userId required | string |
{- "error": {
- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- {
- "code": "string",
- "target": "string",
- "message": "string"
}
]
}
}
Create a user and returns the created user information. This will not send an email to the user and will also set emailVerified
to true.
Custom field information is configured when setting up user-service - please refer to other documentation.
Validation
- valid Authorization specified in request header
- Authorization meets the following requirements:
- it is super user token or a system internal token
Body for creating user into system
email required | string <email> |
password required | string^(?=.*[a-z])(?=.*[0-9])[A-Za-z0-9]{8,24}$ |
typeId required | string Enum: "000" "010" "001" "100" |
name required | string [ 2 .. 20 ] characters |
avatar | string <uri> |
phoneNumber | string |
addressLine1 | string |
addressLine2 | string |
addressLine3 | string |
customFields | object (customFields.field) Custom fields added to the |
object (timeline) Timelines for the user. |
{- "name": "毛利小五郎",
- "email": "mouri@basal.dev",
- "password": "password1234",
- "typeId": "010"
}
{- "mouri": {
- "id": "userId",
- "email": "mouri@basal.dev",
- "name": "毛利小五郎",
- "typeId": "010",
- "avatar": "",
- "emailVerified": true,
- "phoneNumber": "",
- "provider": "",
- "providerId": "",
- "addressLine1": "",
- "addressLine2": "",
- "addressLine3": "",
- "customFields": {
- "twitter": "@mouri-basal"
}, - "reviewStats": {
- "averageRate": 4.3,
- "averageSubRates": {
- "quality": 4.9,
- "price": 3.23,
- "delivery": 4.1
}, - "totalCount": 34
}, - "createdAt": "2024-04-04T01:10:13.460Z",
- "updatedAt": "2024-04-04T01:10:13.460Z"
}
}
Create a user and returns the created user information.
Custom field information is configured when setting up user-service - please refer to other documentation.
For typeId != 100 (non super user type), no authentication or authorization is required.
Side effects
- Verification email will be send to user's email address,
- if
verifyEmail
config is true when setting up the adapter
Body for creating user into system
email required | string <email> |
password required | string^(?=.*[a-z])(?=.*[0-9])[A-Za-z0-9]{8,24}$ |
typeId required | string Enum: "000" "010" "001" "100" |
name required | string [ 2 .. 20 ] characters |
avatar | string <uri> |
phoneNumber | string |
addressLine1 | string |
addressLine2 | string |
addressLine3 | string |
customFields | object (customFields.field) Custom fields added to the |
object (timeline) Timelines for the user. |
{- "name": "毛利小五郎",
- "email": "mouri@basal.dev",
- "password": "password1234",
- "typeId": "010"
}
{- "mouri": {
- "id": "userId",
- "email": "mouri@basal.dev",
- "name": "毛利小五郎",
- "typeId": "010",
- "avatar": "",
- "emailVerified": false,
- "phoneNumber": "",
- "provider": "",
- "providerId": "",
- "addressLine1": "",
- "addressLine2": "",
- "addressLine3": "",
- "customFields": {
- "twitter": "@mouri-basal"
}, - "reviewStats": {
- "averageRate": 4.3,
- "averageSubRates": {
- "quality": 4.9,
- "price": 3.23,
- "delivery": 4.1
}, - "totalCount": 34
}, - "timeline": {
- "work_history": [
- {
- "title": "Joined Basal",
- "subtitle": "Joined Basal as a user.",
- "description": "Joined Basal as a user.",
- "type": "work_history",
- "start": "2024-04-04T00:00:000Z",
- "isCurrent": true,
- "location": {
- "city": "Tokyo",
- "prefecture": "Tokyo"
}
}, - {
- "title": "Joined Co-Lift",
- "subtitle": "Joined Co-Lift as a user.",
- "description": "Joined Co-Lift as a user.",
- "type": "work_history",
- "start": "2023-04-04T00:00:000Z",
- "end": "2024-04-04T00:00:000Z",
- "isCurrent": false,
- "location": {
- "city": "Tokyo",
- "prefecture": "Tokyo"
}
}
]
}, - "createdAt": "2024-04-04T01:10:13.460Z",
- "updatedAt": "2024-04-04T01:10:13.460Z"
}
}
Get user list
Validation
- valid Authorization specified in request header
- Authorization is super user token or a system internal token
$top | integer number of object want to fetch | |||||||||||||||||||||||||||||||||
$skip | integer number of object want to skip | |||||||||||||||||||||||||||||||||
$nextToken | string Token for get next batch of list data | |||||||||||||||||||||||||||||||||
$previousToken | string Token for get previous batch of list data | |||||||||||||||||||||||||||||||||
$filter | string Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).
| |||||||||||||||||||||||||||||||||
$orderBy | string Return sorted items based on property values. It can contains a comma-separated list of expressions. The expression may include the suffix "asc" for ascending or "desc" for descending, separated from the property name by one or more spaces. If "asc" or "desc" is not specified, the service MUST order by the specified property in ascending order. The sort order is the inherent order for the type of the property. Examples:Return all orders sorted by closedAt in descending order and a secondary sort order of updatedAt in ascending order. | |||||||||||||||||||||||||||||||||
$expand | string Include extra information that are not included in responses by default in the response. You can expand customFields, by using $expand=customFields.field |
{- "total": 1,
- "count": 1,
- "@nextLink": "string",
- "@previousLink": "string",
- "value": [
- {
- "id": "userId",
- "email": "mouri@basal.dev",
- "name": "毛利小五郎",
- "typeId": "010",
- "avatar": "",
- "emailVerified": false,
- "phoneNumber": "",
- "provider": "",
- "providerId": "",
- "addressLine1": "",
- "addressLine2": "",
- "addressLine3": "",
- "customFields": {
- "twitter": "@MouriBasal"
}, - "reviewStats": {
- "averageRate": 4.3,
- "averageSubRates": {
- "quality": 4.9,
- "price": 3.23,
- "delivery": 4.1
}, - "totalCount": 34
}, - "createdAt": "2024-04-04T01:10:13.460Z",
- "updatedAt": "2024-04-04T01:10:13.460Z"
}
]
}
Retrieve the information of the user with the matching user ID.
Validation
- valid Authorization specified in request header
- Authorization is any of the following:
- super user token or a system internal token
- useId inside the token matches the userId in the path
$expand | string Include extra information that are not included in responses by default in the response. You can expand customFields, by using $expand=customFields.field |
{- "mouri": {
- "id": "userId",
- "email": "mouri@basal.dev",
- "name": "毛利小五郎",
- "typeId": "010",
- "avatar": "",
- "emailVerified": false,
- "phoneNumber": "",
- "provider": "",
- "providerId": "",
- "addressLine1": "",
- "addressLine2": "",
- "addressLine3": "",
- "customFields": {
- "twitter": "@mouri-basal"
}, - "reviewStats": {
- "averageRate": 4.3,
- "averageSubRates": {
- "quality": 4.9,
- "price": 3.23,
- "delivery": 4.1
}, - "totalCount": 34
}, - "timeline": {
- "work_history": [
- {
- "title": "Joined Basal",
- "subtitle": "Joined Basal as a user.",
- "description": "Joined Basal as a user.",
- "type": "work_history",
- "start": "2024-04-04T00:00:000Z",
- "isCurrent": true,
- "location": {
- "city": "Tokyo",
- "prefecture": "Tokyo"
}
}, - {
- "title": "Joined Co-Lift",
- "subtitle": "Joined Co-Lift as a user.",
- "description": "Joined Co-Lift as a user.",
- "type": "work_history",
- "start": "2023-04-04T00:00:000Z",
- "end": "2024-04-04T00:00:000Z",
- "isCurrent": false,
- "location": {
- "city": "Tokyo",
- "prefecture": "Tokyo"
}
}
]
}, - "createdAt": "2024-04-04T01:10:13.460Z",
- "updatedAt": "2024-04-04T01:10:13.460Z"
}
}
Delete user by ID
Validation
- valid Authorization specified in request header
- Authorization is any of the following:
- super user token or a system internal token
- useId inside the token matches the userId in the path
{- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- { }
], - "innererror": {
- "code": "string",
- "innererror": { }
}
}
Update user information by user ID
Validation
- valid Authorization specified in request header
- Authorization is any of the following:
- super user token or a system internal token
- useId inside the token matches the userId in the path
addressLine1 | string |
addressLine2 | string |
addressLine3 | string |
avatar | string |
customFields | object (customFields.field) Custom fields added to the |
name | string [ 2 .. 50 ] characters |
password | string [ 8 .. 64 ] characters |
phoneNumber | string |
postalCode | string |
object (reviewStats.field) The current statistics for reviews made against this user. If the review service is not in use, then 0 will be returned for all fields. | |
object (timeline) Timelines for the user. |
{- "name": "毛利小五郎"
}
{- "mouri": {
- "id": "userId",
- "email": "mouri@basal.dev",
- "name": "毛利小五郎",
- "typeId": "010",
- "avatar": "",
- "emailVerified": false,
- "phoneNumber": "",
- "provider": "",
- "providerId": "",
- "addressLine1": "",
- "addressLine2": "",
- "addressLine3": "",
- "customFields": {
- "twitter": "@mouri-basal"
}, - "reviewStats": {
- "averageRate": 4.3,
- "averageSubRates": {
- "quality": 4.9,
- "price": 3.23,
- "delivery": 4.1
}, - "totalCount": 34
}, - "timeline": {
- "work_history": [
- {
- "title": "Joined Basal",
- "subtitle": "Joined Basal as a user.",
- "description": "Joined Basal as a user.",
- "type": "work_history",
- "start": "2024-04-04T00:00:000Z",
- "isCurrent": true,
- "location": {
- "city": "Tokyo",
- "prefecture": "Tokyo"
}
}, - {
- "title": "Joined Co-Lift",
- "subtitle": "Joined Co-Lift as a user.",
- "description": "Joined Co-Lift as a user.",
- "type": "work_history",
- "start": "2023-04-04T00:00:000Z",
- "end": "2024-04-04T00:00:000Z",
- "isCurrent": false,
- "location": {
- "city": "Tokyo",
- "prefecture": "Tokyo"
}
}
]
}, - "createdAt": "2024-04-04T01:10:13.460Z",
- "updatedAt": "2024-04-04T01:10:13.460Z"
}
}
This endpoint will send verification Email to user.
Usually when create user endpoint the email will be send. But to give a chance to resend the email (in case the email is missing, or token expired), this endpoint is provided.
Validation
- valid Authorization specified in request header
- Authorization is any of the following:
- useId inside the token matches the userId in the path
Side effects
- Send Reset Password Email will be send to user's email address,
- if
verifyEmail
config is set to be true when setting up the adapter
{- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- { }
], - "innererror": {
- "code": "string",
- "innererror": { }
}
}
Validate user's password with the matches the email.
This endpoint is designed for internal communication with AuthDefaultAdapter.
If developer want to handle use case like "user login", please use /login endpoint in Auth service
After several failed attempts, the user will be locked out.
Validation
- valid Authorization specified in request header
- Authorization is any of the following:
- super user token or a system internal token
Post check user password
string <email> >= 5 characters | |
password | string >= 8 characters |
{- "email": "mouri@basal.dev",
- "password": "password1234"
}
{- "valid": true
}
Validate user's password with the userId specified in the Authorization header and the password provided in the request body.
This endpoint is designed for user to change their own password.
After several failed attempts, the user will be locked out.
Validation
- valid Authorization specified in request header
- Authorization is any of the following:
- super user token or your own token
Change User Password
password | string >= 8 characters |
newPassword | string >= 8 characters |
{- "password": "password1234",
- "newPassword": "password12345"
}
{- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- { }
], - "innererror": {
- "code": "string",
- "innererror": { }
}
}
Validate the user's userId specified in the Authorization header.
This endpoint is designed for user to change their own email.
an email will be sent to the new email address to verify the email.
Verifcation is reset when email is changed.
Validation
- valid Authorization specified in request header
- Authorization is any of the following:
- super user token or your own token
{- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- { }
], - "innererror": {
- "code": "string",
- "innererror": { }
}
}
Verify user's Email address. User can use some function of system only after his email is verified.
When creating user with POST /users endpoint, it will send user an Email link encoded with one-time-token.
Use the one time token with this endpoint, to get the user's Email verified.
Validation
- valid Authorization specified in request header
- Authorization is one-time-token generated for this user's email verification use, and not been used before.
{- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- { }
], - "innererror": {
- "code": "string",
- "innererror": { }
}
}
This endpoint will send a reset password email to a user. Users who click the link in the email will be redirected to the password reset view.
Side effects
- Reset password email will be sent to user's email address,
- when
resetPassword
config is true when setting up the adapter
string <email> >= 5 characters |
{- "email": "edogawaconan@basal.dev"
}
{- "error": {
- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- {
- "code": "string",
- "target": "string",
- "message": "string"
}
]
}
}
By calling this endpoint, user can reset his password.
When request password change, POST /users/send_reset_password_email endpoint to ask system send Email to specified Email address. By Click the url contained in the Email, user navigate to password reset page, and call this endpoint to reset password.
Validation
- valid Authorization specified in request header
- Authorization is one-time-token generated for this user's password reset use, and not been used before.
password | string [ 8 .. 64 ] characters |
{- "password": "stringst"
}
{- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- { }
], - "innererror": {
- "code": "string",
- "innererror": { }
}
}
Locks a user. A user who is locked cannot be logged in to.
{- "error": {
- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- {
- "code": "string",
- "target": "string",
- "message": "string"
}
]
}
}
Unlocks a user, allowing logins to their user account again.
{- "error": {
- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- {
- "code": "string",
- "target": "string",
- "message": "string"
}
]
}
}
This handler will lock the user by applying the following steps in sequence:
userId required | string ID of the user to deactivate |
{- "userId": "string"
}
{- "error": {
- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- {
- "code": "string",
- "target": "string",
- "message": "string"
}
]
}
}
This handler will unlock a given deactivated user, sending them an
email using activateUserEmailConfig
's template.
Only Superusers can perform this action.
{- "error": {
- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- {
- "code": "string",
- "target": "string",
- "message": "string"
}
]
}
}
Create a new user preference
key | string |
value | string |
{- "key": "string",
- "value": "string"
}
{- "userId": "string",
- "key": "string",
- "value": "string"
}
Get list of preferences for user
$top | integer number of object want to fetch | |||||||||||||||||||||||||||||||||
$skip | integer number of object want to skip | |||||||||||||||||||||||||||||||||
$nextToken | string Token for get next batch of list data | |||||||||||||||||||||||||||||||||
$previousToken | string Token for get previous batch of list data | |||||||||||||||||||||||||||||||||
$filter | string Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).
| |||||||||||||||||||||||||||||||||
$orderBy | string Return sorted items based on property values. It can contains a comma-separated list of expressions. The expression may include the suffix "asc" for ascending or "desc" for descending, separated from the property name by one or more spaces. If "asc" or "desc" is not specified, the service MUST order by the specified property in ascending order. The sort order is the inherent order for the type of the property. Examples:Return all orders sorted by closedAt in descending order and a secondary sort order of updatedAt in ascending order. |
{- "total": 0,
- "count": 0,
- "@nextLink": "string",
- "@previousLink": "string",
- "value": [
- {
- "userId": "string",
- "key": "string",
- "value": "string"
}
]
}
Follow a user
This API is used to follow a user. The user in the path will be followed by the given followerId and followerType.
Required
- followerId and followerType must be specified in the request body
When Organization API is not provided in the adapter, using
organization
infollowType
will throw an error.
followerId | string (objectId.field) ^[0-9a-z]{24}$ Enum: "user Id" "organization Id" "product Id" follower id can be any other type of Id and it required |
followerType | string Enum: "user" "organization" "product" follower type is required. If Organization API is not provided in the adapter, |
{- "followerId": "0123456789ab0123456789ab",
- "followerType": "user"
}
{- "error": {
- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- {
- "code": "string",
- "target": "string",
- "message": "string"
}
]
}
}
Unfollow a user
This API is used to unfollow a user. By passing the id in the body, the user on the path will be unfollowed.
Required
- followerId and followerType must be specified in the request body
When Organization API is not provided in the adapter, using
organization
infollowType
will throw an error.
followerId | string (objectId.field) ^[0-9a-z]{24}$ Enum: "user Id" "organization Id" "product Id" follower id can be any other type of Id and it required |
followerType | string Enum: "user" "organization" "product" follower type is required. If Organization API is not provided in the adapter, |
{- "followerId": "0123456789ab0123456789ab",
- "followerType": "user"
}
{- "error": {
- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- {
- "code": "string",
- "target": "string",
- "message": "string"
}
]
}
}
Deprecated use
GET /follows
instead
Get user follow list
Validation
- valid Authorization specified in request header
- Authorization is super user token or a system internal token
type required | string type of follow/follower examples:
| |||||||||||||||||||||||||||||||||
$top | integer number of object want to fetch | |||||||||||||||||||||||||||||||||
$skip | integer number of object want to skip | |||||||||||||||||||||||||||||||||
$nextToken | string Token for get next batch of list data | |||||||||||||||||||||||||||||||||
$previousToken | string Token for get previous batch of list data | |||||||||||||||||||||||||||||||||
$filter | string Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).
| |||||||||||||||||||||||||||||||||
$orderBy | string Return sorted items based on property values. It can contains a comma-separated list of expressions. The expression may include the suffix "asc" for ascending or "desc" for descending, separated from the property name by one or more spaces. If "asc" or "desc" is not specified, the service MUST order by the specified property in ascending order. The sort order is the inherent order for the type of the property. Examples:Return all orders sorted by closedAt in descending order and a secondary sort order of updatedAt in ascending order. |
{- "total": 0,
- "count": 0,
- "@nextLink": "string",
- "@previousLink": "string",
- "value": [
- {
- "followId": "userId",
- "followType": "userId",
- "followerId": "userId2",
- "followerType": "user"
}
]
}
Get user follower list
Validation
- valid Authorization specified in request header
- Authorization is super user token or a system internal token
type required | string type of follow/follower examples:
| |||||||||||||||||||||||||||||||||
$top | integer number of object want to fetch | |||||||||||||||||||||||||||||||||
$skip | integer number of object want to skip | |||||||||||||||||||||||||||||||||
$nextToken | string Token for get next batch of list data | |||||||||||||||||||||||||||||||||
$previousToken | string Token for get previous batch of list data | |||||||||||||||||||||||||||||||||
$filter | string Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).
| |||||||||||||||||||||||||||||||||
$orderBy | string Return sorted items based on property values. It can contains a comma-separated list of expressions. The expression may include the suffix "asc" for ascending or "desc" for descending, separated from the property name by one or more spaces. If "asc" or "desc" is not specified, the service MUST order by the specified property in ascending order. The sort order is the inherent order for the type of the property. Examples:Return all orders sorted by closedAt in descending order and a secondary sort order of updatedAt in ascending order. |
{- "total": 0,
- "count": 0,
- "@nextLink": "string",
- "@previousLink": "string",
- "value": [
- {
- "followId": "userId",
- "followType": "userId",
- "followerId": "userId2",
- "followerType": "user"
}
]
}
Deprecated use
GET /follows
instead
Get the list of followed users by followerId and type
This API gets a list of users that are being followed by an entity.
For example, this can be used to fetch all users that are being followed by organization or other user
Required
- followerId and type must be specified in the query
followerId required | string follower id can be user id or organization id | |||||||||||||||||||||||||||||||||
type required | string type of follow/follower examples:
| |||||||||||||||||||||||||||||||||
$top | integer number of object want to fetch | |||||||||||||||||||||||||||||||||
$skip | integer number of object want to skip | |||||||||||||||||||||||||||||||||
$nextToken | string Token for get next batch of list data | |||||||||||||||||||||||||||||||||
$previousToken | string Token for get previous batch of list data | |||||||||||||||||||||||||||||||||
$filter | string Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).
| |||||||||||||||||||||||||||||||||
$orderBy | string Return sorted items based on property values. It can contains a comma-separated list of expressions. The expression may include the suffix "asc" for ascending or "desc" for descending, separated from the property name by one or more spaces. If "asc" or "desc" is not specified, the service MUST order by the specified property in ascending order. The sort order is the inherent order for the type of the property. Examples:Return all orders sorted by closedAt in descending order and a secondary sort order of updatedAt in ascending order. |
{- "total": 0,
- "count": 0,
- "@nextLink": "string",
- "@previousLink": "string",
- "value": [
- {
- "followId": "userId",
- "followType": "userId",
- "followerId": "userId2",
- "followerType": "user"
}
]
}
Get the list of followed users by followerId and type
This API gets a list of users that are being followed by an entity.
For example, this can be used to fetch all users that are being followed by organization or other user
Required
- followerId and type must be specified in the query
followerId required | string follower id can be user id or organization id |
type required | string type of follow/follower examples:
|
$top | integer number of object want to fetch |
$skip | integer number of object want to skip |
$nextToken | string Token for get next batch of list data |
$previousToken | string Token for get previous batch of list data |
$orderBy | string Return sorted items based on property values. It can contains a comma-separated list of expressions. The expression may include the suffix "asc" for ascending or "desc" for descending, separated from the property name by one or more spaces. If "asc" or "desc" is not specified, the service MUST order by the specified property in ascending order. The sort order is the inherent order for the type of the property. Examples:Return all orders sorted by closedAt in descending order and a secondary sort order of updatedAt in ascending order. |
{- "total": 0,
- "count": 0,
- "@nextLink": "string",
- "@previousLink": "string",
- "value": [
- {
- "followId": "userId",
- "followType": "userId",
- "followerId": "userId2",
- "followerType": "user"
}
]
}
Create a user attachment
This operation requires
- valid Authorization specified in request header
- Authorization have super user permission or
- userId inside Authorization equals the userId in path
attachment data
objectId | string non-empty objectId in storage |
type | string non-empty type of the attachment |
ownerId | string non-empty owner of the attachment |
[- {
- "objectId": "string",
- "type": "string",
- "ownerId": "string"
}
]
{- "id": "string",
- "ownerId": "string",
- "ownerType": "string",
- "type": "string",
}
Get list of user attachments
This operation requires
- valid Authorization specified in request header
- Authorization have super user permission or
- userId inside Authorization belongs to the user
$filter | string Return only items which matches to a condition (The operators below are listed in order of precedence from highest to lowest).
| |||||||||||||||||||||||||||||||||
$orderBy | string Return sorted items based on property values. It can contains a comma-separated list of expressions. The expression may include the suffix "asc" for ascending or "desc" for descending, separated from the property name by one or more spaces. If "asc" or "desc" is not specified, the service MUST order by the specified property in ascending order. The sort order is the inherent order for the type of the property. Examples:Return all orders sorted by closedAt in descending order and a secondary sort order of updatedAt in ascending order. | |||||||||||||||||||||||||||||||||
$top | integer number of object want to fetch | |||||||||||||||||||||||||||||||||
$skip | integer number of object want to skip |
[- {
- "id": "string",
- "ownerId": "string",
- "ownerType": "string",
- "type": "string",
}
]
Get an user attachment
This operation requires
- valid Authorization specified in request header
- Authorization have super user permission or
- userId inside Authorization matches the userId in path
userId required | string The ID of the user |
attachmentId required | string The ID of the attachment |
{- "id": "string",
- "ownerId": "string",
- "ownerType": "string",
- "type": "string",
}
Delete an user attachment
This operation requires
- valid Authorization specified in request header
- Authorization have super user permission or
- userId inside Authorization matches the userId in path
userId required | string The ID of the user |
attachmentId required | string The ID of the attachment |
{- "code": "string",
- "message": "string",
- "target": "string",
- "details": [
- { }
], - "innererror": {
- "code": "string",
- "innererror": { }
}
}
Create signed url for user to upload the attachment
This operation requires
- valid Authorization specified in request header
- Authorization have super user permission or
- userId inside Authorization equals the userId in path
null