Attributes

Attribute

type

values

default

mandate

comment

user

object

 

 

true

 

password

string

 

 

false

 

starts

date

 

 

false

 

expires

date

 

 

false

 

usageLimit

integer

 

1

false

 

usedTimes

 

 

0

false

readonly

sentTimes

 

 

0

 

readonly


/tempPass /create

Examples:
Method:/tempPass /create
Parameters:
{
"attrs":
[
"user.id":userid
"usageLimit":20,
"expires":"2010-01-01T00:00:00Z"
],
"count": 10,
"return": ["id", "usageLimit"]
}
Response:
{
"error":0,
"result":
[
{"id":"1","usageLimit":20},
{"id":"2","usageLimit":20},
....
]
}

/tempPass /send

Examples:
Method:/tempPass /send
Parameters:
{
"ids":
[
"id1", "id2", "id3"
],
"messasge":
{
"to":support@deepnetsecurity.com,
"type":"EMAIL"
}
}
Response:
{
"error":0
}

/tempPass /get

Method:/tempPass /get
Parameters:
{
"match":
[
["id", "=", 2]
],
"return":["*"],
}
Response:
{
"error":0,
"result":
{
"password":"****"
"usageLimit":20,
"expires":"2010-01-01T00:00:00Z"
}
}

/tempPass /set

Method:/tempPass /set
Parameters:
{
"id":1,
"attrs":{"usageLimit":24}
}
Response:
{
"error":0
}

/tempPass /delete

Method:/tempPass /delete
Parameters:
{
"id":1
}
Response:
{
"error":0
}

/tempPass /search

  1. search all system images

Method:/tempPass /search
Parameters:
{
"match":
[
"user.id", "=", uid
],
"return":["usageLimit", "expires"],
}
Response:
{
"error":0,
"result":
{
total:1,
rows:
[
{
"password":"****"
"usageLimit":20,
"expires":"2010-01-01T00:00:00Z"
}
]
}
}

  • No labels