• Register

SecurityProfile

Resource URI

/services/{serviceId}/securityProfile

Items in curly braces represent variables.

Description

Security Profile is a container object for a Service's OAuth 2.0 settings.

Resource Schema

Property Characteristics
oauth Type object
Sub-type OAuth
Create Rule Optional
Update Rule Optional
Fetch Rule Implicit
Description Contains OAuth 2.0 settings for the API

fetch [GET]

Retrieves the identified Security Profile for the Service Definition.

Parameters

Parameter Required Type Description
serviceId true string Service identifier.
fields false string Comma-separated list of property paths to include in response. Each property path is a dot-separated list of object property names. fields=<property\[.property...\]>\[,...\]\[&fields=...\]
filter false string Colon-separated name/value pair specifying the name of property whose value must contain the given value (as a substring). Results may also be filtered by nested collections' properties by specifying a dot-separated property path. filter=<property\[.property...\]>:<value>\[&filter=...\]
sort false string Comma-separated list of properties to sort by. Only root-level properties are supported. Each property name may be optionally followed by :asc or :desc to specify sort direction (defaults to asc). sort=<property\[:(asc\|desc)\]>\[,...\]\[&sort=...\]
limit false int Number of objects to return in the result. Defaults to 100.
offset false int 0-based index of first object in the list to return. Defaults to 0.

Returns

Success

Security Profile for the Service If fields request parameter is not included, only those fields with "Fetch Rule" equal to "Implicit" will be returned. Otherwise, the fields contained in the URL parameter will be included in the response.

Failure

Array of validation responses

Examples

Request

curl -k 'https://api.mashery.com/v3/rest/services/0fcc39d1c7ee470780e6cbe6/securityProfile' -H "Authorization: Bearer <insert your token here>" -H "Content-Type:application/json" 

Response

[
    {
        "error": "Columns must be specified"
    }
]

Request

curl -k 'https://api.mashery.com/v3/rest/services/0fcc39d1c7ee470780e6cbe6/securityProfile' -H "Authorization: Bearer <insert your token here>" -H "Content-Type:application/json" 

Response

[
    {
        "error": "Columns must be specified"
    }
]

update [PUT]

Updates the identified Security Profile for the Service Definition.

Parameters

Parameter Required Type Description
serviceId true string Service identifier.
securityProfile true object Security Profile object

Returns

Success

Security Profile for the Service If fields request parameter is not included, only those fields with "Fetch Rule" equal to "Implicit" will be returned. Otherwise, the fields contained in the URL parameter will be included in the response.

Failure

Array of validation responses

Examples

Request

curl -k 'https://api.mashery.com/v3/rest/services/0fcc39d1c7ee470780e6cbe6/securityProfile' -H "Authorization: Bearer <insert your token here>" -H "Content-Type:application/json" --request PUT --data '{"error":"Columns must be specified"}

Response

[
    {
        "error": "Columns must be specified"
    }
]

Request

curl -k 'https://api.mashery.com/v3/rest/services/0fcc39d1c7ee470780e6cbe6/securityProfile' -H "Authorization: Bearer <insert your token here>" -H "Content-Type:application/json" --request PUT --data '{"error":"Columns must be specified"}

Response

[
    {
        "error": "Columns must be specified"
    }
]

Docs Navigation