AssetService
From OpenSimulator
(Difference between revisions)
(Created page with "=Introduction= The OpenSimulator asset services stores asset data (textures, serialized objects, scripts, etc.) and provides this on request. =API= ==GET:/assets== Request ur...") |
(→API) |
||
Line 7: | Line 7: | ||
==GET:/assets== | ==GET:/assets== | ||
− | + | Uri format is | |
/assets/<asset-uuid> | /assets/<asset-uuid> | ||
Line 14: | Line 14: | ||
/assets/e0eb480b-e405-491d-8ed1-6d0ababe822c | /assets/e0eb480b-e405-491d-8ed1-6d0ababe822c | ||
+ | |||
+ | There is no content in the request body. | ||
Sample return data | Sample return data | ||
Line 53: | Line 55: | ||
==POST:/assets== | ==POST:/assets== | ||
+ | |||
+ | Uri format is | ||
+ | |||
+ | /assets | ||
+ | |||
+ | e.g. | ||
+ | |||
+ | Sample request body | ||
+ | |||
+ | <pre> | ||
+ | <?xml version="1.0" encoding="utf-8"?> | ||
+ | <AssetBase xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
+ | <Data>/0//UQAvAAAAAAEAAAABAAAAAAAAAAAAAA...</Data> | ||
+ | <FullID> | ||
+ | <Guid>f87f97ff-a493-4fb6-b263-1c8a0f1efc12</Guid> | ||
+ | </FullID> | ||
+ | <ID>f87f97ff-a493-4fb6-b263-1c8a0f1efc12</ID> | ||
+ | <Name>terrainImage_bbbbbbbb-bf88-45ac-aace-35bd76426c81</Name> | ||
+ | <Description>test one</Description> | ||
+ | <Type>0</Type> | ||
+ | <Local>false</Local> | ||
+ | <Temporary>false</Temporary> | ||
+ | <CreatorID>bbbbbbbb-bf88-45ac-aace-35bd76426c81</CreatorID> | ||
+ | <Flags>Maptile</Flags> | ||
+ | </AssetBase> | ||
+ | </pre> | ||
+ | |||
+ | where | ||
+ | |||
+ | * '''Data''' - Base64 encoding of the asset data. No maximum length. | ||
+ | * '''FullID''' - UUID of the asset. This is identical to ID for historical reasons. | ||
+ | * '''ID''' UUID of the asset. This is identical to ID for historical reasons. | ||
+ | * '''Name''' - the name of the asset in the database. This is not actively used since assets are referred to by their inventory names. Can be useful for debugging purposes. Maximum size is 64 characters. | ||
+ | * '''Description''' - Description of asset. This is not actively used but can be useful in debugging. Maximum size is 64 characters. | ||
+ | * '''Type''' - Type of asset. An integer that comes from [https://github.com/openmetaversefoundation/libopenmetaverse/blob/master/OpenMetaverseTypes/Enums.cs OpenMetaverse.AssetType]. | ||
+ | * '''Local''' - true or false. In other contexts signals whether asset is local to that simulator only. In the context of the asset service this should always be false. | ||
+ | * '''Temporary''' - true or false. Signals whether the asset should be treated as temporary (and so can be removed on simulator restart) or permanent (which is the usual case). | ||
+ | * '''CreatorID''' - The UUID of the entity that created the asset. | ||
+ | * '''Flags''' - Multiple flags must be comma separated (e.g. <Flags>Maptile,Collectable</Flags>). Each flag can have leading or trailing whitespace (e.g. <Flags>Maptile,Collectable</Flags>). Possible flags are | ||
+ | ** Normal - Normal non-maptile immustable asset. | ||
+ | ** Maptile - Maptile asset. | ||
+ | ** Rewritable - Content can be rewritten | ||
+ | ** Collectable - Asset can be removed after some time (this is poorly defined and may not currently be used). | ||
+ | |||
+ | Returns '''TODO''' | ||
==DELETE:/assets== | ==DELETE:/assets== | ||
+ | |||
+ | '''TODO''' |
Revision as of 14:04, 11 September 2012
Contents |
Introduction
The OpenSimulator asset services stores asset data (textures, serialized objects, scripts, etc.) and provides this on request.
API
GET:/assets
Uri format is
/assets/<asset-uuid>
e.g.
/assets/e0eb480b-e405-491d-8ed1-6d0ababe822c
There is no content in the request body.
Sample return data
<?xml version="1.0" encoding="utf-8"?> <AssetBase xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Data>/0//UQAvAAAAAAEAAAABAAAAAAAAAAAAAA...</Data> <FullID> <Guid>f87f97ff-a493-4fb6-b263-1c8a0f1efc12</Guid> </FullID> <ID>f87f97ff-a493-4fb6-b263-1c8a0f1efc12</ID> <Name>terrainImage_bbbbbbbb-bf88-45ac-aace-35bd76426c81</Name> <Description>test one</Description> <Type>0</Type> <Local>false</Local> <Temporary>false</Temporary> <CreatorID>bbbbbbbb-bf88-45ac-aace-35bd76426c81</CreatorID> <Flags>Maptile</Flags> </AssetBase>
where
- Data - Base64 encoding of the asset data. No maximum length.
- FullID - UUID of the asset. This is identical to ID for historical reasons.
- ID UUID of the asset. This is identical to ID for historical reasons.
- Name - the name of the asset in the database. This is not actively used since assets are referred to by their inventory names. Can be useful for debugging purposes. Maximum size is 64 characters.
- Description - Description of asset. This is not actively used but can be useful in debugging. Maximum size is 64 characters.
- Type - Type of asset. An integer that comes from OpenMetaverse.AssetType.
- Local - true or false. In other contexts signals whether asset is local to that simulator only. In the context of the asset service this should always be false.
- Temporary - true or false. Signals whether the asset should be treated as temporary (and so can be removed on simulator restart) or permanent (which is the usual case).
- CreatorID - The UUID of the entity that created the asset.
- Flags - Multiple flags must be comma separated (e.g. <Flags>Maptile,Collectable</Flags>). Each flag can have leading or trailing whitespace (e.g. <Flags>Maptile,Collectable</Flags>). Possible flags are
- Normal - Normal non-maptile immustable asset.
- Maptile - Maptile asset.
- Rewritable - Content can be rewritten
- Collectable - Asset can be removed after some time (this is poorly defined and may not currently be used).
POST:/assets
Uri format is
/assets
e.g.
Sample request body
<?xml version="1.0" encoding="utf-8"?> <AssetBase xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Data>/0//UQAvAAAAAAEAAAABAAAAAAAAAAAAAA...</Data> <FullID> <Guid>f87f97ff-a493-4fb6-b263-1c8a0f1efc12</Guid> </FullID> <ID>f87f97ff-a493-4fb6-b263-1c8a0f1efc12</ID> <Name>terrainImage_bbbbbbbb-bf88-45ac-aace-35bd76426c81</Name> <Description>test one</Description> <Type>0</Type> <Local>false</Local> <Temporary>false</Temporary> <CreatorID>bbbbbbbb-bf88-45ac-aace-35bd76426c81</CreatorID> <Flags>Maptile</Flags> </AssetBase>
where
- Data - Base64 encoding of the asset data. No maximum length.
- FullID - UUID of the asset. This is identical to ID for historical reasons.
- ID UUID of the asset. This is identical to ID for historical reasons.
- Name - the name of the asset in the database. This is not actively used since assets are referred to by their inventory names. Can be useful for debugging purposes. Maximum size is 64 characters.
- Description - Description of asset. This is not actively used but can be useful in debugging. Maximum size is 64 characters.
- Type - Type of asset. An integer that comes from OpenMetaverse.AssetType.
- Local - true or false. In other contexts signals whether asset is local to that simulator only. In the context of the asset service this should always be false.
- Temporary - true or false. Signals whether the asset should be treated as temporary (and so can be removed on simulator restart) or permanent (which is the usual case).
- CreatorID - The UUID of the entity that created the asset.
- Flags - Multiple flags must be comma separated (e.g. <Flags>Maptile,Collectable</Flags>). Each flag can have leading or trailing whitespace (e.g. <Flags>Maptile,Collectable</Flags>). Possible flags are
- Normal - Normal non-maptile immustable asset.
- Maptile - Maptile asset.
- Rewritable - Content can be rewritten
- Collectable - Asset can be removed after some time (this is poorly defined and may not currently be used).
Returns TODO
DELETE:/assets
TODO