Unknown macro: {next_previous_links}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

This section explains the REST operations for working with properties of resources that have been secured with Basic Auth.

Query parameters

The following terms explain the meaning of the query parameters passed with the following REST URIs:

ParameterExplanation
pathPath of the resource
nameName of the property on the given resource
array of valuesArray of values for the property, e.g., [ {"name":"Name","value":["Smith","Chris"]} ]
startStart page number (optional)
sizeNumber of comments to be fetched (optional)
userUsername of the user

The {start page} and {number of records} can be any value greater than or equal to 0. The {start page} and {number of records} begin with 1. If both of them are 0, then all the comments are retrieved. Note that start and size are optional parameters and will default to 0 by default.

For details on security (the authorization header) and the URI syntax (port, context, etc.), see Registry REST API.

Get all the properties of a resource

AttributesValues

HTTP Method                

GET
Request URI/properties?path={ resource path }&start={ start page }&size={ number of records }
HTTP Request HeaderAuthorization: Basic { base64encoded(username:password) }
DescriptionThis retrieves all the properties posted on the specific resource with a specified start page and size.
ResponseHTTP 200 OK
Response Typeapplication/json

Get a property of a given resource

AttributesValues

HTTP Method                

GET
Request URI/property?path={ resource path }&name={ property name }
HTTP Request HeaderAuthorization: Basic { base64encoded(username:password) }
DescriptionThis retrieves the specific property associated with the given property name.
ResponseHTTP 200 OK
Response Typeapplication/json
Sample request

curl -X GET -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Cache-Control: no-cache" "https://localhost:9443/resource/1.0.0/property?path=/_system/governance/trunk/soapservices/com/amazon/soap/1.0.0/AmazonSearchService&name=resource.source" -i -k

 

Add properties to a resource

AttributesValues

HTTP Method                

POST
Request URI/properties?path={ resource path }
HTTP Request Headers

Authorization: Basic { base64encoded(username:password) }

Content-Type: application/json

Payload[ {"name":"property1","value":["value1","value2"]} ]     
DescriptionAdd the array of properties for the given resource
Response204 No Content
Response Typeapplication/json
Sample request

curl -X POST -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '[ {"name":"property1","value":["value1","value2"]} ]  ' "https://localhost:9443/resource/1.0.0/properties?path=/_system/governance/trunk/soapservices/org/wso2/www/types/1.0.0/Axis2Service"


Delete a property of a given resource

AttributesValues

HTTP Method                

DELETE
Request URI/property?path={ resource path }&name={property name}
HTTP Request HeaderAuthorization: Basic { base64encoded(username:password) }
DescriptionDeletes the specified property from the given resource
ResponseHTTP 204 No Content
Response Typeapplication/json
Sample request

curl -X DELETE -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: application/json" -H "Cache-Control: no-cache" "https://localhost:9443/resource/1.0.0/property?path=/_system/governance/trunk/soapservices/com/amazon/soap/1.0.0/AmazonSearchService&name=resource.source" -i -k

  • No labels