Searching...

Matching results

    Profile

    A profile is a collection of rights to be assigned to users or partners.

    Read only fields are computed by AirVantage and can only be seen on response fragments sent by find, create, or edit requests.

    Field Description Read Only Type
    uid Profile's unique identifier. true uid
    name Profile's name. false string
    rights A list of rights. false string array

    This is a complete representation of a Profile. This fragment can be used for create or edit requests. Please refer to the fields section to know which fields can be modified.

    {
           "uid": "",
           "name": "",
           "rights":          [
          "accountNetwork.users.view",
          "accountNetwork.partners.view",
          "accountNetwork.partners.create"
           ]
    }

    /api/v1/profiles

    Returns a paginated list of profiles with their complete details.

    It is possible to restrain the result list using criteria parameters.

    The fields parameter has to be defined in order to specify the attributes of the profile which will be returned.
    If fields parameter is missing, only the following attributes of the profile are returned : uid, name.

    More information about paging, filtering, and sorting here

    Request

    GET https://na.airvantage.net/api/v1/profiles?fields=uid,name,rights

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    ...
    {
       "items":    [
                {
             "uid": "cfa598a9baaa4393ac1173eef4000245",
             "name": "profile1",
             "rights":          [
                "accountNetwork.users.view",
                "accountNetwork.partners.view",
                "accountNetwork.partners.create"
             ]
          },
                {
             "uid": "d42ac7b66f324e3d91502c752b5863c8",
             "name": "profile2",
             "rights":          [
                "accountNetwork.profiles.createEdit",
                "accountNetwork.profiles.view"
             ]
          }
       ],
       "count": 2,
       "size": 2,
       "offset": 0
    }
    Name Description Use Default Type Operand
    uid Find profile with an uid matching the specified id. optional null uid string =
    name Find profiles which name is like the specified string optional null string like
    company Set the context company. optional caller's company uid =
    HTTP Method GET
    Requires Authentication Yes
    Rate Limited Yes
    Headers None
    Permissions accountNetwork.profiles.view
    Fields uid, name, rights

    /api/v1/profiles/{uid}

    Returns detailed information about the specified profile.

    Request

    GET https://na.airvantage.net/api/v1/profiles/63ee28685c8c4ad0a7e408f88abaffc4
    ...

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    ...
    {
       "uid": "63ee28685c8c4ad0a7e408f88abaffc4",
       "name": "MyProfile",
       "rights":    [
          "entities.applications.view",
          "accountNetwork.users.view",
          "accountNetwork.partners.view",
          "accountNetwork.partners.create",
          "entities.applications.release"
       ]
    }
    Name Description
    profile.unknown.profile The specified uid does not match with any profile.
    HTTP Method GET
    Requires Authentication Yes
    Rate Limited Yes
    Headers None
    Permissions accountNetwork.profiles.view

    /api/v1/profiles

    Creates a new profile in the context company. A name and a collection of rights are required.

    Request

    POST https://na.airvantage.net/api/v1/profiles
    Content-Type: application/json
    ...
    // with the following content
    {
       "name" : "operator",
       "rights" : ["entities.applications.view", "accountNetwork.users.createEdit"]
    }

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    ...
    {
       "uid": "ee81d84aec5b4d4397ead51b823b76a7",
       "name": "operator",
       "rights": ["entities.applications.view", "accountNetwork.users.createEdit"]
    }
    Name Description Use Default Type
    company Set the context company. optional caller's company uid
    Name Description
    profile.missing.name A name must be provided.
    profile.missing.rights A list of rigths must be provided.
    profile.unknown.rights Some rights in the list do not exist.
    profile.exists The specified name is already set to another profile.
    value.too.long Provided name is bigger than 50 characters.
    HTTP Method POST
    Requires Authentication Yes
    Rate Limited Yes
    Headers Content-type: application/json
    Permissions administrator

    /api/v1/profiles/{uid}

    Edits an existing profile. Name field cannot be set to null. Empty right list is not allowed.

    Request

    PUT https://na.airvantage.net/api/v1/profiles/ee81d84aec5b4d4397ead51b823b76a7
    Content-Type: application/json
    ...
    // with the following content
    {
       "name" : "operator",
       "rights" : ["entities.applications.view", "entities.applications.release"]
    }

    Response
    200 OK

    ...
    {
       "name" : "New Company Name",
    }
    Name Description
    profile.unknown The specified uid does not match with any profile.
    profile.missing.name A name must be provided.
    profile.missing.rights A list of rigths must be provided.
    profile.unknown.rights Some rights in the list do not exist.
    profile.exists The specified name is already set to another profile.
    value.too.long Provided name is bigger than 50 characters.
    HTTP Method PUT
    Requires Authentication Yes
    Rate Limited Yes
    Headers Content-type: application/json
    Permissions administrator

    /api/v1/profiles/{uid}

    Deletes a profile. If and only if it is not affected to a user or a partner

    Request

    DELETE https://na.airvantage.net/api/v1/profiles/a86e9a3ff1df4a13b39c24f48f1967ed

    Response
    200 OK

    HTTP/1.1 200 OK
    Name Description
    profile.unknown The specified uid does not match with any partner.
    profile.being.used when it is affected to a user or a partner.
    HTTP Method DELETE
    Requires Authentication Yes
    Rate Limited Yes
    Headers None
    Permissions administrator/none
    TOP