POST resource/upload-images
Loads the images of a not yet loaded resource.
Request Information
Headers
HTTP_AUTHORIZATION: Required. OAuth 1.0 parameters with the OAuth signature of the url you are going to request. The consumer keys and access token can be obtained from the community administration.
Sample:
HTTP_AUTHORIZATION:
OAuth oauth_token="CObXqjfOisVh9%2F2GjC7NNd8BCzY%3D",
oauth_consumer_key="clGACsiGaMp%2FD%2BUwkSvRBxA1k50%3D",
oauth_nonce="VqKza6d5x1HpPQWFe08spbdOnkTQpfaLfD9Oeuyg",
oauth_signature_method="HMAC-SHA1",
oauth_timestamp="1462882011",
oauth_signature="RH5aKKKJaEvK5cIsZZzXtFh7cCk%3D"
Body Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| community_short_name |
Community short name |
string |
Required |
| resource_id |
Resource identificator |
globally unique identifier |
Required |
| title |
Resource title |
string |
Required |
| description |
Resource description |
string |
Required |
| tags |
Resource tags |
Collection of string |
Required |
| categories |
Resource categories |
Collection of globally unique identifier |
Optional |
| resource_type |
Resource type |
integer |
Required |
| resource_url |
Resource url |
string |
Optional |
| resource_file |
Resource attached file |
Collection of byte |
Optional |
| resource_attached_files |
Resource attached files |
Collection of AttachedResource |
Optional |
| creator_is_author |
True if the resource creator is the author |
boolean |
Required |
| authors |
Resource authors (comma separated) |
string |
Optional |
| auto_tags_title_text |
Tags auto extracted of title |
string |
Optional |
| auto_tags_description_text |
Tags auto extracted of description |
string |
Optional |
| create_screenshot |
True if a screenshot of the resource must be generated |
boolean |
Optional |
| url_screenshot |
Url to make a screenshot |
string |
Optional |
| predicate_screenshot |
Screenshot predicate |
string |
Optional |
| screenshot_sizes |
Screenshot posible sizes |
Collection of integer |
Optional |
| priority |
Priority of the upload |
integer |
Optional |
| visibility |
Resource visibility enumeration |
integer |
Optional |
| readers_list |
Resource readers list |
Collection of ReaderEditor |
Optional |
| editors_list |
Resource editors list |
Collection of ReaderEditor |
Optional |
| creation_date |
Resource creation date |
date |
Optional |
| publisher_email |
Resource publisher email |
string |
Required |
| publish_home |
True if the resource must be published in the home of the community |
boolean |
Optional |
| load_id |
Load identificator |
string |
Required |
| main_image |
Path of the resource main image |
string |
Optional |
| end_of_load |
True if it's the end of the load and must delete the cache |
boolean |
Optional |
| create_version |
True if the resource must be versioned |
boolean |
Optional |
| canonical_url |
Resource canonical URL |
string |
Optional |
| aumented_reading |
aumented reading |
AumentedReading |
Optional |
Request Formats
application/json, text/json
{
"community_short_name": "developers",
"resource_id": "abc4a08a-6a33-40fe-be0e-edadfd27e123",
"resource_type": 0,
"resource_attached_files": [
{
"file_rdf_property": "image_name_wo_extension",
"file_property_type": 1,
"rdf_attached_file": "AgM=",
"delete_file": false
},
{
"file_rdf_property": "image2_name_wo_extension",
"file_property_type": 1,
"rdf_attached_file": "AwQ=",
"delete_file": false
},
{
"file_rdf_property": "image3_name_wo_extension",
"file_property_type": 1,
"rdf_attached_file": "BQY=",
"delete_file": false
}
],
"creator_is_author": false,
"create_screenshot": false,
"priority": 0,
"visibility": 0,
"publish_home": false,
"main_image": "[IMGPrincipal][318,234,992,]main_image_name.jpg",
"end_of_load": false,
"create_version": false
}
Response Information
Resource Description
| Description | Type |
|---|---|
| Boolean |
Response Formats
application/json, text/json
true
Response HTTP status code
On success, the response contains 200 code.
On fail, throws a WebException with code:
- 401 Unauthorized if the OAuth signature is invalid
- 400 Bad Request if the params are invalid
- 500 Internal server error if something goes wrong...
