Contract No.: 285248 Strategic Objective



Download 1.78 Mb.
Page43/54
Date28.01.2017
Size1.78 Mb.
#8871
1   ...   39   40   41   42   43   44   45   46   ...   54

22.5API Operations


In this section we go in depth for each operation.

Glossary


Credentials: X509 Digital certificate or login/password to authenticate the User or SP

SP: Service Provider



SPID: Unique ID associated to each SP

22.5.1Operations


Verb

URI

Description

POST

/createUser/{Credentials}

Creates a new user in the SSS database.

POST

/deleteUser/{Crendentials}/{userID}

Deletes an existing user.

POST

/addUserData/{Crendentials}/{userID}/{XML File}

Adds data (XML File) associated to the User in the SSS.

POST

/updateUserData/{Crendentials}/{userID}/{UniqueID}/{XML File}

Updates data (XML File) identified by the given UniqueID.

GET

/getUserData/{Crendentials}/{userID}/{FilesList}

Gets data (a list of XML File) identified by the given FilesList (list of UniqueIDs).

POST

/deleteUserData/{Crendentials}/{userID}/{FilesList}

Deletes data (a list of XML File) identified by the given FilesList (list of UniqueIDs).

POST

/addUserServices/{Credentials}/{userID}/{ServicesList}

Add SPs authorized to access Files (SP IDs associated to Unique IDs).

GET

/getUserServicesList/{Credentials}/{userID}

Retrieve a list of SPs authorized to access data from a User.

POST

/ActivateProfile/{Credentials}/{userID}/{boolean}

(De)activate a user if needed.


Create a User identified by his Credentials

/sss

POST




Parameter:

Content:

plain/text

Return:

plain/text

userID

String

{"uniqueId" : uid }

password

String

Creates the User entry in the table identified by the given UserId and Password.

Return

201

User successfully created




500

User not created, an error occured





Delete a User identified by his Credentials

/sss

POST




Parameter:

userId, password

Content:

Return:

plain/text

Deletes a user identified by the given UserId and Password.




Return

200

If User found







404

If User not found








Store a file (XML) associated to its user

/sss

POST




Parameter:

Content:

application/xml

Return:

plain/text

file

File

{"uniqueId" : uid }

owner

String

Stores an XML file

Return

201

File successfully stored




500

File not stored, an error occured





Update a File identified by the its UniqueId and UserID

/sss

POST




Parameter:

Content:

application/xml

Return:

plain/text

uniqueId

Long

{"uniqueId" : uid }

file

File

userID

String

Updates an XML File identified by the given UniqueId and UserID

Return

200

File successfully updated




500

File not updated, an error occured




404

File not found





Delete a File identified by its UniqueId and UserId

/sss/deleteUserData

POST




Parameter:

Content:

application/json

Return:

application/json

uniqueId

Long

{“deleted” : boolean}

userID

String

Delete a File identified by theUniqueId and UserID




Return

200

See response body

|}

Download 1.78 Mb.

Share with your friends:
1   ...   39   40   41   42   43   44   45   46   ...   54




The database is protected by copyright ©ininet.org 2024
send message

    Main page