|
Mail client
|
attachment | Get information on a given attachment. |
attachments | Get information on multiple attachments. |
case_category | Get a single case category |
cases_categories | Get emails of cases categories. |
copy_message | Create a copy of a message. |
create_and_send_message | Create and send a simple message. |
create_message | Create a new message. |
delete_attachments | Delete message attachments. |
delete_messages | Delete messages. |
message | Get information on a given message. |
messages | Get information on multiple messages. |
put_attachment | Upload an attachment. |
recipients | Get a list of recipients. |
recipients_group | Get information on a given recipients group. |
refresh_recipients | Regenerate recipients list. |
retry_send_message | Retry sending a message. |
send_message | Send a message. |
update_attachment | Update an attachment. |
update_message | Update a message. |
update_recipients_group | Update a recipients group. |
user | Get user's messages. |
services/mailclient/attachment ¶
|
||||||
https://api.usos.tu.kielce.pl/services/mailclient/attachment | ||||||
Get information on a given attachment. | ||||||
attachment_id | required |
Attachment ID. |
||||
fields | optional |
Default value: id|filename Selector of result fields you are interested in. The selector may contain any subset of fields, which are described in the returns section. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional |
Required only if you've chosen jsonp as a return format. |
||||
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Plus required oauth_token for Token authorization. | ||||||
Returned value: A dictionary of selected fields and their values. Available fields:
| ||||||
Thrown errors:
|
services/mailclient/attachments ¶
|
||||||
https://api.usos.tu.kielce.pl/services/mailclient/attachments | ||||||
Get information on multiple attachments. | ||||||
attachment_ids | required |
List of attachment IDs. |
||||
fields | optional |
Default value: id|filename Selector of result fields you are interested in. The selector may contain any subset of fields, which are described in the returns section of attachment method. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional |
Required only if you've chosen jsonp as a return format. |
||||
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Plus required oauth_token for Token authorization. | ||||||
Returned value: A dictionary mapping attachment IDs to dictionaries describing the attachments (as returned by attachment method). If specified message could not be found, null is returned instead of a dictionary. |
services/mailclient/case_category ¶
|
||||||
https://api.usos.tu.kielce.pl/services/mailclient/case_category | ||||||
Get a single case category | ||||||
case_category_id | required | ID of case category | ||||
fields | optional |
Default value: id|name|description Selector of result fields you are interested in. The selector may contain any subset of fields, which are described in the returns section. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional |
Required only if you've chosen jsonp as a return format. |
||||
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Plus optional oauth_token for Token authorization. | ||||||
Returned value: A dictionary of selected fields and their values. Available fields:
|
services/mailclient/cases_categories ¶
|
||||||
https://api.usos.tu.kielce.pl/services/mailclient/cases_categories | ||||||
Get emails of cases categories. | ||||||
active_only | optional |
Default value: true Filter only to active emails |
||||
fields | optional |
Default value: id|email|email_description|is_active|faculty Selector of result fields you are interested in. The selector may contain any subset of fields, which are described in the returns section. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional |
Required only if you've chosen jsonp as a return format. |
||||
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Plus optional oauth_token for Token authorization. | ||||||
Returned value: List of dictionaries of selected fields and their values. Available fields:
|
services/mailclient/copy_message ¶
|
||||||
https://api.usos.tu.kielce.pl/services/mailclient/copy_message | ||||||
Create a copy of a given message. The new message will have status draft and will not contain any attachments. | ||||||
message_id | required |
Message ID. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional |
Required only if you've chosen jsonp as a return format. |
||||
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Plus required oauth_token for Token authorization. | ||||||
Returned value: A dictionary of the following structure:
| ||||||
Thrown errors:
|
services/mailclient/create_and_send_message ¶
|
||||||
https://api.usos.tu.kielce.pl/services/mailclient/create_and_send_message | ||||||
Send simple plain text message in the name of a user. This method bypasses the "regular" way of using the mailclient module. Instead of requiring you to create the message first (via the create_message method), and sending it afterwards (via the send_message method), it allows you to do both - create it and send it - in a single request. You will need to meet all requirements described in both of these methods, otherwise the new message won't be sent (nor saved). Unlike most other methods in this module, this method is accessible to regular consumers - you don't need to be an administrative consumer in order to use it. In a long run, more mailclient methods may become accessible to the public, but - at this moment - only this method is. Note, that this method may put some additional restrictions upon you and your users to prevent abuse (i.e. mass mailing). If we detect possible abuse, PotentialSpam error may be raised. Eventually, both you (the consumer), or your user, may be banned from sending messages (resulting in UserBanned and ConsumerBanned errors respectively). | ||||||
subject | required |
Subject of the message. No more than 200 characters. |
||||
content | required |
Content of the message. No more than 15000 characters. |
||||
lang | optional |
Default value: pl Language of headers and signatures added by USOS API to the message before sending. Accepted values are pl and en. |
||||
primary_group_ids | optional |
List of primary group IDs that should be included in recipients list. |
||||
custom_group_ids | optional |
List of custom group IDs should be included in recipients list. |
||||
user_ids | optional |
List of user IDs that should be included in recipients list. |
||||
emails | optional |
List of email addresses that are part of this group. |
||||
send_summary | optional |
Default value: false Should the summary report (as described in services/mailing/send_simple_message method) be sent to the user? |
||||
send_to_myself | optional |
Default value: false Should the copy of the message be sent to the user? |
||||
content_format | optional |
Default value: plain Format of the message content. Possible values: plain, html. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional |
Required only if you've chosen jsonp as a return format. |
||||
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Plus optional oauth_token for Token authorization. | ||||||
Returned value: Dictionary with a single message_id key - the ID of the newly sent message. In case of bad request, you will get HTTP 400 with error description. | ||||||
Thrown errors:
|
services/mailclient/create_message ¶
|
||||||
https://api.usos.tu.kielce.pl/services/mailclient/create_message | ||||||
Create a new message. | ||||||
subject | optional |
Default value: (empty string) Subject of the message. No more than 200 characters. |
||||
from_inst_address_id | optional |
Default value: (empty string) Institutional address ID from which the message should be sent, or null if user's email address should be used instead. Most users do not have any institutional address assigned so in most cases this value will be null. |
||||
content | optional |
Default value: (empty string) Content of the message. No more than 15000 characters. |
||||
content_format | optional |
Default value: plain Format of the message content. Possible values: plain, html. |
||||
send_summary | optional |
Default value: false Should the summary report (as described in services/mailing/send_simple_message method) be sent to the user? |
||||
send_to_myself | optional |
Default value: false Should the copy of the message be sent to the user? |
||||
attachments_lifetime | optional |
Default value: 14 The number of days the attachments should be available for. The time starts counting from the moment the message is sent. After this time attachments will be automatically deleted. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional |
Required only if you've chosen jsonp as a return format. |
||||
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Plus required oauth_token for Token authorization. | ||||||
Returned value: A dictionary of the following structure:
| ||||||
Thrown errors:
|
services/mailclient/delete_attachments ¶
|
||||||
https://api.usos.tu.kielce.pl/services/mailclient/delete_attachments | ||||||
Delete attachments of messages. This method works only with messages with status draft. | ||||||
attachment_ids | required |
List of attachment IDs. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional |
Required only if you've chosen jsonp as a return format. |
||||
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Plus required oauth_token for Token authorization. | ||||||
Returned value: A dictionary of the following structure:
|
services/mailclient/delete_messages ¶
|
||||||
https://api.usos.tu.kielce.pl/services/mailclient/delete_messages | ||||||
Delete messages. | ||||||
message_ids | required |
List of message IDs which should be deleted. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional |
Required only if you've chosen jsonp as a return format. |
||||
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Plus required oauth_token for Token authorization. | ||||||
Returned value: A dictionary of the following structure:
|
services/mailclient/message ¶
|
||||||
https://api.usos.tu.kielce.pl/services/mailclient/message | ||||||
Get information on a given message. | ||||||
message_id | required |
Message ID. |
||||
fields | optional |
Default value: id|subject Selector of result fields you are interested in. The selector may contain any subset of fields, which are described in the returns section. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional |
Required only if you've chosen jsonp as a return format. |
||||
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Plus optional oauth_token for Token authorization. | ||||||
Returned value: A dictionary of selected fields and their values. Available fields:
| ||||||
Thrown errors:
|
services/mailclient/messages ¶
|
||||||
https://api.usos.tu.kielce.pl/services/mailclient/messages | ||||||
Get information on multiple messages. | ||||||
message_ids | required |
List of message IDs. |
||||
fields | optional |
Default value: id|subject Selector of result fields you are interested in. The selector must contain subset of primary fields, which are described in the returns section of message method. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional |
Required only if you've chosen jsonp as a return format. |
||||
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Plus required oauth_token for Token authorization. | ||||||
Returned value: A dictionary mapping message IDs to dictionaries describing the messages (as returned by message method). If specified message could not be found, null is returned instead of a dictionary. |
services/mailclient/put_attachment ¶
|
||||||
https://api.usos.tu.kielce.pl/services/mailclient/put_attachment | ||||||
Upload an attachment. This method works only with messages with status draft. | ||||||
message_id | required |
Message ID. |
||||
data | required |
The file to be attached.
Important: Currently there are no size limits for the attachments, but they might be in the future! However, you may assume that the maximum allowed size for a single attachment will never drop below 100 MB. |
||||
filename | optional |
The name of a file. No more than 100 characters. If omitted, the value will be taken from data field, but still character limit is implied. |
||||
content_type | optional |
Uploaded file content type. If you omit this argument, USOS API will try to guess it. |
||||
description | optional |
Default value: (empty string) Attachment description. No more than 200 characters. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional |
Required only if you've chosen jsonp as a return format. |
||||
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Plus required oauth_token for Token authorization. | ||||||
Returned value: A dictionary of the following structure:
| ||||||
Thrown errors:
|
services/mailclient/recipients ¶
|
||||||
https://api.usos.tu.kielce.pl/services/mailclient/recipients | ||||||
Get a list of recipients of a given message. | ||||||
message_id | required |
Message ID. |
||||
fields | required |
Selector of result fields you are interested in. The selector may contain any subset of fields, which are described in the returns section. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional |
Required only if you've chosen jsonp as a return format. |
||||
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Plus optional oauth_token for Token authorization. | ||||||
Returned value: A list of dictionaries of the following structure:
Note that always at least one of email and user values is not null. If email is null, then the corresponding user exists but does not have an email. If, on the other hand, user is null, then the dictionary was created based on an individual email, hence email is not null. | ||||||
Thrown errors:
|
services/mailclient/recipients_group ¶
|
||||||
https://api.usos.tu.kielce.pl/services/mailclient/recipients_group | ||||||
Get information on a given recipients group. | ||||||
message_id | required |
Message ID. |
||||
fields | required |
Selector of result fields you are interested in. The selector may contain any subset of fields, which are described in the returns section. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional |
Required only if you've chosen jsonp as a return format. |
||||
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Plus required oauth_token for Token authorization. | ||||||
Returned value: A dictionary of selected fields and their values. Available fields:
| ||||||
Thrown errors:
|
services/mailclient/refresh_recipients ¶
|
||||||
https://api.usos.tu.kielce.pl/services/mailclient/refresh_recipients | ||||||
Regenerate recipients list based on recipient group contents. Depending on complexity of message recpients group, this method may take longer time to complete. You should take this into account and probably call this method asynchronously in your application. This method works only with messages with status draft. | ||||||
message_id | required |
Message ID. |
||||
email_source | optional |
Default value: primary_only Choose which email addresses will be used to send a message. Possible choices:
|
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional |
Required only if you've chosen jsonp as a return format. |
||||
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Plus optional oauth_token for Token authorization. | ||||||
Returned value: An empty dictionary returned if the method has been executed successfully. Some keys may be added in the future. | ||||||
Thrown errors:
|
services/mailclient/retry_send_message ¶
|
||||||
https://api.usos.tu.kielce.pl/services/mailclient/retry_send_message | ||||||
Retry sending a message. | ||||||
message_id | required |
Message ID. |
||||
lang | optional |
Default value: pl Language of headers and signatures added by USOS API to the message before sending. Accepted values are pl and en. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional |
Required only if you've chosen jsonp as a return format. |
||||
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Plus required oauth_token for Token authorization. | ||||||
Returned value: An empty dictionary returned if the method has been executed successfully. Some keys may be added in the future. | ||||||
Thrown errors:
|
services/mailclient/send_message ¶
|
||||||
https://api.usos.tu.kielce.pl/services/mailclient/send_message | ||||||
Send a given message. Following conditions must be all true in order to be able to send the message:
| ||||||
message_id | required |
Message ID. |
||||
lang | optional |
Default value: pl Language of headers and signatures added by USOS API to the message before sending. Accepted values are pl and en. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional |
Required only if you've chosen jsonp as a return format. |
||||
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Plus optional oauth_token for Token authorization. | ||||||
Returned value: An empty dictionary returned if the method has been executed successfully. Some keys may be added in the future. | ||||||
Thrown errors:
|
services/mailclient/update_attachment ¶
|
||||||
https://api.usos.tu.kielce.pl/services/mailclient/update_attachment | ||||||
Update information on a given attachment. Note that only description can be changed. If you want to update other fields, you have to delete the old attachment and upload the new one. This method works only with messages with status draft. | ||||||
attachment_id | required |
Attachment ID. |
||||
description | required |
Attachment description. No more than 200 characters. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional |
Required only if you've chosen jsonp as a return format. |
||||
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Plus required oauth_token for Token authorization. | ||||||
Returned value: An empty dictionary returned if the method has been executed successfully. Some keys may be added in the future. | ||||||
Thrown errors:
|
services/mailclient/update_message ¶
|
||||||
https://api.usos.tu.kielce.pl/services/mailclient/update_message | ||||||
Update a message. This method works only with messages with status draft. | ||||||
message_id | required |
Message ID. |
||||
subject | optional |
Default value: (unchanged) Subject of the message. No more than 200 characters. |
||||
from_inst_address_id | optional |
Default value: (unchanged) Institutional address ID from which the message should be sent, or null if user's email address should be used instead. Most users do not have any institutional address assigned so in most cases this value will be null. |
||||
content | optional |
Default value: (unchanged) Content of the message. No more than 15000 characters. |
||||
content_format | optional |
Default value: (unchanged) Format of the message content. Possible values: plain, html. |
||||
send_summary | optional |
Default value: (unchanged) Should the summary report (as described in services/mailing/send_simple_message method) be sent to the user? |
||||
send_to_myself | optional |
Default value: (unchanged) Should the copy of the message be sent to the user? |
||||
attachments_lifetime | optional |
Default value: (unchanged) The number of days the attachments should be available for. The time starts counting from the moment the message is sent. After this time attachments will be automatically deleted. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional |
Required only if you've chosen jsonp as a return format. |
||||
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Plus required oauth_token for Token authorization. | ||||||
Returned value: An empty dictionary returned if the method has been executed successfully. Some keys may be added in the future. | ||||||
Thrown errors:
|
services/mailclient/update_recipients_group ¶
|
||||||
https://api.usos.tu.kielce.pl/services/mailclient/update_recipients_group | ||||||
Update a recipients group. Remember to call refresh_recipients method after executing this method or you will not be able to send the message. This method works only with messages with status draft. | ||||||
message_id | required |
Message ID. |
||||
primary_group_ids | optional |
Default value: (unchanged) List of primary group IDs that are part of this group. |
||||
custom_group_ids | optional |
Default value: (unchanged) List of custom group IDs that are part of this group. |
||||
user_ids | optional |
Default value: (unchanged) List of user IDs that are part of this group. |
||||
emails | optional |
Default value: (unchanged) List of email addresses that are part of this group. |
||||
strict | optional |
Default value: true Should a nonexistent object referenced by primary_group_ids, custom_group_ids or user_ids argument cause an error? If set to false, all invalid references will be silently discarded. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional |
Required only if you've chosen jsonp as a return format. |
||||
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Plus optional oauth_token for Token authorization. | ||||||
Returned value: An empty dictionary returned if the method has been executed successfully. Some keys may be added in the future. | ||||||
Thrown errors:
|
services/mailclient/user ¶
|
||||||
https://api.usos.tu.kielce.pl/services/mailclient/user | ||||||
Get a list of user's messages. You can optionally filter the list by message status. | ||||||
fields | optional |
Default value: id|subject Selector of result fields you are interested in. The selector must contain subset of primary fields, which are described in the returns section of message method. |
||||
status | optional |
List of status values (draft, pending, sent, error). All messages with different status will be filtered out. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional |
Required only if you've chosen jsonp as a return format. |
||||
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Plus required oauth_token for Token authorization. | ||||||
Returned value: A list od dictionaries describing messages. Each dictionary contains keys listed in the fields argument. |