Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Documented already exists status code

...

Please note, that credential sets can also be managed in the opConfig GUI and the opconfig cli.

Summary

OperationMethodAPI
Get a list of Credential SetGEThttp://server/en/omk/opConfig/api/v1/credential_set
Get a Credential SetGEThttp://server/en/omk/opConfig/api/v1/credential_set/NAME
Create a Credential SetPOSThttp://server/en/omk/opConfig/api/v1/credential_set
Update a Credential SetPUThttp://server/en/omk/opConfig/api/v1/credential_set
Delete a Credential SetDELETEhttp://server/en/omk/opConfig/api/v1/credential_set
Assign a Credential Set to a nodePOSThttp://server/en/omk/opConfig/api/v1/credential_set/NAME/NODE
Unassigns a Credential Set from a nodeDELETEhttp://server/en/omk/opConfig/api/v1/credential_set/NAME/NODE

Methods

Get

GET http://server/en/omk/opConfig/api/v1/credential_set

...

POST http://server/en/omk/opConfig/api/v1/credential_set


Successful Response

HTTP Status

Body

Description

200 JSON objectReturns the credential set (With the password obscured).

Unsuccessful Response

HTTP Status

Body

Description

422Unprocessable EntityString with an error message

Example: A resource called "router1credentials" already exists!

Request example:

Code Block
{"always_privileged": "0",
"description": "the default nmis user",
"lastupdate": 1625045906,
"setname": "nmis",
"ssh_key": "",
"username": "nmis",
"setname": "testapitestapi2",
"password": "1234v&SYI2,LQiQ4ZSgCQa"
}


Response:

Code Block
{
    "always_privileged": "0",
    "description": "the default nmis user",
    "lastupdate": 1645007389,
    "password": "*****",
    "setname": "testapi2",
    "ssh_key": "",
    "username": "nmis"
}

...

Code Block
{
    "always_privileged": "0",
    "description": "new description",
    "lastupdate": 1645007389,
    "password": "*****",
    "setname": "testapi2testapi",
    "ssh_key": "",
    "username": "nmis"
}

...